DirectX and Frame Rate

Started by
10 comments, last by Fnjord 24 years, 3 months ago
woo! windows calls to crash my machine, I gotta try that out- alright to update again, I am using all of teh screen so I got rid of the color fill, but still I get 7 frames per second, I think optimization is what I need, but I''m drawing tiles from an array so how could I access my data members without a lot of dereferencing? I probably need to include some source code to make this make sense, but I don''t want to take up too much space in teh discussion- essentially- I have a vector of vectors of my class of tiles. I pass a pointer to this array to my display tile function and it goes through and blits each one to the back buffer. I''m thinking about jsut having a huge offscreen surface(my current *read: bad* idea) that it initialized with the array of tiles and then the display coudl jsut take 640x480 chunks out of it each blit- any further thoughts?
-Fnj
--- Incompetence is a double edged banana---
Advertisement

Try creating an offscreen surface to hold the displayed
14x16 tiles. Draw your tiles into this surface and then
bltfast the whole thing into your frame buffer.

If you keep an additional 14x16 matrix that tracks which
tile is drawn in each cell of the offscreen surface, you
do a quick comparison and see if you need to redraw each
tile on each subsequent pass through the map drawing.

This topic is closed to new replies.

Advertisement