diff --git a/HelveticaNeueLTStd-Lt.otf b/HelveticaNeueLTStd-Lt.otf new file mode 100644 index 0000000..1b27e9f Binary files /dev/null and b/HelveticaNeueLTStd-Lt.otf differ diff --git a/HelveticaNeueLTStd-Md.otf b/HelveticaNeueLTStd-Md.otf new file mode 100644 index 0000000..0822254 Binary files /dev/null and b/HelveticaNeueLTStd-Md.otf differ diff --git a/images/asteroid1.png b/images/asteroid1.png new file mode 100644 index 0000000..7ebfbbd Binary files /dev/null and b/images/asteroid1.png differ diff --git a/images/asteroid2.png b/images/asteroid2.png new file mode 100644 index 0000000..d3e91df Binary files /dev/null and b/images/asteroid2.png differ diff --git a/images/asteroid3.png b/images/asteroid3.png new file mode 100644 index 0000000..c6cb784 Binary files /dev/null and b/images/asteroid3.png differ diff --git a/images/asteroid4.png b/images/asteroid4.png new file mode 100644 index 0000000..10b5ea9 Binary files /dev/null and b/images/asteroid4.png differ diff --git a/images/bg3_1.jpg b/images/bg3_1.jpg new file mode 100644 index 0000000..3eba103 Binary files /dev/null and b/images/bg3_1.jpg differ diff --git a/images/canvasmark2013.jpg b/images/canvasmark2013.jpg new file mode 100644 index 0000000..88b9d0b Binary files /dev/null and b/images/canvasmark2013.jpg differ diff --git a/images/enemyship1.png b/images/enemyship1.png new file mode 100644 index 0000000..e5c849a Binary files /dev/null and b/images/enemyship1.png differ diff --git a/images/fruit.jpg b/images/fruit.jpg new file mode 100644 index 0000000..75956fa Binary files /dev/null and b/images/fruit.jpg differ diff --git a/images/player.png b/images/player.png new file mode 100644 index 0000000..aabf33d Binary files /dev/null and b/images/player.png differ diff --git a/images/texture5.png b/images/texture5.png new file mode 100644 index 0000000..9795c6b Binary files /dev/null and b/images/texture5.png differ diff --git a/index-debug.html b/index-debug.html new file mode 100644 index 0000000..0c113aa --- /dev/null +++ b/index-debug.html @@ -0,0 +1,158 @@ + + +
+Tests the HTML5 <canvas> rendering performance for commonly used operations in HTML5 games: drawImage, drawImage scaling, alpha, composition modes, points, lines, fills, shadows and text functions.
+Tests the HTML5 <canvas> rendering performance for commonly used operations in HTML5 games: bitmaps, canvas drawing, alpha blending, polygon fills, shadows and text functions.
+This benchmark suite uses a number of elements from my HTML5 games including Asteroids and Arena5. See more HTML5 Canvas experiments.
+Important notes for Windows + Chrome users! [+]
+
To get the best benchmark score for your machine, it is advisable to Disable VSync. Go to "about:flags" and toggle: Disable GPU VSync "Disables synchronisation with the display's vertical refresh rate when GPU rendering." This will resolve the issue with the Chrome implementation of "requestAnimationFrame()" that tries to maintain a steady 60 frames-per-second (FPS) but on Windows with accelerated 2D canvas support, it will drop immediately down to 30 FPS when 60 FPS is not achievable with no gradual degredation. On Mac/Linux the drop in FPS is gradual and therefore does not affect the benchmark. So if you see the FPS counter drop directly from around 60 FPS to 30 FPS then you should do this. This will not produce an "unfair" score as scores are based on time not the number of frames generated.
+
How to interpret the results [+]
+
CanvasMark gives a score for the browser based on the combined performance in each of the various stress tests. You should ensure the browser window is not minimized and that no other CPU or GPU intensive processes are running during the test. The results can only be compared to other browsers running on the same machine - as each machine with different CPU or graphics will produce difference results.
+
How does it work [+]
+
Each test is run and progressively tuned to stress the browser until a steady 30 frames-per-second (FPS) is reached. More objects are added to the scene or the scene is made more complex to render until that point is reached. Then the test is considered completed and the next test is started. The score is based on the length of time the browser was able to maintain the test scene at greater than 30 FPS, multiplied by a weighting for the complexity of each test type.
+
Benchmark version 1.1 [25-03-2013]
+CanvasMark Score: " + score + " (" + browser + " on " + OS + ")
"); + // tweet this result link + var tweet = "http://twitter.com/home/?status=" + browser + " (" + OS + ") scored " + score + " in the CanvasMark HTML5 benchmark! Test your browser: http://bit.ly/canvasmark %23javascript %23html5"; + $("#tweetlink").attr('href', tweet.replace(/ /g, "%20")); + $("#results-wrapper").fadeIn(); + } + } + Game.centerFillText(ctx, interval.label, "18pt Helvetica", GameHandler.height/2 - 32, "white"); + Game.centerFillText(ctx, "Benchmark Score: " + score, "14pt Helvetica", GameHandler.height/2, "white"); + + interval.complete = (this.exit || interval.framecounter++ > 400); + }, + + onKeyDownHandler: function onKeyDownHandler(keyCode) + { + switch (keyCode) + { + case KEY.SPACE: + { + this.exit = true; + return true; + break; + } + } + } + }); +})(); + + +var BrowserDetect = { + init: function () { + this.browser = this.searchString(this.dataBrowser) || "Unknown Browser"; + this.version = this.searchVersion(navigator.userAgent) + || this.searchVersion(navigator.appVersion) + || "an unknown version"; + this.OS = this.searchString(this.dataOS) || "Unknown OS"; + }, + searchString: function (data) { + for (var i=0;iCanvasMark Score: " + score + " (" + browser + " on " + OS + ")
"); + // tweet this result link + var tweet = "http://twitter.com/home/?status=" + browser + " (" + OS + ") scored " + score + " in the CanvasMark HTML5 benchmark! Test your browser: http://bit.ly/canvasmark %23javascript %23html5"; + $("#tweetlink").attr('href', tweet.replace(/ /g, "%20")); + $("#results-wrapper").fadeIn(); + } + } + Game.centerFillText(ctx, interval.label, "18pt Helvetica", GameHandler.height/2 - 32, "white"); + Game.centerFillText(ctx, "Benchmark Score: " + score, "14pt Helvetica", GameHandler.height/2, "white"); + + interval.complete = (this.exit || interval.framecounter++ > 400); + }, + + onKeyDownHandler: function onKeyDownHandler(keyCode) + { + switch (keyCode) + { + case KEY.SPACE: + { + this.exit = true; + return true; + break; + } + } + } + }); +})(); + + +var BrowserDetect = { + init: function () { + this.browser = this.searchString(this.dataBrowser) || "Unknown Browser"; + this.version = this.searchVersion(navigator.userAgent) + || this.searchVersion(navigator.appVersion) + || "an unknown version"; + this.OS = this.searchString(this.dataOS) || "Unknown OS"; + }, + searchString: function (data) { + for (var i=0;i