Page 1 of 2
Ren'Py for Android: Launcher Test
Posted: Sat Dec 18, 2010 3:25 am
by PyTom

- The Question running on the Android emulator.
Developing on the emulator isn't recommended - it's slooow.
After a bit more work, I've nearly finished Android-specific Ren'Py development. And so, I'm happy to present the Ren'Py for Android Launcher Test. This fixes all of the bugs people have reported. It runs on a wider range of hardware, and fixes memory leaks that would cause crashing after a while. It also includes support for launching games distributed as android packages (so they could be in the market by themselves), and for launching games from the SD card.
The requirements haven't changed. This requires Android 2.0 or later, 16MB free space on the SD card, 100MB free ram, and working OpenGL ES 1.1 support. If you tried the old demo, please uninstall it before installing these packages. I don't (yet) support upgrades.
Today's release consists of two packages: We have
the Ren'Py Launcher and
The Question. QR codes:
When you install both packages, a "The Question" icon will show up on your launcher. Choosing it will cause The Question to start up. (If only TheQuestion-debug.apk is installed, then it will prompt you to install Ren'Py. That won't work, since we're not on Android Market yet.)
This version also supports developing for Android. You can do this by mounting your sdcard and putting the proper files on it. If your sdcard is located at sdcard, then you want something that looks like:
Code: Select all
sdcard/renpy/mygame/android.txt
sdcard/renpy/mygame/icon.png
sdcard/renpy/mygame/.nomedia
sdcard/renpy/mygame/game/script.rpy
sdcard/renpy/mygame/game/options.rpy
...
On windows, the sdcard will be a drive letter, so you'd have files like S:\renpy\mygame\android.txt.
The first three files are new. The android.txt file contains information that tells Ren'Py for android how to launch your game. It looks like:
Code: Select all
title=The Question
author=Mikey et al.
api=1
orientation=landscape
The title and author fields are self explanatory. The api should be set to 1 to tell Ren'Py what version to use - if you set it higher, Ren'Py will try to upgrade itself. The orientation can be landscape or portrait - you also need to set config.screen_width and config.screen_height to appropriate values.
The icon.png file is the icon to show in the launcher screen. The .nomedia file should be an empty file - it's used to prevent Android from scanning the game directory for pictures to show in the media gallery.
Once you have this on your SD card, you can re-mount the SD card on android, and run Ren'Py from the launcher. It will scan the SD card, give you a list of games there, and you can choose one of them to run.
Once again, thanks to all the testers, and I look forward to your feedback about this new version.
I plan to make Moonlight Walks a launch title for Ren'Py for Android. If you have a game, and you're willing to spend some time porting it and need help, let me know.
Re: Ren'Py for Android: Launcher Test
Posted: Sat Dec 18, 2010 4:15 am
by jack_norton
A stupid question (maybe I missed it): you can port ANY game to renpy-android? Even supercustomized ones like mine?

Re: Ren'Py for Android: Launcher Test
Posted: Sat Dec 18, 2010 4:30 am
by PyTom
The answer to that is complex.
Certainly, we support the vast majority of features that Ren'Py supports. So you can expect things like screens and python logic to work exactly the same. So we support complex games.
The big difference is in how someone interacts with the device. Since everything is done by touch, you need to make the buttons big enough that someone can comfortably hit them with their fat fingers. Similarly, a touch device can only register touch, so it's the equivalent of a mouse that only register its position when the button is held down, and jumps to the upper-left when it's released. Finally, many devices don't have keyboards, so that's out.
There are a few missing features, for hardware and space reasons:
- No movie playback support.
- No ImageDissolve (also AlphaDissolve, AlphaBlend) support.
- A change in dissolve semantics.
But fundamentally, this is Ren'Py, with all its python and crazy extensibility - and not a cut-down engine.
Re: Ren'Py for Android: Launcher Test
Posted: Sat Dec 18, 2010 4:55 am
by jack_norton
Nice. The small button problem is the same as iphone, grr

for normal VN that isn't going to be a problem but for a RPG like Planet Stronghold it would definitely be (clicking on portraits to access inventory for example). Anyway is cool to know that the only real limit is on the game-design side and not coding!
Re: Ren'Py for Android: Launcher Test
Posted: Sun Dec 19, 2010 12:42 am
by netravelr
Just finished
The Question on my Droid. Looks like great progress and I have to try making something specifically for the Android soon now.

Re: Ren'Py for Android: Launcher Test
Posted: Sun Dec 19, 2010 10:32 am
by vaiol123
Darn AT&T and it's sideload restrictions...
Will definitely report back once I figure this out.
Re: Ren'Py for Android: Launcher Test
Posted: Thu Dec 23, 2010 4:30 pm
by elbosco
Great! Many thanks from one Android Developer. Good job
Re: Ren'Py for Android: Launcher Test
Posted: Fri Dec 24, 2010 12:08 am
by fischer22
Sorry for the silly question, but how could I port and try MY visual novel (currently in development) on an android device?
Re: Ren'Py for Android: Launcher Test
Posted: Mon Jan 03, 2011 2:33 pm
by TGeorgeMihai
Great, thank you
I'm new here but this is exactly what I was searching for...
I've tasted it on my LG Optimus (GT540) with Android 2.1 and works great. Fullspeed in game, the menu have a little delay (1~2 sec when you are in the game press the "Menu Key" to save or quit) but nothing that would ruin the overall great experience
I think this Android port is very good, works great on the minimum specs (Android 2.1 and 500-600Mhz procesor ). I've tested that if I recive a call the game will stop, but no, it worked perfect even after that.
Re: Ren'Py for Android: Launcher Test
Posted: Sun Jan 16, 2011 4:57 pm
by iichan_lolbot
Hey, wow, it works just great! Our team plans to release at least 3 small VN (in russian, english and some other versions) using this!
So, there are 3 major questions we have:
1. Do you think this is a stable platform and releases can be already build using this version of RenPy engine? Are there any known limits on script and data (looks like 1366x768 game doesn't want to work)?
2. Distribution Builder. Do you plan adding a new target to "Win32-MacOS-Linux-Universal" list?
3. Tracebacks. We are just beginning to explorere this RenPy version and were unable to find traceback.txt after game failure. Does it even exist? Some of our games does not even start and we want to know why *^_^*
Also: I sometimes do renpy.utter_restart() when I need to do some dirty changes in settings or styles. Is it possible to keep it working on Android too? If no - ok, we will release 7 versions of one of our too-many-times-translated-game.
P.S. A bugreport - we tried cookbook's snow particle genetar and it leads application to crash after showing a particle.
Re: Ren'Py for Android: Launcher Test
Posted: Sun Jan 16, 2011 5:16 pm
by PyTom
iichan_lolbot wrote:1. Do you think this is a stable platform and releases can be already build using this version of RenPy engine? Are there any known limits on script and data (looks like 1366x768 game doesn't want to work)?
In a word, no. I'm going to spend the next few days qualifying it, and I hope to make a release to Market shortly. What was the problem you had with a large game, and what device are you testing on?
2. Distribution Builder. Do you plan adding a new target to "Win32-MacOS-Linux-Universal" list?
Probably not, just because you need quite a bit of the android toolchain for it to work. Instead, you'll probably want to grab the PyGame for Android packaging tool from
http://www.renpy.org/pygame/ - it will also work for Android.
3. Tracebacks. We are just beginning to explorere this RenPy version and were unable to find traceback.txt after game failure. Does it even exist? Some of our games does not even start and we want to know why *^_^*
I'll look into this. For now, you can use adb logcat to see output, including tracebacks.
Also: I sometimes do renpy.utter_restart() when I need to do some dirty changes in settings or styles. Is it possible to keep it working on Android too? If no - ok, we will release 7 versions of one of our too-many-times-translated-game.
Hm... maybe? I don't think you'd want to do this, because it will be very slow. But I don't see why it wouldn't work.
P.S. A bugreport - we tried cookbook's snow particle genetar and it leads application to crash after showing a particle.
I'll look into this. That code was rewritten recently, so it's possible that it's already fixed.
Re: Ren'Py for Android: Launcher Test
Posted: Tue Jan 18, 2011 1:47 pm
by iichan_lolbot
A full traceback for snow failure:
Code: Select all
I/python ( 248): File "/home/tom/ab/renpy-dev/renpy/bootstrap.py", line 270, in bootstrap
I/python ( 248): File "/home/tom/ab/renpy-dev/renpy/main.py", line 313, in main
I/python ( 248): File "/home/tom/ab/renpy-dev/renpy/main.py", line 93, in run
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/execution.py", line 259, in run
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/ast.py", line 942, in execute
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/exports.py", line 748,in with_statement
I/python ( 248): File "/home/tom/ab/renpy-dev/renpy/display/core.py", line 1405, in do_with
I/python ( 248): File "/home/tom/ab/renpy-dev/renpy/display/core.py", line 1595, in interact
I/python ( 248): File "/home/tom/ab/renpy-dev/renpy/display/core.py", line 1966, in interact_core
I/python ( 248): File "/home/tom/ab/renpy-dev/renpy/display/core.py", line 1295, in draw_screen
I/python ( 248): File "render.pyx", line 339, in renpy.display.render.render_screen (render.c:4063)
I/python ( 248): File "render.pyx", line 155, in renpy.display.render.render (render.c:2060)
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/display/layout.py", line 508, in render
I/python ( 248): File "render.pyx", line 97, in renpy.display.render.render(render.c:2311)
I/python ( 248): File "render.pyx", line 155, in renpy.display.render.render (render.c:2060)
I/python ( 248): File "/home/tom/ab/renpy-dev/renpy/display/transition.py",line 86, in render
I/python ( 248): File "/home/tom/ab/renpy-dev/renpy/display/transition.py",line 63, in null_render
I/python ( 248): File "render.pyx", line 97, in renpy.display.render.render(render.c:2311)
I/python ( 248): File "render.pyx", line 155, in renpy.display.render.render (render.c:2060)
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/display/layout.py", line 508, in render
I/python ( 248): File "render.pyx", line 97, in renpy.display.render.render(render.c:2311)
I/python ( 248): File "render.pyx", line 155, in renpy.display.render.render (render.c:2060)
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/display/layout.py", line 508, in render
I/python ( 248): File "render.pyx", line 97, in renpy.display.render.render (render.c:2311)
I/python ( 248): File "render.pyx", line 155, in renpy.display.render.render (render.c:2060)
I/python ( 248): File "accelerator.pyx", line 70, in renpy.display.accelerator.transform_render (accelerator.c:1008)
I/python ( 248): File "render.pyx", line 155, in renpy.display.render.render (render.c:2060)
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/display/image.py", line 137, in render
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/display/image.py", line 32, in wrap_render
I/python ( 248): File "render.pyx", line 97, in renpy.display.render.render (render.c:2311)
I/python ( 248): File "render.pyx", line 155, in renpy.display.render.render (render.c:2060)
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/display/particle.py", line 366, in render
I/python ( 248): File "render.pyx", line 97, in renpy.display.render.render (render.c:2311)
I/python ( 248): File "render.pyx", line 155, in renpy.display.render.render (render.c:2060)
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/display/particle.py", line 201, in render
I/python ( 248): File "/home/tom/ab/renpy-1000/renpy/display/particle.py", line 347, in update_callback
I/python ( 248): TypeError: 'NoneType' object is not iterable
I/python ( 248): While running game code:
I/python ( 248): - script call at line 750 of /home/tom/ab/renpy-dev/common/00library.rpy
I/python ( 248): - script at line 833 of /mnt/sdcard/renpy/uvao2/game/script-ru.rpy
I/ActivityManager( 61): Process org.renpy.android:python (pid 248) has died.
I/WindowManager( 61): WIN DEATH: Window{43fd84e0 org.renpy.android/org.renpy.a
ndroid.PythonActivity paused=false}
I/WindowManager( 61): WIN DEATH: Window{44005400 SurfaceView paused=false}
I/UsageStats( 61): Unexpected resume of com.android.launcher while already res
umed in org.renpy.android
I/ActivityManager( 61): Low Memory: No more background processes.
W/InputManagerService( 61): Got RemoteException sending setActive(false) notif
ication to pid 248 uid 10032
D/dalvikvm( 118): GC_EXPLICIT freed 8042 objects / 398424 bytes in 668ms
D/dalvikvm( 115): GC_EXPLICIT freed 365 objects / 15128 bytes in 152ms
D/MediaScanner( 167): prescan time: 341ms
D/MediaScanner( 167): scan time: 334905ms
D/MediaScanner( 167): postscan time: 3ms
D/MediaScanner( 167): total time: 335249ms
D/MediaScannerService( 167): done scanning volume external
D/dalvikvm( 167): GC_EXTERNAL_ALLOC freed 4815 objects / 273296 bytes in 167ms
D/skia ( 118): purging 17K from font cache [2 entries]
D/dalvikvm( 118): GC_EXPLICIT freed 1589 objects / 75328 bytes in 185ms
D/dalvikvm( 167): GC_EXTERNAL_ALLOC freed 1267 objects / 95176 bytes in 153ms
D/skia ( 167): --- decoder->decode returned false
W/MediaThumbRequest( 167): Can't create mini thumbnail for /mnt/sdcard/renpy/uv
ao2/game/stol_a.png
D/dalvikvm( 167): GC_EXTERNAL_ALLOC freed 456 objects / 33976 bytes in 136ms
D/skia ( 167): --- decoder->decode returned false
W/MediaThumbRequest( 167): Can't create mini thumbnail for /mnt/sdcard/renpy/uv
ao2/game/slava-3.png
D/dalvikvm( 167): GC_EXTERNAL_ALLOC freed 345 objects / 21320 bytes in 130ms
D/dalvikvm( 167): GC_EXTERNAL_ALLOC freed 352 objects / 34360 bytes in 140ms
D/skia ( 61): purging 7K from font cache [1 entries]
Re: Ren'Py for Android: Launcher Test
Posted: Tue Jan 18, 2011 1:50 pm
by PyTom
Thanks, I'll look into this.
Re: Ren'Py for Android: Launcher Test
Posted: Tue Jan 18, 2011 3:30 pm
by iichan_lolbot
Doesn't work on Android-x86 Virtual CD =(
Re: Ren'Py for Android: Launcher Test
Posted: Tue Jan 18, 2011 3:43 pm
by PyTom
Yes, it's arm-only for the time being.