# Game Engine

Game engine is a software, usually a framework or a library, that serves as a base code for games. Such an engine may be seen as a platform allowing portability and offering preprogrammed functionality often needed in games (3D rendering, physics engine, I/O, networking, AI, audio, scripting, ...) as well as tools used in game development (level editor, shader editor, 3D editor, ...). The scope and complexity (bloat) of game engines vary, some are quite tiny (good), others are full fledged all-in-one frameworks with tools, asset stores and so on (bad).

Game engines differ from general multimedia engines/libraries, such as SDL, by their specific focus on games. They are also distinguished from generic rendering engines, e.g. 3D engines such as OpenSceneGraph, because games require more than just rendering (audio, AI, physics, ...). While one may use general purpose technology such as C + SDL to create a game, opting for a game engine should make the process easier. However, **beware of bloat** that plagues most mainstream game engines. LRS advises against use of any frameworks, so try to at worst use a game library. Many game programmers such as Jonathan Blow advocate and practice writing own engines for one's games.

**Should you use a game engine?** Probably NOT, either use something LRS approved, such as SAF, or write the game from scratch, as a portable software without dependencies.

## Existing Engines

The following are some notable game engines.

- **free as in freedom**
  - **Allegro**: 2D C game library. 
  - **BRender**: Old 3D engine that used mainly software rendering, used e.g. in Carmageddon, later released under MIT.
  - **Cube2**: 3D voxel outdoor shooter engine with real-time editable levels, used e.g. in Cube 2: Sauerbraten.
  - **Godot**: A successful but bloated FOSS (MIT) framework engine, alternative to the proprietary Unity engine, written in C++, supports many platforms, has 3D/2D graphics and physics engines, scripting in many languages and many "advanced" features. Capitalist software.
  - *id Tech* engines (engines by Id software)
    - **id Tech 0**: Simple 2D raycasting engine, written in ANSI C, used mainly in Wolf3D (1992).
    - **id Tech 1**: BSP rendering engine used mainly in Doom and Doom 2.
      - **Chocolate Doom**: Doom engine fork aiming to be very similar to the vanilla version, even including bugs. Keeps the original software renderer. Due to keeping it oldschool, this is a very KISS/suckless engine.
      - **Crispy Doom**: Slight enhancement of Chocolate Doom: increased resolution (640x480) and removed hardcoded engine limits, sometimes also seems to run faster. Along with Chocolate Doom a very KISS/suckless engine.
      - **GZDoom**: Another Doom fork, supports newer OpenGL etc., however it's quite bloated and breaks compatibility.
      - **PrBoom**: Doom engine fork adding e.g. OpenGL support.
    - **id Tech 2**: 3D engine used mainly in Quake and Quake 2, in a modified form (GoldSrc, proprietary) also in Half Life, features both GPU accelerated and software rendering.
      - **Darkplaces**: Fork of id Tech 2, used e.g. in Xonotic.
    - **id Tech 3**: 3D engine used mainly in Quake 3, sadly dropped software rendering support.
      - **ioquake3**: Fork of id Tech 3 aiming for bugfixes and improvements, e.g. SDL integration.
      - **OpenArena**: Game-specific fork of id Tech 3.
    - **id Tech 4**: 3D engine used mainly in Doom 3 and Quake 4.
      - **iodoom3**: Fork of id Tech 4, in a similar spirit to ioquake3.
  - **Irrlicht**: C++ cross-platform library for 3D games, includes a physics engine and many rendering backends (OpenGL, software, DirectX, ...). Used e.g. by Minetest.
  - **OpenMW**: FOSS remake of the engine of a proprietary RPG game TES: Morrowind, can be used to make open-world 3D RPG games.
  - **Panda3D**: 3D game engine, under BSD, written in Python and C++.
  - **pygame**: Python 2D game library.
  - **Raylib**: C99 2D/3D game library, relatively minimalist.
  - **SAF**: Official LRS library for tiny and simple portable games.
  - **Torque3D**: 3D game engine in C++.
  - ...
- **proprietary** (no go!):
  - **Build Engine**: Old portal rendering "pseudo 3D" engine used mainly in 3D Realms games such as Duke3D. It is source available.
  - *id Tech* engines (engines by Id software)
    - **id Tech 5**: 3D engine used e.g. in Rage and some shitty Wolfenstein games.
    - **id Tech 6**: 3D engine adding Vulkan support, used e.g. in Doom 2016.
    - **id Tech 7**: 3D engine used e.g. in Doom: Eternal.
  - **Jedi engine**: old 90s "2.5D/Pseudo3D" engine best known for being used in *Dark Forces * (Star Wars game).
  - **GameMaker**: Laughable toy for non-programmers.
  - **RAGE**: 3D open-world engine developed and used by Rockstar for games such as GTA.
  - **Source**: 3D engine by Valve used in games such as Half Life 2.
  - **Source2**: Continuation of Valve's source engine with added support of VR and other shit.
  - **Unity**: Shitty nub all-in-one 3D game engine, very bloated and capitalist, extremely popular among coding monkeys, includes ads.
  - **Unreal Engine**: One of the leading proprietary 3D game engines developed alongside Unreal Tournament games, EXTREMELY BLOATED and capitalist, known for hugely overcomplicated rendering (advertised as "photorealistic").
  - ...
  
## See Also

- game
- physics engine
- 3D rendering