Game Development Reference
In-Depth Information
<script src="//Microsoft.WinJS.1.0/js/base.js"></script>
<script src="//Microsoft.WinJS.1.0/js/ui.js"></script>
<!-- HTMLGameTest references -->
<link href="/css/default.css" rel="stylesheet" />
<script src="/js/default.js"></script>
</head>
<body>
<p>Content goes here</p>
</body>
</html>
You'll notice there is hardly any code in this file. We have a reference to the default ui-
dark.css file that has all the styling for standard Modern UI apps. Next we have a reference to
the base.js and ui.js, which allows us to build out Modern controls and UI. You'll notice
these three files are located at //Microsoft.WinJS.1.0/js. These are part of the WinJS library
and are only available when you run your app in Windows 8.
NOTE
WinJS is a built-in Windows 8 library that allows you to communicate with the OS. This
helps bridge the game between the JavaScript run time and the native code running under
the hood. We'll talk more about WinJS throughout the rest of this topic.
The paths to these files will be automatically resolved for you when the app is launched.
WinJS is the underlying bridge that allows your app to talk to the OS via JS and also
provides code needed to build out Modern UI components. You will want to keep these so
that you can leverage WinJS in your own game. Finally, you'll see two references to local
files in your project: default.css and default.js.
Now you are ready to start putting your own code into the project.
Moving Your Code Over
You should have everything you need to get started from the first chapter: a copy of Win-
dows 8, Visual Studio, and your own game's source code that has been tested to run in IE 10.
Search WWH ::




Custom Search