Sign in to follow this  
EmilDenVige

DirectDraw performance problem

Recommended Posts

Hello, my name is Emil and recently me and my friend started a small project, a space sidescroller. A sidescroller like that seemed to be simple enough for me as i am quite new with this stuff. I was wrong. =) Just kidding, it's going very well, but now i encountered a problem i can't get around. I'm having performance problems =( The thing is, the only limit i have is checking if there has been 0 ticks between the renders. I think i am getting a very high framerate, but the framerate is instable. For instance, when i move the "ship" around the sceren, it does not move with a constant speed. I used to have a application.doevents, but i just removed it and got a much higher framerate. If i set the ticks to around 30 per render my ship moves with a constant speed, but the framerate is then noticable.. I'm using vb.NET I don't have any experience with this so don't take for granted i've done those things everybody else always does =) I'm thinking i must have missed something very important.. Any help would be greatly appreciated. Thanks!

Share this post


Link to post
Share on other sites
I believe what you need to look into is time-based movement as opposed to frame based movement. Using time based movement, no matter what the framerate is, the ship will move at the same speed, it will just look smoother at higher framerates.

There are a number of articles on this site, in the game programming section about the technique.

Share this post


Link to post
Share on other sites
Right on! Thanks for the quick reply mate!
It sounds very sensible, i looked around the articles before, finding nothing but i'll look a bit closer now :P

Anyways, i think i see what time-based movement is about tough. Thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this