HTML5 Game Development with GameMaker
上QQ阅读APP看书,第一时间看更新

Making HTML game development easy

GameMaker: Studio is an incredibly powerful and easy to use development tool for making games. The software was originally designed to be used in a classroom setting as a way for students to learn basic programming concepts, understand game architecture, and create fully featured games. As a result, the development environment is very intuitive for first time users due to the drag-and-drop system of coding. Unlike many other competing development tools with similar functionality, GameMaker: Studio has a very robust scripting language that allows users to create almost anything they can imagine. Add to this the fact that you can easily import and manage graphics and audio resources, the integration of the fantastic Box2D physics library, and built-in source control, why wouldn't you use it? Up until now, making games generally meant that you were creating a stand-alone product.

The Internet was not really a consideration as it was fairly static and required a slew of proprietary plugins to display dynamic content, such as games, movies, and audio. Then HTML5 came along and changed everything. HTML5 is an open-standards collection of code languages that allows anyone and everyone to develop interactive experiences that will be able to be run natively on any device with a modern browser and an Internet connection. Developers are now able to use cutting edge features, such as WebGL (a graphics library that allows for 3D rendering), audio APIs, and asset management, to push the boundaries of what you can do in a browser.

Note

Not all browsers are equal! While the HTML5 standards are set by the W3C, each vendor implements them differently. Also, not all the standards have been set at this time, which means that some things may not work in certain browsers. For example, there are multiple audio APIs competing to become the standard. As the standards become locked down and as the browsers become more compliant, these issues should go away. To see how well your preferred browser supports HTML5, go to http://html5test.com.

Normally, developing a game for HTML5 would require a working knowledge of three different coding languages: HTML5 (Hypertext Markup Language), the code language that creates the structure of a web page, CSS3 (Cascading Style Sheets 3), that determines the presentation of the site, and JavaScript that actually makes the magic happen. The GameMaker: Studio HTML5 export module makes all of this simple by allowing developers to work in an integrated environment and export to these languages with the press of a button. Beyond just being a game engine, the HTML export module includes specific functions for dealing with URLs and browser information. It also comes with its own local server software that will allow you to test your games as if it were up on the Internet live. Finally, you can extend GameMaker: Studio even further, because it allows you to import external JavaScript libraries for any functionality you may need or want. Sounds great, doesn't it? Now let's get the Studio up and running.