Menu

Becketron -- Game Engine

A game engine is developed as part of this project but before we take an in-depth look, lets first understand what a game engine is and where the term comes from and why build one in the first place.

The concept of a game-engine was introduced by ID software with the announcement of their game ‘Doom’ in 1993. The concept involved the separation of the game assets (e.g., 3D models, textures, game-logic etc.) from its core functionality (e.g., the tools used to build the game, the tools to deal with lower-level hardware-requirements and drivers, the tools to provide platform abstraction etc). The suite of these tools was termed ‘The game engine’. Over the coming years, ID software released games made with several other engines, licensing the engines to other companies for a fee. Other game engines like Epic Game’s Unreal Engine, Valve’s Source engine arose around the same time which, over the years, had become full featured development kits and could be licensed to build and realize highly ambitious game ideas.

The sophistication and features of the game engines themselves began to be used to gauge the game industry’s maturity and growth. Game engines nowadays are not just being used for making games but also for serious: medical, military, visualisation, simulation applications etc. Today, popular game engines like Unreal, Unity, CryEngine etc. are free to use and come with a royalty system that only applies when the game starts generating certain amount of revenue (e.g., Unreal recently changed the $1 million mark to $2 million, for the revenue generated by a game when the company, Epic Games, starts taking its 5% fee)

The Diagram above shows a general overview of what a game engine is composed of.

Why build a Game Engine?

So an obvious question to ask an Engine developer is, why? Why build a game engine when there are engines like Unity, Unreal, Godot etc. that already provide extremely powerful features, are very stable (being around for so long), have decent documentations and what not.

Well, there are many reasons you might want to build your own game-engine:

  • Experience: Having to build different complex-components that make up a game engine can provide an extremely valuable software development experience. Skills gained from such a project can be highly transferable and applied to other sophisticated software development projects.

  • Easy to specialize: Having first-hand experience in developing the engine components can provide an intuitive understanding of what’s under the hood, making it easier to specialise the engine for a specific purpose (e.g., Physics Simulation, 2D-Game making etc.). This applies mainly to the open-source engines, where the source code is available, but the codebase is huge and is contributed to by hundreds of developers

  • No Strings attached: Having your own game engine can leave you untied to any corporate strings and license agreement that might seem reasonable to begin with but can be restrictive as the project grows (doesn’t usually applies to indie developers)

  • Access to Source code: Popular game engines like Unity, Unreal etc. are proprietary engines, and are not open-source. Although, this might not be a problem for most indie developers and small companies, big ambitious projects can, and do end up in positions where a custom designed feature is required. Without access to the source code, this can lead to bottlenecks or the sacrifice of the given feature.

  • Pleasure: Building a complex software like a game engine can have its own internal rewards which can be hard to describe to non-programmer. To a programmer, a game engine is a giant piece of puzzel that needs to be solved and improved. Its like parenting a child, proudly watching as it does impressive things.

"I'd rather have a search engine or a compiler on a deserted island than a game."

John Carmack

Engine Design

The current design of the Becketron Game Engine is composed of three different projects, Becketron (static library), Tron (Editor), Sandbox (Testing ground for engine features).

Becketron Game-Engine architecture

The codebase for Becketron Engine (static library) contains the implementation for the different modules (e.g., 3D-Renderer, ECS, Physics System etc.) that make up the engine. The basic foundation for the GUI (i.e., integration of ImGui library) is also done within the project Becketron. The GUI components (e.g., Scene Hierarchy panel, Viewport etc.) that use the ImGui library are implemented within the ‘Tron’ Editor project. Both Sandbox and the Tron Editor have access to asset files (e.g., Textures, Skyboxes) and scene-specific GLSL Shader files. The video below provides a demo walkthrough of the current engine features.

Nvidia’s PhysX library is used to implement the physics system within the engine. The Rendering system is based on the OpenGL API, with plans for a Vulcan Implementation. Entt library is used for supporting Entity Component System within the engine. ImGui’s docking branch is used to provide window-docking functionality in addition to the other GUI features. Other ibraries, such as spdlog, stb-image, GLAD etc. are also used for their respective functionalities (See the vendor folder in the engine source code).

Becketron Game-Engine Current features Demo

The documentation for the engine can be found Here. The open-source code, which is open to community contribution can be found here.