1 decade ago
by empika
Hey
I just knocked up a quick plugin to make it easy to display any debug info you may want to, including the FPS.
You can grab the code here
https://github.com/empika/ImpactJS-Plugins
It's pretty easy to use, there is a sample bit of code in the readme for the repo.
Cheers and hope it helps someone :)
Edd
Hey just wanted to say thanks for writing this! Very helpful, and it was easy to use.
1 decade ago
by MikeH
Big thank you from me too, very helpful!
1 decade ago
by davidx
Thanks a lot Ed. Do you have any functionality for calculating the averages for full game run? Average fps etc?
Thanks.
1 decade ago
by empika
Hey folks
Glad you have found the plugin useful.
davidx, there is no average for full game run, i'm sure I could add it fairly quickly though. I guess you would just take a sample of the framerate once every 10 seconds or so.
I'll see if I can do this sometime this week :)
1 decade ago
by empika
Hallo!
I have updated the plugin to get an average fps over time. I hope this was what you were after davidx.
You can now do:
// this.debugDisplay.draw(info, display_fps, display_average, average_time, interval_count)
// info, array: this will display each array element on a new line
// display_fps, bool: pass in true or false to either show the FPS or not. defaults to true
// display_average, bool: pass in true or false to either show the average FPS over a period of time or not.
// defaults to false
// average_time, integer: amount of of time between samples. defaults to 10000 (10 seconds)
// interval_count, integer: amount of samples to take over time. defaults to 500
this.debugDisplay.draw(["my", "info", "here"], true, true, 10000, 100);
It will basically take a sample of the current FPS every 'average_time' seconds, 'interval_count' amount of times. In the example above, it will take a sample every 10 seconds, 100 times.
I've limited it to this to stop the framerate calculation time taking too long as it has to sum all of the array values each time it is called, if that array is massive (ie, there was no limit) it could end up taking a substantial amount of time and in the end impact the framerate itself.
If anybody knows a quicker way of summing all the values of an array then please let me know, or submit a patch to my repo.
Check out the code on
https://github.com/empika/ImpactJS-Plugins
Also, ive created a new plugin to click on elements. See the other thread i'm about to write for that :)
Cheers
Edd
1 decade ago
by empika
Just quickly added the min and max to the average FPS output.
1 decade ago
by davidx
Hey,
Thanks a lot Edd!!!
Ill have a look at this later!
Thanks again!
Dave
That is so useful. Thanks a bunch for this.
Alex (new here; bought impact yesterday)
1 decade ago
by dominic
alexandre: Impact 1.18 has a
Debug Menu included already :)
Oh. Please forgive me. "my impact not very good". :$
Page 1 of 1
« first
« previous
next ›
last »