jpospTynker 2025-07-18 21:51 (Edited)
read title. also, how do i stop sprites and cells from wrapping around from the top when they get too far off the screen.
was8bit 2025-07-18 21:57 (Edited)
Go here...
https://lowresnx.inutilis.com/topic.php?id=3737
And pay attention how sprite coordinates differ from cell image coordinates...
.... then simply read a sprites coordinates as it move, and restrain how far it goes
was8bit 2025-07-18 21:58
Raster interupt is something totally different...
wryhode 2025-07-18 21:59 (Edited)
Raster interrupts are SO neat and useful! To use them here is also very simple:
SUB
that takes a single argument (RASTER
). E.g. SUB RASTERFX(RASTER)
. The RASTER
argument will be the line number of the screen that is about to be drawn. (0 - 127)SCROLL 0, SIN(RASTER / 40) * 8, 0
ON RASTER CALL {name of your SUB}
wryhode 2025-07-18 22:04 (Edited)
Sprites overflow because their position is stored as a byte, which wraps to 0 when over 255. You can prevent this in code by checking if the coordinate the sprite is getting drawn to is within the screen coordinates.
yeah, or listen to was8bit!