Archived

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

ghost1206

Tough decision!

Recommended Posts

ghost1206    122
Dear, I am trying to implement a game using DirectX during my free time, but I run into a problem and I am facing a dilemma concerning the way I should solve it. What I am trying to make is a strategy like civilization (the main map made of little diamond-shaped tiles) and I am currently trying to implement the scrolling part (the user brings the mouse pointer to one of the sides of the screen and the map should scroll to the opposite direction). I figure there must be two solutions to this. One is to blit the frame diamond by diamond starting from an X+1 diamond and the other one is to blit the whole frame as it was shifted by one diamond size and then blit the missing column (or row if we are scrolling vertically). I managed to make both solutions work but I am not sure which is the most efficient and why. I would very much like to have your guidance on this. Dimitris

Share this post


Link to post
Share on other sites
Sandman    2210
The second solution sounds a lot better to me. The best way to check this would be by running it and seeing the difference (having an fps counter and/or a profiler running might help if the difference is hard to see)

Share this post


Link to post
Share on other sites