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 - GameMaker Tutorial
From the course: Building a Physics-Based Platformer in GameMaker Studio Using GML
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Create the player object2m 48s
-
Using Finite State Machines1m 38s
-
Player state machine3m 16s
-
Control logic: Idle to run state2m 5s
-
Control logic: Idle and run animations2m 38s
-
Control logic: Jump state3m 50s
-
Control logic: Rotation and animation2m 46s
-
Collision checking with the ground3m 49s
-
Make the player duck3m 57s
-
View following and debug3m 18s
-
Create physics fixtures in code6m 48s
-
Swap fixtures4m 3s
-
-
-
-
-
-