Game Development Reference
In-Depth Information
Basically this just creates a watch target for any changes to JavaScript files in the src folder.
Once a file has been changed, I concatenate everything into a single JavaScript file then copy
the images, js music, sound, and index.html files over to a deploy/Web folder. Finally, I start
a server to host the contents of the Web folder by opening the index.html.
NOTE
You may have noticed that I manually list each of the JavaScript files in the game to be
minified. That is because Heroine Dusk required each file to be loaded in a particular or-
der for the game to work. You may have to do the same for you own games if you have
similar requirements.
This workflow allows me to continue to edit the code for the game, maintain my Windows 8
build, and test it out in the browser at the same time. This means I can continue to maintain a
Windows Store build of the game and Web version without doing anything extra outside of
continuing to edit the game's code. The other thing to keep in mind is that you'll notice I am
using Grunt's concat task over uglify. This helps for debugging since you can still read the
code if there is an error. If you try debugging uglified code you will not be very happy, but
you still run that after everything is said and done if you want even more minification on the
file.
Don't forget to include the HeroineDusk.min.js file that gets generated into our js directory.
You will need this in order to build for Windows 8. Also, your index.html should include this
file, and you can remove the links to each of the individual files. Outside of that everything
else should work perfectly. The only thing missing from this game is artwork for a Live Tile,
store logo, and splash screen, which are automatically generated for you by Visual Studio
when you make the project. And, of course, you would need to support snap view, which is
easily done through CSS.
As you can see, it didn't take much to get this game up and running on Windows 8. I was
able to apply my own workflow to an existing HTML5 game and get it to seamlessly run in-
side of Visual Studio with builds for the Web and Windows 8. I can't stress enough how easy
it is to port existing HTML5 games to Windows 8, submit them to the Windows Store, and
monetize them. I also wanted to thank Clint Bellanger for making his game open source and
allowing me the opportunity to talk about porting it over to Windows 8 in this topic. Hope-
fully this helps you better understand the process outlined in each of the chapters leading up
to this case study.
Search WWH ::




Custom Search