HTML5 Game Development with ImpactJS


HTML5 Game Development with ImpactJS
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • A practical hands-on approach to teach you how to build your own game from scratch.
  • Learn to incorporate game physics.
  • How to monetize and deploy to the web and mobile platforms.

Book Details

Language : English
Paperback : 304 pages [ 235mm x 191mm ]
Release Date : March 2013
ISBN : 1849694567
ISBN 13 : 9781849694568
Author(s) : Davy Cielen, Arno Meysman
Topics and Technologies : All Books, Game Development, Games

Table of Contents

Preface
Chapter 1: Firing Up Your First Impact Game
Chapter 2: Introducing ImpactJS
Chapter 3: Let's Build a Role Playing Game
Chapter 4: Let's Build a Side Scroller Game
Chapter 5: Adding Some Advanced Features to Your Game
Chapter 6: Music and Sound Effects
Chapter 7: Graphics
Chapter 8: Adapting Your HTML5 Game to the Distribution Channels
Chapter 9: Making Money with Your Game
Index
  • Chapter 1: Firing Up Your First Impact Game
    • Installing a XAMPP server
    • Installing the game engine: ImpactJS
    • Choosing a script editor
    • Running the premade game
    • Debugging your game with the browser and ImpactJS
      • Debugging with the browser
        • Firebug – the Firefox debugger
        • Chrome debugger
        • Exercises in debugging with Chrome and Firebug
      • Debugging with ImpactJS
    • Which helpful tools are out there
      • Ejecta
      • AppMobi
      • PhoneGap
      • lawnchair
      • Scoreoid
      • Playtomic
      • one.com webhost
    • Summary
    • Chapter 2: Introducing ImpactJS
      • Building your own levels
        • Creating, loading, and saving levels in Weltmeister
        • Layers and the z axis
        • Adding and removing entities and objects
        • The collision layer
        • Connecting two different levels
      • Objects – playable and non-playable characters
        • The ImpactJS entity
        • Setting up player controls
        • Position, acceleration, and speed
        • The game's graphics: sprites and animation sheets
        • Spawning, health, and death
      • The camera view
        • The game canvas
        • Free to move camera
        • Automatically following camera
      • Adding music and sound effects
        • Playing background music
        • Introducing sound effects
      • Game physics with Box2D
        • Gravity and force
        • Collision impact and bounciness
      • Summary
      • Chapter 3: Let's Build a Role Playing Game
        • The RPG game setting
        • Building an RPG level
        • Adding a playable character
        • Introducing a defeatable opponent
        • Giving the player some weapons
          • Spawning a projectile
          • Causing harm with a projectile
        • Bringing your NPCs to life with artificial intelligence
          • The NPC's behavior
          • The NPC's decision making process
        • Pickup items to help out your player
          • Healing your player with a potion
          • Becoming rich with coins
        • Keeping score for player feedback
        • Transitioning from one area to another
        • NPCs and conversation
          • The speech balloon
          • Adding a talking non-playable character
        • The final battle
        • Summary
        • Chapter 4: Let's Build a Side Scroller Game
          • The side scroller game setting
            • Preparing the game for Box2D
          • Building a side scroller level
          • The playable character
          • Adding a minor foe
          • Introducing formidable weapons
            • Shooting a projectile
            • Building an actual bomb
          • Artificial intelligence
          • Pickup items
            • Adding a normal crate
            • Implementing a healing crate
          • Keeping score
          • Transitioning from one level to another
          • The final battle
          • Summary
          • Chapter 5: Adding Some Advanced Features to Your Game
            • The Start and Game-over screen
              • The game's Start screen
              • The Victory and Game-over screens
              • More advanced debugging options
              • Short introduction to unit testing
              • Adding your own debug panel to the ImpactJS debugger
            • Handling game data
              • Adding data to your game
              • Using cookies to store data on the player's computer
              • Local storage
              • Using lawnchair as a versatile way of storing data
            • Extra functionalities for the RPG
              • Moving the player with a mouse click
              • Adding intelligent spawn locations
              • Introducing basic conversation
              • Adding a basic Head-Up Display
            • Artificial intelligence: The hive mind
            • Implementing Playtomic for game analytics
            • Summary
            • Chapter 6: Music and Sound Effects
              • Making or buying the music
              • Buying tunes and sound effects
              • Making a basic tune using FL Studio
              • Adding background music to your game
              • Playing a sound when an action has happened
              • Tips when using sound files in your game
              • Summary
              • Chapter 7: Graphics
                • Making/buying the graphics
                • Where to buy graphics
                • Introduction to vector graphics
                • Creating your own avatar using Adobe Photoshop
                • Adding your creation to the RPG
                • Hints for graphics in HTML5
                • Summary
                • Chapter 8: Adapting Your HTML5 Game to the Distribution Channels
                  • Preparing your game for the web browser
                  • Preparing our game for mobile web browsers
                  • Turning the game into a web app for the Google Chrome Web Store
                  • Pushing your game to Android's Google play store
                  • Making your game available on Facebook
                  • Direct canvas game acceleration with AppMobi
                  • Summary
                  • Chapter 9: Making Money with Your Game
                    • Your game development strategy
                    • Making money with game apps
                      • Google Play
                      • iOS App Store
                      • The Chrome Web Store
                    • In-game advertising
                    • Selling distribution rights with MarketJS
                    • Summary

                    Davy Cielen

                    Davy Cielen is the co-owner of An Ostrich On Mars, a graphic design and marketing agency with a special branch of game design, graphics, and game development. He has a background in analytics, marketing, and mathematics. Davy is seriously in love with game design and web technologies.

                    Arno Meysman

                    Arno Meysman is the co-owner of An Ostrich On Mars, a graphic design and marketing agency with a special branch of game design, graphics, and game development. Arno Meysman is a specialist at customer and web analytics using statistics and has always been very interested in game development, including graphical design. He started using the ImpactJS engine for hobby projects when it was first released in 2010.
                    Sorry, we don't have any reviews for this title yet.

                    Code Downloads

                    Download the code and support files for this book.


                    Submit Errata

                    Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                    Errata

                    - 4 submitted: last submission 18 Feb 2014

                    Support:

                    The footsteps sound effect keeps playing continually

                     

                    It seems to be a bug in the ImpactJS core:


                    apparently (according to Dominic, the creator of ImpactJS himself) it only occurs on short clips and he suggests some example code.

                    Errata type: Code Related|Page number: location 951 in the Kindle eBook

                    The levelchange.js code results in a duplicate player entity.
                    The spawn point generates a player in ADDITION to the player position specified on the map in Weltmeister.
                    This happens only if you write a game where you can go back and forwards amongst levels. The solution is rather easy, but the implementation is game specific.

                    In the game we wrote, you just have to add the following line of code in levelchange.js. Add an assert statement to convince yourself that there is only one player:

                    ig.game.spawnEntity(EntityPlayer, spawnpoint.pos.x, spawnpoint.pos.y);
                                                            var nrPlayers =ig.game.getEntitiesByType( EntityPlayer ).length;
                                                                 
                                                            ig.game.player = ig.game.getEntitiesByType( EntityPlayer )[0];
                                                            nrPlayers > 1 ? ig.game.getEntitiesByType(EntityPlayer)[0].kill(): null;
                                                            console.assert(ig.game.getEntitiesByType(EntityPlayer).length==1);
                                                            ig.game.player.health = health;  


                    The code budle is now updated on 18 June, 2013.
                    Errata type: Typo | Page number: 35
                    Inside the Tip
                    " But for now, failing to insert the word Level before your actual level name or writing both Level and your level name with a capital letter will result in the display of the following error: "
                    Should be:
                    "But for now, failing to insert the word Level before your actual level name or not writing both Level and your level name with a capital letter will result in the display of the following error:"
                    Errata type: Typo | Page number: 38
                    In the first paragraph,
                    "The bottom layer can only be visible when nothing else is on the way."
                    Should be:
                    "
                    The bottom layer can only be visible when nothing else is in the way."

                    Sample chapters

                    You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                    Frequently bought together

                    HTML5 Game Development with ImpactJS +    HTML5 Enterprise Application Development =
                    50% Off
                    the second eBook
                    Price for both: £16.14

                    Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                    What you will learn from this book

                    • Set up a game development environment on your computer
                    • Find and use resources such as graphics, music, and sound effects
                    • Integrate the Box2D engine in ImpactJS to make a side scroller game with realistic physics
                    • Build a top-down game using solely the ImpactJS engine
                    • Optimize and prepare your games for computer screens and mobile browsers
                    • Turn your HTML5 game into an app for Google Play, Apple, and Chrome app stores

                    In Detail

                    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.

                    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.

                    "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.

                    Approach

                    HTML5 Game Development with ImpactJS is an insightful, friendly guide that will amaze users with its ease of use in game development. It consists of several informative yet simple instructions, which help develop and build your skill set and knowledge base.

                    Who this book is for

                    This book is for anyone with basic knowledge of JavaScript, CSS, and HTML. If you have the desire to build your own game for your website or an app store but have no idea how and where to begin, this book is for you.

                    Code Download and Errata
                    Packt Anytime, Anywhere
                    Register Books
                    Print Upgrades
                    eBook Downloads
                    Video Support
                    Contact Us
                    Awards Voting Nominations Previous Winners
                    Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                    Resources
                    Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software