What is happening behind the scenes?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
Marty
Citizen
Posts: 89
Joined: Mon Dec 04, 2017 1:47 am
Location: Germany

What is happening behind the scenes?

Post by Marty »

Hey there,

first of all, let me tell you how I end up here:

I'm a German .NET and web programmer in the mid 20s who wants to start developing games for mobile devices. I wanted to start with simple things, so any big engines are out of my view. I've no interest in a huge 3D engine that simulates 2D by using an orthographic camera. It's just so heavy, so the deployment files are.

Since I'm a C# developer and worked with Xamarin a little before, I was looking at CocosSharp. It's not a bad engine, but it still has tons of bugs and the last commit is over a year old. People said to use UrhoSharp instead, but this would be 2D in a 3D space for 2D games, such as Unity does, again.

I literally searched hours and hours, watched videos and checked communities over and over again. Since game development is new to me, I need a good community that replies to questions and provides good examples and tutorials.

Then I found LÖVE and I'm very satisfied by it's simplicity, the documentation and you, the community, that is super helpful and friendly from all I've read on this forum so far. So I want to give it a shot. :ultraglee:

Now I haven't dig into the distribution topic of LÖVE games for mobile devices so far. So I wonder, how is the LÖVE team and Martin Felis deploying the LUA files to the system in detail? I know the whole game will be in source in the *.love file. But what does the wrapper exactly do? Is it an app that extracts the *.love file and interprets the LUA files and draws all the things of my game natively? Is there some sort of intermediate language in between?

EDIT: Just to clarify: I know there are tutorials how I can deploy my game on mobile, I just wonder what happens behind the scenes of an Android / iOS app when it runs. How does this engine work?
Visual Studio Code TemplateRichLÖVE Mobile (AdMob+UnityAds+PlayGamesServices+GameCenter)Add me on Discord

───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░░░░░░░░█────
▄▄──█░░░▀█▀░░░█──▄▄
█░░█▀▄░░░░░░░▄▀█░░█
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: What is happening behind the scenes?

Post by xNick1 »

I'm also a fullstack .NET web dev and I'm in my mid 20s :D
I was looking for something similar to XNA.
Unfortunately I didn't like monogame because of the very few resources out there, so I chose Love.

As far as I know Love games are just a zip file interpreted by Love2d at runtime.
And as far as I know it's the same on every platform.
That means that Love games run on every platform where you can manage to compile Love.
Some of Loves dependencies are Lua, OpenAl, Sdl2.
If you can manager to compile them on your platform, Love games will run on that platform :D

And thanks to the webport love.js, you can even make it run in a webview
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: What is happening behind the scenes?

Post by s-ol »

The löve app, like the desktop version, includes a Lua interpreter/VM that executes the (extracted) code from the .love file. I'm not sure whether JIT is enable on mobile (and on which platforms, afaik apple store rules are touchy on that kind of thing) but it it is then some of the Lua code will be turned into machinecode at runtime. Otherwise I think the Lua VM still uses a bytecode representation to execute also.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
Marty
Citizen
Posts: 89
Joined: Mon Dec 04, 2017 1:47 am
Location: Germany

Re: What is happening behind the scenes?

Post by Marty »

xNick1 wrote: Mon Dec 04, 2017 2:13 pm I'm also a fullstack .NET web dev and I'm in my mid 20s :D
I was looking for something similar to XNA.
Unfortunately I didn't like monogame because of the very few resources out there, so I chose Love.
Interesting. Yes I was checking out XNA before, too. MonoGame was an option for me, but it's way to down-level to get things done quickly. Since I'm a full time programmer (currently working on web frontends), I don't have load of time to dig into things like MonoGame, glad that I found LÖVE. What is your most important property of LÖVE?
xNick1 wrote: Mon Dec 04, 2017 2:13 pm As far as I know Love games are just a zip file interpreted by Love2d at runtime.
And as far as I know it's the same on every platform.
That means that Love games run on every platform where you can manage to compile Love.
Some of Loves dependencies are Lua, OpenAl, Sdl2.
If you can manager to compile them on your platform, Love games will run on that platform :D

And thanks to the webport love.js, you can even make it run in a webview
s-ol wrote: Mon Dec 04, 2017 2:15 pm The löve app, like the desktop version, includes a Lua interpreter/VM that executes the (extracted) code from the .love file. I'm not sure whether JIT is enable on mobile (and on which platforms, afaik apple store rules are touchy on that kind of thing) but it it is then some of the Lua code will be turned into machinecode at runtime. Otherwise I think the Lua VM still uses a bytecode representation to execute also.
So in other words, the compiled LÖVE VM is a wrapper that uses native functions to draw everything on mobile. JIT is perhaps not present. This is fine, as long as it's native. Did Apple ever complained about LÖVE apps somehow or is it cool?
Visual Studio Code TemplateRichLÖVE Mobile (AdMob+UnityAds+PlayGamesServices+GameCenter)Add me on Discord

───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░░░░░░░░█────
▄▄──█░░░▀█▀░░░█──▄▄
█░░█▀▄░░░░░░░▄▀█░░█
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: What is happening behind the scenes?

Post by xNick1 »

For me?
It's really easy to work with and it's insanely fast to prototype stuff.
After making a couple games you can reuse entire Lua files!
But this is just my opinion
User avatar
Marty
Citizen
Posts: 89
Joined: Mon Dec 04, 2017 1:47 am
Location: Germany

Re: What is happening behind the scenes?

Post by Marty »

xNick1 wrote: Tue Dec 05, 2017 6:21 pm For me?
It's really easy to work with and it's insanely fast to prototype stuff.
After making a couple games you can reuse entire Lua files!
But this is just my opinion
I share your opinion so far. The whole thing is really easy to adapt and perfect for me to get into game development.
Thanks for your insights.
Visual Studio Code TemplateRichLÖVE Mobile (AdMob+UnityAds+PlayGamesServices+GameCenter)Add me on Discord

───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░░░░░░░░█────
▄▄──█░░░▀█▀░░░█──▄▄
█░░█▀▄░░░░░░░▄▀█░░█
Post Reply

Who is online

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