Ren'iOS: Getting Ren'Py to run on iOS
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Ren'iOS: Getting Ren'Py to run on iOS
Hi everyone,
I'd like to share something I spent a few days working on for fun over the holiday season. I wanted to see how hard it would be to get Ren'Py running on iOS devices, and I've managed to get something working.
Here's a short video showing Ren'Py's 'Tutorial' game running on an iPad and an iPhone:
http://youtu.be/OLCWHM2aNzs
And here is a link to the GitHub project, where there is the code and some minimal documentation:
https://github.com/chrismear/renios
This is still very much a proof-of-concept at the moment. There are bugs and performance issues, and it needs a lot of testing; so this is not ready to release anything with. But I thought I would share it now to see how much interest there is in taking this further, and perhaps get questions, suggestions and feedback. (I don't produce VNs myself; I've just played a few good ones that were made using Ren'Py, and hence got interested in the project.)
Thanks for reading!
I'd like to share something I spent a few days working on for fun over the holiday season. I wanted to see how hard it would be to get Ren'Py running on iOS devices, and I've managed to get something working.
Here's a short video showing Ren'Py's 'Tutorial' game running on an iPad and an iPhone:
http://youtu.be/OLCWHM2aNzs
And here is a link to the GitHub project, where there is the code and some minimal documentation:
https://github.com/chrismear/renios
This is still very much a proof-of-concept at the moment. There are bugs and performance issues, and it needs a lot of testing; so this is not ready to release anything with. But I thought I would share it now to see how much interest there is in taking this further, and perhaps get questions, suggestions and feedback. (I don't produce VNs myself; I've just played a few good ones that were made using Ren'Py, and hence got interested in the project.)
Thanks for reading!
- jack_norton
- Lemma-Class Veteran
- Posts: 4086
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
- Contact:
Re: Ren'iOS: Getting Ren'Py to run on iOS
I think the main obstacle is not getting Ren'Py to run on iOS, but making sure that the result abide the supertight Apple rules. Otherwise even if it works, you end up with something that you can't distribute because the apps would never get approved, becoming a bit pointless
Re: Ren'iOS: Getting Ren'Py to run on iOS
This is very true! To the best of my knowledge, the two potentially troublesome technical requirements are that:
1. Any interpreted code must be bundled with the app, not downloaded after the user has installed it.
2. The app can't dynamically load libraries at runtime.
For number 1, all of the Python code is included in the app bundle, so I think this falls within the rules. And for 2, all of the Ren'Py and dependency libraries get statically linked into a single binary executable, so that there's no dynamic loading of code.
Of course, this is all academic until somebody actually tries submitting an app and sees what the result is. But the Kivy project has used a similar system, and have apparently successfully submitted apps to the App Store ( http://kivy.org/docs/guide/packaging-ios.html ), so I think there is hope!
1. Any interpreted code must be bundled with the app, not downloaded after the user has installed it.
2. The app can't dynamically load libraries at runtime.
For number 1, all of the Python code is included in the app bundle, so I think this falls within the rules. And for 2, all of the Ren'Py and dependency libraries get statically linked into a single binary executable, so that there's no dynamic loading of code.
Of course, this is all academic until somebody actually tries submitting an app and sees what the result is. But the Kivy project has used a similar system, and have apparently successfully submitted apps to the App Store ( http://kivy.org/docs/guide/packaging-ios.html ), so I think there is hope!
- jack_norton
- Lemma-Class Veteran
- Posts: 4086
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
- Contact:
Re: Ren'iOS: Getting Ren'Py to run on iOS
Well there's no need to submit for real, you can use a tool called Application Loader (I think that's the name) which checks if your app is "OK" before submitting. So if your resulting app is fine by that tool, means that will pass the technical check (then can still be rejected for other reasons).
In that case I'm surely interested in it, and I suspect many other commercial developers
In that case I'm surely interested in it, and I suspect many other commercial developers
Re: Ren'iOS: Getting Ren'Py to run on iOS
Thanks for reminding me about that -- just tried it, and the app does indeed pass the automatic validation: http://cl.ly/image/3l3M0S300f3Q
-
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Re: Ren'iOS: Getting Ren'Py to run on iOS
I'm definitely interested in this to make my VN into an app, I'm planning on releasing it commercially and I have an iPad.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Ren'iOS: Getting Ren'Py to run on iOS
This is a huge technical accomplishment, for a lot of reasons. (For example, it includes a port of Ren'Py and Pygame to SDL2 as part of it.)
So as not to get everyone's - but especially Jack's - hopes up, we think that there are a few restrictions that will hit when it comes to actually producing a Ren'iOS game. The LGPL requires that you give users everything needed to run your game on top of a modified Ren'Py. This shouldn't be a problem for free games, where the .rpc files and game data can just be posted freely, but figuring out how to properly license commercial games may be complicated.
So as not to get everyone's - but especially Jack's - hopes up, we think that there are a few restrictions that will hit when it comes to actually producing a Ren'iOS game. The LGPL requires that you give users everything needed to run your game on top of a modified Ren'Py. This shouldn't be a problem for free games, where the .rpc files and game data can just be posted freely, but figuring out how to properly license commercial games may be complicated.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- jack_norton
- Lemma-Class Veteran
- Posts: 4086
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
- Contact:
Re: Ren'iOS: Getting Ren'Py to run on iOS
Hmm not sure I understand
Can't just be shared the .rpyc ? also why this restrictions is for iOS only and not PC/Mac/Linux too then?
Can't just be shared the .rpyc ? also why this restrictions is for iOS only and not PC/Mac/Linux too then?
-
- Veteran
- Posts: 253
- Joined: Fri Nov 14, 2008 7:59 pm
- Completed: Lots.
- Projects: Black Closet
- Organization: Slipshod
- Location: Behind you.
- Contact:
Re: Ren'iOS: Getting Ren'Py to run on iOS
As I understand the LGPL, it requires that you distribute the source of the underlying libraries (assuming you've changed them), not of the entire program. The big issue is that it has to be possible for the user to freely modify the LGPL portion of the code if they so choose. With Win/Mac/Linux versions, we can just replace the .so/.dll files with our custom versions if we like.
There are several versions of the LGPL with different clauses; if Apple expects everything to be statically linked, that makes it more of a pain in the butt - but it looks to me like LGPL 2.1 could be satisfied by separately distributing a Ren'Py version that's capable of opening your iOS versions and building an iOS distribution with modded versions of the LGPL libraries if the user so chooses. I haven't analysed the other LGPL versions in detail and I don't know which versions actually apply to Ren'iOS, though.
There are several versions of the LGPL with different clauses; if Apple expects everything to be statically linked, that makes it more of a pain in the butt - but it looks to me like LGPL 2.1 could be satisfied by separately distributing a Ren'Py version that's capable of opening your iOS versions and building an iOS distribution with modded versions of the LGPL libraries if the user so chooses. I haven't analysed the other LGPL versions in detail and I don't know which versions actually apply to Ren'iOS, though.
Nom nom nom nom nom LEAVES.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Ren'iOS: Getting Ren'Py to run on iOS
The only problem is that - as far as I know - there's no way to get the iOS package off your device, so you can add in the new Ren'Py.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Ren'iOS: Getting Ren'Py to run on iOS
If you sync your device with iTunes, it'll download any installed app archives to your iTunes library. The app archive is just a Zip file, and inside is the usual OS X/iOS app bundle.
In the case of Ren'iOS, this would include the 'game' directory. So for a commercial game, paying customers would indeed have a way to access the game's .rpyc/.rpyb/.rpa files, which non-customers wouldn't be able to access. It's a bit of a circuitous route, but it would give them the ability to rebuild the app with any modified libraries they wish. Could that be enough?
In the case of Ren'iOS, this would include the 'game' directory. So for a commercial game, paying customers would indeed have a way to access the game's .rpyc/.rpyb/.rpa files, which non-customers wouldn't be able to access. It's a bit of a circuitous route, but it would give them the ability to rebuild the app with any modified libraries they wish. Could that be enough?
- jack_norton
- Lemma-Class Veteran
- Posts: 4086
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
- Contact:
Re: Ren'iOS: Getting Ren'Py to run on iOS
Spoke with a coder friend of mine and he asked: "What parts are LGPL? SDL2 has no such restrictive license (not anymore)."
Re: Ren'iOS: Getting Ren'Py to run on iOS
http://www.renpy.org/wiki/renpy/LicenseBecause of these portions which must be licensed under an LGPL, the single license that applies to Ren'iOS taken as a whole is the LGPL Version 3.
The version of SDL used by Ren'Py is LGPL (link)
Re: Ren'iOS: Getting Ren'Py to run on iOS
Ren'iOS is actually using the pre-release code of SDL 2, which is licensed under the zlib license. The code we're using that is covered by the LGPL 2.1 is:
I'll be writing up some more documentation for the project soon, which will cover this in more detail.
- pygame
libav (compiled with only LGPL options)
GNU FriBidi
I'll be writing up some more documentation for the project soon, which will cover this in more detail.
- jack_norton
- Lemma-Class Veteran
- Posts: 4086
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
- Contact:
Re: Ren'iOS: Getting Ren'Py to run on iOS
I admit I don't understand much of all of this, but if you manage to make it work you'll become my personal hero
Who is online
Users browsing this forum: Ocelot