Jump to content

  • Log In with Google      Sign In   
  • Create Account

measuring efficiency in a game


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 too_many_stars   Members   -  Reputation: 213

Like
1Likes
Like

Posted 05 February 2014 - 05:11 PM

Hello everyone,

 

I have a general question I have been thinking about for some time. My gaming experience so far has involved 2D side scrollers. Every now and then I read up on statements such as "trig ratio functions are resource expensive" and "SDL rotozoom should not be used as it's too costly."

 

I am sure that these statements are true, but how does a newbie game developer measure or keep track of how resource intensive a game is? Obviously when the application slows down I know too many resource are being used, but are there are programs, strategies or advice that someone can tell me about which will point me in the right direction in measuring program efficiency?

 

Thanks,

 

Mike



Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 6304

Like
6Likes
Like

Posted 05 February 2014 - 05:17 PM

Google: Profiler.


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 frob   Moderators   -  Reputation: 22718

Like
4Likes
Like

Posted 05 February 2014 - 09:45 PM

A profiler is the tool to use, but a bit of a longer description is probably in order as this is For Beginners forum.

 

 

The cost of doing something is relative.

 

The cost of floating point operations is expensive relative to the cost of pure integer operations, but modern games use floating point numbers all the time.

 

The cost of accessing data on the disk is much greater than accessing data already in memory, but people load data from disk call the time.

 

A profiler is a tool that measures how long things take. They have a bit of a learning curve, but once you learn how to use them you can isolate the approximate cost of just about anything. Over time as you gain experience, you will come to learn approximately how long things should take.

 

You might discover that your code is making millions of calls to strlen() every frame, or that 70% of your time is being spent in memory allocation, or that your pathfinder requires 8ms to run. Once your experience teaches the patterns and timings that are common you will learn to quickly identify performance metrics that are problematic.


Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I write about assorted stuff.


#4 too_many_stars   Members   -  Reputation: 213

Like
1Likes
Like

Posted 05 February 2014 - 10:29 PM

Thanks for the advice guys, I will check out this profiler. It's incredible how much there is to learn in game programing.

 

Mike






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS