From the course: Building a Physics-Based Platformer in GameMaker Studio Using GML

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Create the player object

Create the player object

- [Instructor] Now let's get down to business and create our player object. I'll go to the objects folder and create a new group. I'll call this group "player." And in that group, we'll create a new object. I'll call it "O_player." And for an initial setting, we'll set the sprite to the idle sprite. I'll click the sprite drop down, go to player, and select s player idol. Let's check the uses physics box and set the collision shape for our new object. I'll select the box because this will get us close enough to the sprite shape to accurately detect collisions. Let's modify the collision shape and set the fixture close to the center of the knight. There's a bit of an art to setting the collision shape to your sprite. You don't want it to be too aggressive and detect collisions when they don't seem appropriate. You also don't want to be too conservative and not detect collisions when they should happen. What we have here should be pretty close and work well for our game. We can always…

Contents