This is a mirror of official site: http://jasper-net.blogspot.com/

An End-to-End Windows 8 Metro Style HTML5/JavaScript Game Sample

| Tuesday, March 20, 2012
We're going to start mixing in some new items in our Monday posts. Given the recent release of Windows 8 Customer Preview and Visual Studio 11 beta we're going to start mixing in some new "M's", such as today's Metro Monday project...

One of the promises of developing for Windows 8 is that you can build locally installed and executed HTML5/JavaScript based applications. These are not "web" pages morphed into an app somehow, or a link to a page running on a server somewhere, but a fully fledged app. One way to think about it is that HTML5 is the UI language (i.e. like XAML) and JavaScript is the programming language (like C++, C#, VB.Net, etc).

So what would such a game or app look like? Lets take a peek at a recently released "end to end" sample that's released by Windows SDK team...

Metro style JavaScript and HTML5 game sample

This sample shows how to design a basic casual game in HTML5, from end-to-end. The game included in the sample is deliberately simple to minimize distractions from game logic intended to be replaced.

Specifically, this sample covers:

Setting up draw and update loops
Handling snapped view
Suspend and resume behaviors
Asset loading and audio playback
Roaming application data and settings
Handling touch events

This sample also demonstrates App Bar integration, accessed by swiping up with a touch gesture from the bottom edge of the screen. The main navigation elements of the sample are available there. Additionally, when on the game screen there are game-specific commands for starting a new game or pausing the game. It also demonstrates integration with the Share Contract, accessed via the Charms Bar when you select a score on the high scores table. Lastly, settings for the sample are available via integration with the Settings Contract via the Charms Bar.

Read more: Channel9
QR: Inline image 1

Posted via email from Jasper-net

0 comments: