Game Development Community

Terrible Game Speed and Loading Speed

by Dawei Bi · in iTorque 2D · 10/23/2009 (1:01 pm) · 15 replies

I test the game BehaviorShooter , fps is only 7-9 , the loading time is 20 seconds.

How to improve it?

#1
10/24/2009 (4:28 am)
up up up up up
#2
10/24/2009 (4:40 am)
And I tested cocos2d for iphone just now, 20-30 fps , what should I say?
#3
10/24/2009 (5:03 am)
There are a good number of possible reasons. Please post all the information of your current device setup.

iPhone/iPod Touch Version :
Build Configuration :

Also, until i can make a monster blog on optimising games for the iPhone try the following -

1) Use PVR textures.
2) Don't load anything you don't need.
3) Don't load lots of little images, pack them into sprite sheets.
4) Don't load lots and lots of separate cs files, try and condense code into less files.
5) Try minimise disk access for load time increase
6) Textures affect render times, less texture swaps = higher FPS
7) Battery life affects performance severely, this is not your fault
8) Clogged memory affects performance severely, also not your fault
9) Don't do code to script side updates every tick if you can avoid it
10) calling lots of code to script and back is slower every frame
11) implement as much code as possible in c++ for performance reasons

I can also recommend using a new project, and STARTING optimised. The current demos are in need of a good beating and i'm sure that will happen but rather test something new, something SUITED directly for iPhone that had iPhone in mind from day one. There is also a lot of talk on IRC of what to try next if you have tried everything and there is also a great deal of threads in the forums with good quality tips. read through the performance tips here in the forums as well.

iTGB can deliver good performance if you keep in mind you are working on a mobile device, and you work with the hardware to achieve good performance. Keep in mind that bad practices or implementations can bring any engine to its proverbial knees - no exceptions.

I hope this helps :) If you are making a specific game, get the game going and running according to the tips above, and we can help you squeeze every drop of performance out of the engine on the way. This is not to say the engine wont get much faster - just that we know you want to make games now.
#4
10/24/2009 (5:10 am)
Platform : Mac Book
OSX Version : 10.5.7
XCode Version : 3.1.4
iPhone SDK : 3.1 sdk for leopard
iTGB Version : iTGB_1_2
Devices tested on : Simulator ( OS 2.2.1)/iPhone 3G 16GB( OS 3.1 )


I just tested the demo of the iTGB,Thank you, I will try what you say to optimise.
#5
10/24/2009 (5:31 am)
Also, you should probably get the newer iTGB (its called T2D_iPhone_Beta_1_0, as it has quite a few good optimisations already.
#6
10/24/2009 (5:53 am)
I have downloaded T2D_iPhone_Beta_1_0 ,should I build game with Target (iTGB_Script_Optimize) ?
#7
10/24/2009 (5:55 am)
Yep , you can follow my thread on building successfully out of the box, if that helps. Its stickied in the forums. It should run a bit better but as i say the game needs to be optimised first (the demos will be optimised when the time comes).
#8
10/24/2009 (6:04 am)
Thank you , I run BehaviorShooter with T2D_iPhone_Beta_1_0 ,the fps is about 10 .
#9
10/24/2009 (6:58 am)
I think T2D_iPhone need a faster demo for beginner.
#10
10/24/2009 (9:38 am)
That won't help you much as most of the improvements with the current architecture are per game optimizations on code level.
#11
10/24/2009 (1:40 pm)
Thank you , I read the document ,and create a new game named ifish .

But when I add it to my xcode project , it display a white screen . where can I download the src of ifish?
#12
10/24/2009 (4:08 pm)
The scripts are in the corresponding project folder.

The engine source is what you see primarily in xcode
#13
10/25/2009 (12:54 pm)
I added the common and game folder and main.cs to my xcode project ,but could not run .
#14
10/25/2009 (1:45 pm)
You will need to run the game first on your mac to compile all the .cs into .dso
Then.. clean All and rebuild to test on device.
#15
10/25/2009 (2:37 pm)
Thank you ,I run the game on my mac to compile all the .cs into .dso
Then.. clean All and rebuild to test on device, but still display white screen.