Can 'Upside Down' mode be set procedurally?


I'd like to include support for an 'upside down' mode in my latest game, which will be played vertically. It sounds like what I'm after is pretty close to the Accessibility / Upside Down mode option in Settings, but personally I think it would be nice to have this kind of option as something you can choose per game. For example, I'm a left hander so there are certain games where playing in upside-down mode would be better for me, but any game where I'd need to use the A / B buttons regularly would be a pain.

Is there any way to set Upside-Down mode from within an app, which would reset after the app is quit?

I'll file this, but it's a pretty niche request so it'll be low priority. Maybe some day it'll show up!

In the mean time you can have your game draw into an intermediate buffer using gfx.pushContext() then draw that to the screen with an X+Y flip.

Yes, it is possible to implement an "upside-down" mode in your game that can be toggled within the game and will reset when the game is quit. To do this, you can use the accelerometer in the device to detect the orientation of the phone and then adjust the game's graphics and controls accordingly.

In order to use the accelerometer, you will need to add the necessary code to your game's programming. You can do this by using a library or framework that provides access to the accelerometer, such as the Core Motion framework on iOS or the SensorManager class on Android.

Once you have access to the accelerometer data, you can use it to determine the orientation of the device and adjust the game's graphics and controls accordingly. For example, if the device is upside down, you can flip the graphics and swap the functions of the A and B buttons so that they are more accessible for left-handed players.

gah. sorry, I didn't see that the spambot had posted again. :angry: I thought we'd nuked the account.

I just implemented a feature like this in my game. It uses setFlipped to rotate the screen. The only downside is that the controls are unaffected, so I have to reverse the d-pad buttons myself when this mode is activated.