Is Components Enabled
by Matthew Harris · in iTorque 2D · 05/26/2009 (2:51 am) · 4 replies
Hey,
I didn't know you could make behaviors into components to speed up things.
I overwrote four of the behavior with the components version, ShootAdv, TakesDamage, DealsDamage, and MoveTo.
I use all of these behaviors in my game. I am using the iTGB_SCRIPT_OPTIMIZE target with 2.2.1 and Debug.
I don't really notice a frames per second increase... I read about the targets in the readme. It said USE_COMPONENTS was only used on the iTGB target (the one that is not optimized).
Is USE_COMPONENTS used in all four of the targets?
Where do I add this, I know where the preprocessor macros is, but it just says <multiple values> and when I click it doesnt show me anythign. I don't want to mess up the build/project file but want to make sure the USE_COMPONENTS flag is set.
- Matt
I didn't know you could make behaviors into components to speed up things.
I overwrote four of the behavior with the components version, ShootAdv, TakesDamage, DealsDamage, and MoveTo.
I use all of these behaviors in my game. I am using the iTGB_SCRIPT_OPTIMIZE target with 2.2.1 and Debug.
I don't really notice a frames per second increase... I read about the targets in the readme. It said USE_COMPONENTS was only used on the iTGB target (the one that is not optimized).
Is USE_COMPONENTS used in all four of the targets?
Where do I add this, I know where the preprocessor macros is, but it just says <multiple values> and when I click it doesnt show me anythign. I don't want to mess up the build/project file but want to make sure the USE_COMPONENTS flag is set.
- Matt
#2
Thanks a lot, now I can actually see what the values are. And yeah it does look like USE_COMPONENTS is there for the iTGB_SCRIPT_OPTIMIZE target :)
Still tho I am not seeing that much of a difference and 5 of of me behavior's now use components, pretty much the heavily used ones.
Side Note, I can only run my game from xCode, I can't run it by touching the icon on the iPhone. It trys to load and cuts out sometime during loading when the splashscreen is there.
05/26/2009 (2:25 pm)
Ahhh,Thanks a lot, now I can actually see what the values are. And yeah it does look like USE_COMPONENTS is there for the iTGB_SCRIPT_OPTIMIZE target :)
Still tho I am not seeing that much of a difference and 5 of of me behavior's now use components, pretty much the heavily used ones.
Side Note, I can only run my game from xCode, I can't run it by touching the icon on the iPhone. It trys to load and cuts out sometime during loading when the splashscreen is there.
#3
You could easily test this by taking out the USE_COMPONENTS method and seeing if your game still works. IT should not work at all without that compile flag because the behaviors won't be able to find the native components.
Also I've found DEBUG builds have a large impact on framerate.
05/26/2009 (2:29 pm)
Are you sure you switched over to components? It's not as simple as just compiling with USE_COMPONENTS. You could easily test this by taking out the USE_COMPONENTS method and seeing if your game still works. IT should not work at all without that compile flag because the behaviors won't be able to find the native components.
Also I've found DEBUG builds have a large impact on framerate.
#4
How long is your load time? This sounds like the error which happens when your games load time exceeds 25 seconds. The initial build/install ignores this rule, but when you try to run it after the first time it will crash if it takes longer than 25 seconds to get going.
05/26/2009 (2:33 pm)
Quote:Side Note, I can only run my game from xCode, I can't run it by touching the icon on the iPhone. It trys to load and cuts out sometime during loading when the splashscreen is there.
How long is your load time? This sounds like the error which happens when your games load time exceeds 25 seconds. The initial build/install ignores this rule, but when you try to run it after the first time it will crash if it takes longer than 25 seconds to get going.
Torque Owner Justin Mosiman
Opsive