Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Scroll Theory

This topic is 5367 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Allright ladies and gents, here''s the deal. I''m working on a basic 2D game with sprite animation. I need to move the window around the "world" basically just like in Diablo or any other "top view" game. It''s a quite simple game, and I''m not doing anything fancy, just a big map array of tiles that make up the world, and sprites for the player and enemies. The thing that may greatly decrease the amount of help I get from this post is that I''m programming on a Macintosh using quickdraw as my graphics driver. I really don''t think it should be as hard as I have found it to be because I would think the Mac would have enough processor speed and memory to do simple blits quickly. I will need to redraw the entire screen every frame, of course, but I am in desparate need of optimization. I''ve created an offscreen buffer that holds the background image, then I just copy it to the screen. I move the world around in the offscreen, draw the new area, then....what. 1.Do I draw my player and any other changing images onto this offscreen and copy the whole thing to the window?(Which means I would have to erase the images that change in order to prepare for the next frame.) 2.Or...Do I draw just the background image onto the offscreen, copy it to the window, then draw the player/enemies onto the SCREEN?(The changing images would then just be copied over on the next frame. Basically what is faster? Should I write my own blitting routines, should I use a mask (CopyMask())? Any assistance would be appreciated. (onecaracarn@hotmail.com)

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!