Jump to content
  • Advertisement

Archived

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

Game Smoothness ?

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

Firstly, I''d like to mention that I sincerely hope GameDev makes it through this difficult period. Unfortunately, I have no way of contributing (Being in South Africa, our money is worth sh*t, and my time is also incredibly taxed) Onto my ''beginner'' problem My trouble is that my game runs ''jumpy''. Its a VC++ Win32 App game, and the logic is run in a separate thread. The reason I did this is to make the development easier (I don''t need to worry about interrupting the messaging loop) But even on THREAD_PRIORITY_HIGHEST it does not run as smoothly as I would like. Could someone give me some insight into how THEY develop their games to run smoothly? The light at the end of the tunnel is probably oncoming lights of the train

Share this post


Link to post
Share on other sites
Advertisement
Well it depends on what you mean by smoothness? Do you mean frame rate? Do you mean characters are not animating smoothly? In order to fix the problem, you must know what the problem is.

This is a question of "When to optimize" Through every project I have been on (4 games, 4 years) there is a point where you hae to optimize. Optimizing too early gets you into trouble. You must take a step back and find out what the biggest bottle neck is in the entire system.

On PC, VTune can help you gain insight into what is going on with your game. Is the AI taking too long? Is the Rendering taking too long? Is the communication between your two threads causing the problem?

Sounds like you need to go on a good fact finding mission. Also maybe adding some realtime profiling inside of your code can help. Block out systems in your game that you want to time. Such as Collision, AI, Drawing etc... You might be suprised at the results...

-JT

Share this post


Link to post
Share on other sites
Thanks for the reply.
Maybe I should have been a little more specific:

I''ve eliminated things so that I know its not the speed of any particular element in my game.
However, as its a multi-processing OS (Windows98), it seems my thread gets interupted in little bits - all the time.

End result = random jumpiness in graphics + rules.
By random I mean that the jumps are not steady.
eg. XXX--X-XX-XXX-X--X-X-XXXXX-XXX
where ''X'' is a frame and ''-'' is a gap (no processing)

Not random would be : XXX-XXX-XXX-XXX

How do you usually make your games? with separate threads?
if so - how many and for what?
If not - how?

Thanks again

--------------------------------


The light at the end of the tunnel is probably oncoming lights of the train

Share this post


Link to post
Share on other sites
Ahh - granat - I AM using GetTickCount.

That may be the cause.

How do I use HighPerformanceTimer? is it an API call too?

The light at the end of the tunnel is probably oncoming lights of the train

Share this post


Link to post
Share on other sites
You can use a Mutex and consider the rendering thread a critical section that should not be interrupted. Definitely switch to the highperformancetimer for accurate time measurements.

Give that a shot

-JT

Share this post


Link to post
Share on other sites
Thanks guys!
I''ll try that tonight (its 4:23PM for me now)

For the GameDev staff:
Would you have a problem with me writing articles - considering that I''m still (relatively) a beginner?

The light at the end of the tunnel is probably oncoming lights of the train

Share this post


Link to post
Share on other sites
Uuh - I just realised - I still dunno how to use the HighPerformanceTimer.

I''ve seen it somewhere - but usually ignored it.

Could someone give me a push

The light at the end of the tunnel is probably oncoming lights of the train

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!