Sunday, 20 June 2010

Motion is in :)

Well after Emm requested the Accelerometer controls of the iPod/iPhone system to be used as a control method for our other game yesterday I have added it to the game and it seems to work quite well. On the whole the entire game is looking more polished now and after some more adjustments to the game system I think we will have another one to release to the masses.

With the accelerometer controls one thing to take into careful consideration is to remove the idle action from the iPod/iPhone so it doesnt go into standby after all you arent using the touch screen if your tilting it all over the place for a game like marble madness or something like that when it doesnt require touch :). Its quite simple to do once you know how to do it and can be performed with a simple:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

// Override point for customization after app launch

application.idleTimerDisabled = YES; //turn off games 'auto sleep mode'

[window addSubview:viewController.view];

[window makeKeyAndVisible];

return YES;


The bit we need to get the code for is the idleTimerDisabled call this is the one that does everything and tells your game not to go into standby. After all that is done you can use the accelerometer in your game without a problem.

More soon...

No comments:

Post a Comment