HTML 5 Profiler #3
by Eric Preisz · 08/31/2012 (11:29 pm) · 12 comments

Previous Posts
HTML 5 Profiler #1
HTML 5 Profiler #2
It’s been a few hectic weeks here at GarageGames and I haven’t been able to work on my Innovation Friday project nearly as much as I had hoped (at least on Friday). So for me, I’ve been innovating more on weeknights after 9pm then I have been on Fridays. But the good news is that I am making progress. Here’s an update:
I’ve used Javascript before, but never to do anything complicated. I’m surprised how long it took me to figure out how to implement inheritance. A lot of the documentation I found online was misleading. It’s not a blocker to work with Javascript, but it’s not necessarily intuitive for someone who’s been writing C++ for over 17 years.
I’ve built a framework for testing performance. My core objects are Core and Stat Block.
Core provides the base functionality for performance tests. I’ve implemented one test which is basically an example test. Core starts timing before the main function and ends it after the test finishes.
Javascript’s timer is low resolution and I’m guessing the variance is somewhere around 1 to 10 milliseconds which isn’t a big deal for a web page, but way too coarse grained for accurate timing. So in order to time tests, they are going to need to iterate many times to account for the errors of an inaccurate timer.
Currently, I’ve implemented two different iterations, once that occurs within the test and one that runs the test multiple times. The first iteration (the inner iteration) accounts for the low accuracy of the timer, the second iteration (the outer iteration) accounts for performance inconsistences that can occur. These iterations feed the stat block.
The stat block records information about a set of tests. Currently, I’m collecting the mean, max, min, and std deviation of each set of tests. We divide the total time by the inner iteration count to get the approximate timing of one iteration.
I’ve done some very basic UI work and I’m planning to do enough to make the test application functional. It won’t be pretty . I will be away on travel next Friday, so hopefully I’ll get the chance to work on this project some more while I travel. I’m really close to being able to put this on GitHub so that I can share it with others.
Next steps are: 1) Finish functional UI 2) Write some documentation on how to make a good test 3) Post it on GitHub
About the author
Manager, Programmer, Author, Professor, Small Business Owner, and Marketer.
#2
Did you already post a link of where this stuff is going on github? I certainly would like to check this out.
09/01/2012 (11:48 am)
Haha, I didn't know you could even do inheritance in JavaScript. Did you already post a link of where this stuff is going on github? I certainly would like to check this out.
#3
09/01/2012 (11:52 am)
I Agree with GUY Allard! It has been long time, no NEWS on our Investment.
#4
-and I'd love an follow up to the 'coming news' statement 20/7 ;)
09/01/2012 (1:35 pm)
Eric, I do respect that you guys do sidebone stuff to keep the spirit up, but I can only agree 100% with Guy Allards post above. The engines is what brought us together, and why we linger!-and I'd love an follow up to the 'coming news' statement 20/7 ;)
#6
09/01/2012 (11:18 pm)
Sorry guys, news coming soon. My guess is that we will be sharing a big announcement on the 11th or sooner.
#7
09/01/2012 (11:21 pm)
@Frank - I was planning to move everything to GitHub on Friday but my day was consumed. I'll post it on my next innovation day.
#8
@Eric, apologies for hijacking.
09/02/2012 (12:12 am)
Thx Novack, for some reason I hadn't seen that blog.@Eric, apologies for hijacking.
#9
09/02/2012 (1:43 am)
@Eric: What's your GitHub username? I'd like to follow you so I don't miss the update. Thanks!
#10
As for that blog which is huge, yes I know comments did come out there, but that shouldn't be the place to find information.
With the lack of release information and bugs here and there, I have currently decided to look in to using CryEngine 3, yes its nice we have source etc etc, but the fact is it needs to have more out of the box, 1.2 of T3D was a great release but nothing has happened since as far I know, no updates or even a roadmap for future releases. And so I've been looking else where and starting a project on CryEngine 3 as I said, and leaving the T3D one on hold, or will plan to move it after smaller projects are completed.
And from the looks of it so are GG with people wanting to work on UDK instead of doing the same with T3D.
I'll look forward to the 11th, but please GG keep in touch in the future.
09/04/2012 (9:09 pm)
I agree with Guy, although its nice you get to have fun and investigate other things outside of T3D/T2D but really it's all we see you all do.As for that blog which is huge, yes I know comments did come out there, but that shouldn't be the place to find information.
With the lack of release information and bugs here and there, I have currently decided to look in to using CryEngine 3, yes its nice we have source etc etc, but the fact is it needs to have more out of the box, 1.2 of T3D was a great release but nothing has happened since as far I know, no updates or even a roadmap for future releases. And so I've been looking else where and starting a project on CryEngine 3 as I said, and leaving the T3D one on hold, or will plan to move it after smaller projects are completed.
And from the looks of it so are GG with people wanting to work on UDK instead of doing the same with T3D.
I'll look forward to the 11th, but please GG keep in touch in the future.
#11
While I understand that we've been very quiet, we are working ten hour days Monday-Thursday to fulfill the commitments to our investors and then we get to use Friday to work on our personal projects using company resources. No one is losing in what we are doing. My audio game in UDK is not taking away from T3D resources, and it is providing us with a real-world project using a competitor's tools. That's worth more than a marketing bullet list of features. A real-world comparison of friction points is invaluable in the tools business. Eric's HTML5 profiling is not pulling him away from bizdev and being a CEO. HTML5 pushes us technically in a direction that is rapidly evolving into the next area of web-based game development that a lot of major players are throwing their weight behind; but one of the problems is speed and throughput...which is the problem this sets out to document and improve.
As Eric said a little while ago, the announcement on Monday will be the most transparent process that we've ever had. We will talk a lot more about it then, but for now I'll try to answer any questions I can in this topic. I won't address anything that we're going to announce, but I'll try to keep the information we've already shared in a number of different places all in a single location to help people find it.
09/05/2012 (4:02 pm)
Let's keep this on topic. Feel free to ask in this forum post for us to answer any questions that you have as well as we can before our announcement. We've discussed a lot with different people via e-mail, forum posts, IRC, etc.While I understand that we've been very quiet, we are working ten hour days Monday-Thursday to fulfill the commitments to our investors and then we get to use Friday to work on our personal projects using company resources. No one is losing in what we are doing. My audio game in UDK is not taking away from T3D resources, and it is providing us with a real-world project using a competitor's tools. That's worth more than a marketing bullet list of features. A real-world comparison of friction points is invaluable in the tools business. Eric's HTML5 profiling is not pulling him away from bizdev and being a CEO. HTML5 pushes us technically in a direction that is rapidly evolving into the next area of web-based game development that a lot of major players are throwing their weight behind; but one of the problems is speed and throughput...which is the problem this sets out to document and improve.
As Eric said a little while ago, the announcement on Monday will be the most transparent process that we've ever had. We will talk a lot more about it then, but for now I'll try to answer any questions I can in this topic. I won't address anything that we're going to announce, but I'll try to keep the information we've already shared in a number of different places all in a single location to help people find it.
#12
http://www.w3.org/TR/2012/CR-hr-time-20120522/
http://updates.html5rocks.com/2012/08/When-milliseconds-are-not-enough-performance-now
I have confirmed that window.performance.now() is available in firefox 16 and window.performance.webkitNow is available in Chrome 20.
09/10/2012 (12:49 pm)
You probably want to take a look at Javascript high resolution timers:http://www.w3.org/TR/2012/CR-hr-time-20120522/
http://updates.html5rocks.com/2012/08/When-milliseconds-are-not-enough-performance-now
I have confirmed that window.performance.now() is available in firefox 16 and window.performance.webkitNow is available in Chrome 20.

Torque Owner Guy Allard
Default Studio Name