HTML5 Game Development with GameMaker


HTML5 Game Development with GameMaker
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
  • Build browser-based games and share them with the world
  • Master the GameMaker Language with easy to follow examples
  • Every game comes with original art and audio, including additional assets to build upon each lesson.

Book Details

Language : English
Paperback : 364 pages [ 235mm x 191mm ]
Release Date : April 2013
ISBN : 1849694109
ISBN 13 : 9781849694100
Author(s) : Jason Lee Elliott
Topics and Technologies : All Books, Game Development, Games

Table of Contents

Preface
Chapter 1: Getting to Know the Studio with Your First Game
Chapter 2: Triple 'A' Games: Art and Audio
Chapter 3: Shoot 'em Up: Creating a Side-scrolling Shooter
Chapter 4: The Adventure Begins
Chapter 5: Platform Fun
Chapter 6: Toppling Towers
Chapter 7: Dynamic Front Ends
Chapter 8: Playing with Particles
Chapter 9: Get Your Game Out There
Index
  • Chapter 1: Getting to Know the Studio with Your First Game
    • Making HTML game development easy
    • Setting up the software
    • Our first look at the Studio
      • The Menu
      • The Toolbar
      • The Resource tree
      • The Workspace
    • Exploring the resource editors
      • Loading your art assets with the Sprite Properties editor
        • The wall sprite
        • The player sprite
      • Creating game objects with the Object Properties editor
        • The Wall object
        • The Player object
      • Creating worlds with the Room Properties editor
      • Running the game
      • Introducing code with the Script Properties editor
      • Filling the scene with the Background Properties editor
      • Bringing noise with the Sound Properties editor
        • A little background music
        • Controlling the game with the Overlord
        • The collectible
      • Writing text and the Font Properties editor
      • Creating complex movements with the Path Properties editor
      • Using the Time Line Properties editor to spawn collectibles
    • Tools for debugging your games
      • Using the HTML5 DEBUG console
      • Using the Windows version debugger
      • Taking a look at the JavaScript code
    • Summary
    • Chapter 2: Triple 'A' Games: Art and Audio
      • Manufacturing art assets
        • Understanding the image file formats
      • Importing sprite sheets
      • Introducing the image editor
        • Creating backgrounds with tilesets
      • Animating and creating sprites
        • The illusion of action
        • Maximize the sprite space
        • Looping an animation
      • Manufacturing audio
        • Understanding the audio file formats
      • Using the GM:S Audio engine
      • Raising the quality bar
        • Consistency
        • Readability
        • Polish
      • Summary
      • Chapter 3: Shoot 'em Up: Creating a Side-scrolling Shooter
        • Coding conventions
        • Building the player
          • Setting up the player sprite
          • Controlling the player object
          • Building the bullet
          • Firing the bullet
          • Removing bullets from the world
        • Constructing three little enemies
          • Making the enemy parent
          • Building the FloatBot
          • Creating the SpaceMine
          • Making the Strafer
        • Controlling the game with the Overlord
          • Spawning waves of enemies
          • Building the Overlord
        • Dealing with the life and death of the player
          • Setting up the win condition
          • Respawning with a Ghost object
        • Drawing the user interface
        • Adding the finishing details to the game
          • Adding the game music
          • Making the background move
          • Creating the explosions
        • Summary
        • Chapter 4: The Adventure Begins
          • Creating animated characters
            • Simplifying the character movement
            • Implementing a melee attack
          • Navigating between rooms
            • Setting up the rooms
            • Creating Room Portals
            • Teleporting a persistent player
          • Bringing enemies to life
            • Summoning the Ghost Librarian
            • Building a wandering Brawl
            • Creating the Coach
          • Adding finishing details to the game
          • Summary
          • Chapter 5: Platform Fun
            • Structuring systems-based code
              • Creating gravity
              • Building an animation system
              • Creating a collision forecasting system
              • Checking the keyboard
            • Building the player
            • Setting up the room
            • Building a boss battle
              • Creating the indestructible Gun
              • Constructing the first phase: The Cannons
              • Building the second phase: The giant LaserCannon
              • Setting the final stage: The shielded Boss Core
            • Winding it up
            • Summary
            • Chapter 6: Toppling Towers
              • Understanding the physics engine
                • Activating the world
                • Defining properties with fixtures
                • Connecting objects with Joints
                • Applying forces to objects
              • Building a tower toppling game
                • Constructing the Pillars and Debris
                • Breaking the Pillars into Debris
              • Adding in the collision sounds
              • Building the demolition equipment
                • Creating a Wrecking Ball
                • Making a Magnetic Crane
              • Completing the game
                • Setting the win condition
                • Creating the Equipment Menu
                • Constructing the towers
              • Summary
              • Chapter 7: Dynamic Front Ends
                • Setting up the rooms
                  • Initializing the main menu
                  • Selecting levels with 2D arrays
                  • Preparing the Shop using data structures
                • Rebuilding the HUD
                • Adding risk and reward to destruction
                • Adding introductory text to each level
                • Saving the player's progress
                  • Understanding local storage
                  • Writing to local storage
                  • Saving multiple game profiles
                • Summary
                • Chapter 8: Playing with Particles
                  • Introducing particle effects
                    • Understanding particle systems
                    • Utilizing particle emitters
                    • Applying particles
                    • HTML5 limitations
                  • Adding particle effects to the game
                    • Creating a Dust Cloud
                    • Adding in Shrapnel
                    • Making the TNT explosion
                    • Cleaning up the particles
                  • Summary
                  • Chapter 9: Get Your Game Out There
                    • Releasing a game on your own site
                      • Creating the application
                      • Hosting the game
                      • Uploading the game with FTP
                    • Integrating with Facebook
                      • Adding a Facebook login button
                    • Tracking the game with Flurry Analytics
                      • Setting up Flurry Analytics
                      • Tracking events in the game
                      • Sending the data to Flurry
                      • Understanding the Analytics
                    • Making money with your games
                    • Summary

                    Jason Lee Elliott

                    Jason Lee Elliott is a digital media expert with a passion for game design. He started his career as an all-purpose Artist at Konami, working his way up to the position of Lead Artist on Spawn for the Game Boy Color. Jason then returned to school to study film at the Vancouver Film School, where the shot he wrote, directed, and produced was selected as a finalist for the BC Film Director Internship Program. Games were never far away from his thoughts and with his new cinematic skills in hand, Jason returned to the industry as a Level and Game Designer at Radical Entertainment. While there, Jason became a proficient scripter, working on several acclaimed titles including Hulk, Hulk Ultimate Destruction, and The Simpsons: Hit & Run. Since 2005, Jason has been a teacher at the Art Institute of Vancouver, and is currently a senior faculty member in the Game Art and Design program. In his spare time, he develops indie games, dabbles in web and graphic design, is the webmaster for the Vancouver chapter of ACM SIGGRAPH, and occasionally blogs at jasonleeelliott.com.

                    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

                    - 16 submitted: last submission 23 Jul 2014

                    Errata type: Code    Page No: 86

                    sound_play(snd_Bullet_01);
                    should be:
                    sound_play(snd_Bullet_Player);

                    Errata type: Technical    Page No: 17
                    Section name: The Player object
                    Bullet no.3
                    For the vast majority of this book we are going to use only the Execute Script icon found in the Common tab, as we will be writing code placed into Scripts.
                    This should be:
                    For the vast majority of this book we are going to use only the Execute Script icon found in the Control tab, as we will be writing code placed into Scripts.

                    Errata type: Code    Page No: 98
                    Bullet no. 18
                    bullet.direction = point_direction(x,y, obj_Player.x,obj_ Player.x, obj_Player.y);
                    This should be:
                    bullet.direction = point_direction(x, y, obj_Player.x, obj_Player.y);

                    Errata type: Typo    Page No: 32

                    If you want a slight variation, such as a font that is two points larger, than a separate font resource must be created.
                    This should be:
                    If you want a slight variation, such as a font that is two points larger, then a separate font resource must be created.

                    Errata type: Technical    Page No: 29

                    With Remove Background and Smooth Edges selected, load the file Chapter 1/Sprites/Collect.png and center its origin.
                    should be:
                    Uncheck Remove Background and Smooth Edges, then load the file Chapter 1/Sprites/Collect.png and center its origin.

                    Errata type: Technical    Page No: 36

                    Create a new Object and name it obj_Enemy.
                    should be:
                    Create a new Object and name it obj_Enemy and apply spr_Enemy as the Sprite.

                    Errata type: Technical    Page No: 36

                    8. With Remove Background and Smooth Edges selected, load Chapter 1/Sprites/Enemy.png and center the origin.
                    should be:
                    8. Uncheck Remove Background and Smooth Edges, then load the file Chapter 1/Sprites/Enemy.png and center its origin.

                    Errata type: Technical    Page No: 242

                    Run the game and activate the equipment. You should see the Zone remain red for as long as there are Pillars or Debris within it. Once it is clear, it will turn light blue, indicating that it is clear of collision.
                    should be:
                    Run the game and activate the equipment. You should see the Zone remain striped for as long as there are Pillars or Debris within it. Once the area is clear of collision it will turn yellow.

                    Errata type: Code    Page Nos: 172 and 174


                    if (!keyLeft && !keyRight)

                    {

                    if (hspeed >= 1) { hspeed -= 1; }

                    if (hspeed <= -1) { hspeed += 1; }

                    if (keyUp)

                    {

                    action = IDLEUP;

                    myAim = 45;

                    } else if (keyDown) {

                    action = IDLEDOWN;

                    if(facing == LEFT) { myAim = 205; }

                    if(facing == RIGHT) { myAim = 335; }

                    myAim = 315;

                    } else {

                    action = IDLE;

                    if (facing == LEFT) { myAim = 180; }

                    if (facing == RIGHT) { myAim = 0; }

                    }

                    }

                    This should be:

                    if (!keyLeft && !keyRight)

                    {

                    if (hspeed >= 1) { hspeed -= 1; }

                    if (hspeed <= -1) { hspeed += 1; }

                    if (keyUp)

                    {

                    action = IDLEUP;

                    if(facing == LEFT) { myAim = 150; }

                    if(facing == RIGHT) { myAim = 30; }

                    } else if (keyDown) {

                    action = IDLEDOWN;

                    if(facing == LEFT) { myAim = 205; }

                    if(facing == RIGHT) { myAim = 335; }

                    } else {

                    action = IDLE;

                    if (facing == LEFT) { myAim = 180; }

                    if (facing == RIGHT) { myAim = 0; }

                    }

                    }

                    Errata type: Technical    Page No: 124

                    Step 3: Adjust the Bounding Boxvalues for Left: 0, Right: 24, Top: 0, and Bottom: 4.
                    should be:
                    Step 3: Adjust the Bounding Boxvalues for Left: 0, Right: 24, Top: 0, and Bottom: 48.

                    Also, the screenshot shows Automatic to be selected. The selected option should be Manual.

                    Errata type: Technical    Page No: 106

                    Step 2: Set origin to be exactly the same as the origin of spr_Player. Set Origin to X: 43, Y: 22
                    should be:
                    Step 2: Set origin to be exactly the same as the origin of spr_Player. Set Origin to X: 28, Y: 24

                    Errata type: Code    Page No: 291

                    for (i = 0; i < totalLevels; i++)
                    {
                        ini_write_string("Levels", string("Level_" + i), level[i, 1]);
                    }
                    for (j = 0; j < ds_grid_width(equip); j++)
                    {
                        ini_write_real("Equipment", string("Equip_" + j), ds_grid_get(equip, j, AMOUNT) );
                    }
                    This should be:
                    for (i = 0; i < totalLevels; i++)
                    {
                        ini_write_real("Levels", "Level_" + string(i), round(level[i, 1]));
                    }
                    for (j = 0; j < ds_grid_width(equip); j++)
                    {
                        ini_write_real("Equipment", "Equip_" + string(j), ds_grid_get(equip, j, AMOUNT) );
                    }

                    Errata type: Code    Page No: 292

                    for (i = 0; i < totalLevels; i++)
                        {
                            level[i, 1] = ini_read_string("Levels", string("Level_" + i), "");
                        }
                        for ( j = 0; j < ds_grid_width(equip); j++ )
                        {
                            ds_grid_set(equip, j, AMOUNT, ini_read_real("Equipment", string("Equip_" + j), ""));
                            if (ds_list_find_index(inventory, j) == -1 && ds_grid_get(equip, j, AMOUNT) > 0)
                            {
                                ds_list_add(inventory, j);
                            }
                        }   
                    This should be:
                    for (i = 0; i < totalLevels; i++)
                        {
                            level[i, 1] = ini_read_real("Levels", "Level_" + string(i), "");
                        }
                        for ( j = 0; j < ds_grid_width(equip); j++ )
                        {
                            ds_grid_set(equip, j, AMOUNT, ini_read_real("Equipment", "Equip_" + string(j), ""));
                            if (ds_list_find_index(inventory, j) == -1 && ds_grid_get(equip, j, AMOUNT) > 0)
                            {
                                ds_list_add(inventory, j);
                            }
                        }   

                    Errata type: Code   Page No: 100

                    instance_create(room_width - 64, room_height/2 - 64, obj_Strafer);
                    instance_create(room_width - 64, room_height/2 + 64, obj_Strafer);

                    should be

                    instance_create(room_width + 64, room_height/2 - 64, obj_Strafer);
                    instance_create(room_width + 64, room_height/2 + 64, obj_Strafer);
                    
                    
                    Errata type: Code    Page No: 101
                    placeY = irandom_range(64, room_height - 64);
                    instance_create(room_width - 64, placeY, obj_SpaceMine);

                    should be

                    placeY = irandom_range(64, room_height - 64);
                    instance_create(room_width + 64, placeY, obj_SpaceMine);
                    Errata type: Code   Page No: 101
                    placeY = irandom_range(80, room_height - 80);
                    instance_create(room_width - 32, placeY, obj_FloatBot);
                    instance_create(room_width - 64,placeY - 32, obj_FloatBot);
                    instance_create(room_width - 64, placeY + 32, obj_FloatBot);

                    should be

                    placeY = irandom_range(80, room_height - 80);
                    instance_create(room_width + 32, placeY, obj_FloatBot);
                    instance_create(room_width + 64,placeY - 32, obj_FloatBot);

                    Errata type: Technical   Page No: 106

                    It is:

                    Set  Origin to  X:  43,  Y:  22, and then click on  OK.

                    Should be:

                    Set  Origin to  X:  28,  Y:  24, and then click on  OK.

                    Errata type: Code   Page No: 95

                    The code:

                    bullet.hspeed -= 2; 

                    should be:

                    bullet.speed -= 2;

                    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 GameMaker +    Heroku Cloud Application Development =
                    50% Off
                    the second eBook
                    Price for both: $41.55

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

                    What you will learn from this book

                    • Create great web based and social networking games, including games for Facebook, no experience is needed
                    • Implement Pathfinding and Artificial Intelligence
                    • Make games in various genres using the GameMaker Language
                    • Explore and appreciate the most popular mobile games genre, Physics based games
                    • Add unlockable levels, equipment and inventories
                    • Create amazing particle effects for any game
                    • Publish your games online, play with friends on Facebook

                    In Detail

                    The introduction of HTML5 has revolutionized the web browser as a legitimate gaming platform with unlimited potential. Making games for the browser has never been simpler, especially with GameMaker Studio. Developers have full control over asset management, built-in systems for physics, particles and path finding. In addition, it offers a rich scripting language and extensions for developers now enabling everyone to create games and monetize them quickly and easily.

                    HTML5 Game Development with GameMaker will show you how to make and release browser based games using practical examples. This book utilizes GameMaker’s powerful scripting language allowing you to create your first game in no time. With this guide you will develop a thorough skill set and a coherent understanding of the tools to develop games of increasing complexity, gradually enhancing your coding abilities and taking them to a whole new level.

                    The GameMaker Studio environment allows you to jump right into building browser based games quickly and releasing them online. The chapters focus on core practical elements, such as, artificial intelligence and creating challenging boss battles. This book guides you on how to use advanced features easily and effectively, these include, data structures and demonstrating how to create rigid body physics with simple explanations and visual examples. By the end of this book you will have an in-depth knowledge of developing and publishing online social browser based games with GameMaker.

                    Approach

                    The book is a friendly but explosive reference for all skill levels, with several action packed projects. You will develop the ability to build games from scratch with a comprehensive practical tutorial guide. This book is assured to boost your skill set to another level.

                    Who this book is for

                    This book is for anyone with a passion to create fun and action packed web browser games using GameMaker Studio. This intuitive practical guide appeals to both beginners and advanced users wanting to create and release online games to share with the world, using the powerful GameMaker tool.

                    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