Book Image

HTML5 Game Development with ImpactJS

By : Davy Cielen, Arno Meysman
Book Image

HTML5 Game Development with ImpactJS

By: Davy Cielen, Arno Meysman

Overview of this book

<p>ImpactJS is a JavaScript library specially geared towards building 2-dimensional games. It is intuitive and versatile and allows the game developer to get results in no time while keeping an easy overview when games grow more complex. Games built with ImpactJS can be published on websites and even as an app on both Android and iOS. <br /><br />With "HTML5 Game Development with ImpactJS", building games for the Web and app markets has never been so easy. Using the ImpactJS JavaScript engine, you only need this book and basic knowledge of JavaScript in order to build and publish your own game. <br /><br />"HTML5 Game Development with ImpactJS" allows a single person to build a full game. Using only basic knowledge of JavaScript and this book, you will end up publishing a 2D game for the entire world to enjoy. You will learn to set up a working environment and gather all the necessary tools and resources your game needs. Develop both a top-down and a side scroller game, integrate physics such as gravity, and deploy your game as an app or to your website.</p>
Table of Contents (17 chapters)
HTML5 Game Development with ImpactJS
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Choosing a script editor


We now have a server up and running with the ImpactJS game engine installed but we don't have a tool yet with which we can actually write the game code. This is where the script editor comes in.

For choosing the right code editor to suit your needs, it is best to make the distinction between a pure editor and an IDE. The IDE or Integrated Development Environment is both a script editor and a compiler. So this means that in one program you can both change and run your game. A script editor on the other hand is just for changing the script. It won't show you the output but will, in most cases, tell you in advance when you are about to make a syntax error. While the editor will show you syntax errors in your JavaScript code, actually executing the code will reveal logical mistakes and give you something (pretty) to look at.

For ImpactJS there is an IDE called AppMobi, which is free but charges for extra services. The alternative to using AppMobi is the XAMPP server you just installed.

Script editors, even very good ones, often come for free. Some nice ones you should check out before choosing the one you like are Eclipse , notepad++, komodo edit , and sublime edit 2 . For Mac specifically there is Textmate , which is an often used editor but it doesn't come for free. And of course Xcode , the official apple developer editor.

All of these script editors will check for mistakes you make in the JavaScript code, however, they don't check for ImpactJS specific code. For this you could make your own script color coding bundle or download one from those who took the time to build one.

Download and install a few of the previously mentioned script editors and pick the one you like best. All of them will do the trick just fine, it's just a matter of preference.