Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: coffeeANDsoda 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.
-
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
-
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
-
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
-
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.
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.
-
Hi,
You must define your inputs within Unity Input settings:
http://docs.unity3d.com/Documentation/Manual/Input.html
Bye,
Jean
-
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.
-
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
-
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.
-
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
-
Could you elaborate on what certain actions I'm suppose to add to each of the objects? Like array list add, range, get? Thanks.
-
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
-
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 (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.
-
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
-
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.
-
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
-
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?
-
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
-
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.
-
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
-
I do have ArrayMaker installed.
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.
-
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
-
If you have any questions let me know.
How do I decrease the speed of each letter appearing on the screen?
-
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
-
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?
-
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
-
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.
-
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
-
Is there any chance you might be able to share this Simon game again? The dropbox link is dead
-
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
-
Hi,
Jean has placed the simon says on the Ecosystem.
http://hutonggames.com/playmakerforum/index.php?topic=16013.0
-
Hi,
Thanks Kurt, I just could not find this thread yesterday after I'd put it on the Ecosystem, good job!
Bye,
Jean
-
Hi jean,
No problem.
Btw i remembered that i made a different version using yours, that memorized the sequence. i will see if i can find it back
-
You guys are awesome!