Build Love with Ruby instead of Lua

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Nightrains
Prole
Posts: 6
Joined: Sat Apr 25, 2020 7:58 am

Re: Build Love with Ruby instead of Lua

Post by Nightrains »

zorg wrote: Sun Apr 26, 2020 12:44 am That said, if you really want to write a ruby interpreter, whether to replace LuaJIT or even just in lua, that's up to you and is in fact a more gargantuan task than if you just started coding your game at this moment. :monocle:
I can, I made games with LUA and not just in Love, but the purpose of this project is not only to create a game, but to do it in a new language, and also, I want to make Love compatible with Ruby.

So I will keep looking how and if I can't then I'll try but with a different language.
MrFariator
Party member
Posts: 548
Joined: Wed Oct 05, 2016 11:53 am

Re: Build Love with Ruby instead of Lua

Post by MrFariator »

Fair enough, best of luck to you, then.
User avatar
pgimeno
Party member
Posts: 3657
Joined: Sun Oct 18, 2015 2:58 pm

Re: Build Love with Ruby instead of Lua

Post by pgimeno »

I believe that doing this would "just" involve rewriting the wrap_XXXX source files and the Lua scripts, and maybe a few other changes. I don't think the code depends on Lua in any other part. At least a grep for Lua reveals pretty few instances out of these files; I think I only found one in BezierCurve.h but I haven't looked in detail.

See for example https://github.com/love2d/love/blob/mas ... aphics.cpp - good luck rewriting that for a different language!

Then of course you need to somehow adapt the build system.
Nightrains
Prole
Posts: 6
Joined: Sat Apr 25, 2020 7:58 am

Re: Build Love with Ruby instead of Lua

Post by Nightrains »

pgimeno wrote: Sun Apr 26, 2020 11:48 am I believe that doing this would "just" involve rewriting the wrap_XXXX source files and the Lua scripts, and maybe a few other changes. I don't think the code depends on Lua in any other part. At least a grep for Lua reveals pretty few instances out of these files; I think I only found one in BezierCurve.h but I haven't looked in detail.

See for example https://github.com/love2d/love/blob/mas ... aphics.cpp - good luck rewriting that for a different language!

Then of course you need to somehow adapt the build system.
Maybe it is easier than that, the modules can be tables and Lua functions, as long as they can be used from Ruby.

With Lunatic-Python I managed to make Python useable in Love without recompiling it, although I had to call the main Python script from main.lua, but then I give it the Love functions from main.lua and from Python they can be used.

I could do the same but from the script that runs main.lua, or maybe in another similar way.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests