





pelya wrote:The new keyboard theme Ultimate Droid by Sean Stieber was added, well it looks not as good on device screen as on monitor.
Auto-fire was desperately disabled for that theme (still present in my Ugly Arrows), because there's no auto-fire button state images and I cannot think of any animation to toggle it.
The transparency setting will be added soon.
Also, what do you think about buttons layout?



renpytom wrote:I just discovered this on Thursday and I have to say, it's exactly the thing I needed. With a little bit of work, I was able to get pygame running under android-SDL, which opens the door to porting many projects, including my Ren'Py engine.
renpytom wrote:Is there any work being done on integrating the android lifecycle with SDL, so that the application can be notified when android is about to destroy it? If not, I'd like to try to implement that, and give it back to this project.
DangerMouse wrote:I've also noticed on the Ur-Quan Masters that if you were to miss the right direction just slightly on the dpad... it's acting as a button press.. I think it was button 1. So I think the whole screen is still acting like a button 1 trigger. Might look into that one to see if you can remove it.
SBS wrote:I was wondering if it's possible in OpenTyrian to get the touch-screen to act as the mouse-control do on the PC? I think this is the best way to control the game if you don't have a physical keyboard.

pelya wrote:SBS wrote:I was wondering if it's possible in OpenTyrian to get the touch-screen to act as the mouse-control do on the PC? I think this is the best way to control the game if you don't have a physical keyboard.
Well, in PC version the ship was not following mouse, the mouse instead was acting as a dpad/joystick with the center of the screen as neutral position. I think making ship to follow your finger will be better.


pelya wrote:The most important thing you have to worry about is that with Android 1.6 the application will lose OpenGL context when it is put to background (with Android 2.0+ it does not happen) - the SwapBuffers() Java call will return some error code when that happens. I was planning to make application sleep inside GlSwapBuffers() call, until it will get notification from Java that it created new OpenGL context, then re-create all GL textures with the pixel data from SDL surfaces/textures, so SDL application does not need to worry about GL stuff at all.


pelya wrote:Are there many games written in Python-SDL? Most games I've found across internet use plain C.
The most important thing you have to worry about is that with Android 1.6 the application will lose OpenGL context when it is put to background (with Android 2.0+ it does not happen) - the SwapBuffers() Java call will return some error code when that happens. I was planning to make application sleep inside GlSwapBuffers() call, until it will get notification from Java that it created new OpenGL context, then re-create all GL textures with the pixel data from SDL surfaces/textures, so SDL application does not need to worry about GL stuff at all.
Also you'll have to remove PowerManager from MainActivity.java (it crashes anyway, and eats battery), and stop/restart both audio and video threads from OnSleep() / OnResume() (video thread is the one from which JNI main() is called).


pelya wrote:I would rather prefer shutting down main and audio threads, so the audio just stops if someone calls you (and that wont' depend on bad application design, because it's handled inside SDL).
For application it will look like a very long SDL_SwapBuffers() call.
You may send SDL_ActiveEvent, but the problem is - you don't know in what order the application will draw things on screen and process events, it may first call SDL_SwapBuffers() - OpenGL context is lost here, then it will draw something without OpenGL context, in the best case it will spam logcat with error messages, in the worst - crash, and only then it will process SDL_ActiveEvent.
pelya wrote:BTW I've added SDL on-screen keyboard interface exposed to the application - check out file SDL_screenkeyboard.h in SDL include dir. It has functions to hide or show overlay buttons, to redefine button coordinates to make it in sync with your app layout, and to bind different SDLKey to each button (except D-Pad).
So basically, you just have to rebind all buttons to what you like at the start of the game, override their coordinates, and hide them until you'll get to the game action screen (I hope 7 buttons will be enough for you).
renpytom wrote:Since Android is willing to kill an app while it's paused, I think the best thing to do is to provide an explicit pause handling API. Trying to do it automatically, without giving the app a chance to save its data, is asking for data loss.

Return to Code Snippets for Android
Users browsing this forum: No registered users and 3 guests