0%

Book Description

Design and create your own engaging, extensible, and addictive game using Construct 2

In Detail

Construct 2 is one of the most accessible 2D game development tools available. With its easy-to-use editor, you can create brilliant, stunning, and impressive games even if you're just starting out. Construct 2 takes care of all the technical details and lets you focus on the exciting bit, designing your game.

Packed with practical and accessible examples, this guide will empower you to become a top game developer. With an introduction to the highly effective Construct 2 interface, you will learn immediately how to make great game design documents and build in random generation, as well as popular and vital game concepts.

Learning Construct 2 will arm you with all the knowledge, tips, and tricks to make you stand out in the world of game development, producing enjoyable games quickly.

What You Will Learn

  • Install Construct 2 and navigate around its interface and layout
  • Become involved in the developmental life cycle of a game
  • Use events to manipulate game objects in the layout
  • Understand the many types of game object behavior and use them to control game objects
  • Analyze game objects at runtime to check whether there are any bugs or errors
  • Apply the best set of practices when developing games in Construct 2
  • Build, package, and publish your game to the Web and on different devices

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Learning Construct 2
    1. Table of Contents
    2. Learning Construct 2
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Downloading and Understanding Construct 2
      1. About Construct 2
        1. Downloading Construct 2
        2. Walking through the installation of Construct 2
      2. Navigating through Construct 2
      3. Creating game objects
        1. Adding layers
        2. Sorting the z-order
        3. Layer properties
      4. Saving your project
      5. What is an event system?
        1. Reading an event system
        2. Writing events
        3. Creating a variable
      6. Using a license
      7. Summary
    9. 2. Creating Your First Game Design
      1. Defining a game
        1. Making your own challenges in a game
        2. Rewarding your players
        3. Ending the loop
        4. Examples of games for Construct 2
      2. Drawing the flow of the game
      3. Making game mechanics
        1. Creating game rules
        2. Main game phases
        3. Understanding the fun factor
      4. More references for game design
        1. Game-design template
      5. Game-design books
      6. Summary
    10. 3. Creating Diverse Player Experiences with a Flappy Bird Clone
      1. How Flappy Bird works
        1. Understanding random generation
        2. Flappy Bird game design
      2. Making our own Flappy Bird game
        1. Adding the layers
        2. Adding a Sprite object
          1. Using image points
          2. Setting the collision polygon
        3. Enabling the plane to fall and collide
        4. Making it tap to flap
          1. Using instance variables
        5. Using the timer behavior
        6. Stopping the rotation
      3. Learning random generation
        1. Making the ground scroll
          1. Picking objects for actions
        2. Creating random obstacles
      4. Adding collectibles
        1. Completing our code
      5. Summary
    11. 4. Making a Breakout Clone
      1. Creating the design
        1. Designing the reward system
      2. Setting up our layout
        1. Using a tiled background object
        2. Moving the paddle in only two directions
        3. Making the ball bounce
        4. Adding the blocks
        5. Destroying the blocks
        6. Setting up the power up blocks
          1. Writing an expression
      3. Understanding constant variables
        1. Adding sub-events
        2. Changing a game object's state
        3. Adding more states
      4. Ending a game
        1. Losing by time
        2. Losing by life
        3. Calculating the score
          1. Comparing an expression
        4. Killing the bug
      5. Summary
    12. 5. Making a Platformer Game
      1. Preparing the level
        1. Setting up the character
        2. Moving the character
        3. Changing the animations
        4. Making the camera follow the player
        5. Jumping through platforms
        6. Moving to another level
        7. Hitting the coin box
      2. Learning about physics
        1. Forces, impulses, torques, and joints
        2. Adding a puzzle element
          1. Moving our character with the Physics behavior
          2. Changing the properties of the rock
          3. Selecting an object via its UID
      3. Joining two objects
      4. Types of physics engines in Construct 2
      5. Summary
    13. 6. Creating a Space-shooter Game
      1. Setting the stage
        1. Scrolling the stage
        2. Creating the enemy
          1. Deleting offscreen objects
        3. Making the player shoot at enemies
        4. Adding the particle effects
      2. Storing data in Construct 2
        1. Getting to know arrays
          1. Understanding the elements of an array
          2. One-dimensional and multidimensional arrays
        2. Storing data in a dictionary
        3. Comparison between arrays and dictionaries
        4. Using arrays in your game
        5. Inserting data into a dictionary
          1. Retrieving the value in an array and dictionary
      3. Storing data in the player's machine
        1. Using WebStorage to store data
        2. Making the leaderboard
          1. Understanding looping
        3. Using a loop in our leaderboard
      4. Summary
    14. 7. Making a Battle Tank Game
      1. Setting up the layout
        1. Using a container
        2. Pinning an object to another object
        3. Moving the units
        4. Adding obstacles
          1. Making custom obstacles for the units
        5. Creating enemies
        6. Making the turrets shoot
        7. Navigating through the level
        8. Adding music and sound effects
          1. Choosing the right file
          2. Playing the sound
      2. Making enemies smarter
        1. Enabling enemy patrolling
        2. Creating a scout type of enemy
        3. Additional reading
      3. Summary
    15. 8. Debugging Your Game
      1. Bugs and their types
        1. Solving a runtime bug
        2. Picking the right object
          1. Picking in sub-events
          2. Picking unreferenced objects
      2. Using Construct 2's debugging tool
        1. Using the inspector
        2. Watching the properties values
        3. Profiling the CPU
          1. Reading the profiler
        4. Performance summary
        5. Using breakpoints
      3. Different levels of bug importance
      4. Summary
    16. 9. Mastering the Best Practices
      1. Applying common best practices
        1. Backing up data regularly
        2. Testing your game on multiple browsers
        3. Supporting devices with touchscreen
        4. Using the right file format
        5. Security
      2. Using technical best practices
        1. Optimizing for mobile platforms
        2. Knowing the cause of poor performance
        3. Listing the common optimization misconceptions
          1. Zeroing in on a frames per second rate
          2. Understanding which part of the game to optimize
        4. Previewing over Wi-Fi
      3. Using your memory wisely
        1. Avoid using large image files
        2. Doing it the right way
        3. Construct 2 – texture loading
        4. Mobile limitations
      4. Summary
    17. 10. Publishing Your Game
      1. Exporting to the Web
        1. Exporting as an HTML5 game
        2. Uploading games to your Dropbox
        3. Requirements for the Scirra Arcade
          1. Publishing for Scirra's Arcade
        4. Changing the icons used
      2. Publishing to desktop
        1. Exporting using node-webkit
        2. Publishing as an Open Web App
          1. Exporting a packaged app
        3. Exporting a hosted app
          1. Submitting to the Firefox marketplace
      3. Publishing to mobile platforms
        1. Preparing your PhoneGap game
        2. Uploading to PhoneGap
      4. Summary
    18. Index