Something went wrong. Try again.
Something went wrong. Try again.
RayEngine example
2 folders · 4 files
README.md
# WeirdForce — Chromatic Drift
A one-screen prototype for RayEngine where **the background is the physics**.
`src/background.fs` paints a colour field. `src/map.jl` is an allocation-free
CPU port of that exact shader, so the game can sample the colour under the
player and turn it into acceleration:
| sample | force |
| ----------------- | ---------------------------- |
| red dominant | push left |
| green dominant | push right |
| blue dominant | push up |
| white | hover (forces cancel) |
| black (vignette) | dead zone |
| yellow | down (red + green, no blue) |
You can only steer horizontally. Height is the field's business — ride the
magenta updrafts, let the green water carry you right, and dive through the
yellow downdrafts.
## Play
From `example/`:
```sh
julia --project=. activate.jl
```
or from the REPL:
```julia
using WeirdForce
WeirdForce.run!()
```
Reach the gold beacon before its countdown ring drains. Each capture moves the
tour to a different mood of the field; after all six, the field jumps more
often and the tour starts again. Missing a beacon shifts both the beacon and the
field. Every few seconds the whole field also jumps a little to a new snapshot.
| key | action |
| ---------------------- | -------------------------------------- |
| `A` / `D`, `←` / `→` | nudge left / right |
| `W` / `S`, `↑` / `↓` | nudge up / down |
| `G` | toggle the force-arrow grid |
| `F` | engine debug overlay |
| `P` | pause / resume |
| `R` | restart the run |
The white arrows are the field's force at each point (G toggles the grid); the
player has to learn the currents by reading the colours and feeling the d…