Introduction

If you’re reading this, you undoubtedly have some level of interest in making games for the web. As someone with some experience in this field, I feel qualified to tell you you’re in the right place.

Games on the web have changed immensely in the last ten years and, while the core concepts of web games tend to change very slowly over time, the tools we use to create them change much more rapidly. On today’s web, large amounts of code must be written to accomplish simple, game-related tasks in a browser.

The open-source game engine enchant.js solves this problem by drastically reducing the amount of code needed to write a game, and includes several fall-back and compatibility functions that work behind the scenes to keep things running smoothly across multiple browsers without you needing to do anything special. It has become a very popular tool in its home country in Japan, and is now being used more and more by programmers in the West.

If you’re a beginner to web coding, don’t worry! We walk you step-by-step through the basics of how enchant.js works, JavaScript (the common scripting language of the web – used by enchant.js), and basic elements of an enchant.js game. We then move on to more advanced topics. We cover all the necessities of a game, including scenes, sprites, interactivity, and more. Additionally, we provide tutorials for every concept. In the second part of the book, we show you how to create several games, including a Whack-A-Mole game (in 2-D and 3-D) and a classic arcade space shooter.

Although some code samples in the book are linked to working versions on the free programming environment code.9leap.net, all code samples in this book can be found at the Apress website (www.apress.com) by searching for this title and going to the source code section of this book’s page.

Learning game programming is a fun and exciting adventure with entertaining rewards. If you have a question regarding the library, please don’t hesitate to reach out to us on the official enchant.js subreddit (reddit.com/r/enchantjs), enchantjs.com, or our Facebook page (search for “enchant.js”). Our user community is growing every day with both brand new and experienced game programmers.

Best of luck on your game programming journey!

Brandon McInnis

enchant.js Technical Evangelist

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.142.20