0
\$\begingroup\$

Our game (Android based) traces how long it takes to do the world logic updates, and how long it takes to a render a frame to the device screen.

These traces are collected every frame, and displayed at a constant interval (currently every 1 second).

I've seen games where on-screen data of various engine subsystems is displayed, with the time they consume (either in text) or as horizontal colored bars.

I am wondering how to implement such a feature?

\$\endgroup\$
1
  • 3
    \$\begingroup\$ It sounds like you're on the right track. What portion of this are you having trouble with? It's hard to answer this question at the moment because you don't say what you need. You need help implementing it graphically? You need help collecting more data? \$\endgroup\$
    – House
    Jun 24, 2013 at 14:26

1 Answer 1

2
\$\begingroup\$

You basically time your function calls and then store those timings in some kind of database. You can then add a debug overlay mode to your game and display those timing values.

Niklas Fryholm's wrote a post on the bitsquid engine's development blog which I used as a starting point:

http://bitsquid.blogspot.de/2011/05/monitoring-your-game.html

When you have the basics working most of the further work is identifying what data you want to collect and how you want to display it.

I found looking at screenshots from RAD's Telemetry quite helpful in this regard: http://www.radgametools.com/telemetry.htm

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .