Any help would be much appreciated.

goliathgoliath Member Posts: 1,440
edited November -1 in Working with GS (Mac)
Hey guys, I am so close to finishing my game!! All the pieces are in place..... I just need to figure out how to make my game spit out random patterns for a memory game and have player repeat them as they progress.

Any ideas?

Comments

  • netdzynrnetdzynr Member Posts: 296
    What kind of patterns? Numbers? Images? Words? Something else?
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    1. "any help" not a good title
    2. "patterns" is not a good answer.

    Images, words, numbers everything is different.
    What do you mean with patterns?

    there is a random fuction. Look for it in the FAQ under "expression editor"
  • goliathgoliath Member Posts: 1,440
    The game is based on the old Simon game.... Players are going to have to repeat a series of patterns and sounds.

    Thanks for being patient with me. This is my first game and I am just looking for some advice.
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    We should know, how the game should look like.

    To be honest, if I wanted to help you, I would have to write your entire game here, with that few information given and probably it still wouldn't be the same game, you want.

    you have to use attributes and random numbers and based on the random number you must spawn your "patterns".

    But we would have to know, what is seen on the screen, when it should appear, where it should appear, how many of them should appear and so on.

    There is enough info on random fuction and spawning actors on the forum and in the tutorials.

    If you have specific problems, ask them. With this few info, you give, I can't say anything. Maybe others can...
  • quantumsheepquantumsheep Member Posts: 8,188
    Ah - Simon - loved it as a kid...

    Essentially you'll have four colours, that will be highlighted in different sequences. e.g. Red Red, yellow, blue - and the user would have to press those colours in the same order to get it right.

    You just need to be clearer about what you want help with, and how your game works ;)

    Hope that helps a little for those in a position to help.

    QS :)

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • goliathgoliath Member Posts: 1,440
    Well thanks for the "friendly" advice. Man I am just trying to create a game here and I get the 3rd degree...

    I thought that's what these boards were designed for anyway... I have NEVER done this before and I was looking for some advice. I apologize for not being specific enough and not having a good title for my post but dude if you didn't want to help, don't help.

    I will try the patterns/attributes thing and I appreciate that part of your comment and I will report back if it works.

    I have been working really hard on this thing for the last week so I thought I would turn it over to the community and get some help. I have watched TON of video tutorials but like I said, this is my first time doing this.

    As mentioned, thanks for the attributes suggestion as I will try that.
  • design219design219 Member Posts: 2,273
    "Man I am just trying to create a game here and I get the 3rd degree..."

    That's just how Hun is... you get used to him. He actually can be helpful, but he's not a real "people person" and I'm sure he would even say so himself. That said, he has a point, you just need to study some of the Support info on how attributes and random numbers work.

    Best of luck, and after you study the documentation, and still have questions, post again with exactly what's not working.
  • goliathgoliath Member Posts: 1,440
    Thanks QS. Yes Simon is the idea i am going for. Sorry I wasn't being more specific.
  • CatOnAKeyboardCatOnAKeyboard Member Posts: 39
    In the most generic sense, you will need a control that selects a random number, and then a control that acts upon that random number. It is difficult to describe exactly what path you should take to the solution without knowing more about how your game works. But a simple example (which is still quite complicated):

    Simon things needed:
    4 actors (R,G,B,Y)
    4 booleans (Rbool,Gbool,Bbool,Ybool)

    Behaviors:
    Timer: every # seconds
    -- number := random number 1-4

    Rule: if number == 1 AND Rbool == false
    -- spawn R
    -- Rbool := true

    (...) 3 other rules for three other colors

    This will basically make the other random, but only happen once for each color.

    Sorry if my shorthand is too difficult to discern. Let us know how it goes.
  • bladeolsonbladeolson Member Posts: 295
    goliath:

    I would imagine you would want to set up a variable that represents each color in your simon game. for example 1 to 4

    then make the game engine choose a random number from 1 to 4 ever randam number from .5 secs to 3 seconds or something like that.

    You will need to store those numbers in integers for colors choosen or reals for time

    You could also make it add an additional random choice each time with some sort of counter.

    I don't know if that is helpful, but I am just thinking outloud here. Sounds like a fun idea for a game. Hope you have fun figuring it out. I suggest dig into it and play around , you will figure it out.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Simon requires a preset random sequence of colors.

    It's a little tedious to do in GameSalad, but it can be done.

    Simon works by creating a random sequence of colors. In a different programming environment, you would use an Array, or list, for the sequence, like this:

    myRandomSequence = [R,Y,B,G,G,G,B,R,Y,R,R,Y,G,G,B,R];

    That example is what a random sequence of 16 steps would look like.

    GameSalad does not have an Array data type, so you will have to make a separate Attribute for each step of the sequence, like this:

    myRandomSequence1 = 0
    myRandomSequence2 = 0
    myRandomSequence3 = 0
    myRandomSequence4 = 0
    myRandomSequence5 = 0
    myRandomSequence6 = 0
    myRandomSequence7 = 0
    myRandomSequence8 = 0
    myRandomSequence9 = 0
    myRandomSequence10 = 0
    myRandomSequence11 = 0
    myRandomSequence12 = 0
    myRandomSequence13 = 0
    myRandomSequence14 = 0
    myRandomSequence15 = 0
    myRandomSequence16 = 0

    But that just gives you the placeholders for the steps. You still need a way to fill those steps with a random color.

    You can create an actor called RandomSequenceGenerator

    And a global boolean Attribute called PleaseCreateMyRandomSequenceNow

    In the RandomSequenceGenerator Actor, create a Rule like this:

    Rule
    When game.PleaseCreateMyRandomSequenceNow = TRUE
    -----Change Attribute game.PleaseCreateMyRandomSequenceNow To: FALSE
    -----Change Attribute game.myRandomSequence1 To: random(1,4)
    -----Change Attribute game.myRandomSequence2 To: random(1,4)
    -----Change Attribute game.myRandomSequence3 To: random(1,4)
    -----Change Attribute game.myRandomSequence4 To: random(1,4)
    -----Change Attribute game.myRandomSequence5 To: random(1,4)
    -----Change Attribute game.myRandomSequence6 To: random(1,4)
    -----Change Attribute game.myRandomSequence7 To: random(1,4)
    -----Change Attribute game.myRandomSequence8 To: random(1,4)
    -----Change Attribute game.myRandomSequence9 To: random(1,4)
    -----Change Attribute game.myRandomSequence10 To: random(1,4)
    -----Change Attribute game.myRandomSequence11 To: random(1,4)
    -----Change Attribute game.myRandomSequence12 To: random(1,4)
    -----Change Attribute game.myRandomSequence13 To: random(1,4)
    -----Change Attribute game.myRandomSequence14 To: random(1,4)
    -----Change Attribute game.myRandomSequence15 To: random(1,4)
    -----Change Attribute game.myRandomSequence16 To: random(1,4)

    That will fill the steps with a random number between 1 and 4, something like this:

    myRandomSequence1 = 2
    myRandomSequence2 = 3
    myRandomSequence3 = 4
    myRandomSequence4 = 4
    myRandomSequence5 = 4
    myRandomSequence6 = 1
    myRandomSequence7 = 2
    myRandomSequence8 = 1
    myRandomSequence9 = 3
    myRandomSequence10 = 4
    myRandomSequence11 = 3
    myRandomSequence12 = 3
    myRandomSequence13 = 1
    myRandomSequence14 = 2
    myRandomSequence15 = 4
    myRandomSequence16 = 1

    (1=Red,2=Blue,3=Yellow,4=Green)

    Simon works by first showing 1 step of the sequence. Then the player repeats it.
    Then Simon shows two steps of the sequence. Then the Player repeats those two steps.
    Then Simon shows three steps, and so on, and so on.

    If the Player correctly gets all 16 correct they win. If at any time, the player presses a wrong color, they lose.

    Now, your job is to use Timers and Attributes to step the user through this sequence.
    I'm going to leave that up to you to program. I could do it for you, but where is the fun in that?

    Then, once you master this game, you can make a version of Super Simon! Which had 8 colors! (two sets of each color)

    Interesting fact: the person who created this game, Ralph Baer, is called the "Father of Video Games" as he also invented the first home video game console system, the Odyssey. Which was released the same year I was born, 1972. Coincidence?
  • goliathgoliath Member Posts: 1,440
    Guys thank you so much!! I cannot wait to try out all of these and I will keep you updated. I sincerely appreciate the help and I will keep you all updated.

    I will be working on this for the next number of hours! Thanks!!!!
  • goliathgoliath Member Posts: 1,440
    Here I'm thinking I am making a simple memory game.... man this is tedious.... fun but tedious....
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    1. I have no clue what a simon game is. I am not american.
    2. I would help, if I could, but this topic started like a "build me a car" in a mechanics forum
    3. I don't think, the forum is here for posts like firemapple's.

    If he has so much time to practically write a whole game down here for you, good for him and for you. Be thankful for that. I don't have this time, nor am I willing to do it.

    Nobody made a game for me either and I do it also the first time. I am also not a programmer.

    So before you get upset, "dude", maybe you should try a bit harder first and then, when you are stuck somewhere, I am happy to help if I can.
  • goliathgoliath Member Posts: 1,440
    Wow man you have no "time" to help someone who is new to this and who is not a programmer but you have time to post 3 posts that do not help at all.... Thanks.

    I have worked very hard on this game and I only posted this because I needed help. If you didn't want to help, don't post that's all.

    Anyway- I didn't want to turn this into a bickering match, I was just looking for some help. I am really excited about this game and was only looking for a more experienced person.
  • goliathgoliath Member Posts: 1,440
    For this part :

    Rule
    When game.PleaseCreateMyRandomSequenceNow = TRUE
    -----Change Attribute game.PleaseCreateMyRandomSequenceNow To: FALSE
    -----Change Attribute game.myRandomSequence1 To: random(1,4)
    -----Change Attribute game.myRandomSequence2 To: random(1,4)
    -----Change Attribute game.myRandomSequence3 To: random(1,4)
    -----Change Attribute game.myRandomSequence4 To: random(1,4)
    -----Change Attribute game.myRandomSequence5 To: random(1,4)
    -----Change Attribute game.myRandomSequence6 To: random(1,4)
    -----Change Attribute game.myRandomSequence7 To: random(1,4)
    -----Change Attribute game.myRandomSequence8 To: random(1,4)
    -----Change Attribute game.myRandomSequence9 To: random(1,4)
    -----Change Attribute game.myRandomSequence10 To: random(1,4)
    -----Change Attribute game.myRandomSequence11 To: random(1,4)
    -----Change Attribute game.myRandomSequence12 To: random(1,4)
    -----Change Attribute game.myRandomSequence13 To: random(1,4)
    -----Change Attribute game.myRandomSequence14 To: random(1,4)
    -----Change Attribute game.myRandomSequence15 To: random(1,4)
    -----Change Attribute game.myRandomSequence16 To: random(1,4)

    Should I be creating a rule within a rule? Under change attribute, it was not giving me the option to PleaseCreateMyRandomSequenceNow To: FALSE. I am very thankful that you guys are helping me with this.
Sign In or Register to comment.