Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
3  
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? –  Byte56 Jun 24 '13 at 14:26
add comment

1 Answer 1

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.