playMaker

Author Topic: "Simon says" game  (Read 6717 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: "Simon says" game
« Reply #15 on: February 03, 2014, 04:11:41 AM »
Hi,

 how does the user knows where he is? could you share some screenshot of your game? or some blue prints?

 If you use keyboard, it's actually a lot easier, you will simply define the right logical combination of keys and that's it isn't it? "Left, Left, Right, Left"

am I understanding correclty?

bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 609
    • View Profile
Re: "Simon says" game
« Reply #16 on: February 03, 2014, 07:17:21 PM »
Hi,

 how does the user knows where he is? could you share some screenshot of your game? or some blue prints?

https://db.tt/C1tllgUQ

https://db.tt/4xH70OV4

Does this help?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: "Simon says" game
« Reply #17 on: February 07, 2014, 05:16:10 AM »
Hi,

 ok, and what keys would be used to select one color? would we use left and right and then press enter to validate the choice?

bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 609
    • View Profile
Re: "Simon says" game
« Reply #18 on: February 07, 2014, 06:51:55 PM »
Hi,

 ok, and what keys would be used to select one color? would we use left and right and then press enter to validate the choice?

bye,

 Jean

Right now Blue is set to Space, Pink is A, and Green is Z. Plus I'm trying to make it more like the game is in real time, so the player doesn't have to press a additional key or click a button to confirm the type of pattern they have created.

Think of this concept of pressing keys in real time like a DDR or Parappa The Rapper game. 


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: "Simon says" game
« Reply #19 on: February 11, 2014, 04:35:43 AM »
Hi,

 then you need to work along this line:

 when you create a pattern, you record each item in order in a simple Array ( using ArrayMaker, you know this add on right?).

 then when the user starts repeating this sequence, you check that his input matches the current index in the recorded pattern.

so let's say this is the pattern to repeat

blue
red
yellow
red
red
blue

when the user select his first action, check the first item in that list, if it doesn't match you fail the user attempt and start over, else you increment by one the index to look up the pattern, when the player performs his second input, you check the second item in the list and compare, this until the pattern is fully repeated.

Does that make sense?

 Bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 609
    • View Profile
Re: "Simon says" game
« Reply #20 on: February 11, 2014, 01:29:14 PM »
I do have ArrayMaker installed.

Quote
Does that make sense?

So what I have to do is make playmaker record key pressing actions for each buttion. If that's what you are saying right?

What actions for each FSM within the buttons and the main FSM for the level would be needed in order to make it work?

Thanks.
« Last Edit: February 11, 2014, 01:33:35 PM by coffeeANDsoda »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: "Simon says" game
« Reply #21 on: February 12, 2014, 11:02:48 AM »
Hi,

 ok, Please find a working sample doing the whole logic of a Simon Says game on the Ecosystem.

 It's only using letters, but you will get everything you need to understand how to build the logical steps to create a pattern, show it, and then watch user's input and check against the pattern just created. Also this sample features some goodies such as a proper UI ( simple but working), and a level system that increase difficulty as the user progress and wins.

The nice thing about this sample is that you can watch in real time the creation and check of the pattern, the ArrayList proxy component is set to work live and items being added and removed can be seen live in Unity Inspector ( and also a nice way to cheat :)

This sample will be on the next ArrayMaker update, which I should start sometime next week.

If you have any questions let me know.

Bye,

 Jean
« Last Edit: October 25, 2017, 11:16:57 PM by jeanfabre »

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 609
    • View Profile
Re: "Simon says" game
« Reply #22 on: February 14, 2014, 08:54:45 PM »


If you have any questions let me know.

How do I decrease the speed of each letter appearing on the screen?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: "Simon says" game
« Reply #23 on: February 17, 2014, 09:53:34 AM »
Hi,

 in the "show item" state, there is a "wait" action, simply increment that valuie, it's 0.4, make it 1 for 1 second.

bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 609
    • View Profile
Re: "Simon says" game
« Reply #24 on: February 18, 2014, 12:46:29 AM »
In the example, it looks like theirs 2 full FSM instead of 1 whole. With Start and Start pattern are in a black color verses grey for states. How come?
« Last Edit: February 18, 2014, 12:48:19 AM by coffeeANDsoda »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: "Simon says" game
« Reply #25 on: February 18, 2014, 02:37:32 AM »
Hi,

 I think you are getting confused with a lot of concepts here.

 an FSM is "one" graph and it appears as one component on the GameObject itself.

in their, states are grey by default but you can color them.

the black "states" are not states, they are "global transitions" referencing events ( global or not).

So , here the "START" global transition ( in black) is the real starting point of the FSM.  it features a gui action that shows a button on screen, when the user press that button it sends an event called "START PATTERN". I implemented that event as a a global transition ( in black) for the state  "Clear list", because this is the first thing I want to do when starting a pattern, then the flow of states and transition leads to more and more actions.

Does that make more sense? I would encourage that you watch as much screencasts and videos on PlayMaker. This will help you get a feel of what's involved and the vocabulary. Jumping into this "simon says" example may be too complex if you are beginning with PlayMaker and Unity has it covers a lot of ground, especially with the use of ArrayMaker that is yet another thing to learn on top.


http://www.hutonggames.com/tutorials_game_design_with_playmaker.php

Bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 609
    • View Profile
Re: "Simon says" game
« Reply #26 on: February 18, 2014, 01:37:49 PM »

the black "states" are not states, they are "global transitions" referencing events ( global or not).

So , here the "START" global transition ( in black) is the real starting point of the FSM.  it features a gui action that shows a button on screen, when the user press that button it sends an event called "START PATTERN". I implemented that event as a a global transition ( in black) for the state  "Clear list", because this is the first thing I want to do when starting a pattern, then the flow of states and transition leads to more and more actions.

 I just don't get how a event can be turned into a global event. Don't recall seeing that in the FSM variables tutorial for playmaker.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: "Simon says" game
« Reply #27 on: February 18, 2014, 09:36:47 PM »
Hi,

 There are two concepts here, global events and global transitions.

 transitions can be local to a state ( underneath in white) or global ( black on top of a state). This is independant from the "global" flag of an event.

 To set an event to global, select it in the "event" tab and tick its check box, now it can be used for inter FSM communication.

does that answer your question?

 Bye,

 Jean

WillowN

  • Playmaker Newbie
  • *
  • Posts: 16
    • View Profile
Re: "Simon says" game
« Reply #28 on: October 23, 2017, 10:03:02 AM »
Is there any chance you might be able to share this Simon game again? The dropbox link is dead

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: "Simon says" game
« Reply #29 on: October 24, 2017, 08:17:21 AM »
Hi,

 yeah, Dropbox really shoot themselved in the foot by deprecating the public... they could have stopped the ability to add new content but kept existing content live...

I am working on it, should be ready tomorow ( I want to use the new ui system now)

 Bye,

 Jean