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)

Summary


Now that you have finished the chapter, you have a good understanding of the GameMaker: Studio interface. You have learned what many of the buttons on the main interface do; how to create and name resources including sprites, objects, and rooms; how to add events and actions to your objects and assign them sprites; how rooms and their coordinates work; and how to compile your games.

Review questions

It's always good to be asked questions so that you can be sure you comprehend everything you have read; so, here are some review questions to go over. If you can't figure one out, that's a sign that you could benefit from more reviewing of the chapter:

  • What are examples of common naming conventions used for the various resources available in GameMaker: Studio?

  • How do you open the documentation for GameMaker: Studio and what is it useful for?

  • What is the difference between the green play button and the red play button when it comes to compiling and running your game?

  • How do coordinate planes in rooms here vary from the Cartesian coordinate system (regular mathematics)?

  • What are events and actions and how are they related?

Quick drills

It's also good for comprehension to apply the skills you learned in different ways, so here are some little challenges that you can try out to make sure you understand how to perform the tasks you learned:

  1. Edit the sprite in your spr_square and play around with some of the other tools in the editor to modify your original image (your final outcome doesn't even have to be a square); just rename the sprite to reflect this, as with your object.

  2. Play around with some of the other actions on your obj_square to make it do more rather than be displayed and print text. Try something and immediately test it. It will become good practice to test your games often in order to discover errors where they originate. If you add ten features and discover a bug, you don't know where it came from—but if you add one and get a bug, you know where your problem is.

  3. Create a new project named testGame2 or something like that. It will be a clone of the original example, but you're not going to reread the instructions in the chapter or read them from your example game. You're instead going to see if you can recall how to do everything from memory. If you can't recall something, review the chapter to make sure you are comfortable with the content.

Remember that all of these drills and questions are for your comprehension and you're good, so do them—it only helps. With that, this chapter concludes and hopefully, you learned a lot about using GameMaker: Studio. The next chapter will cover the creation of a more complex game with which the player interacts. It will be an escape the dungeon game from which you will learn all sorts of components of programming games in GameMaker: Studio, much more so than you already know about.

An extra note that you might find helpful—GameMaker saves backups of your game by default in your Documents\GameMaker\Backups\<project name> folder. You might find that it saves them far too often and does not save enough, so under the File option in the IDE's top bar, select Preferences, and the left pane will allow you to specify some backup-related options (frequency, location, and amount). Backups are useful if you accidentally break your game and need to go back to a point where everything worked. It might be helpful to make a copy of a working project alongside using the built-in backup system.