Device performance and touch
by Techfront · in iTorque 2D · 10/21/2009 (12:22 am) · 3 replies
Hi All
We finally have the game running on iPhone :), but we have two problems that I think are the same.
#1) The touch doesn't work during game play, it is working on main menu, but on game play it doesn't work.
#2) The game is running at 1 FPS, It is spending 1500 ms to complete a Game->processEvents();, I don`t know what is happen, because on Simulator this game ir running fine at 40 FPS. I'm compiling the DSO files using iTGB_Game on my mac, but I saw that main.cs on the root folder of game isn't create a dso file, this is normal?
On XCode I'm using the iTGB_Optimize to run my game because I received one exception when I tried to run using iTGB_Script_Optimize. So I think the click problem is because the FSP is very slow.
The exception when I execute iTGB_Script_Optimize is this line:
File: compiledEval.cc
Do you have any idea, what is happen to performance to be so bad?
Basiclly all game logic is on cs files, as I told on other post, this game is a port of the one game developed to Torque Engine 2D to PC version 1.0 :)
Thanks
Eros
We finally have the game running on iPhone :), but we have two problems that I think are the same.
#1) The touch doesn't work during game play, it is working on main menu, but on game play it doesn't work.
#2) The game is running at 1 FPS, It is spending 1500 ms to complete a Game->processEvents();, I don`t know what is happen, because on Simulator this game ir running fine at 40 FPS. I'm compiling the DSO files using iTGB_Game on my mac, but I saw that main.cs on the root folder of game isn't create a dso file, this is normal?
On XCode I'm using the iTGB_Optimize to run my game because I received one exception when I tried to run using iTGB_Script_Optimize. So I think the click problem is because the FSP is very slow.
The exception when I execute iTGB_Script_Optimize is this line:
File: compiledEval.cc
const char *CodeBlock::exec(U32 ip, const char *functionName, Namespace *thisNamespace, U32 argc, const char **argv, bool noCalls, StringTableEntry packageName, S32 setFrame)
{
...
if( !pVarEntry || pVarEntry->mOwner->scopeNamespace != thisNamespace ) {
...
}Do you have any idea, what is happen to performance to be so bad?
Basiclly all game logic is on cs files, as I told on other post, this game is a port of the one game developed to Torque Engine 2D to PC version 1.0 :)
Thanks
Eros
#2
As mentioned above, and everywhere else on the forums - The iPhone/iPod touch is a mobile device, not suited for PC games directly ported. There will be sacrifices and there will be optimisations and modifications to get it to perform well on the cellphone. Obviously the simulator is running ON the mac, so it can handle the script driven games just fine.
Also, the error from SCRIPT_OPTIMIZE, can you post what the errors are? Make sure that PUAP_SCRIPT_CHANGE as well as PUAP_SCRIPT_OPTIMIZE is defined (they need to be defined in the Mac build as well, for the dso files to be the correct ones).
10/21/2009 (4:33 am)
And when performance is extremely low, the touches take very long to get processed by the device (as is expected). As mentioned above, and everywhere else on the forums - The iPhone/iPod touch is a mobile device, not suited for PC games directly ported. There will be sacrifices and there will be optimisations and modifications to get it to perform well on the cellphone. Obviously the simulator is running ON the mac, so it can handle the script driven games just fine.
Also, the error from SCRIPT_OPTIMIZE, can you post what the errors are? Make sure that PUAP_SCRIPT_CHANGE as well as PUAP_SCRIPT_OPTIMIZE is defined (they need to be defined in the Mac build as well, for the dso files to be the correct ones).
#3
That will actually not work on a performant base at all in iTGB, you will have to port / rewrite code in C++ to get back on a usable performance again i fear.
10/21/2009 (2:10 pm)
From what you mention it sounds like your game is pretty much script focus with many scripts and likely many update handlers.That will actually not work on a performant base at all in iTGB, you will have to port / rewrite code in C++ to get back on a usable performance again i fear.
Associate Luke Lamothe
Luma Arcade
A quick browse through these forums will easily show you that in iTGB, you should use as little scripting as possible (especially math that occurs every tick) in order to obtain good performance.