Skip to content

gazed/vu

Repository files navigation

Vu

Vu (Virtual Universe) is a 3D engine based on Go (Golang) programming language. Vu is composed of packages, detailed in GoDoc, and briefly summarized below. More getting started and background information is available on the Wiki

Vu is a small engine intended for simple games. It currently supports Vulkan on Windows.

  • vu/physics handles spheres and convex hulls.
  • vu/render uses Vulkan 1.3 without any extensions.
  • vu/device supports a basic window, button presses, mouse clicks, and mouse movement.

Vu started as a learning project for Go and 3D programming. It is currently being used by the author to develop games and other 3D applications.

Sub packages

  • audio Positions and plays sounds in a 3D environment.
  • device Links the application to native OS specific window and user events.
  • eg Examples that both demonstrate and test the vu engine.
  • load Asset loaders including models, textures, audio, shaders, and bitmapped fonts.
  • math/lin Linear math library for vectors, matricies, and quaternions.
  • physics Repositions bodies based on simulated physics.
  • render 3D drawing and graphics interface.

Build and Test

  • Clone the repo, ie: git clone git@github.com:gazed/vu.git
  • Use go generate in vu/assets/shaders to build the shaders. Requires glslc executable.
  • go build in vu\eg and run the examples.

Build Dependencies

Credit Where Credit is Due

Vu is built on the generous sharing of code and information by many talented, kind, and lucid developers. Thank you in particular to:

  • https://www.youtube.com/@TravisVroman Travis Vroman brilliantly explains how to use Vulkan in a game engine. His video devlog and code base provides an overall context for Vulkan that is difficult to get from the specification. Want a Vulkan C engine? Checkout https://github.com/travisvroman/kohi Apache License.

  • https://github.com/bbredesen/go-vk MIT License. Go bindings for Vulkan that does not required c-go and a C compiler. This is a huge amount of work due to the size and complexity of Vulkan. The generated bindings were dragged directly into vu/internal/render/vk

  • https://github.com/felipeek/raw-physics MIT License. Raw-physics provides the ability to collide spheres and convex hulls in less than 5000 lines of code. This was perfect for porting from C into Go vu/physics pretty much line for line.

  • https://github.com/lxn/win Go bindings for the Windows API that do not require c-go and a C compiler. The parts needed where put directly into vu/internal/device/win along with the original License.

  • https://github.com/qmuntal/gltf BSD 2-Clause License. GLTF helps tremendously for importing 3D model data and thanks to qmuntal it was possible to pull a few thousand lines of Go code into vu/internal/load/gltf and get a working importer.