playMaker

Author Topic: Creating a Game Over  (Read 3187 times)

Justlivinganotherday

  • Playmaker Newbie
  • *
  • Posts: 2
Creating a Game Over
« on: March 18, 2014, 09:06:58 PM »
Hello! I'm fairly new to Playmaker but I've been messing with it for a while now and I have to say I'm very impressed by it but I need a little help in regards to a "Game Over" sequence.

Essentially what I want to do is when the player character falls or touches "spikes" which I already have I would like a few things to happen. First a sound effect, second a "Game Over" comes down into the Main Camera from above the screen as well as the "Retry" and "Main Menu" buttons. Which brings me to my 3rd point, I would like the "Retry" button to start the game again.

I know it's a lot to ask but I've been working on my project for a long time now and this is my only hurdle so far.

Thanks for the feedback in advance!

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: Creating a Game Over
« Reply #1 on: March 18, 2014, 10:59:44 PM »
Make global event a "Collision Enter" on your player. So when hit Something, create a game over.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Creating a Game Over
« Reply #2 on: March 19, 2014, 04:46:50 AM »
Hi,

 Make sure you glance through the 100% playmaker small games by M2H, you'll find a lot of design patterns and solutions for all of these cases.

https://hutonggames.fogbugz.com/default.asp?W880

bye,

 Jean

Justlivinganotherday

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Creating a Game Over
« Reply #3 on: March 19, 2014, 01:17:07 PM »
Thanks for the advice from both of you. The tutorials I viewed helped a little but ultimately I could not understand the majority of it. Essentially what I want to accomplish is a running player that is running on platforms to attempt to jump over incoming spikes on those platforms (infinite runner), then when that player impacts those spikes it initiates a game over or automatic restart.

This is a 2d game and I've tried to add colliders and collision enters but it forces me to use rigidbodies and colliders that aren't 2d and it interferes with the character animations.

So far I've completed a running sequence, a random platform generator and a spike generator but now I just need that Game Over event or auto restart. Either way.

Sorry I'm just not too savvy at this kind of thing.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Creating a Game Over
« Reply #4 on: March 25, 2014, 09:06:09 AM »
Hi,

 game over and auto restarts are really a question of triggering an event to stop/pause the game and reload the level.

 -- are you able to reload a level?
-- are able to show a UI window with a hight score or some feedback with the game paused?
-- are you able to detect when you are game over in your game logic?

bye,

 Jean