Would these games be possible with Love?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
adge
Citizen
Posts: 54
Joined: Mon Dec 14, 2015 8:50 pm

Re: Would these games be possible with Love?

Post by adge »

Will there some day native 3D be added to the engine? Like added in C++ to the inner guts of the engine.
Would 3D implementations done with lua run slower than the C++ ones? Probably I guess.
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Would these games be possible with Love?

Post by bobbyjones »

I think ones implemented in luajit would be faster than one implemented in c++. love3d is real 3d and is quite usable. It does need somethings from love's side to be complete but that should hopefully be in 0.11.0.
adge
Citizen
Posts: 54
Joined: Mon Dec 14, 2015 8:50 pm

Re: Would these games be possible with Love?

Post by adge »

Hmm. That seems interesting as I've always heard that C++ is faster, if not the fastest language available if used correctly. I heard that Lua is quite fast with Luajit. How does Love2d compare to similar engines in terms of performance.
As I'm coming from GameMaker it feels faster but I don't know if its really faster. I'm just curious. Or what about Unity? Or is this just hard to test?
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Would these games be possible with Love?

Post by bobbyjones »

The only reason coding something in c++ might be slower is that you would most likely have to cross the C boundary which is apparently slow in lua. Although using FFI may negate that.

Edit: Something programmed in C++ has a potential to be a lot faster than it being implemented in luajit. But when you are wrapping the C++ it would be best to keep as much of the code on luajit's side as possible. For speed reasons. Unless of course you are doing heavy math. If you are doing heavy math having to cross the C boundary may not be as bad.
adge
Citizen
Posts: 54
Joined: Mon Dec 14, 2015 8:50 pm

Re: Would these games be possible with Love?

Post by adge »

I thought love2d is fully coded in C++ and the functions you use are just bindings to lua?
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Would these games be possible with Love?

Post by bobbyjones »

Yes it is. But there are certain components that have FFI variants too. The FFI makes them much faster. For example this commit is slime adding an ffi variant for a couple functions. https://bitbucket.org/rude/love/commits ... 4f520ecd6b

Love3d uses FFI to call Opengl directly to add 3d to love. Im saying that is probably faster to do that than having love call Opengl functions and then pass it on to lua through the C api. Love was made before luajit's FFI was any good. I would imagine that if it was redone today that it would probably just use FFI.

C++ is faster than Lua. But in love any function that love provides generally has to cross the C api boundary which is slow. I have a feeling I just confused you lol
User avatar
FroggestSpirit
Prole
Posts: 11
Joined: Tue Jan 26, 2016 7:13 pm

Re: Would these games be possible with Love?

Post by FroggestSpirit »

I've used c++ a lot for game coding, and I'm still kinda new to Lua and Love2D, but would FFI also be cross-platform compatible? Now that I learned I can do 3D games, I might work on porting one of my projects, though I'd probably leave calculation intensive stuff as C/C++ to speed it up
This isn't easy to say, but…
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Would these games be possible with Love?

Post by bobbyjones »

Um well FFI it's self cross-platform iirc. But if you need a binary then that binary will need to be compiled for each platform.
adge
Citizen
Posts: 54
Joined: Mon Dec 14, 2015 8:50 pm

Re: Would these games be possible with Love?

Post by adge »

Which engine did you use with C++?
User avatar
FroggestSpirit
Prole
Posts: 11
Joined: Tue Jan 26, 2016 7:13 pm

Re: Would these games be possible with Love?

Post by FroggestSpirit »

I mainly used ENIGMA (similar to GameMaker and uses a mix of GML and c++), but I've done a 3D game demo in Visual C++ for a class before.
I'm usually reluctant to steer away from c++, because of how powerful it can be, but the appeal of Love2D drew me in, especially with it being cross-platform, and you don't have to do much to get a quick program ported to another platform
This isn't easy to say, but…
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests