Page 1 of 1
Is LÖVE a framework, API, or engine?
Posted: Wed Jul 01, 2015 3:57 am
by RonanZero
Title.
Re: Is LÖVE a framework, API, or engine?
Posted: Wed Jul 01, 2015 4:14 am
by ejmr
An engine that provides an API that serves as a framework for 2D games. So, all three to some degree.
Re: Is LÖVE a framework, API, or engine?
Posted: Wed Jul 01, 2015 8:54 am
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:
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.
Re: Is LÖVE a framework, API, or engine?
Posted: Wed Jul 01, 2015 6:52 pm
by markgo
It's love, baby
Re: Is LÖVE a framework, API, or engine?
Posted: Fri Jul 03, 2015 10:50 am
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.