tuzz / game-engine

A project for me to explore writing a game engine from scratch.

Home Page:http://tuzz.github.io/game-engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Game Engine

A project for me to explore writing a game engine from scratch using an ECS design pattern. My game engine is written in Rust, compiles to WebAssembly and binds to a WebGL canvas. That means it runs in a browser.

Currently, it supports the following features:

  • 3D meshes built from vertex normals
  • Surface normals calculated for models
  • Phong lighting model (ambient, diffuse, specular)
  • Multiple directional and point lights
  • Orthographic and perspective cameras
  • Multiple cameras, rendered to portions of the view
  • Dynamic generation of GLSL shaders
  • Materials, or colors specified per vertex
  • Scene graph that's optimised for lazy updates
  • Game loop that's frame rate independent
  • Keyboard input event handling

Usage

$ make setup
$ make build
$ make server

If you're not on a Mac, you'll need to install binaryen manually. There are a few more Makefile commands you might find useful (e.g. build-watch). For more examples, check out the wasm-bindgen documentation.

About

A project for me to explore writing a game engine from scratch.

http://tuzz.github.io/game-engine


Languages

Language:Rust 99.3%Language:Makefile 0.5%Language:HTML 0.2%