Jump to content
  • Advertisement

Archived

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

AlexM

just curious

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

in tile based games like starcraft, i suppose when the camera was being moved they had to redraw all the tiles and blit the sprites on top of them, every frame. BUT, do they do that when the camera is stationary?? In that case they could preserve the background without redrawing the whole thing... which is it?? thanx in advance

Share this post


Link to post
Share on other sites
Advertisement
It is possible to use a ''dirty rectangles'' technique but it''s difficult to know whether Starcraft uses it. In this technique, you keep track of which portions of the screen have been changed each loop and only redraw those. I am guessing that Starcraft probably just redraws the whole screen every frame since they have to do that anyway when scrolling the map and the added complexity of writing a bunch of dirty rectangle code probably isn''t worth the effort in this case. Dirty rectangles are a better solution for an application or game where, usually, little of the screen changes every frame. (for instance, I believe that Win9x uses a dirty rectangle technique)

Share this post


Link to post
Share on other sites
IMHO u keep ur current "map on screen" on a surface in video memory if possible and just do a blit from it to back buffer (no color key no clipping) this makes it fast...
Until Scroll around ....then u can go 2 ways
1.remake hole on screen portion of map
2.make a blit from terain to terain in the "right" direction and the just fill in the rest (row or column)

Anyway both methods work OK and are fast...

On Starcraft....who can know how the make it...i have seen some tearing there if the game is on "slow" ...but they wrote it in C++ ... in my ASM game there is no problem

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!