Are you making a github rep with snippets?HI,
Could you tell me a list of things that make a Renpy game incompatible with Android?
It has nothing to do with my request, but I created split repositories to not publish all the code, to help the Modders and get help.Are you making a github rep with snippets?
Always cool too see how people are doing it behind the scenes.It has nothing to do with my request, but I created split repositories to not publish all the code, to help the Modders and get help.
A few things that I've run into:HI,
Could you tell me a list of things that make a Renpy game incompatible with Android?
thanks, but I was looking for example of the functions not implemented in android.A few things that I've run into:
- PC and Mac games support video and audio encodings that Android does not. Thus, if you're going to use video or audio files, you have to make sure that they are encoded using Android-supported formats.
- In addition, the vanilla Movie class tends to use an underlying "movie" channel, and the Android build will raise an exception if you use that channel and have hardware video decoding enabled. You can get around that by disabling hardware decoding just for mobile platforms. Either that, or you need to configure your own channel and arrange for your movies to play on that channel.
- Since Android is touch-based, it doesn't support "hover." Thus, anything you do with "hover" in the user interface never gets triggered on Android.
- Again, being touch-based, it's hard to hit small targets. As an example, the default Ren'py Quick Menu can be challenging to hit (at least for my fat fingers) on a smaller Android device. You can work around this by having different screens for Android using the "variant" feature of Ren'py.
Ah so. I don't know of anything native to Ren'py that works on desktops that doesn't work on mobile. (PyTom's done too good a job for what you want. LOL)thanks, but I was looking for example of the functions not implemented in android.
so only I can create an android version, knowing the code to be removed or modified.
To my knowledge, there's no universal way to do this directly with Python. There'sFrom Python, you can certainly detect whether you're on mobile or not.
import renpy
[...]
def whatever:
if( renpy.variant('touch') ): raise Exception( "Do not works with touch screens" )
In the Ren'py source code, theTo my knowledge, there's no universal way to do this directly with Python. There'sYou must be registered to see the links, but it don't give you a generic information ; you need to deduct it. Therefore, the most reliable way is to rely onYou must be registered to see the links:
renpy.android
variable is set as follows:android = ("ANDROID_PRIVATE" in os.environ)
android
and mobile
variants into the variant list. I suspect that it's set as part of the native code used to bring up the Ren'py environment.# Returns the path to the Ren'Py base directory (containing common and
# the launcher, usually.)
def path_to_renpy_base():
renpy_base = os.path.dirname(os.path.realpath(sys.argv[0]))
renpy_base = os.path.abspath(renpy_base)
return renpy_base
I think that it can works as "universal".So, a 100% universal way of figuring this out? Possibly not.
Exactly. You can complicate the task, but you can't prevent the uncompilation. And generally, the more you complicate it, the more dedicated will be the guy that will revert it. In top of that, since the said guy was able to uncompile your code, you can easily guess that he'll also be able to find the tricks you used inside.The problem with all of this, however, is that since the game can be decompiled, it probably wouldn't be too hard for someone to find the offending code and comment it out before building the Ren'py version. People regularly ask about doing something DRM-ish within Ren'py games, but the answer's always the same - the game itself has to be able to read the assets, so anything you do to keep, for example, .rpa files from being manually decompressed can be defeated by someone that looks at what you've done within the game. So, it's "basic script kiddie" protection and nothing really more than that.
Ya, same here. To both... LOLThe lockdown (we are ending the fourth week here) start to hit my brain a little too much