A tip to help with optimisation.
CannonFodder
Member Posts: 230
Hi guys just though I would share a tip that will hopefully help with optimisation.
I know a lot of members have been contemplating making 3GS only games or have had trouble with getting their games to run smoothly on 3G and older Iphones. So I came up with this tip.
Basically the idea is to create a global boolean variable that lets the user tell the game which model iphone they have so the game can optimise its self accordingly.
Ok first make a new boolean attribute in the game attribute section named say, 3GS and set it to true. True being the iphone is a 3GS model, false being it is not.
Now in the option scene of your game, make a actor that acts as a button switching between true and false. If you do not know how this is done here you go:
make an actor, then create a rule, “Actor receives event” “touch” is “pressed” then in that rule place another rule “attribute” “game.3GS” is “true”.
Now within that rule add a change attribute behaviour “game.3GS” To “false”.
Next within the current rules otherwise section, add a change attribute behaviour “game.3GS” To “true”.
This will create a very basic button.
Next name the button something like '3G friendly” and then put some text explaining its purpose i.e. if you have a 3G model Iphone or older it is recommended you use this feature as it will result in smother gameplay blah blah.
Now where ever you do not want a behaviour to be activated you can add this attribute to within any rule:
make a new rule “attribute” “game.3GS” is “true” now if the 3GS attribute is set to false it will not activate the behaviours within this rule.
This can also be used to activate less memory hogging alternatives e.g. Say you want to have a particle effect go off when a certain enemy is killed, but the effect causes frame rate issues in 3G iphones. You could set the rule out as before but in the otherwise section of the rule put in an alternative optimised version of the partial effect catered to the 3G Iphone.
Also you could save the 3GS attribute so whenever the game is next played it is set up accordingly.
Hopefully this will help people make the game they want but without worrying too much about it effecting older model Iphones.
Sorry if I have not been clear at any point any problems\questions please ask
I know a lot of members have been contemplating making 3GS only games or have had trouble with getting their games to run smoothly on 3G and older Iphones. So I came up with this tip.
Basically the idea is to create a global boolean variable that lets the user tell the game which model iphone they have so the game can optimise its self accordingly.
Ok first make a new boolean attribute in the game attribute section named say, 3GS and set it to true. True being the iphone is a 3GS model, false being it is not.
Now in the option scene of your game, make a actor that acts as a button switching between true and false. If you do not know how this is done here you go:
make an actor, then create a rule, “Actor receives event” “touch” is “pressed” then in that rule place another rule “attribute” “game.3GS” is “true”.
Now within that rule add a change attribute behaviour “game.3GS” To “false”.
Next within the current rules otherwise section, add a change attribute behaviour “game.3GS” To “true”.
This will create a very basic button.
Next name the button something like '3G friendly” and then put some text explaining its purpose i.e. if you have a 3G model Iphone or older it is recommended you use this feature as it will result in smother gameplay blah blah.
Now where ever you do not want a behaviour to be activated you can add this attribute to within any rule:
make a new rule “attribute” “game.3GS” is “true” now if the 3GS attribute is set to false it will not activate the behaviours within this rule.
This can also be used to activate less memory hogging alternatives e.g. Say you want to have a particle effect go off when a certain enemy is killed, but the effect causes frame rate issues in 3G iphones. You could set the rule out as before but in the otherwise section of the rule put in an alternative optimised version of the partial effect catered to the 3G Iphone.
Also you could save the 3GS attribute so whenever the game is next played it is set up accordingly.
Hopefully this will help people make the game they want but without worrying too much about it effecting older model Iphones.
Sorry if I have not been clear at any point any problems\questions please ask
Comments
Buy my partner and I are debating whether this is good practice. I am on the side that it allows your game to be more advanced (and perhaps more dynamic) and not be "held back" by the slower 3G.
He is of the opinion that the 3G is the benchmark device (not to mention the primary market share) and your games should be in 1 format designed around the benchmark performance capabilities.
Any thoughts on this out there?
One thing to consider is i dont know if apple will always approve it if you make it a model diff specifically.
They have had issues with that sort of thing.
If you just worded it like a typical desktop's "Video Options" they wouldn't or couldn't say anything.
Just put graphic quality "High Performance" or "high graphic quality" to avoid a potential rejection
So if we want your games to have any sort lasting appeal (longer than a few months) the more powerful handsets need to be catered for primarily.
@ James. Good point I just pulled that name from the top of my head. Come to think of it now, it does not sound too clever, as you say we all know how Apple like to reject apps lol.
In the case the benchmark changes...you update the software to the new performance benchmark with the fresh game enhancements...or re-release it as a new version and re-charge the user base for the update (if you dare to do so).
I would avoid putting language on the screen that says anything about a spefific device. Apple will reject it if they see it.
I also thought that you cannot specifically target a platform just because your app doesnt run well on the older devices. I thought you can say "3GS Only" - ONLY if your app uses things that only the 3GS has - like the compass. I might be wrong though.
you can't just say it in your app or description
apple has even rejected apps for putting "please restart if your game is running slow" in the instructions
although not required ipad even goes as far as to say try to avoid branding splash screens so that the app feels like part of the ui
Or more like Apple's product you mean. That suggestion is never gonna' take so long as Devs are the ones building the apps! I mean...I don't want people to think Apple made my app. I want my brand ALLOVER the place...so that they know when they see my brand label on new apps...they know its going to be GOOD!