A tip to help with optimisation.

CannonFodderCannonFodder Member Posts: 230
edited November -1 in Working with GS (Mac)
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 :)

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    Cool idea. I may well do this on my next game, to much done on current creation me thinks. Or am I being lazy
  • CannonFodderCannonFodder Member Posts: 230
    Hi Draper, it should only take a few minutes to implement but saying that, if there are no major resource hogging features in your current game, it might be worth as you say leaving it till your next game. That’s what I am doing lol.
  • synthesissynthesis Member Posts: 1,693
    I like this tip...
    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?
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    Thats an amazing idea. I love it.....especially for deactivating unnecessary eye candy.

    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
  • CannonFodderCannonFodder Member Posts: 230
    @ Synthesis. I agree that the 3G is the benchmark device at the moment but with the imminent release of the 4G Iphone, I believe it will not be long before focus shifts over to the more powerful handsets.
    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.
  • synthesissynthesis Member Posts: 1,693
    The focus lies in the market definition. Currently a MUCH larger shares of app store users are operating on the 3G than not. If that "DEMAND" changes...then yes...the benchmark changes.

    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).
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I added an "animated background" toggle to the option screen for Danger Cats! Because when i was making it i only had a 3G to test with. I found that it helped performance.

    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.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    Right and from my understanding you can only did that in the plist
    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
  • synthesissynthesis Member Posts: 1,693
    "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!
Sign In or Register to comment.