Is LÖVE a framework, API, or engine?
- 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?
An engine that provides an API that serves as a framework for 2D games. So, all three to some degree.
- 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?
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:
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.
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".
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.
- 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?
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.
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.
Who is online
Users browsing this forum: No registered users and 7 guests