You can handle what happens when the player dies.
- [Instructor] The last thing we need to do for our game…is take care of our player when they die.…We can have some fun with this.…So let's create a sword object…that will launch out from player when they get killed.…I'm gonna go to the Player Objects folder,…create an object,…and we'll cal it o_sword.…Let's set our sprite…to the Player folder and sword.…We wanted to use physics, so we'll check that box.…Let's set the Collision Shape to Box,…and modify that.…
Set the Horizontal and Vertical to eight,…and we'll just line this up with the center of our sword.…That'll work just fine.…Click OK.…Our sword isn't too heavy.…So let's change the Density to .3,…and it would be fun it bounced around the room a little bit…when it runs into things.…So let's set the Restitution to .25.…We can always adjust those later if we want to.…We wanna make sure it collides with things in the room,…so let's change the Parent to parent dynamic.…And we wanna be able to see it when it goes flying around…so let's set the depth to minus 15,…which will put it in front of our roof tiles.…
- 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.