Ok, I don't know... something is wrong.

HunnenkoenigHunnenkoenig Member Posts: 1,173
edited November -1 in Working with GS (Mac)
I optimized the heck out of my game (images, rules etc).

My images look like crap, but still can't come under 20MB. I have 466 images in my game and optimized to 72 dpi, saved with punyPNG and everything.

This is not even the problem.

The problem is, no matter what I do, the game is jerky. I made test levels with 3-4 bricks in them (There should be at least 20-30) and the normal animations I have. The ball jumps around, this is not normal.

In the viewer app I get 25 fps sometimes. I don't know what to do. I can't sell the game with this conditions.

I came to the conclusion that either my iPhone is crap, or you can't make a high quality game with GS. Sorry, but it seems so at the moment for me. I am really sad and desperate.
Maybe I should start to make e-books...

What do I have in a scene?

1 background image (i skipped animated backgrounds already)
1 lifebar
1 life counter
1 score counter (standard font)
1 racket
4 bricks, which change images on hit, sometimes they play a small animation
1-4 animated actors
many movements, what in a wallbreaker game is essential
sounds for shooting, hiting, exploding and a background music.

Is this too much for a game? I don't think so.

And don't tell me about hackintosh! My iPhone is a real Apple product :-P

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    how many constrain rules do you have? I know those kill FPS, what type of iPhone do you have?

    did you go through and uncheck 'moveable' on everything that doesn't move? Also go through and uncheck visible on everything that is always hidden, it'll help.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    are all your sounds mono instead of stereo?
    unless they need transparency, make sure your images are all 8-bit, not 24-bit

    the big FPS killers are:

    Constrain Attribute
    Timers
    trig functions like vectorToAngle

    If you want to send me your project, I can take a look at it for you.

    Also, are you testing on a 3GS or 2ndGen iPod,
    or is it an earlier model?
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    I have a 3G
    Constrain attributes depend on the level, but I have maximally 3-4 in one scene. Mostly 1-2 if there is such a rule.

    I unchecked moveable and visible, but I will go through the whole thing again.

    The problem is mostly, when more things happen at once. Like when the ball hits a brick, which drops a bonus and explodes. Thet it stays for a second and when it moves again, the ball is suddenly somewhere else, which is not good for a wallbreaker game.
  • chosenonestudioschosenonestudios Member Posts: 1,714
    make it an iPad only game, if you port it now, you can easily have it ready when its released, you'll be computing against very few apps, (also I'd be willing to bet you can make it more expensive, instead of 99c maybe 2 or 3 bucks) with the extra processing power and with a larger screen, (I bet you have nice graphics) it'll probably run well and sell like hell! good luck:)
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    @Firemaplegames: My sounds are mono. Although I think some of them are 4400 Mhz (or what) instead of 22 thingy.

    I have a second gen 3G iPhone
    The images are 8 bit. As far as I can tell. In photoshop, it says 8 bit when I go to the image tab.

    I will send you the project. That would be very cool if you could look at it.

    @chosenonestudios: I can't make it an iPad game, because the graphics are in 320x480. I can't blow them up to 1024x768 :-(
  • chosenonestudioschosenonestudios Member Posts: 1,714
    (If you made vector images, you can blow those up easily, I'd recommend you make all vector iamges for your games, (not all, but as many as you can, or at least start it as a vector image, and then edit it so you don't quite have to do as much, all my images are vector based) i think it would probably be easier for you to redo your graphics instead of optimizing it for a platform thats not meant to run it... my 2 bits.. Good luck!
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    My graphics are hand drawn and very professional graphics. Not like something made in corel draw :-)

    It took a few weeks for the artist to make them :-)
  • chosenonestudioschosenonestudios Member Posts: 1,714
    I don't know what corel draw is haha I use illustrator, but I assume its something of that nature:) Well, If you could borrow somebodys 3gs to test it on I'd recommend you make it 3gs only:) if you could check out my game (theres promos!) I'd highly appreciate it:) Sorry I couldnt be of any more assistance! Best of luck to you!

    http://gamesalad.com/forums/topic.php?id=4407&replies=1#post-26739
  • synthesissynthesis Member Posts: 1,693
    I'm having optimization headaches too hunnen.
    Some things I have done are:
    Reduce actor counts!!!
    Reuse actors
    Reduce Timer loops (ie...use .25 seconds instead of .1 seconds)
    Eliminate Rules whereever possible.
    Use splitting rules (ie...if you have 10 rules to check...first split in half, then half again then assign...which forces only 3 rule checks instead of all 10)
    Try to use expressions instead of rules whenever possible.

    Also...
    3G is the most difficult to push a complex GS game to...the engine uses 2/3 of the available memory. Our game won't even get through the load on one right now...
    We are looking for ways to optimize currently...but its tough.

    Unless the GS engine gets better optimization...its going to be really tough to push to a 3G phone. You only have about a 10MB sandbox to run you game in...since they are hogging up all the ram with the game engine.

    It seems GS is using 3 to 4 times the ram and processor that much more complex game engines are using...the difference between a $100 game engine and a $100,000 game engine. They really need to get things optimized SOON if they want to be taken seriously by pro developers.
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    @Firemaplegames: I have sent you an email with the download link to joe _at_ firemaplegames _dot_ com

    Thanks!

    @synthesis: I tried everything I could. I am new to this, so Firemaple will laugh his arse off, probably :-)

    But we will see. I have read every possible topics here about optimization and I tried to use the advices, but there is much to do better for sure.
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Do you have many spawn rules?

    I had similar problems, then instead of spawning actors i have them offscreen and "call" them on screen with a rule.

    My fps bumped up a lot and now I'm having some glitches only on some bonus levels with about 150 actors (but I still have to optimize some things like visibility, sounds and some rules).
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    Yeah, I spawn many actors, but mostly only if it is necessary, like the explosion of a brick or such.

    Because of the kind of the game I can't really call actors from offscreen.

    I have one level, where I do, but then I have to spawn them offscreen too, ebcause I can't palce so many actors just outside.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Hunnen: i am out at a party for a few hours. Send the project to joe at firemaplegames dot com and i will take alook at it when i get back
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    Thanks.

    As I said above, I already sent you a download link for the project :-)

    Now I go to sleep.
    Maybe when I wake up, you can already tell me some advice, how to improve it :-)

    Oh btw, some actors and attributes are named in hungarian or half english half hungarian, but you will know, what is what I think :-)

    And enjoy the party! :-)
  • synthesissynthesis Member Posts: 1,693
    Who knows...maybe when you wake up FMG will have published your game to the appstore under his licensing. :)
  • adadoadado Member Posts: 219
    @Hunn: My StarKeep app was the same way on non-3GS devices. On a 3GS, it floats between about 26fps and 35fps during game play. On the non-3GS devices, it just wouldn't run properly (i.e. slow, jerky, things happening out of sequence due to timing being interrupted by slowdowns, etc.).

    You may just have to scale it way down to work on all devices or do what I did and pray they approve it on a 3GS and then just update your "Description" in the app store to tell folks it only works on the newer devices.

    Your images are probably bigger and more details than my pseudo vector graphic looking images but I did have approximately 46 actors at scene start and then it could vary from a low of 19 actors up to about 60 actors with an average probably somewhere in the 30s. I also had a little over 100 constrains to allow for the defense ring segments to circle properly and for the enemies to track the player appropriately. So if you images are bigger and more detailed, the use of actor number and constrain count should be lower than what I am doing. Maybe you have some crazy rule/behavior sets though but I think 100+ constrains would be more of a concern. Funny thing is, two-thirds of those 100+ constrains are trig related so you would think it wouldn't even run on a 3GS. I do spawn the explosion animations, point indicators, projectiles, and the swirly photons thingies so a decent amount of spawning occurring too.

    I provided those details in my game's announcement so others planning something action oriented could get a feel for some of the limits of the GS system at its current version (0.8.3):

    http://gamesalad.com/forums/topic.php?id=4338

    By the way, how numerous and frequent are your animations. The only animations I have (besides normal rotations and movement) are the explosion animations that are about 12-14 frames with maybe only about three ever happening at the same time but typically only one at a time.
  • jhaasjhaas Member Posts: 233
    Here's something else you can try. When you first load a scene - load and play a copy of every sound effect you will use in the level. (of course set the volume to zero). This will "preload" all your sounds and when you call them again during your game you will avoid the stutter in the action as the sound is already loaded.

    Also I've had better luck using the .caf format instead of .ogg for sounds.

    I use a free program called MAX to convert my audio to .caf using the A-law encoder.

    :)
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    Thank you for all your help.

    I will try to optimize further.

    @Synthesis: I hope not :-)
    I trust him :-)
  • synthesissynthesis Member Posts: 1,693
    Just Kidding...
    FMG is the real deal!!! Good man!
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    Wow!

    After doing some work, how FMG told me, my game went from 20MB to 10 MB.

    I thought, I did everything right, but it seems I didn't :-)

    Thank you FMG! :-)
  • synthesissynthesis Member Posts: 1,693
    Care to share?
  • SDMGSDMG Member Posts: 280
    so how is performance now at your 3G?
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    It was just using photoshop the right way.

    I had to save the images through the "save to web & devices" option instead of the standard save. I didn't know that.

    And I made my sound files smaller with audacity. I used Audacity before, but on windows, where you can't convert into m4a, so I used some other software.

    Now I converted the musics back to wav, I made them mono and converted them to m4a again on the mac.

    FMG told me, on his 3GS the game was running at 60 FPS.

    On my 3G it's also running better now.

    I am correcting game logic errors after my optimization :-)
    I have put some things into else rules, which don't work that way :-)
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    yes
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    I already explained it above :-)

    My racket uses constrain all the time. The ball sometimes too.
    Other things use also a few.

    On one level it is not more than 3 or 4, I think.
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    That's great news Hunnenkoenig.
    I'm sure you must be so relieved. FMG is the man!
    It seems Gamesalad is actually pretty sweet, you just have to be extremely careful with all the elements to get it working at its best.
    We are all learning and sharing and while we are doing that, tools improve too. Just gotta keep at it and never give up.
    Well done guys and good luck!
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    :-)

    Good night tshirt, sleep well :-)

    Yeah, it works now without big problems on my 3G.
    I am a perfectionist, so it will be never 100% for my satisfaction, but it's ok now :-)
Sign In or Register to comment.