new topic     » goto parent     » topic index » view thread      » older message » newer message

Hello Ferdinand,


>Thanks for all the help with my last questions .
>Does anyone here know how to scroll a level ? This is truely the last =
>thing I have to know to have my game on the right path . Please , ANY help
>will be very helpfull. Else I am gonna have to go on a nother crusade to
>find someone to help me . Thank.
>
>Ferdinand

Okay, you asked for ANY help. Without knowing exactly how
your game works, I'll have to give you very GENERAL help.
Scrolling is a simple concpet: all that it really means is
displaying to the screen a slightly different position of
the world. If you are using bitmaps, you should have a
separate image for the view area. All new drawing should be
done to this "buffer" image. The buffer should then be copied
to the screen when all drawing is done.
The concept of scrolling is simply drawing a changing location
of the game-world onto the unchanging location of the screen.
Pseudocode follows:

game loop
  calculate new game data (positions etc.)
    change view position
  draw new game data to buffer relative to view position
  copy buffer to screen
end loop

later,
Lewis Townsend
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu