GameDev Glossary: Library Vs Framework Vs Engine

This is a topic that seems to cause some degree of confusion, especially among new game developers.  We often here the terms “game library”, “game framework” and “game engine” but what is the difference, where does one end and the next begin?  This post attempts to explain the difference as clearly as possible.  It’s important to note, there isn’t a hard and fast definition for each term, basically the meaning prescribed to each is formed by the most popular usage.  I suppose that’s true with most modern words.

Library

A library is simply put a collection of code and data intended for reuse.  Libraries are often compiled binaries, such as DLLs, but don’t have to be.  Plenty of JavaScript libraries exist for example, while entire template libraries in C++ are pure code.  In game development terms, a library generally is a collection of code for performing tasks from a specific domain.  For example, playing audio, performing physics, handling input.

Gamedev examples of libraries include FMOD, RakNet, Box2D or Assimp.

There can be some ambiguity here, as FMOD for example contains some tools and calls itself “middleware”, while Box2D refers to itself as an “engine”, both are still essentially libraries.

Framework

What happens when you gather a bunch of libraries together, throw in a couple of tools, assembling all the ingredients you need to start creating a game?  Well, you’ve got yourself a framework.  Essentially a framework is a collection of libraries and tools that go together to solve a given task, in this case, making a game.

Gamedev examples include SFML, OGRE, LibGDX and MonoGame.

SFML is a good example of the relationship between libraries and frameworks.  SFML is composed of several libraries… graphics, input, window, audio, etc…  Collected together as a whole they become the framework SFML.  LibGDX is a slightly more interesting example as the inclusion of Scene2D straddles the line between framework and game engine a bit closer than most.

Game Engine

So, a library is a collection of code to accomplish a task, a framework is a collection of libraries to create a game, we does something become an engine?  This classification is probably the least defined but in my opinion two key things separate a framework from a game engine.  In addition to providing all the various libraries needed to create a game, a game engine must include:

  • a scene graph
  • a world/level editor

The scene graph is essentially the data structure that  holds a game’s world.   Generally there are a number of supporting functions for managing, searching and saving the scene graph as well, although often these are left to the game itself to implement.  The level/world editor requirement is probably the biggest distinguishing factor, although there exist some game engines (often 2D) that have no editor ( although I would then argue they are in fact frameworks ).

Game Engine examples include Unity , Unreal, Construct2, GameMaker, HeroEngine and Copperlight.

Quite often however, frameworks and engines will be used interchangeably.  Even here on GameFromScratch, the game engine resource refers to both game engines and frameworks using the same moniker.  This is because frankly, at the end of the day, it’s a matter mostly of semantics.

What about APIs and SDKs

This is another point of confusion for developers…  what’s the difference between an API, an SDK or simply a library?

Well an API is generally one or more library, as is an SDK.  An API ( Application Programmer Interface ) is generally a programmatic interface to another product.  That product could be an entire operating system, or an embedded programmable interface within a game.  That interface is generally provided in the form of libraries.

An SDK (Software Development Kit) is generally the same thing as a framework.  While a framework is a collection of libraries and tools used to create a game, an SDK can be a collection of tools and libraries to create device drivers for your OS, to use or integrate a technology or hardware such as the Oculus Rift or Android phones.  Of course and SDK can also be aimed at creating games, like DirectX or GameKit.  Then of course just to make life even more confusing, you can have a SDK/API/Library combo, like OpenGL.

Generally where APIs and SDKs vary from everything else discussed today is who provides them.  Quite often these are provided by the OS or hardware manufacturers.

General


Scroll to Top