https://github.com/peterhellberg/fps
A simple FPS in Zig, based on https://github.com/lizard-demon/fps
https://github.com/peterhellberg/fps
example fps zig
Last synced: 23 days ago
JSON representation
A simple FPS in Zig, based on https://github.com/lizard-demon/fps
- Host: GitHub
- URL: https://github.com/peterhellberg/fps
- Owner: peterhellberg
- Created: 2025-11-21T10:56:17.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2026-02-11T21:44:07.000Z (4 months ago)
- Last Synced: 2026-02-12T06:04:13.181Z (4 months ago)
- Topics: example, fps, zig
- Language: Zig
- Homepage: https://play.c7.se/fps/
- Size: 384 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FPS
A simple FPS in [Zig](https://ziglang.org),
based on
> [!Note]
> Requires Zig 0.15.2+
## Screenshot

## Build
Build a small native binary;
```sh {name=build}
zig build --release=small
```
> [!Tip]
> The `--release` flag for `zig build` takes the following values:
>
> - `fast`
> - `safe`
> - `small`
### Run
Build and run a small native binary;
```sh {name=native}
zig build run --release=small
```
Build and run a small [WebAssembly](https://webassembly.org/) binary in your browser;
```sh {name=web}
zig build run --release=small -Dtarget=wasm32-emscripten
```
### Test
You can run all the test cases like this;
```sh {name=test}
zig build test
```
## Input
Key | Action
--------------|------------------
**W,A,S,D** | Move
**Mouse** | Look around
**Space** | Jump (with audio)
**Click** | Capture mouse
**Escape** | Release mouse
**Q** | Quit
**P** | Print player state