Help with a simple bubble popping game.

Hi, I'm trying to make a personalised ipad game for my nephew who has developmental issues. It's a very simple bubble spawn and pop game on a single scene. I'm a complete newb when it comes to this, but I've been working through with a mix of watching the tutorials and trial and error, unsurprisingly I've got stuck.

What I've got so far: I have a actor set up that, when touched, spawns bubbles. I followed the 'spawn random actor' vid and added a timer set up to randomise what kind of bubble/actor spawns. This doesn't always work, sometimes you press the trigger actor, the sound plays but nothing is spawned. I then tried changing it from spawning one actor to variants of multiple actors, just by adding multiple 'spawn actors' to the rule. So if varient = 1 it should spawn 3 actors. It now doesn't spawn anything.
I've also added a timer which gives a variable random size when the bubble spawns. Unfortunately it doesn't constrain proportions and gives me elliptical bubbles as well as round ones.


What I want to do: When the trigger is pressed, I would like it to spawn random bubbles/actors, and a random number of bubbles between 1-4.
I would also like to randomise the size they grow to when spawned, whilst constraining proportions.


Any help, or links to relevant tutorials, would be most gratefully received.
thanks in advance, Okem.

Comments

  • Alembic_SoftworksAlembic_Softworks Member Posts: 114
    I'm just heading off my day gig but try searching tutorials along the lines of "when touch is pressed spawn actor" - and then within the spawned actor you could add behaviours (using random (min, max) and maybe have that number between 1 and 4?). To randomize the size I'd probably first open up the actor and see what you can do with interpolate - I don't often use the change size behaviour myself. There will be tutorials for this on youtube and other links I'm positive. Someone on here with more experience probably knows exactly what you need to do. :)

    Here's a link to GSHelper's tutorial on spawning actors with randomized behaviour, there's plenty more good tutorials to go through, hope this helps:



  • OkemOkem Member Posts: 10
    edited January 2013
    Thanks for the reply Alembic. I'll search out some tutorials on interpolate, it's not a function I've utilised yet.

    That GSHelper tutorial is the one I followed to create the function of random spawning actors. I then put the results of that in a rule that triggers it when touched. Only it's temperamental and doesn't spawn with every touch like it should.

    Edit: Ok. I fixed the random spawning issue. Now I just need to work out how to randomise size whilst constraining proportions, and randomise the number of actors spawned.
  • OkemOkem Member Posts: 10
    edited January 2013
    Update:

    I've created a way to randomise size whilst constraining proportions by creating a randomising atribute then setting size rules for 3 alternates.
    It changes the size and constrain proportions, but unfortunately it does not do it just once when the actor is spawned, but repeatedly until actor is destroyed. So my actors jump from one size to another.
    How do I set it to only take effect once, when the actor is spawned?

    thanks for reading.
    Okem.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Okem, it sounds like you're making some good progress and learning a lot about GameSalad along the way. If you can post a screenshot of your rules or type out how you're changing the size, I'm sure someone here can help.

    It's hard to troubleshoot an issue without knowing if you are using Change Size, Change Attribute, Interpolate, etc., and then are you interpolating the width only, or the width and height, and if so, what rule/condition is that in? etc.
  • OkemOkem Member Posts: 10
    edited January 2013
    Good suggestion. thanks tatiang.

    Ok here is a screen cap of my group for randomising size.

    I created an attribute called "random size" and set it to randomise between 1-3. I then attached 3 rules, you can only see one as I could not fit any more in the cap, but the others are identical, rule 2 sets the size to 100, 3 to 150.



    With this on, it changes the size whilst constraining proportions as I want, but it changes size multiple times. I only want it to randomise the size change once, when the the actor is spawned.
  • OkemOkem Member Posts: 10
    This is the rule that governs the spawn an actor trigger.

    When pressed it plays sound and randomly spawns one of 7 actors. You can see the random 'change attribute' 1-7, and #1 of the rules (again the others are identical apart from the variables, = 2, actor: Lorry, etc)



    This works well. But I would ideally like to find a way to make it spawn multiple actors, and have this randomised.
    I guess I could do this by just putting random groups of 'spawn actor' in each rule. But wondered if there was a better way to do this, that would make it actually random rather than preset random groups that would inevitably repeat.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I don't see why the random size would be changed more than once. I assume that rule Group is turned on when your game runs... is that Group inside of another rule? Have you tried putting a Log Debugging Statement right below the first Change Attribute (game.randon size) and then watching the Debugger Window to see how many times the statement appears? I'd be curious to see if it appears more than once...
  • OkemOkem Member Posts: 10
    edited January 2013
    Thanks for all the help tatiang. I think I now have the resizing issue sorted. In the end I think it was the old, rather messy, spawning rules that caused the confusion. Now they've been cleaned up it works better.

    The group/rule will still change the size of any actor already in the scene, if a new actor of the same type is spawned. But I think I can live with that, as it isn't a massive issue.*

    thanks again for helping me work through this. It's a great little app.

    *edit: I figured out I could stop this from happening by putting the randomise size group in a short timer.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Nice!
Sign In or Register to comment.