Game Development Reference
In-Depth Information
Chapter 2. Getting Started with Visual
Studio
When it comes to getting an HTML5 game up and running on Windows 8, I use the term
porting lightly. Unlike other languages, you do not have to endure the difficult process of
truly porting over your code. Windows 8 was designed to make HTML5-based apps run and
perform like native ones written in C# or C++. In most cases you simply need to copy your
code over to a Visual Studio project, include the files, and hit compile to see your game run-
ning. Let's talk a little bit about which games will work and which ones won't on Windows
8.
What Games Work Best
As a rule of thumb, if the game runs in IE10 then you are set. For extra insurance, you can
double check your game in the Windows 8 version of IE10 to discover any minor issues that
may arise. For the most part, the two browsers run identically. You can also do the same test-
ing on Windows RT to see what performance would be like on ARM devices.
Outside of testing your game in IE10, completely Canvas-based games will generally be the
easiest to port. This is true of any HTML5 game you are trying to run on different platforms,
as Canvas is self-contained and consistently implemented across each of the major browsers
at this point. Also, it's important to note that Canvas is hardware accelerated in IE10, and
you will see similar performance boosts that you would have gotten in WebKit-based
browsers that support hardware-accelerated Canvas, such as Chrome.
I've also been testing out several different JavaScript game frameworks and have found that
all of them run well on Windows 8. ImpactJS, which is one of my favorites, is a great one to
use and is fairly easy to get set up out of the box with little to no modifications. You can also
use DOM-based games, but expect to have to account for IE10-specific CSS issues. If you
already built your game to support IE10 then you shouldn't have a problem. I've also had
great success with “hybrid” games that make use of Canvas for the main game display and
HTML for the UI. Just keep in mind you will need to do additional CSS work to make sure
your UI scales well on different resolutions.
Search WWH ::




Custom Search