What is the Physics System in GameMaker: Studio?

By Michael Rohde

Working with physics in GameMaker: Studio draws upon examples from the in-software Physics Tutorial, as shown in this figure. (Choose the Tutorials tab from the New Project window that appears when you start the software; the Physics Tutorial is found under Advanced.) The tutorial provides information on how to make an Asteroids-style game.

The New Project window.
The New Project window.

Game physics revolves around the idea of making Objects appear more real to the player. By adding physics to your game, you change how Objects react during collision detection and how Objects move through the Room based on energy and force.

Physics provide your game a more natural feel. This chapter doesn’t explain everything you can do with physics and GameMaker, but it does provide a solid foundation of how physics works.

The most simple example would be to make a player’s ship that can shoot bullets. You can also write a Script that will enable both the ship and the bullets to leave one side of the Room only to reenter on the opposite side of the Room.

The physics system in GameMaker is completely different from the movement and collision systems used in other games you can create through the different in-software tutorials, such as Catch the Clown and Breakout.

When you turn the physics system on, all interactions between Objects will be done through the physics system and all the built-in variables like speed and image_direction are no longer used. Instead, you use a whole new set of physics variables and constants.

To do anything presented here, you must already know how Objects, Instances, Rooms, Events, and Actions work. Then you can work on using code for physics.