Slimelite BBS

Wavs and Virtual Screens

Back to CYBER

From Robin Beckett · 1996-04-03 03:55 · #74576 in CYBER

Greetings Joz!

25 Mar 96 17:09, Joz Ong wrote to All:

 JO>            (You know, for example.. you create a starfield background in
 JO>            320 x 200 mode , 256 color, and then you want a ship to go thru
 JO>            But, you don't want the ship erasing the pixels as it moves
 JO> along.)          Someone said to prevent this.. I need to use a Virtual
 JO> Screen.

Sorry, I don't program in BASIC or QBASIC, I'm a Pascal man myself, but what your asking about sounds familiar. I'll ask my friend Ian for more information, but I think what is meant by a 'Virtual Screen' is more a matter of screen pages. Each screen mode (I think) has two screen pages. The idea is to draw the screen on one page and display it while you draw on the other one. This gives the appearance of smooth movement.

Now, this is one way of doing the above effect, you just redraw the stars and the ship in a different position and then swap to that screen. I think there is another method, like you said, to have the ship move along. I think with the proper code you can have a 'mask' taken of the background. The ship then gets drawn, and then the background is replaced, and the ship is moved over a pixel. It sounds complicated, but isn't too hard at all once you get down to it. :)

I'll have to show you an example sometime.

See ya,

RTB     *Suburban Wolf*         InterNet: subwolf@compuserve.com
        FidoNet: 2:2500/708     CIS: 100076,1260

... A long time ago, in a galaxy far, far, away...
--- FMail/386 1.02
 * Origin: The Arctic Wolf BBS, +44 1283 539529, 24hrs, Arroooo! (2:2500/708)