• Advertisement

Archived

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

Scroll Theory

This topic is 5105 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

  • Advertisement