Skip to content

Rismosch/ris_engine

Repository files navigation

ris_engine

Barebones game engine. Home made passion project.

thumbnail

Features:

  • Startup, shutdown, mainloop and error handling
  • Logging, to console and file
  • Threadpool based concurrency
  • Remappable controls
    • Mouse
    • Keyboard
    • Gamepad
  • 3d math
    • Vectors and Matrices
    • Quaternions
    • Color
      • RGB
      • OkLab
  • 3d Graphics via Vulkan
    • Terrain
    • Static Meshes
    • Skinned Meshes
    • Materials
    • Lighting
  • Debugging
    • GUI via Dear ImGui
    • Profiling
    • 3d Gizmos
    • const hashed string ids
  • Asset system and pipeline
    • Importing
    • Loading
    • (De)compiling
  • Codecs
    • GLSL to SpirV, with custom pre processor
    • QOI
    • glTF
  • Settings/Configuration
  • Gameobjects and components
    • Mesh renderer
    • Scripting
  • Scene editing, saving and loading
  • Collisions
  • Animations
    • Bones
  • 3d Sound

Legend:

  • implemented
  • planned

Requirements

You will need rustc and cargo to compile this repo. I am using version 1.77.2 download link

The target platform is x86_64, Windows and Linux.

A newer compiler and other platforms may work, but I cannot give guarantees.

Your hardware must support Vulkan. Most modern GPUs work.

You also require an internet connection, to download dependencies from crates.io. You can vendor crates for offline use or download an archived repo from my website. Note that I make these archives sporadically, meaning they may not be up to date.

Setup

This engine relies on the Vulkan SDK. ris_engine requires prebuild binaries from it.

For information on how to get and install the Vulkan SDK, click to reveal the instructions for the given platform.

Windows

click to reveal

Download and run the SDK Installer from https://vulkan.lunarg.com/sdk/home#windows

When running the SDK Installer, make sure that you select the SDL2 libraries and headers.

To confirm if the Vulkan SDK was installed properly, check the environment variables $VULKAN_SDK and $VK_SDK_PATH. They should be pointing to the directory where you installed the SDK into. You can also confirm if your hardware supports Vulkan, by running $VULKAN_SDK/Bin/vkcube.exe. If you see a spinning cube with the LunarG logo, everything is working as intended.

Arch Linux

click to reveal

1. Install SDL2

sudo pacman -S sdl2

2. Install shaderc

sudo pacman -S shaderc

3. Install Vulkan

Depending on your graphics card, you need to install a different package. Follow the instructions in the link below:

https://wiki.archlinux.org/title/Vulkan#Installation

Building

Assuming your environment is set up properly, you can now compile and run the engine with:

cargo run

Alternatively, you can build a release-ready package, by running the command below. Note that this builds with all optimizations enabled, which may take longer than just using cargo run.

cargo run -- cli build

Passing the -r flag is discouraged, because asset discovery works differently in release builds. If you want to pass the -r flag to cargo, you must import and compile the assets manually. Infos and how to do that can be found in ./assets/README.md.

Testing

All tests are found under ./tests/ and can be run with:

cargo test

Alternatively, to run much more extensive tests, you can run the command below. Note that this may take several minutes.

cargo run -- cli pipeline all

Using the command above, some tests run miri. If miri is not installed, then the according tests will fail.

Cli

The command cargo run -- cli is a command line utility tool. It runs features of ris_engine as a headless oneshot cli program. Thus it enhances the development environement and provides further utility functions.

For all available commands run:

cargo run -- cli

To get further information on a specific command and what additional args it may be need, run:

cargo run -- cli help <command>

To execute a command, run:

cargo run -- cli <command> [args...]

For example, the command below runs the testing pipeline:

cargo run -- cli pipeline all

About

Barebones game engine. Home made passion project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages