How do I make a reaction game

  • So basically what I am trying to do is something like this:

    https://play.google.com/store/apps/deta ... .halloween

    This is how far I got

    Basically, at the first click the game starts and choose a random time from 2 to 4 seconds, after that the mouth start closing and if it touches you , you lose. What I can't figure how to do is making a score system(how do I make to add 1 point every time it didn't catches you) and how to make it restart (so it is ready to play again). I tryed reseting the variables.

    Infos:

    play=0 : not playing

    play=1 : you started the game and the game has began

    play=2 : it starts moving the mouth

    play=3 : the mouth has fully closed

    gameover=0 : you are playing

    gameover=1 : mouth is opening again

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There are many missing things as i see. You should think them step by step.

    First starting condition: I suggest you a countdown or something to make player understand that game begin.

    After your random waiting time finishes jaw (upper_part) of your monster will move downward as defined Y speed as i understand. Instead of that i suggest you to use animating the monster and define the animation speed.

    Anyway, not sure if your "Game Over" system is working so i assume it is working.

    So in this case you show C2 how to "lose" the turn but not "win" it. In your example again, you can set an end Y coordinate to Jaw of monster. For ex:

    When 'any touch end' while 'play=2 and upper_part.Y < 700' than there is a "Win". So in "Win" condition you can add +1 to score and restart the game. Don't forget to set necessary variables to their defaults while restarting the game.

    But in this case you will face with other problems. You have to find out them without quiting. When you solve them you will see how simple they were. That will improve your game designing logic.

    Hope it will help you. Btw no need to set the score every thick. Once per round start will do fine. Reaction games need lowest usage of system resources to REACT better.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)