A86: Tile based games


[Prev][Next][Index][Thread]

A86: Tile based games




>Anyway, since I am working on a tile based game,
>you will in the future find tutorials on my web 
>site about tile based techniques, smooth scrolling 
>and page scrolling, and the like.


Please help:

I know that in order for a tile\sprite to scroll every pixel in that
sprite must be shifted (SLA=left, SRA=right, ???=up, ???=down) to which
ever direction that it is supposed to move, multiple times.  But what
about the pixels that get bumped off the sides.   


Suppose we want to move the sprite left, one pixel.

00000000   11101110
00000000   10001000
00000000   11101000
00000000   00101000
00000000   11101110
00000000   00000000
00000000   11111111
00000000   00000000

A SLA for each byte leaves us with:

00000000   11011100
00000000   00010000
00000000   11010000
00000000   01010000
00000000   11011100
00000000   00000000
00000000   11111110
00000000   00000000
       ?
But what about the missing column?

Would the contents of the carry flag be copied to BIT 0 in the next byte,
and then the byte to the left would also have to be SLAed?

Is this how to scroll?
If it is, then how do I scroll up or down?



_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]


Follow-Ups: References: