Page 3 of 6

Re: Ren'Py 7.1.0 Prereleased

Posted: Sun Aug 19, 2018 9:01 pm
by FroGlenn
Imperf3kt wrote: Sun Aug 19, 2018 3:47 pm Haven't got Android studio, but I guess I need it with the latest updates.
Time to go find it.

Thanks for the help.
Android Studio really lets you customize your app a lot. I mean, now Renpy targets SDK 28, so if you publish it and something goes wrong, you cnat go back to any SDK 22 or previous. I'm really not that confident to do that jump yet.

With android studio, you can change your target to sdk 22 and publish it if your app is already published (until november). So you have more time to understand all the great things Tom implemented in the new version of Renpy.

Android Studio really lets you unlock your renpy game potential to android market. There is so great things you can do with it, like using firebase events to track which choices your players are choosing. This can be really helpful.

And with Renpy 7.1.0 is so easy to import your game to Android Studio. Just open Android Studio, select File > New > Import Project and select the folder PROJECT inside renpy 7.1.0 install folder > rapt.

You can start building for debug and release using the keystore generated by rapt the first time you published your game.

Re: Ren'Py 7.1.0 Prereleased

Posted: Wed Aug 22, 2018 3:00 am
by jack_norton
Interesting. Is there a way to use some thing like "cloud saves" ? I am a total newbie when comes to Android :mrgreen:
But probably the most commonly requested feature from the android players was a way to store the savegames "in the cloud". Now I don't know if there's something that can be added easily, like Steam cloud saves. But if it's possible I'd be interested to know how. Since Android devices in general are much less reliable (lots of crashes or app quitting unexpectedly) having an auto-cloud save option would be really a great addition to Ren'Py :)

Re: Ren'Py 7.1.0 Prereleased

Posted: Wed Aug 22, 2018 1:16 pm
by jack_norton
For the heap error found a solution online:
Step 1 : Open gradle.properties file in your Android Studio project.
Step 2: Find the line in the file:
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx256m

I put 256 instead of the default value which was 1576-something, now works :)

Re: Ren'Py 7.1.0 Prereleased

Posted: Thu Aug 23, 2018 4:03 am
by jack_norton
A question about this new release, I think some behavior in screens has changed.
before I could set variable values directly on the screens, like:
$curlabel=XYZ;locID=Map[x][y]
and so on. Now, seems that all variables are "local" to the screen. If I want "curlabel" which I change in the screen to be used also in the main script code, like after a Return action, I need to write it like this:
action (SetVariable("curlabel",curlabel),SetVariable("locID",locID),Return("land"))
which seems weird to me :lol: I mean I need to use SetVariable to set a variable with the same name, to be used outside the screen!?! :shock:

Re: Ren'Py 7.1.0 Prereleased

Posted: Thu Aug 23, 2018 11:51 am
by PyTom
I don't believe that code (using $ to set a variable outside the screen) has ever worked. Variables inside a screen have always been local to the screen.

Re: Ren'Py 7.1.0 Prereleased

Posted: Thu Aug 23, 2018 11:58 am
by jack_norton
Whoops, seems like you're right :lol:

Re: Ren'Py 7.1.0 Prereleased

Posted: Fri Aug 24, 2018 10:14 am
by JackDoe
jack_norton wrote: Wed Aug 22, 2018 1:16 pm For the heap error found a solution online:
Step 1 : Open gradle.properties file in your Android Studio project.
Step 2: Find the line in the file:
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx256m

I put 256 instead of the default value which was 1576-something, now works :)
I got a new error after that:

Code: Select all

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file 'C:\RenPy\renpy-7.1.0-sdk\rapt\android.keystore' not found for signing config 'release'.
UPD: Problem is solved. I set path to the android.keystore file in the Android Studio.

Re: Ren'Py 7.1.0 Prereleased

Posted: Fri Aug 24, 2018 12:02 pm
by FroGlenn
jack_norton wrote: Wed Aug 22, 2018 3:00 am Interesting. Is there a way to use some thing like "cloud saves" ? I am a total newbie when comes to Android :mrgreen:
But probably the most commonly requested feature from the android players was a way to store the savegames "in the cloud". Now I don't know if there's something that can be added easily, like Steam cloud saves. But if it's possible I'd be interested to know how. Since Android devices in general are much less reliable (lots of crashes or app quitting unexpectedly) having an auto-cloud save option would be really a great addition to Ren'Py :)
I'm doing it myself using Firebase. My game is already published, so I do some story and some new features each update.

For now, I'm using Authentication and Database to create a "bucket" for each user upon first login and storing simple variables, like Strings (player name, player ID), int (coins and other stuff from the game) and Boolean (if the player got something persistent).

Using Firebase Storage, I'm pretty sure you can upload and download .save files from Renpy to use it. You can upload and download it in the right folder and using jnius, you can integrate with your renpy game loop.

I will need a bit more time myself to create and test the code, but if it works I will gladly share here.

Re: Ren'Py 7.1.0 Prereleased

Posted: Mon Aug 27, 2018 7:24 am
by jack_norton
That's interesting :)
FroGlenn did you manage to make the IAP work? I am getting an error message on startup in my game. But I am not using Android studio to publish, just Ren'Py like before.

Re: Ren'Py 7.1.0 Prereleased

Posted: Mon Aug 27, 2018 8:54 am
by JackDoe
Game uploaded to Google Play doesn't work with Android 7.0. It freezes on "Starting..." screen without any errors. It work fine on 4.4.2 and 5.1.
Game is set in landscape orientation. It also loading default RenPy icon instead of custom one.
Image

Re: Ren'Py 7.1.0 Prereleased

Posted: Tue Aug 28, 2018 12:25 am
by FroGlenn
jack_norton wrote: Mon Aug 27, 2018 7:24 am That's interesting :)
FroGlenn did you manage to make the IAP work? I am getting an error message on startup in my game. But I am not using Android studio to publish, just Ren'Py like before.
I dont have any in app purchases in the app. Its just ads for now, so I dont know how to make it work.

IMO you need the Android Studio to use any of Google Services features. You need to use the google-services.json file to authenticate your app and use authentication, save, achievments and other features.

Everybody working in games targeting android players should use Android Studio and start learning the basics of android programming, just the basic Java so you can integrate libraries and use a lot of code samples and easy to use resources that Google, Facebook and other companies gives you for free.

Its really huge the amout of things you can do with little time of ressearch.

Re: Ren'Py 7.1.0 Prereleased

Posted: Tue Aug 28, 2018 1:59 am
by PyTom
I've uploaded an updated version which should work alot better.

Re: Ren'Py 7.1.0 Prereleased

Posted: Tue Aug 28, 2018 3:11 am
by jack_norton
The apk produced now though are "unsigned". The filenames are like:
com.winterwolves.bionicheartdemo-10208-armeabi-v7a-release-unsigned.apk
while before I think they were correctly signed? I need to sign them manually ? (I don't think) thanks!

Re: Ren'Py 7.1.0 Prereleased

Posted: Tue Aug 28, 2018 3:59 am
by Imperf3kt
The apk files have always been unsigned for me, even back while using ANT.

Appreciate all the hard work PyTom. 🍻

Re: Ren'Py 7.1.0 Prereleased

Posted: Tue Aug 28, 2018 4:41 am
by jack_norton
I think I remember before Ren'Py was automatically signing them all with the Android key (android.keystore). I remember in the RAPT bin folder being two different APK, unsigned, and signed (I'm 99% sure of this). I don't think you can publish an unsigned APK on Google Play anyway?