Can you integrate Lua code in Ren'py scripts?
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.
Can you integrate Lua code in Ren'py scripts?
This might be a bit of an odd question,
but I have a friend who is a great programmer & likes to help me out with my game- The only thing is, that he codes in Lua.
Now, my question is; can I add his Lua code to my renpy scripts? ...without the player noticing anything of this, or getting other issues along the way.
To be more specific, he would code several mini-games - So, those are seperated parts from the main game. But the currency you earn there, CAN be spend in the the main game.
Well, if you have experience with this, then I love to hear about it
Kind regards
Robin
but I have a friend who is a great programmer & likes to help me out with my game- The only thing is, that he codes in Lua.
Now, my question is; can I add his Lua code to my renpy scripts? ...without the player noticing anything of this, or getting other issues along the way.
To be more specific, he would code several mini-games - So, those are seperated parts from the main game. But the currency you earn there, CAN be spend in the the main game.
Well, if you have experience with this, then I love to hear about it
Kind regards
Robin
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: Can you integrate Lua code in Ren'py scripts?
Robin4000 wrote: ↑Thu Oct 24, 2019 4:41 am This might be a bit of an odd question,
but I have a friend who is a great programmer & likes to help me out with my game- The only thing is, that he codes in Lua.
Now, my question is; can I add his Lua code to my renpy scripts? ...without the player noticing anything of this, or getting other issues along the way.
To be more specific, he would code several mini-games - So, those are seperated parts from the main game. But the currency you earn there, CAN be spend in the the main game.
Well, if you have experience with this, then I love to hear about it
Kind regards
Robin
First of all, RenPy uses Python. And thats all. If you want to make various mini games, you can learn it in Pygame and maybe import it in RenPy.
https://www.pygame.org/news
So RenPy and Pygame had the same codes, Python.
Re: Can you integrate Lua code in Ren'py scripts?
Thank you! But we actually want to avoid learning another code-language
So the question still remains...can I add his Lua code to my renpy scripts?
The thing that gave me the impression that it might be possible, was this post; viewtopic.php?f=32&t=33923&p=385416&hil ... 0libraries
Kind regards
Robin
So the question still remains...can I add his Lua code to my renpy scripts?
The thing that gave me the impression that it might be possible, was this post; viewtopic.php?f=32&t=33923&p=385416&hil ... 0libraries
Kind regards
Robin
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: Can you integrate Lua code in Ren'py scripts?
I believe that's a question for the "Development of Ren'Py" section viewforum.php?f=32.
Only PyTom himself can give a better answer related to the latest Ren'Py development state. Some things may have changed during the last four years.
Only PyTom himself can give a better answer related to the latest Ren'Py development state. Some things may have changed during the last four years.
Last edited by Donmai on Thu Oct 24, 2019 11:16 am, edited 1 time in total.
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: Can you integrate Lua code in Ren'py scripts?
Asking PyTom should do, because he knows what RenPy can only use types of code languages.
Obviously only Python, and no one else. Putting that lua might be cause some errors in RenPy. As Donmai says, it is better to ask in that forum for future updates for RenPy.
Obviously only Python, and no one else. Putting that lua might be cause some errors in RenPy. As Donmai says, it is better to ask in that forum for future updates for RenPy.
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: Can you integrate Lua code in Ren'py scripts?
Just for the record: "that Lua thing" is an outstanding scripting language used in many games like "Hungry Birds". Robin4000's question is really interesting.
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: Can you integrate Lua code in Ren'py scripts?
this is what I get searching will lua code work with python
Pytom probably only can give you a 50 out of 100% answer
best to test it your self because it is untested there is only way to find out is to try itThe lua module interfaces Python code to the Lua library, thus allowing Lua scripts to be run from Python. For most operations, a lua.lua object must be created. This object does all the work. Creating multiple lua objects from one Python program should work, but is untested.
Pytom probably only can give you a 50 out of 100% answer
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: Can you integrate Lua code in Ren'py scripts?
Facepalm! Of course, you know, I meant ANGRY Birds.
But I guess most people here know that English is not my language. Oh my...
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
Re: Can you integrate Lua code in Ren'py scripts?
I guess using ctypes you could interact with lua lib (or anything else outside of python/renpy).
Biggest problem will be integrating RenPy graphics/audio systems with these lua minigames.
Overall it is really not worth it.
Biggest problem will be integrating RenPy graphics/audio systems with these lua minigames.
Overall it is really not worth it.
I may be available for hire, check my thread: viewtopic.php?f=66&t=51350
- Remix
- Eileen-Class Veteran
- Posts: 1628
- Joined: Tue May 30, 2017 6:10 am
- Completed: None... yet (as I'm still looking for an artist)
- Projects: An un-named anime based trainer game
- Contact:
Re: Can you integrate Lua code in Ren'py scripts?
You would need to write an abstraction layer (likely in Python) to interpret the Lua (or other language syntax) and then call/use the relevant Python or Ren'Py functions/classes/methods. In essence, you'd need to learn Python to do that and then do more work creating the interpreter than just continuing in Python and starting to learn some of the Ren'Py ways of doing things.
Ren'Py is, after all, a Python based DSL specifically aimed toward making VNs easily and having them built for a wide range of platforms (PC, Mac, web, tablet, mobile). It is not an API that you can easily expect to plug any language into without a good deal of work.
On an aside; even though Lua is a rather nice language, your friend would not go far wrong with starting to learn some Python - and Ren'Py is quite a nice visual way to start doing so.
Quietly mutters something about #1 programming language on the planet versus #20... (http://pypl.github.io/PYPL.html)
Ren'Py is, after all, a Python based DSL specifically aimed toward making VNs easily and having them built for a wide range of platforms (PC, Mac, web, tablet, mobile). It is not an API that you can easily expect to plug any language into without a good deal of work.
On an aside; even though Lua is a rather nice language, your friend would not go far wrong with starting to learn some Python - and Ren'Py is quite a nice visual way to start doing so.
Quietly mutters something about #1 programming language on the planet versus #20... (http://pypl.github.io/PYPL.html)
Frameworks & Scriptlets:
- Speech Bubble dialogue system
- Multiple Notify with ATL and history
- (WIP) Radial Masking - needs updating to use Shader
- 7.4 - Smooth Tinting using ATL and matrixcolor
- Several other repositories there too
Re: Can you integrate Lua code in Ren'py scripts?
Hello & thanks everyone!
From your answers I understand that it's not really recommended to do this
To integrate lua with renpy seems a lot of hassle & that was actually what I was trying to avoid. So, I will just drop the idea, and start looking for some other wat to get this done.
Thank you all so much for your support!
Kind redards
Robin
From your answers I understand that it's not really recommended to do this
To integrate lua with renpy seems a lot of hassle & that was actually what I was trying to avoid. So, I will just drop the idea, and start looking for some other wat to get this done.
Thank you all so much for your support!
Kind redards
Robin
Who is online
Users browsing this forum: Google [Bot]