LAG! I NEED HELP NOW PLEASE!

ForteForte Member, PRO Posts: 297
edited November -1 in Working with GS (Mac)
Hi everyone,

Well. The title pretty much says it. I have M4j0r l@g... I need to have my project done by the end of November this year. And I can't test my app to continue on for the project because it keeps lagging. I have been told, the 3G sucks when it comes to games. Yes, true it does not have much RAM. I have done the optimising tips in the Wiki. I need at LEAST a max of 30-50 actors for each scene. I have rules that stop it from going over that number. Does anyone know any FANTASTIC IDEAS for me about how they optimised their application.

If you can't help me. Then just reassure me that Gendai Games will give the GS "Emulator" a tune up and everything will be fine for the future.

Thanks.

P.S. Half Yearly exams over! History: 88%. Math: 76%. Japanese: 77%.
I'm very happy!

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    I was unable to get more than 20 or so moving actors in a Scene without problems.
    The iPhone 2G (the first generation) is even worse than the 3G.

    If I was you, I would create a new blank game, and start adding elements to it from your current game - with the intent of bringing all of it over.

    As you add each element, watch the RAM usage and FPS in the GS Viewer as you play your game.

    Make a note of the heavy hitters, and exactly which actors are negatively affecting the FPS (the lag you are talking about).

    RAM is another thing to keep an eye on. A 3G iPhone will crash at about 40-45MB. The 2G is even less than that.

    You need to make sure that your images are as optimized as possible.
    You need to make sure that your audio is optimized as much as possible.
    You need to make sure your code is as tight as possible. No extra timers firing, no Constrains unless absolutely necessary, etc., etc...
  • ForteForte Member, PRO Posts: 297
    Ok, how am I supposed to optimize images? Audio two
  • ForteForte Member, PRO Posts: 297
    And btw, I can't get the viewer over because of the fact that I do have a provisioning profile, but, it still wont work so i have to go and publish it just to see how it goes.

    If you can give me EXACT guidelines, then maybe I will try.

    Some people just throw s*** out there that I have no idea about.

    I'm only 13

    Anyway thanks

    p.s. Do you think GS is going to give the "Emulator" a tune up? I hope so.
  • ZackGSZackGS Member Posts: 313
    You can use this to optimize your png images :)

    http://psydk.org/PngOptimizer.php

    (it's windows only though :/,)

    This seems to be the mac equivalent http://imageoptim.pornel.net/
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Here is the link to the instructions to install GS Viewer on your device:
    http://gamesalad.com/wiki/developing_for_iphone:building_gamesalad_viewer

    You need to follow these instructions EXACTLY.
    It is very complicated, but it does work. If it isn't working for you, you need to retrace your steps.

    Using GS Viewer is critical when making your game. It allows you to see what affects RAM usage and FPS while you play your game. You can also install it on as many devices as you have, so you can test it on different hardware.

    For images, I find the best way to get them as small as possible is to use Photoshop. Choose "Save for Web...". If the image does not require transparency, use PNG-8, if it does, use PNG-24. Make sure your images are 72dpi.

    If you don't have Photoshop, you can use one of the online .png optimizers. In addition to the two danny_iphone mentions, there is also http://www.gracepointafterfive.com/punypng

    For audio compression, I use VLC for creating .ogg files (for sound effects) and Audacity for creating .mp4 files (the background music). Both of these programs are free.
  • JamJarRiotJamJarRiot Member Posts: 62
    >>I was unable to get more than 20 or so moving actors in a Scene without problems.

    This is the part that interests me. I'm hoping to keep the actual moving actors down to a minimum. Say, no more than 10. I'm designing my game so that the screen is busy looking, but most of the objects are static. Is there a limit to the number of purely onscreen actors or actor sizes before the display may start choking? Would 20 STATIC actors (say 32x32 in size) in a scene affect the smoothness of 10 moving actors in the same scene for instance?

    If anyone has produced a scene similar to this I'd appreciate any comments on the fps rate. I'd do it myself but I have no GS license as yet and to be honest, if it should struggle with the above scenario on a 2G Touch I'll probably pass.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    should be fine, but depends on what is in each static actor. Lots of timers, constrains, animations, etc. may still lower the FPS. Got to use the GS viewer app to test. It's a must!
  • firemaplegamesfiremaplegames Member Posts: 3,211
    20 moving actors was my limit on the iPhone 2G (there was some static actors as well).

    The iPod 2G (where the 2G stands for 2nd Generation, not the network) should be better. That is more akin to the iPhone 3G.

    The iPhone 3GS and iPod 3rd generation can handle even more.
    The iPad is even better than those...

    I wanted my games to work on all devices, so I targeted the 1st generation iPhone.
  • JamJarRiotJamJarRiot Member Posts: 62
    Thanks scitunes and firemaple. I consider myself lucky in that I'm old enough to have made games on the Amiga and such, where you used a bunch of hardware sprites (was it 8?) and some blitter objects and if you hid them and called them into use in a practical way you'd have no slowdown and still appear to have lots going on.
    This is how I plan to use GS and as such; object spawning,constraints, more than 1 timer and even physics (unless the game requires actual physics) are all a NO NO. All seems well so far but I'll need to test a device soon. My recurring dream is an announcement from GS that states "Ver 4 contains Pause function! Arrays! And....a 50% speed increase !!

    I dream....
  • firemaplegamesfiremaplegames Member Posts: 3,211
    The old-school craftiness required to make games back in the day will definitely help with developing iPhone games with GameSalad!
    jamma said:
    My recurring dream is an announcement from GS that states "Ver 4 contains Pause function! Arrays! And....a 50% speed increase !!

    I dream....

    Many of us have those same dreams!

    All that being said, GameSalad is a lot of fun to work with. And to be able to instantly see your game on a device is really something special.

    It definitely has its quirks, and can certainly be frustrating at times, but every development environment I have ever used is like that.

    I see your avatar name is jamma, do you have any arcade games? (I have a few jamma games is why I am asking...)

    Welcome to the forums!
  • JamJarRiotJamJarRiot Member Posts: 62
    Thanks for the welcome. And you guess rightly, I'm an old-school/retro nut. Not so much these days, I'm still trying to clear some space to set a cabinet up, but yes I collected a few boards. I have an old arcade cabinet that is, regrettably, giving up the ghost. It's an original monitor from the early 80's and is slowly dying and becoming less visible. The cabinet is great, though a bit battered, a hybrid with an as-yet unknown space game illustration on the cab sides and a Phoenix marquee that still lights. I have a few boards, some obscure, my prize being an original R-Type. If I ever get the money for an Ipad, this is my next buy...

    http://www.thinkgeek.com/stuff/41/iCade.shtml?icpg=Carousel_iCade_1
    (can you put html links in these messages?)
  • firemaplegamesfiremaplegames Member Posts: 3,211
    To add an image, use: `image`

    image

    Unfortunately, that is ThinkGeek's April Fool's joke this year!! Sadly, it is not real.

    R-Type would be a great game to have! I started collecting arcade machines about ten years ago. I initially had 5 games and 5 pinball machines. Then I got my friend hooked! Between the two of us, we have about 40 arcade machines and pinball machines. We have two generic JAMMA machines, one with a horizontal monitor and one with a vertical one.

    Your old monitor can easily be fixed with a cap kit. That will bring it right back up.

    However, playing R-Type in a Phoenix cab is going to be difficult! Phoenix uses a vertical monitor, whereas R-Type is horizontal. And both of them are not JAMMA!

    You'll have to rig up a pretty tricky wiring harness to get it to work (in addition to rotating the monitor).

    R-Type was put out by Nintendo in the arcades, so I am pretty sure that it used a Nintendo cabinet and monitor (which uses negative colors) . I have a Donkey Kong machine, (with Donkey Kong Jr. and Excitebike boards that will also work in it).

    Anyway, enough rambling! It's nice to see another classic video game collector!

    Good luck with GameSalad!
  • JamJarRiotJamJarRiot Member Posts: 62
    >>Unfortunately, that is ThinkGeek's April Fool's joke this year!! Sadly, it is not real.

    Haha ! I Googled Phoenix cabinet in a brief moment of boredom and it came up with that. What a shame...
    Yeah, the Phoenix marquee is all that's left of the Phoenix cab, it was modified and has a Jamma interface in there. It actually came with Wonderboy, a non-Jamma board with a Jamma loom fitted. I'll fix the garage up one day and get a couple of cabinets in there. Yeah, one day...
Sign In or Register to comment.