Performance question?

fadamionfadamion Member, PRO Posts: 309
edited June 2012 in Working with GS (Mac)
So i have my game and it is all done but i am very unhappy with its performance it lags always this is an adhoc and on a 4g with no apps running in the background. By slow down i I'm talking like even 10 sec it will studded for .5 sec but it screws up gameplay.

So here are some details about the project what would cause the most slow down?

There are 30.8mbs worth totaling 1243 images about half are 64x64 caricature animation. All images have been ran on imageoptim.

2 songs and 13 sound effects.

I have 17 caricatures all running pretty heavy code. they chase run away stop have health but i am recycling them.
I have 20 caricatures on each level all running heavy code.(few copes of some"

I have 3 game levels each one map is made up of 6 1024x1024 backgrounds so like 3072x3072.
scene loading is 13 sec.

I use very little constants maybe 10 for the game.

I probably have miss sized images like 64x55 instead of 64x64 is this bad?

I have 9 weapons they destroy the bullet not respawn cuz it would be a full blow headache to do so.

Everything works just works slow i do not think this game can run on a 3gs but i don't have one but 4g struggles.

Am i pushing gamesalad to hard or am i doing something wrong and this should run?


here is a screen shot of one scene...

http://www.use.com/b4a4cdf084ab29e25c7f

Answers

  • fadamionfadamion Member, PRO Posts: 309
    on viewer i get 20 to 40 with drops to 7.

    So images are the most draining? or heavy code?
    I will send you the code if you wanted to see it and tell me what you think. Project size is 42mb.
  • fadamionfadamion Member, PRO Posts: 309
    Im not sure but it takes 10 min to get on the phone. I will go do it now.
  • fadamionfadamion Member, PRO Posts: 309
    edited June 2012
    Well i had to go get the new viewer.
    So the total ram is 155.
    image 79
    sound 3.4
    ge 34.3
    other 37.9

    fps 20-40
  • fadamionfadamion Member, PRO Posts: 309
    edited June 2012
    anyone else have any ideas? and i got my images down to 22mb by having all the backgrounds to half size it looks like a none retina game, but it still lags.
  • tutysestutyses Member Posts: 134
    the game looks pretty good, if you can try to upload a video showing how it lags so i can try to recognize what kind of issue it is
    First 6 1024 * 1024 images are not equal as 3072*3072 image, it would be like an 2048*3072
    2) Imageoptim will not make your images less ram intensive. it will only make them weight less in the hard drive, in the ram, the images are loaded in a different way
    3) You do have a lot of ram used by images and it will be a good idea to make that number a little lower but i think thats not the source of your performance problem
    I would do this:
    First check if there is a certain moment when the lag occurs, maybe is a piece of code which has a problem, try to identify if the lag starts when you trigger a certain actor or action
    Try to test the game every time you make a significative change in the game, so you can track where your performance is being affected
    2)If you have a very intensive code with lots of rules and actions, you can create a rule with a boolean and make all those rules are checked only in a specific moment
    Eg: you have a game with a character which has many rules to check life (its a pretty stupid example :P) you can make a boolean and put all your rules inside it, and they will only be checked if there is an enemy on the map (in that case you change the boolean to true)
    3)Look in the forums for performance tips , i m pretty sure you already did, your account has 2 year but, just in case

    about this game working on a 3gs, maybe it run better
    If this is a ram problem, running this game on a 3gs will make the images weight 4 times less,
    the 3gs has half of the ram of an iphone 4g, but make the balance between that and 4 times lighter images.

    sorry if i had many mistakes, too late and english is not my native lenguage
Sign In or Register to comment.