Enigma 3D

enigma-3d is my first attempt to do a little graphics API and game engine for Rust. Please be aware that I'm not a professional graphics programmer, so the code is most likely butchering some conventions. I also don't take care of performance at the moment. That said, I have the following features working:

 

Feature List:

  • Model loading from GLTF and OBJ
  • Opaque and Transparent rendering
  • Material, Shader, Shape, Object Abstractions
  • PBR Shading
  • 3 Step customizable Render Pipeline: Vertex -> Geometry -> Fragment
  • Texturing, Normals, Vertex Colors
  • Up to 4 Point or Directional Lights per Objects. As many Lights as one wishes in the Scene
  • One Ambient Light
  • A Camera
  • A simple Event System to inject a generic Function type alongside Keycodes and Keycode-Modifiers into the EventLoop. At the moment events get processes one by one in sequence
  • A simple Update system based on either time or delta time, to inject a generic function type into the Update loop. At the moment, functions get processed one by one in sequence
  • Screen to World positions
  • Raycasting
  • Box Colliders
  • A default selection system
  • A generic Postprocessing system to write postprocessing effects and inject them into the renderloop
  • Skybox and sky reflections
  • GUI integration
  • Loading resources from macros to include them into the built application
  • Arbitrary Data dictionary within the application, to store and access any kind of data within the game loop
  • Serialization and Deserialization of Scene Objects into and from JSON
  • Optimization: Cached Textures
  • Optimization: Shared Materials
  • Optimization: Instanced Objects batched into one Draw call

How to install and run:

For an installation guide, please refer to the GitHub. Please be aware that you need to compile the project with rust. Cargo should be of great help.

 

 

Example Game:

A first little game, developed with enigma, can be found here: https://github.com/JeremiasMeister/enigma-flappy-bird keep in mind, it was originally developed with an older version of enigma-3d and will most likely not compile anymore. But you can always checkout the built release for windows