About Fixtures in GameMaker: Studio - dummies

About Fixtures in GameMaker: Studio

By Michael Rohde

When creating a physics-based game in GameMaker: Studio, you need to create a fixture for the Object, as opposed to a collision mask or mask_index. You create this fixture so that you can assign physical properties to the Object. Fixtures define the area of an Object that becomes the shape the physics uses for collisions; it also contains the physical information of the Object as well.

The basic process for creating a fixture is to give it a shape, define the physical properties, and then apply that fixture to the Object. You can create a fixture and then apply it to multiple Objects so they all have the same base properties. GameMaker has built-in tools to help you create and apply fixtures in the Object Properties window.

When working with a physics-based game, your Sprites must have a specific shape in that they must be convex and never concave. A convex shape is one that only has an outline or surface curved like the exterior of a circle or sphere and it has only interior angles measuring less than 180 degrees. A concave shape is one where the outline curves inward, as shown in the figure.

Create convex Sprites when creating a physics-based game.
Create convex Sprites when creating a physics-based game.

Now you can create a new Object for the player using physics properties. You can use the premade Sprite that is included in the Physics tutorial or make a new one using a convex shape.