Forums » Suggestions

Expose the underyling OS' Battery info in-game.

Oct 30, 2013 abortretryfail link
I play VO pretty frequently on my phone and it's a fantastic way to kill your battery without knowing until it's too late.

The game takes up the whole screen on Android, hiding the top notification bar that has the clock, battery, signal status, etc. Some other apps that also full-screen like this show a little battery meter or icon someplace unobtrusive.

How hard would it be to get this info into the game sandbox so it could show on the UI someplace or maybe a plugin could see it?
Nov 01, 2013 incarnate link
Interesting thought. We'll look into it.

Putting something permanent on the HUD might be time consuming, but even just a "warning" pop-up when the device gets to 30% or something, might not be a bad idea.
Nov 01, 2013 abortretryfail link
I suppose another way to approach this would be to add an option for the game to not hide the notification tray so the OS' own icons are still visible.
Nov 01, 2013 incarnate link
I'm not sure if that's really viable. Going from past experience, there's a huge hit to GPU performance when the OS is doing something on-screen (part of why we had to roll our own touch-keyboard). Performance is not something we can really sacrifice on mobile.
Nov 02, 2013 CrazySpence link
a battery event would be awesome , for 20 and 10% would be consistent with OS behaviour
Nov 02, 2013 slime73 link
SDL2 has an API for this, its implementation code for various platforms is open source under a liberal license (zlib), viewable here: https://hg.libsdl.org/SDL/file/tip/src/power

Perhaps that'll make it a bit simpler for you to implement. :)
Nov 02, 2013 incarnate link
Thanks, and noted. Although I'm sure it's not hard to implement the APIs ourselves, which might be a good idea for something like this. For instance, the SDL2 "Windows" implementation calls GetSystemPowerStatus(), which is a Win32 API that is not supported on WinRT (and I'm sure is asynchronous on that platform).

We're mostly too weird to use anyone else's code, unless it's something internally all-encompassed like zlib or ogg or whatever.
Nov 02, 2013 slime73 link
Yeah I definitely understand, and the Win32/WinRT thing is annoying. Just thought it might help a bit.
Nov 04, 2013 PaKettle link
Might also be of interest to the laptop crowd as well.....