I DONT KNOW HOW MUCH LONGER I CAN HANDLE THIS!

DanielAvniDanielAvni Member Posts: 114
edited November -1 in Working with GS (Mac)
I am going to go crazy/cry. Gamesalad runs so terrible for me its ridiculous. After about 10 mins of working with GameSalad everything gets extremely slow and horrible errors start to occur. For example sometimes when its lagging really bad i drag an actor into the scene and it deletes the actor from the game and i can only hope i saved close to that incident.
Im also building a jumping game that i want to publish to the iphone in a few days. But i dont know if the game is going to even be fun because it will lag to much on the iphone! Again for example on level 1! when my guy reachs certain point he just falls through ALL THE PLATFORMS! and sometimes when he lands on the platform he just doesnt jump anymore.

What im trying to say from this is, is it even worth it is my game going to run at all?
Sorry to cry and b!*** but im going crazy!

Comments

  • synthesissynthesis Member Posts: 1,693
    You are not the only one:
    http://gamesalad.com/forums/topic.php?id=4261

    The GS software performance will NOT be related to your game's performance...2 completely separate issues.
  • DanielAvniDanielAvni Member Posts: 114
    Well in my game tshirtbooth there is like 3 constrains and a spawner that runs for about 5 seconds then i destroy it and it spawned all the platforms. my game is 8000 tall and a platform every .35 secends... but theres not much i can do.
    And synthesis i see what u say but i have played some of the gs games on my iphone 3g and they dont run vary well.. so i cant help to think that my game which is much bigger will run terrible.
    Thanks DanielA
  • synthesissynthesis Member Posts: 1,693
    @TSB
    I disagree with your actor count statement. We are running about 60-80 actors in our gameplay scenes on Bumper Derby X-Treme and our game is about 6MB in size for 1 course (5 to go). We expect to bloat out to about 12-15MB by the time we are done. We do have some performance issues with the iPhone3G but we continue to optimize and are getting close to clearing 20 FPS on average on the 3G. We are running at least 30-40 FPS on average on newer devices (iPodTouch 2G and the iPhone 3GS).

    The key issue driving app performance on the devices are quality of logic sequences and efficiency of the code logic used. The more efficient your rules are and the fewer calculations used to achieve functionality...the better the apps performs.

    BDX is a fairly complex game and moves very fast with lots going on and runs quite smoothly (on newer devices). Its tough to get it to perform well (on the older 3G) with GS using up soooooooo much ram and processor to run the game engine. Hopefully GS will improve their game engine optimization so we don't have to jump through so many hoops and shred our game quality to make it run on a 3G....which represents most of the app market today.
  • synthesissynthesis Member Posts: 1,693
    We have tried to put most of the gameplay rules inside limited actors. Some actors are heavier than others...but the rules are located strategically in the most relevant actor. We tried to spread them out so no single actor is overwhelmed with processing.

    About half of the actors are course props (walls, tire bumpers, etc.)
    About 30% of the actors are gameplay actors (HUD, score readout, time clock, joystick, etc.)
    About 10 are tracking actors or sensor actors (such as the game timer and score counter)
    About 12-15 actors are "heavy" with AI rules (the bumper cars)

    We have also been VERY diligent about having our rules in switches so they only process when ABSOLUTELY necessary...especially if they contain constrains or timers.

    We also have made sure that all of our collider behaviors are on a limited number of actors...which seems to help keep the physics engine tighter.

    We are careful to make sure the visible and physics booleans are unchecked whenever possible.

    So far...we are well-optimized sticking to this structure. But we continue to downsize our course design (which is only 640x960 in size) to accommodate the BLOATED gameSalad game engine to allow the game to function on 3G devices.

    WE REALLY NEED A MORE OPTIMIZED GAME ENGINE GENDAI!!! HINT...HINT! :)
  • tekkendptekkendp Member Posts: 49
    @synthesis - what would you consider to be an actor that is heavy with AI? I'm having performance issues with one of my games, especially in boss battles. The hero ship has about 11 behaviours (some linked to rules or timers). The Bosses have about 10 behaviours. Is that too much?

    I know that spawning (which I'm using too much at the moment) is causing me problems - working on that.
  • synthesissynthesis Member Posts: 1,693
    SPAWNING IS BAD (IMO)!!! I am only spawning my points (when I score points in something...the points tracker actors spawns a points graphic actor at the location where the points were scored and its only on screen for 2 seconds to do a simple alpha fade out before self-destructing) and my "main menu" button when the game is over. Everything else is in the game at startup. This saves processor resources considerably for us.

    A "heavy" actor I would consider is anything that is constantly running multiple rule sequences and is in a constant state of operation. Usually they are you "main characters" in a game. My "heavy" actors are my bumper cars. They are constantly running rules to seek drive targets to go towards. Sometimes they are chasing the player...while other times they chase a random point on the course. My enemy actors are even more complex in the sense that they have several collision detection rules in order to "strike a hit" to the player or "take a hit" from the player. Some of these actors may have 50-100 rules in them...but the rules are only firing when ABSOLUTELY necessary. (I've been rebuilding my main enemy all night tonight for the fourth or fifth time now...trying to optimize it even more and reduce the misfires that seem to still be happening)

    These actors are constantly processing. In order to save processing weight and optimize...we are building tons of switches in them to keep the actors in a single mode and focus on only one task at a time. Using rule trees...we are able to sequence the actors to do certain tasks...depending on the state they are in.

    For example...my enemy bumper (the shocker car) sometimes is in "shock mode" and other time not. If in shock mode...he chases the player and tries to get him and deliver a "hit" to the player. If he succeeds...a switch is thrown that he "made a hit" and he tells the game this occurred and he changes mode and the player car changes its mode. The AI states operate within this rule structure as well as the graphics and the collision switches. In this case...the shocker car immediately goes into "runaway" mode after delivering the hit and tells his other shocker buddies to do the same to give the player a chance to recover.

    The idea is...keep the actors focused on ONLY 1 task at a time and make sure that any other rules are disabled while they are doing something. Keep the rules well organized and switched accordingly so the actor does not get confused. This reduces bugs and misfires.

    Also...when building complex and "heavy" actors...avoid timers and constraints like the plague. They are already complex enough without adding that kind of overhead. If you do use a timer...make sure you only have 1 running at a time...otherwise...problems. GS isn't stable enough to trust multiple or embedded timers right now...otherwise misfires occur (I have found). Parallel sequences (rules executing simultaneously) also seem to cause misfire problems too...probably due to switches being thrown out of sequence...which can cause an AI breakdown.

    Best advice is to keep the logic sequential and VERY CAREFULLY organized.

    The only constrains I am using (within the character actors) is the player position X and Y. Everything revolves around the player anyway. I have been saving my constrain overhead damage for counters such as time keeping and scoring or sending the MOST CRITICAL information to the main actors (such as player position)

    Following these tips will allow you to do MORE with the game and save the processing for expanded game play capability and character counts. If you waste that VALUABLE RAM and FPS processing on needless redundancy or irrelevant rules...your game will not be as rich and deep as it could be because your RAM caps will be spent on "junk" logic and frivolous processing demands.

    Hope this helps!
    Syndessol

    SUPPORT REFERENCES:
    BUMPER DERBY X-TREME BETA RELEASE ON GS WEB
    (my game referenced above)

    http://gamesalad.com/forums/topic.php?id=4376
  • tekkendptekkendp Member Posts: 49
    Wow!! Thanks Synthesis. That is a lot of food for thought. Let me read it through properly, and check my projects when I get home.
  • JackBQuickJackBQuick Member Posts: 524
    Thanks, Synthesis. I can't wait to get back to my own project so that I can optimize it more with ideas that you've given me. I appreciate your taking the time to outline how you did it. This page is worth bookmarking :)
  • maniraptormaniraptor Member Posts: 81
    Agreed - excellent write-up! Framing behaviors in terms of rule trees and switches that turn off process-intensive actions as well as initiate them is immensely useful.

    Very much appreciated.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    @ Daniel

    If you want send me your file

    dan (at) scitunes dot com

    I'll see if I can get it running better and send it back.
  • DanielAvniDanielAvni Member Posts: 114
    Scitunes that would be awesome!!!!! ill send it right know and also i will pay you for all the work u have done and are going to do. We can talk about that through email! and
    @synthesis thanks for all the writing and helping everyone here i really appreciate it!
  • synthesissynthesis Member Posts: 1,693
    Sure...no problem DanA, Mani, JackB and Tekken.

    If any of you would really like to thank me (or if this forum post helped any others out there)...you can do so by going and test driving my new Bumper Derby X-Treme game and take a moment to give me some constructive feedback on my thread. :)

    a really convenient link to BDX: http://gamesalad.com/forums/topic.php?id=4376
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Dan, I sent you an email...
  • jmp909jmp909 Member Posts: 73
    DanielAvni said:
    I am going to go crazy/cry. Gamesalad runs so terrible for me its ridiculous.

    are you running on an Apple Mac or an "Intel" Mac? I have an Intel OSX and it gets slow for me. Other apps don't but i don't know if it's just me or the software
  • firemaplegamesfiremaplegames Member Posts: 3,211
    This is an old post, but yes, it still runs slow for everybody. There is some sort of memory leak. Just quit and restart every few minutes.
  • patm1982patm1982 Member Posts: 50
    few more performance tips:
    If its a side scroller deactivate all enemies that are off screen. you can do this with a collider that follows the player or calculate the distance between the player & enemies using magnitude().

    Instead of spawning oftentimes you can just have the actor off screen until you need it and then change its x&Y location. I did that for a firing mechanism that cycles 3 bullets. (I'm also going to try using this for enemies that repeat in another part of the level.)

    oftentimes when you think you need to use 'Constrain attribute' you can use a 'Change attribute' placed in a timer.

    if its a huge level you can always break it up into a few scenes, I'd rather have more level loading time then laggy gameplay.

    I work as an artist at a game company & coding my own games is kinda a side hobby, and working in casual games in general has a lot to do with figuring out how to optimize but save quality. Like everybody else my game ran perfect on my i5 iMac, but this week when I put it on a iphone 3G, it was horribly slow & i've had to optimize this week & been finding & figuring out tons of cool tricks. (I wonder if when the games are exported to X-code if they run faster? seems logical)

    p.s. can't wait until theres a Game Salad 3D. Unity3D is cool but a little to much scripting involved for non-programers.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I think they should get rid of GS direct!

    :)
This discussion has been closed.