Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikesmullin/game8
exploring Sokol lib
https://github.com/mikesmullin/game8
Last synced: about 1 month ago
JSON representation
exploring Sokol lib
- Host: GitHub
- URL: https://github.com/mikesmullin/game8
- Owner: mikesmullin
- License: wtfpl
- Created: 2024-10-19T23:08:38.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-30T09:24:04.000Z (about 2 months ago)
- Last Synced: 2024-11-30T09:29:34.398Z (about 2 months ago)
- Language: C
- Size: 946 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Game 8
This prototype explores an application of the [Sokol](https://github.com/floooh/sokol) library.
### Features include:
- cross-platform (win, mac, nix, wasm)
- stateful hot-reload (via .DLL + file watcher)
- entity component system (ECS) design pattern
- atlas + PBR shaders
- Blender-compatible via Wavefront (.obj)
- real-time networked multiplayer
- client-authoritative
- lockstep entity replication
- input synchronization
- deterministic math
- websockets
- unit & integration test runner (like rspec)
- windowed or headlessmy related Game prototypes:
[5](https://github.com/mikesmullin/cpp20-win11-x64-sdl2-vulkan?tab=readme-ov-file)
[6](https://github.com/mikesmullin/c17-sdl2-vulkan)
[7](https://github.com/mikesmullin/game7)## Prerequisites
- Recent version of **Windows**, Mac, or Linux OS (32-bit)
- or a Browser supporting [**WebGL2**](https://webgl2fundamentals.org/)
- **GPU** supporting [**OpenGL**](https://www.opengl.org/) or [**Metal**](https://developer.apple.com/metal/) (drivers often included with OS)
- **Node.js** (for build scripts)
- **Clang** (recommended compiler)## Building
Clone the repo, and fetch dependencies.
```
git clone ...
git submodule update --init --recursive
```### ie. on Windows
Start the game.
```
C:\> node build_scripts/Makefile.mjs all
```
Enable hot-reload. (ie. when editing [`Logic.c`](src/game/Logic.c))
```
C:\> node build_scripts/Makefile.mjs watch
```### ie. in Browser
Setup emscripten compiler (`emcc`) environment.
```
cd vendor/emsdk/
emsdk_env
cd ..
```Start the web server.
```
C:\> node build_scripts/Makefile.mjs web
```Navigate to [http://localhost:9090/build/main.html](http://localhost:9090/build/main.html)
**NOTICE:** Web version does not hot-reload, only because desktop affords the superior debugging experience.
## Testing
### ie. on Windows
```
C:\> node build_scripts/Makefile.mjs test
```Additional build commands can be found with `help`.