Game Froze as enemies travel faster

butterbeanbutterbean Member Posts: 4,315
edited November -1 in Working with GS (Mac)
So I added the equation as suggested in the previous post to make the birds move faster, making it so that they move faster each time 5000 points is attained.

Once I reached 15000 points, the game froze, and booted me out

Will this problem be resolved as the full version of GameSalad releases, or should I change the speed to a slower speed initially?

I also wanted to be able to spawn more enemies for each 5000 points attained, but I'm not sure if GameSalad can handle it at this time

Is there an equation to spawn more birds as the score goes up?

And is there anything I can do on my part to prevent the game from freezing

Comments

  • JGary321JGary321 Member Posts: 1,246
    Not sure about it crashing. It's still beta, but make sure anytime it crashes, it should ask to send a report to gamesalad. Make sure you do.

    You can spawn more, this is a bit more complex. I have it on one of my games. I'm at work, so I'll start this, but may not be able to finish right away.
  • JGary321JGary321 Member Posts: 1,246
    After thinking about it the "easiest" but maybe not the "most optimized" way of doing this is to create several rules. This is going to go wherever you have the mobs spawning now.

    RULE
    Attribute game.score < (less than) 5000

    Spawn Actor Mob

    RULE
    Attribute game.score > (greater than) 4999
    Attribute game.score < (less than) 10000

    Spawn Actor Mob
    Spawn Actor Mob

    RULE
    Attribute game.score > (greater than) 9999
    Attribute game.score < (less than) 15000

    Spawn Actor Mob
    Spawn Actor Mob
    Spawn Actor Mob

    This is one way. Again probably not the most memory sensitive way, but it works.
  • butterbeanbutterbean Member Posts: 4,315
    No worries, I'm not in a rush to increase the enemy spawner, especially since the game crash occurred

    I did send a report both times to apple, it happened again, this time when the score reached 12000

    This only happened when I put this equation in, before I was able to play past that score range without any crash issues
  • JGary321JGary321 Member Posts: 1,246
    Feature Request: Equation for Spawn Actor =)

    You sent to apple or GS?
  • butterbeanbutterbean Member Posts: 4,315
    I sent to Apple, I played it a 3rd time at it didn't crash, and I went into Gameover after losing 3 healthbars ( I don't recall it asking me to send a report to GameSalad) I will try it again, and if it crashes, will try to look for that)

    I'm going to keep testing it :)

    Also, to constrain my actor on the ground, I just placed a simple constrain attribute, self position y to 16 b/c I don't want the player to move up or down or float off the ground (position y=16) is where my actor sits perfectly on the ground

    Is that how you constrain an actor or is there a better way?

    Also, where does the Spawn Actor Mob come from?

    I'm sure Codemonkey will have one equation for spawning more enemies

    Since the speed of the enemies moves faster, it seems as if they are spawning less in my game
  • JGary321JGary321 Member Posts: 1,246
    Constrain - I know no better way.

    Spawning Actor Mob - Where do you spawn your mobs now? What is the name of your "enemy"

    My terminology will be different b/c I'm not looking at your game. Spawn Actor is of course a Behaviour, you know where that is. Mob, is what you're spawning (just what i named it, nothing official)

    Basically in my example, I created rules that if the score is between xxxx & xxxx then spawn mob x amount of times. I know of no other way to create multiple spawns other than inputting the spawn actor multiple times. But hey it works. =)
  • butterbeanbutterbean Member Posts: 4,315
    Spawn Blue Crow is the name of my "spawn enemy" prototype

    So I would just add that in as you stated above, thanks JGary, that's helpful!

    Codemonkey, if you see this, and there is a memory efficient way, by all means, spill it :)

    I just have a feeling if I do it that way above, if the game is already having problems with crashing, that this will only amplify it
  • JGary321JGary321 Member Posts: 1,246
    This won't cause ANY crashing. I use it in my games. I haven't been able to figure any other way out.
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    I think JGary covered everything nicely.
  • butterbeanbutterbean Member Posts: 4,315
    I tested the game a few more times, and surpassed 20,000 and 25,000 points and it didn't crash.

    Perhaps my laptop overheated, and I had another program running at the time too, so it wasn't GameSalad, it was my laptop

    Everything works great!

    As for spawning more enemies, JGary I will try your technique and see how that works :)

    Thanks! I am loving this program for without the help of users on this forum, and help from the awesome people of GS, I would never have been able to achieve creating a game :)
Sign In or Register to comment.