ScumSoft, on Wed Sep 14, 2011 5:18 PM, said:
I would just do this instead:
dim color = a
dim FrameNum = b
rem set starting color
color = $40
Loop
drawscreen
FrameNum = FrameNum + 1
rem cycle color from 40 and 46 every other frame
if FrameNum{0} then color = color ^ 6
COLUBK = color
goto Loop
I was working under the assumption that he wanted to limit RAM usage, and have an effect that was simple to restart and stop after two iterations. My version uses 22 more bytes of ROM, but it only uses 1 byte of RAM and resets to defaults after two flashes.
And - maybe I was wrong in assuming this - but I figured that the "flash" effect itself was something that would start when a certain condition was triggered, like a ship being smacked with a missile, and stop after a certain duration.
In that spirit, I put together a little demo showing how 9 bits can be used to trigger a color & sound event. This could be optimized in a bunch of ways (including storing both the color and sound effect in a single data table), but I get the feeling that this is somewhat along the lines of what RT was looking for.




Send me a message
Find content
Male
Display name history

