Book Image

GameMaker Programming By Example

By : Brian Christian, Steven Isaacs
Book Image

GameMaker Programming By Example

By: Brian Christian, Steven Isaacs

Overview of this book

This book is excellent resource for developers with any level of experience of GameMaker. At the start, we’ll provide an overview of the basic use of GameMaker: Studio, and show you how to set up a basic game where you handle input and collisions in a top-down perspective game. We continue on to showcase its more advanced features via six different example projects. The first example game demonstrates platforming with file I/O, followed by animation, views, and multiplayer networking. The next game illustrates AI and particle systems, while the final one will get you started with the built-in Box2D physics engine. By the end of this book, you have mastered lots of powerful techniques that can be utilized in various 2D games.
Table of Contents (16 chapters)

Creating an endless platformer


Let's first explain exactly how this game will work. Whenever the player hits a platform, they will bounce into the air, regardless of whether a key was pressed. They will come down in the air too, and bounce on any platforms they land on. Direction can be controlled by the left and right keys. If they do not land again after falling, and thus go off the bottom of the screen, they die. As they get higher, the screen will move, in that, platforms previously visible and usable will go off screen and disappear. Enemies will be incorporated, followed by the main part of the game—random spawning. The game will finish up with the introduction of menu and message displaying systems.

You can compare this whole game to games such as Doodle Jump or Pixel Jump.

So let's begin! First, make your player sprite. Give it two subimages, for a left and right view, and modify the collision mask to whatever you think works best for the sprite. Make an object for the player and prevent...