Skip to content

Simple graphics demo in Rust

Notifications You must be signed in to change notification settings

0xc0dec/demo-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

A simple graphics demo where you can fly around, spawn boxes and grab them.

Demo

I made this project to learn Rust and try it in game development. There is no attempt to create an "engine", everything is pretty low level and abstractions are built along the way when needed.

Even though this is a learning project, the code is not heavily commented. Hopefully it's clean enough to be readable and easy to navigate.

Building and running

cargo run

Controls:

  • Toggle camera control: Tab
  • Move: WASDQE
  • Grab/drop boxes: left mouse click
  • Spawn new box: F
  • Quit: Esc

Features

  • hecs ECS.
  • wgpu rendering.
  • nalgebra math.
  • Rapier physics
    • Rigid bodies with colliders.
    • Camera with character controller, preventing it from passing through objects.
    • Ray casting.
    • Drag-n-drop.
  • First person flying camera ("spectator") with clamping of vertical angles to protect from overturning.
  • Skybox rendering on a full-screen quad.
  • Vignette post-processing.