Fyse Engine

A C++ Game Engine

Introduction

The name is currently "Fyse Engine" is an in-house game engine, created for teaching children how to make video games from scratch. We aimed to make it easier for developers to just skip the linker and additionally include directories. Since this engine is directed to a children consumer audience who seeks the challenge of learning C++ but lack the hardware for Unreal Engine's requirements. Everything we do in this engine to design choices and structures is to ensure that even children can easily program in C++.

What does it offer?

Most of the features and syntax of Fyse Engine is meant for ease and simplicity, since the audience of Fyse Engine is for children, as an introduction into C++. All features were designed with so many workarounds and fail safes to ensure ease for the children developing their games on!! There is a build in math library that covers Vector and Matrix math, alongside euler rotations!! An automatic texture loader (that can be disabled) to load in all the textures inside a given directory. Many features will be covered within this "Features" segment...

So Far...

There is little to show visually since I'm still working on the engine. And in total the engine only comes up to a bit over 8500 lines of code. With nothing much to show, I can show a few technical things.

Upcoming Features

There are some features that are still in development, such as serialization/deserialization of the engine's worlds and GameObjects. The list of features is as follows:

  • Sounds
  • Engine GUI Toolkit
  • UI/UX Toolkit
  • Compute Shaders
  • Lighting and Shadows
  • And Much More

Features

A few features have already been included in the engine, such as Textures, GameObjects, Components, Scenes, Physics, and more! Though, there are still many features that are still in development. It is a primary learning experience for me to create a game engine from scratch, but I do plan on making it a professional game engine. I will be adding more features to the engine, such as serialization/deserialization of the engine's worlds and GameObjects. Editor GUI's, and also a UI/UX toolkit for the engine so that developers can create their own UI's for their games.

Some Engine Features
  • // Initializing Engine Configurations
  • EngineConfig NewConfig = EngineConfig();
  • NewConfig->WindowTitle = "Random Game";
  • NewConfig->MSAACount = MSAA_X0;
  • NewConfig->FullscreenMode = Windowed;
  • NewConfig->WindowWidth = 1280;
  • NewConfig->WindowHeight = 720;
  • NewConfig->RefreshRate = 165;
  • NewConfig->BackgroundColor = { 0, 1, 0, 0 };
  • // Turning on some features (Optional)
  • // Shows an outline of the Colliders to debug and visualize
  • NewConfig.ShowColliders = true;
  • // Turn off the world grid
  • NewConfig.ShowWorldGrid = false;
  • // Utilize the Alpha Channel in loaded textures in render passes
  • NewConfig.EnableTransparency = true;
  • // Enable/Disable if the engine should load in textures from a directory.
  • NewConfig.AutoLoadTextures = true;
  • // Creating Fyse Engine Instance
  • // Fyse Engine does not require an EngineConfig argument
  • Engine* VulkanInstance = new Engine(&NewConfig);

Some Examples

Creation and GameObject and Components in Fyse Engine are straightforward. I wanted a clean, simple syntax for the engine, so I made sure that the engine was easy to use. Since it's an introduction for children to get into C++, known as a challenging language to learn, especially for children.

Instantiation and Components
  • // Creating GameObjects and Components
  • int main() {
  • Engine* VulkanInstance = new Engine();
  • GameWorld* World = VulkanInstance->GetWorld();
  • // GetTexture(): Retrieves textures loaded on VRAM
  • Texture* T_Viking = VulkanInstance->GetTexture("T_Viking");
  • // Instantiate(): Crates a GameObject in the world and returns a pointer to it
  • GameObject* Viking = World->Instantiate("Viking");
  • // AddComponent(): Adds a component of the type to the GameObject and returns a pointer to it
  • StaticMesh* SM_Viking = Viking->AddComponent<StaticMesh>();
  • SM_Viking->SetTexture(T_Viking);
  • SM_Viking->LoadAsset("Viking.obj");
  • . . .
  • }

Built-In Math Library

Fyse Engine has a built-in math library that covers Vector and Matrix math, alongside euler rotations!! It is a simple and easy-to-use math library meant for ease and simplicity, since the audience of Fyse Engine is for children. Pre-written documentation is available in the code itself, allowing a quick understanding of the library.

Vector3 Struct Example
  • // Multiple ways to access data from Vectors
  • Vector3 A = { 124, 300, 290 };
  • std::cout << A[0] << std::endl; // 124
  • std::cout << A.X << std::endl; // 124
  • // And also for Matrices
  • // Matrices are written in Row-Major
  • Matrix3x3 A = {
  • { 1, 2, 3 },
  • { 4, 5, 6 },
  • { 7, 8, 9 }
  • }
  • // Accessing B's first row, second element
  • std::cout << B[0][1] << std::endl;
  • std::cout << B[0].Y << std::endl;

Challenges

Developing in C++ comes with complexity. Ensuring the syntax and API are child-friendly required countless iterations. Since Simplicity brings Complexity, I had to make sure that the engine was easy to use, especially for children.