Join Steven Moser for an in-depth discussion in this video Collision checking with the ground, part of Building a Physics-Based Platformer in GameMaker Studio Using GML.
- [Instructor] Let's open up the player object,…and transition from the jump state back into the run state.…The easiest way to do this is to check…to see if we've collided with the ground,…once we're in the jump state.…So, let's open up our collision with our static parent,…which includes the floor object.…Now, let's drag some code in there.…I'll do a triple slash comment,…and say…floor checking.…So, when we collide with the floor,…the first thing we wanna do is check and see…if we're in the jump state.…
So, let's check our state player variable,…and if the current state is equal to our jump state,…then we wanna transition back into the run state.…Simple enough.…I'll close this out.…Since we now have some code in this event,…I can remove the comment that we added earlier.…I'll close out the player object.…And if we run our game, we'll see that we have an issue.…
We'll start our player running. And jump.…You notice that for some reason,…the animation isn't correct.…It's a very subtle reason,…but what's happening is,…
- Setting up basic game components
- Creating the player object
- Using Finite State Machines
- Making the player duck
- Creating physics fixtures in code
- Creating physics obstacles
- Box2D liquid physics
- Creating particles that behave like water
- Creating a floating blocks obstacle
- Creating a swinging chain obstacle and a rope bridge
- Adding the finishing touches
Skill Level Beginner
1. Set Up Basic Game Components
2. The Player Object
3. Create Physics Obstacles
4. Liquid Physics
5. Decorate the Level
6. Finishing Touches
Next steps1m 2s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.