Advertisement

Tough decision!

Started by January 11, 2002 03:02 AM
1 comment, last by ghost1206 22 years, 11 months ago
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
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)
Advertisement
Thanks! You are right about the fps counter (I was just too lazy to include it in the program! I guess I can''t avoid it anymore.

This topic is closed to new replies.

Advertisement