https://github.com/johanhenriksson/goworld
Experimental Vulkan 3D Engine written in Go
https://github.com/johanhenriksson/goworld
3d glsl go golang vulkan
Last synced: 5 months ago
JSON representation
Experimental Vulkan 3D Engine written in Go
- Host: GitHub
- URL: https://github.com/johanhenriksson/goworld
- Owner: johanhenriksson
- License: other
- Created: 2015-07-20T02:53:55.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2025-01-05T18:11:59.000Z (over 1 year ago)
- Last Synced: 2025-01-05T19:22:09.664Z (over 1 year ago)
- Topics: 3d, glsl, go, golang, vulkan
- Language: Go
- Homepage:
- Size: 15.4 MB
- Stars: 38
- Watchers: 5
- Forks: 5
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goworld
An attempt at building a basic 3D engine from scratch in Go using Vulkan.
**Goals**
- Have fun creating it
- Use minimal dependencies
- Implement modern GPU-driven rendering techniques
- Ideally leverage Go's concurrency in useful ways
- Run on MacOS/Linux/Windows
- Create an ergonomic, reactive GUI system
- Get to a state capable of producing _some_ kind of _passable_ graphics with a coherent art style
- Experiment with some cool demo scenes
- Maybe make a game
**Features**
Currently, the following features exist in varying degrees of completeness:
- Classic object/component scene graph
- Basic scene editor
- Voxel world/editor demo
- Unified Rendering Pipeline (Forward/Deferred)
- Directional Lights (w/ cascading shadow maps)
- Point Lights
- Screen-Space Ambient Occlusion (HBAO)
- Color Grading with Lookup Tables
- 3D Physics Engine integration via Bullet SDK
- Character controller
- Rigidbody dynamics
- Basic shape colliders (box, sphere, cylinder, capsule)
- Mesh colliders
- TrueType Font Rendering
- React-like UI with a flexbox layout engine & css-like styling
- Hooks
- Portals/fragments
- Rect
- Image
- Button
- Textbox
- Floating windows
- Custom ergonomic 3D math library derived from mathgl and go3d




## System Requirements
- Vulkan 1.2
- MacOS users need MoltenVK.
## Build Instructions
Goworld is developed & tested on MacOS 13. It should be reasonably easy to get it running on Linux or Windows,
but its not officially supported yet.
### (MacOS) Install MoltenVK
Grab the latest version of MoltenVK.
### Install glslc
`glslc` must be installed in your path to compile shaders.
### Build Bullet SDK
Goworld uses the Bullet SDK for physics. In order to compile from source, you first need to compile Bullet.
```bash
# check out bullet3
git clone https://github.com/bulletphysics/bullet3.git
cd bullet3
git checkout 3.25
# configure build
cmake . \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_UNIT_TESTS=OFF \
-DINSTALL_LIBS=ON \
-DUSE_DOUBLE_PRECISION=OFF \
-DBUILD_BULLET2_DEMOS=OFF \
-DBUILD_CPU_DEMOS=OFF \
-DBUILD_OPENGL3_DEMOS=OFF \
-DBUILD_BULLET3=ON \
-DBUILD_PYBULLET=OFF \
-DBUILD_EXTRAS=OFF \
-G "Unix Makefiles"
# compile & install
make
make install
```
### Build
Goworld uses Taskfile for convenient building:
- Build:
```
$ task build
```
- Build & run:
```
$ task run
```