HTML and CSS Reference
In-Depth Information
Distributing the game
The game is playable and fits in different screens. We are now ready to make the game public.
Prepare for lift off
YUI from Yahoo is a commonly used compressor. It can be installed and used locally as a
standalone program. We can also use preprocessor tools such as the ones we menioned in
Project 6 , Space Defenders , which come with the YUI-compressing opion inside the tools.
However, in this task, we make it simple by using an online compressor.
Engage thrusters
Let's work on the following steps to deploy our game on the Internet:
1. We concatenate and compress the logic and the styling of files using a compressor.
In this task, we use an online tool. The http://gpbmike.github.io/refresh-
sf/ URL contains the Online JavaScript/CSS Compressor tool.
2. Select all the JavaScript files and drag them onto the text field of the
compressor website.
3. Click on the Compress JavaScript buton and the tool generates the compressed
code into the text area of the result.
4. Then, we can get the file and put it into the project by clicking on the Save buton.
5. Make sure we update the index.html file to include the compressed code instead
of the development code.
6. We will repeat the same steps for the CSS file. Let's upload the CSS file; choose
CSS as the file type and compress the code. We save the compressed CSS code
and update the index.html file to link to the minified CSS file.
7. We are ready to upload the game to the server. We use a simple way that uses
an online staic ile-hosing service. Go to the http://getforge.com URL of
the Forge online service and create a free account of the service, which allows
one staic public site.
8. Compress the website and upload the website to the Forge service by dragging
the ZIP file directly to the browser. The following screenshot shows the service
with our HTML5 game uploaded:
 
Search WWH ::




Custom Search