A86: Re: Tile based games


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

A86: Re: 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.

>But what about the missing column?


You must fill that missing column in. In tile based worlds it is a little
difficult. I have a smooth scrolling map program
that I wrote that does the trick. I will not post the code here and may not
in the future. After all, this is the game me and David
Phillips are working on. I have not even talked to him in over two days I
may have to work on this project independently.. anyway, what you basically
must do is find the tile that the scroll routine is going to need to redraw.
Then you apply a bitmask with 1-bit set that determines what part of that
sprite is needed, and you do this for 8 rows and 8 sprites until the whole
64 bit column in height is filled... Make sense?

It probably doesn't. But I am going to make a huge section on my web site
that explains how to do this. Since there is a lot to cover and a lot of
graphics to lay out that is essential in understanding this, it could take
up to a week or two to get just that one section done. Plus I am buying a
computer pretty soon (maybe).. soo..

A full taste of smooth scrolling will be on my site. If you are impatient,
print out the source to SQRXZ and figure it out yourself. It took me 16
hours to get it working and 2 hours for the other direction (I learned from
many mistakes). I am not just going to give away my source code so someone
can cut and paste and not learn a thing. It will be combined with a tutorial
so you can really learn what is going on and it will reinforce what I
(recently) learned.

Later,
    Matt