Article View: rec.games.programmer
Article #1476Re: Xmode Scrolling
From: Baylor
Date: Sun, 15 Nov 1992 23:09
Date: Sun, 15 Nov 1992 23:09
26 lines
1873 bytes
1873 bytes
> What I am wondering is how games do scrolling (smooth) with a static >piece any other place on the screen, such as on the left. > Honestly, they do it completely different then the way you think. They don't scroll anything onto the screen. Virtual screens are almost always to short for anything except demos and title screens (at which point it looks very nice). They define an array of screen tiles for background (not jill, alligators or such) and then do a putpic-type blit for each visible screen, that is, they constantly redraw it! Ok, get yourself a scratch piece of video memory. Put down the background (can be done with movsw), each tile hopefully like 16*16 or 32*32. Then put down things that go over the background, keeping in mind their priority (if two things collide on the screen, like the birds and alligators, which overlaps which? Depends on the order they're put down, so keep that in mind). Then lastly draw the things that masks everything else, like the words DEMO in keen or other words on jill (or anything you can walk behind that masks you, like columns and hidden tunnels). That's also how you can have teh score on top or on the side and scroll in a window, like in duke pukem. Someday look at the intro to Ultima 6. Turn your machine down to 4mhz and use the pause button alot - you'll see that it doesn't scroll smoothly and that you can catch it before it finishes a redraw, something that doesn't happen by scrolling with the start address. - baylor
Technical Details
Message-ID:
<83704@ut-emx.uucp>Path:
arc1-ca.pugleaf.net!sparky!uunet!gumby!wupost!cs.utexas.edu!ut-emx!ccwf.cc.utexas.eduShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gumby!wupost!cs.utexas.edu!ut-emx!ccwf.cc.utexas.edu From: baylor@ccwf.cc.utexas.edu (Baylor) Newsgroups: rec.games.programmer Subject: Re: Xmode Scrolling Message-ID: <83704@ut-emx.uucp> Date: 15 Nov 92 23:09:14 GMT Sender: news@ut-emx.uucp Organization: The University of Texas at Austin, Austin TX Lines: 28