Skip to content

Deterministic, multi-threaded 3d demo written from scratch

License

Notifications You must be signed in to change notification settings

AlxHnr/3d-zig-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

795 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building and running the game

Install the required dependencies, example for Fedora:

sudo dnf install SDL2-devel SDL2_image-devel

Install zig 0.14.0 and run zig build run inside the projects directory. The game is considerably faster when built with optimizations: zig build run -Doptimize=ReleaseFast.

Controls

  • arrow keys - Move
  • space + arrow keys - Strafe
  • right ctrl + arrow keys - Rotate slowly
  • t - Toggle top-down view
  • f - Toggle flow-field (path-finding info, zoom with mousewheel)
  • F2 - Save map to disk
  • F5 - Reload map from disk
  • left mouse button - Start/stop placing object
  • mouse wheel - Zoom in/out
  • right mouse button + mouse wheel - Cycle trough placeable objects
  • middle mouse button - Cycle trough object types
  • delete - Toggle delete/insert mode