Skip to content

bobis33/VEngine

Repository files navigation

VENGINE_LOGO

Build Linux Build Windows Tests Build Documentation GitHub repo size License: MIT

VEngine - Vulkan based Game Engine

WORK IN PROGRESS!

Welcome to VEngine, a Vulkan-based game engine.

I Build this project to learn more about Vulkan and graphics programming in general. The goal is to create an efficient engine that can be used for various projects, such as games, simulations, and visualizations.

Features

  • Vulkan Rendering Pipeline: Leveraging Vulkan for high-performance graphics rendering
  • Basic Camera System: Control camera movement in the 3D space
  • Model Loading: Import 3D models using assimp
  • Real-time debugging: Use ImGui for real-time debugging and tool development
  • Cross-platform support (Linux, Windows)
  • Doxygen Documentation: Automatically generated documentation hosted on GitHub Pages

Planned Features:

  • Ray Tracing
  • Physics Integration
  • Audio Integration
  • Support for more input devices (e.g., mouse, game controller)
  • Support for more platforms (e.g., macOS, Android, iOS, PS5 ...)

Build

Before building the project, make sure you update the submodules:

git submodule update --init --recursive

Prerequisites

Make sure you have the following dependencies installed on your system:

If you are using a Debian-based distribution, you can install the dependencies using the following command:

./tools/install-dependencies.sh build

Linux

Build and Run

./tools/build.sh build

This script also handle several other commands: tests, format and doc.

Then you can run the engine:

./vengine [options]

Windows

Build and Run

I build the project with CLion, also works with Visual Studio. I'm using the Visual studio toolchain with ninja.

You should create your own CMake profile depending on your configuration. Basic configuration should run the following commands:

cmake -G "Visual Studio 17 2022" .
cmake --build . --config Release 

Then you can run the engine:

.\vengine.exe [options]

Command Line Options

The following command-line options are available:

Option Description
--help, -h Show help message and exit
--version, -v Show version information and exit
--fullscreen, -f Enable fullscreen mode
--vsync, -V Enable vertical sync
--width <value> Set the width of the window (e.g., 800)
--height <value> Set the height of the window (e.g., 600)
--fov <value> Set the field of view (1.0 to 300.0)
--mspeed <value> Set the move speed (0.1 to 100.0)
--lspeed <value> Set the look speed (0.1 to 100.0)
--near <value> Set the near plane (0.1 to 100.0)
--far <value> Set the far plane (0.1 to 100.0)

Key Bindings

The following keyboard controls are currently available for interacting with the engine:

Key Description
Z Move forward
S Move backward
Q Move left
D Move right
SHIFT Move down
SPACE Move up
Look up
Look down
Look left
Look right
à Show debug windows

Documentation

The documentation is generated using Doxygen. You can access the latest version on the GitHub Pages.

To generate the documentation locally, run the following command:

./tools/build.sh doc

The generated documentation will be available in the docs directory.

You can also run the following command to host the documentation locally:

./tools/run-doc.sh [ node | php | python ]

Then you can access the documentation at http://localhost:8080.

External Libraries

  • Assimp: Open Asset Import Library to load various 3D model formats into the engine.
  • Doxygen Awesome CSS: A custom CSS theme for Doxygen documentation.
  • GLFW: For creating windows, receiving input, and managing OpenGL and Vulkan contexts.
  • GLM: A header-only C++ mathematics library for 3D transformations, vectors, and matrices, compatible with OpenGL and Vulkan.
  • Google Test: A testing framework for C++.
  • ImGui: Immediate Mode Graphical User Interface for real-time debugging and tool development.
  • stb: A set of single-file public domain libraries for graphics, image loading, and more.

These libraries are included directly into the project to simplify dependency management. Be sure to initialize and update the submodules when cloning the repository:

Commit Norms

Commit Type Description
build Changes that affect the build system or external dependencies (npm, make, etc.)
ci Changes related to integration files and scripts or configuration (Travis, Ansible, BrowserStack, etc.)
feat Addition of a new feature
fix Bug fix
perf Performance improvements
refactor Modification that neither adds a new feature nor improves performance
style Change that does not affect functionality or semantics (indentation, formatting, adding space, renaming a variable, etc.)
docs Writing or updating documentation
test Addition or modification of tests

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

Special thanks to Brendan Galea for inspiration and resources related to Vulkan development.