[comp.sys.amiga.tech] large scrolling areas, as in a game

jojo@astroatc.UUCP (Jon Wesener) (10/06/88)

    I'm trying to create a long continuous display that can scroll left to
right as done in many arcade games.  Thing is, I think I'm limited to a
width of 1024 pixels in which I figure I can fit about 3 screens worth
of data.  

	But, I want around 7-8 screens worth of scrolling and can't figure an easy
way to make the scrolling continuous with 3 screens worth of data without
copying the last screen over to the beginning of the scroll region and then
when I'm about to walk out the edge on the right, start at my copy on the
left.  This sounds time consuming copying the right edge over to the right,
and believe it would make the scrolling jumpy.  But I've seen games like
gold-runner which scroll large areas across the screen at impressive rates.

	My guess is they use a super-bitmap and have copied the bottom edge
to the top of the next row and whip through it as I mentioned above.  I
suppose I could do this, but I want/need to double buffer and don't think
I have the memory for 2 super bitmaps along with other graphix without
cutting the number of bitplanes down to 4, ugh.

	Could someone advise me on whether this is the only way to do it, or
offer a solution cuz I'm stuck.  

thanx in advance,
--j
-- 
... {seismo | harvard } ! {uwvax | cs.wisc.edu} ! astroatc!jojo
    "They weren't just any women...  They were women fresh from Hell, with
	wisps of devil-smoke curling behind their ears and unholy vapors hiding 
	in their tight leather dresses, looking for Mr. Right." 

amorando@euler.uucp (Alex Morando) (10/07/88)

In article <1214@astroatc.UUCP> jojo@astroatc.UUCP (Jon Wesener) writes:
>
>    I'm trying to create a long continuous display that can scroll left to
>right as done in many arcade games.  Thing is, I think I'm limited to a
>width of 1024 pixels in which I figure I can fit about 3 screens worth
>of data.  

You should tell us why you are limited to 1024 pixels, as I myself cannot
see any such limitation.

My idea is:

Do not have a huge bitmap. Only have a normal sized one, say 320x200. At
the bottom have as many extra lines as you want screens, say 10. SO: in
memory you have a 320x210 pixel bitmap.

To do the horizontal scrolling, update the bitmap pointers one word at
a time, thus pushing the display to the right. For each new word, write in
an entire column of new data one word wide. Do the same for scrolling left.
THere could be trouble if you want the display to wrap around.

So what happens is, after 20 words are shifted in, the display is now
displaying the same bitmap, but one line down, and the whole bitmap has
been updated to new stuff. Horizontal scrolling is thus very simple and
does not use a lot of memory.

David Ashley
amorando@euler.berkeley.edu
Guest on this new account.

ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (10/11/88)

In article <1214@astroatc.UUCP> jojo@astroatc.UUCP (Jon Wesener) writes:
>    I'm trying to create a long continuous display that can scroll left to
>right as done in many arcade games.  [ How can I do it? ]

	Try a tile-oriented approach.

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape	INET: well!ewhac@ucbvax.Berkeley.EDU
 \_ -_		Recumbent Bikes:	UUCP: pacbell > !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
"Work FOR?  I don't work FOR anybody!  I'm just having fun."  -- The Doctor