8 releases (breaking)

✓ Uses Rust 2018 edition

0.11.0 Apr 2, 2020
0.10.0 Mar 5, 2020
0.8.0 Feb 1, 2020
0.7.0 Jan 12, 2020
0.3.2 Nov 7, 2019

#89 in GUI

Download history 19/week @ 2020-01-30 7/week @ 2020-02-06 24/week @ 2020-02-13 12/week @ 2020-02-20 54/week @ 2020-02-27 45/week @ 2020-03-05 11/week @ 2020-03-12 22/week @ 2020-03-19 8/week @ 2020-03-26 24/week @ 2020-04-02 35/week @ 2020-04-09 25/week @ 2020-04-16 5/week @ 2020-04-23 6/week @ 2020-04-30 7/week @ 2020-05-07

95 downloads per month

MIT license

1.5MB
33K SLoC

Ruby HTML 32K SLoC // 0.0% comments Gherkin (Cucumber) 558 SLoC // 0.0% comments

RG3D

3D game engine written in Rust.

WARNING: Some places are semi-complete or just does not implemented yet, this engine is not in production-ready state yet.

Screenshots

These screenshots are from rusty-shooter which is a big demo for the engine.

1

2

3

4

5

What is done already?

  • Window and OpenGL context.
  • Core library (rg3d-core) with some handy data structures - object pool, vectors, matrices, etc.
  • Scene graph with pivot, camera, mesh, light, particle system, sprite nodes.
  • FBX Loader - both ASCII and binary. Note: Only 7100 - 7400 versions are supported!
  • Advanced node-based UI with these widgets:
    • Border
    • Button
    • Canvas (layout panel)
    • Grid (layout panel)
    • Stack panel
    • Scroll bar
    • Scroll viewer
    • Scroll content presenter
    • Text
    • Text box
    • List box
    • Tab control
    • Window
  • Fonts - TTF Loader (compound characters are not supported yet)
  • Built-in save/load using object visitor - save/load state of engine in one call.
  • Skinning
  • Animation blending state machine - similar to Mecanim in Unity Engine.
  • Animation retargetting - allows you to remap animation from one model to another.
  • Automatic resource management
    • Texture
    • Models
    • Sound buffers
  • Deferred shading
    • Point light
    • Spot light
    • Bump mapping
  • A* pathfinder + Navmesh support.
  • Particle systems with soft particles.
  • Sounds - using rg3d-sound crate.
  • Physics - using rg3d-physics crate.

Plans

  • Simple editor - would be so nice to have, but until UI is not stabilized enough there is no point to try to write editor.
  • Documentation - it is still incomplete because engine contstantly changing its API.

Dependencies

  • glutin - window and OpenGL initialization
  • image - texture loading
  • lexical - fast text -> number parsing for ASCII FBX loader
  • byteorder - read/write builtin rust types (u16, u32, f32, etc.)
  • base64 - encode binary data for object visitor's text output
  • inflate - to decompress binary FBX data
  • rand - to generate random numbers in various places of the engine (mostly in particle systems)

Contributing

Contributions are very welcome!

Why Rust?

Previously I wrote my engine in C (DmitrysEngine), but at some point it become relatively hard to maintain it. I thought if it was hard to maintain for me, how hard it would be to use it correcly for newcomers? Initially I thought to port engine to modern C++, but C++ is not a silver bullet and won't guarantee memory safety. At my full-time job almost every day we fixing issues related to memory safety and threading bugs, I really tired of this and then I just remembered that Rust provides memory safety and safe concurrency. I've started to learning Rust and it was real pain in the ass at the first few weeks, I even thought to return back to C, but from some point I found ways of doing things without fighting with compiler... and engine started growing, and at some point I found that I crashed (because of segfault) only few times since start and only at unsafe code in OpenGL functions, that was very exciting!

Dependencies

~11MB
~194K SLoC