playMaker

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

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
"Simon says" game
« on: December 30, 2013, 01:06:31 AM »
I thought about making a "simon says" style type of game in playmaker. How can that be done?

Thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: "Simon says" game
« Reply #1 on: December 30, 2013, 07:00:15 AM »
Hi,

 Can you explain a bit more about what you are trying to achieve? there is many forms of implementation for this types of game and the context is very important to give valid advices.

 Typically tho, this is very straighforward, you simply fire a global event like "SIMON SAYS / RUN" or "SIMON SAYS / STOP" and any player or NPC can watch for these events either by reacting to them or show something on screen to express what Simon Just said.

Then, one seconds from the call, you verify that each players is actually doing what simon said, so each player would have built in all the different possible things Simon could say and would maintain flags of what they do currently.

bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: "Simon says" game
« Reply #2 on: January 01, 2014, 11:29:00 PM »
Hi,

 Can you explain a bit more about what you are trying to achieve?

A game where the player mimics a series of light patterns.

Like this. http://en.wikipedia.org/wiki/Simon_%28game%29

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: "Simon says" game
« Reply #3 on: January 02, 2014, 05:38:33 AM »
Hi,

 Then I would use ArrayMaker to define the pattern, play it and check against the user input as well.

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

so each color is an entry in an arrayList, in order, then you iterate through them using a timer and show the current color on screen. During the user input time, have a counter for the user input and compare his color with the arrayList content at that index, move to the next everytime it's correct or fail the user if the color doesn't match.

bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: "Simon says" game
« Reply #4 on: January 13, 2014, 04:18:34 AM »
When I added the state Get Button Up & Down along with Set light intensity on both of the on and off states I get a error message.

Code: [Select]
UnityException: Input Button off light is not set up
On one hand it's set up to where the light doesn't show up, but I can't find a way to control what buttons the player has to press. How can I add a state that lets me do that?

Thanks.

« Last Edit: January 13, 2014, 04:21:53 AM by coffeeANDsoda »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: "Simon says" game
« Reply #5 on: January 13, 2014, 06:09:59 AM »
Hi,

 You must define your inputs within Unity Input settings:

http://docs.unity3d.com/Documentation/Manual/Input.html

 Bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: "Simon says" game
« Reply #6 on: January 13, 2014, 04:31:56 PM »
By editing the Negative and Positive Button? See, since theirs three buttons I want the game set up to have the player be able to press A,S, and D. So am I suppose to add something to Descriptive Name as well as Negative name?  Still isn't working.

Thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: "Simon says" game
« Reply #7 on: January 21, 2014, 02:00:58 AM »
Hi,

 What A S and D should do in your game? Because these keys are already in use by default for horizontal and vertical movements. This is maybe your problem? Study the vertical and horizontal inputs and you'll see that they are defined in there.



 Bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: "Simon says" game
« Reply #8 on: January 23, 2014, 06:02:59 PM »
I see. Well I was able to get a few input keys to work. When it comes to arrays, the example with 3 in a row doesn't have colors that don't match disappearing.

I have a problem with that because usually in matching games you have to find 2 or 3 objects that are the same picture, color, whatever.

How would that be solved.

Thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: "Simon says" game
« Reply #9 on: January 24, 2014, 07:12:44 AM »
Hi,

 You need to add this logic instead of what this example i currently doing, so instead of animating cubes, simply animate their alpha channel or visibility.

bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: "Simon says" game
« Reply #10 on: January 29, 2014, 12:37:12 AM »
Could you elaborate on what certain actions I'm suppose to add to each of the objects? Like array list add, range, get? Thanks.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: "Simon says" game
« Reply #11 on: January 30, 2014, 06:27:41 AM »
Hi,

 do you have a problem of implementing the logic or the animations themselves?

 The logic is the right one from that example isn't it? It's only how you want to present that to the user that differs, so you don't need to touch arrays for this, simply animate the alpha instead of rotating the cubes for example.

Am I correct?

bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: "Simon says" game
« Reply #12 on: January 30, 2014, 09:33:32 PM »
Hi,

 do you have a problem of implementing the logic or the animations themselves?


I have the lights enabled when the player presses a key down. But the game manager is set up like this..

https://db.tt/RoE8o1V7

You see, I don't understand how this would be modified since first theirs a FSM on the game manager, second it's only for clicking three in a row and that doesn't even count images disappearing when they don't match correctly , thirdly the game isn't designed to be a memory pattern game that the player has to follow. Forth of all, just mouse clicking. So that is what I'm stuck on. 

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: "Simon says" game
« Reply #13 on: February 03, 2014, 03:32:11 AM »
Hi,

 you need to cut down your problem.

1: user input management
2: game procedure
3: Winning procedure check

These three topic should be addressed separatly and then once you master each one you can combine them to finalize your game.

So, can you describe more in details what's your issues with mouse to begin with? how do you want the user to interact with your game? by dragging and moving over stuff?


Bye,

 Jean

coffeeANDsoda

  • Hero Member
  • *****
  • Posts: 618
Re: "Simon says" game
« Reply #14 on: February 03, 2014, 06:08:14 AM »
Hi,

 you need to cut down your problem.

1: user input management
2: game procedure
3: Winning procedure check

These three topic should be addressed separatly and then once you master each one you can combine them to finalize your game.

So, can you describe more in details what's your issues with mouse to begin with? how do you want the user to interact with your game? by dragging and moving over stuff?

Instead of using a mouse to click on buttons, or dragging, just use key's on a keyboard. Since the user has to mimic a pattern that the game want's them to repeat.