The idea is that everything's dark, but you can use "sonar" (press "P") to send out a ping to light up the surrounding area. Using
thrust or colliding also sends out "sound". However, if you can see it, so can the Bad Guys (other players, AIs, turrets, sound-tracking torpedos,
etc.... none of which is implemented yet)
Key
Action
---
------
W,A,S,D
Thrust
P
Ping
L
Headlight (bit broken)
F
Fire
TODO/Issues:
Obviously not balanced or tweaked. This is just a concept experiment.
No AI or multiplayer, or any opponents.
Map/cave generation SUCKS. Needs to be:
Tileable
Deterministic from a seed (for multiplayer)
Smooth to hide tile edges
Connected
Sensible
Infinite
Fast to generate
Easier said than done.
Probably slow. It works fine on my MacBook Pro M3 Max, but it does lag a little when there's a lot of sonar.
It currently displays all sonar pings and searches all visible wall blocks for lighting.
Bounding boxes and subdivision would be good.
Walls are implemented as thousands of individual squares rather than grouping
Marching cubes or something would be good to give diagonal walls
Reflections are meant to be in there, but they don't seem to work
Code is currently uncommented. This is a priority.
I did implement this in two other ways, including a per-chunk tensor field as a kind of fluid dynamics, but it didn't work well, was buggy, and I
realised it wouldn't simulate multiple sound waves well either.
I thought maybe this could be done better using a WebGL surface and a shader program. Thinking needed on whether this is better or worse than a particle
system.