Is LÖVE a framework, API, or engine?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
RonanZero
Citizen
Posts: 90
Joined: Mon Oct 20, 2014 3:33 am

Is LÖVE a framework, API, or engine?

Post by RonanZero »

Title. :nyu:
while true do end;
User avatar
ejmr
Party member
Posts: 302
Joined: Fri Jun 01, 2012 7:45 am
Location: South Carolina, U.S.A.
Contact:

Re: Is LÖVE a framework, API, or engine?

Post by ejmr »

An engine that provides an API that serves as a framework for 2D games. So, all three to some degree.
ejmr :: Programming and Game-Dev Blog, GitHub
南無妙法蓮華經
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Is LÖVE a framework, API, or engine?

Post by kikito »

The definition of framework, library and engine has to do with the kind of relationship each has with your game.

Here's a schema I did to differentiate each:

Image

Short explanation:
  • A library extends it or gives it more capabilities, but your game is "in control of the game flow". Your game code decides when to call it. The library feels like "a tool your game uses" - like a shotgun or a screwdriver.
  • A framework takes control of the flow. It is the framework who decides when to call your game code. You program your game by "filling up slots" or "using hooks" provided by the framework. Given that your game has to adapt to these constraints, the framework is not a "tool", but more like a "vehicle": it makes your game easier and faster in some ways, but also limits your code a bit (the same way a motorbike makes the terminator go faster, but can't be used off-road, for example).
  • An engine is much more restrictive and more complete than a framework. It used to limit the type of game which you could make (there used to be first person engines, or strategy-game engines), but nowadays engines are genre-agnostic. It also frequent that engines come with example assets, or asset stores. The relationship is different here. Your game does not "hook" into some parts of the engine. Instead, the parts which constitute your game are mostly provided by the engine. The engine is "bones" and your game is "skin".
It is also worth noting that these distinctions are not discrete, but a spectrum. A library can be a bit "frameworky" (for example, providing some callback hooks at some point). A framework can be a bit of an engine (for example by providing some assets).

In that spectrum I think LÖVE is mostly a framework (you must provide a main.lua, and generally use love.update and love.draw as hooks), with some engine-like behaviour (you use some parts like Image or Source to build your game). But it is mostly a framework.

The API discussion is completely different. API means "Application Programming Interface". An API is what the programmer uses to interact with a system. Libraries, frameworks and engines all have APIs. LÖVE also has an API. The API is not LÖVE, it is just a part of it.
When I write def I mean function.
User avatar
markgo
Party member
Posts: 190
Joined: Sat Jan 05, 2013 12:21 am
Location: USA

Re: Is LÖVE a framework, API, or engine?

Post by markgo »

It's love, baby
User avatar
ejmr
Party member
Posts: 302
Joined: Fri Jun 01, 2012 7:45 am
Location: South Carolina, U.S.A.
Contact:

Re: Is LÖVE a framework, API, or engine?

Post by ejmr »

Kikito, I love that image, which made me actually laugh out loud. I think your explanation was great as well.

Just as an aside, if you go back and watch the first two Terminator films you will see that the terminators are running assembly code for a 6502 processor, and on top of that the code is commented. I'm glad that SkyNET considers it important enough to comment the code for their time-traveling killing machines. Good for them.
ejmr :: Programming and Game-Dev Blog, GitHub
南無妙法蓮華經
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests