Commit graph

72 commits

Author SHA1 Message Date
f41e464b4a
Add ant gravity, surface constraint, and collision displacement
- isObstacle() now blocks all non-air, non-home materials so ants treat sand/dirt/rock/food as walls
- gravity pulls ants down when no solid cell is below them, gating all steering logic while falling
- collision displacement pushes ants to nearest air cell when sand falls on top of them
2026-03-11 22:50:10 -04:00
d4e48af662
Add configurable world seeding with random home and food placement 2026-03-11 20:48:05 -04:00
baadf6cd6d
Add ANTS_START_COUNT and ANT_BUDGET shader defines 2026-03-11 20:46:20 -04:00
f5b9af0ccc
Replace antsCount with antsStartCount and antBudget config 2026-03-11 20:45:31 -04:00
cd4f10bc80
Add ant behavior overhaul implementation plan
7 phases: config changes, world seeding, ant physics (gravity/surface/collision),
priority stack brain, unified brush with ant spawning, sand color variation,
and cleanup. Future phases B (digging pheromone) and C (colony dynamics) captured
as hooks.
2026-03-11 20:35:11 -04:00
fe537218a3
Add ant behavior overhaul design and nest-building research
Design covers ant gravity/physics, unified brush tool, behavioral
priority stack, sand color variation, and config changes. Research
doc captures real ant nest construction patterns for informing
simulation behavior.
2026-03-11 20:31:06 -04:00
2269f26f9f
Update CLAUDE.md with sand physics architecture 2026-03-11 18:12:14 -04:00
685a382d4d
Add material palette to GUI panel 2026-03-11 18:12:14 -04:00
3e13b2ecd2
Add camera view mode toggle between side and top-down 2026-03-11 17:45:47 -04:00
9f958089c0
Add stats overlay with cursor position, TPS, and colony info 2026-03-11 17:45:47 -04:00
d91b5a9b5e
Block pheromone diffusion through solid materials
Checks each blur neighbor's material behavior before including it in
the average. Solid and non-gas cells are excluded so pheromones don't
bleed through walls, sand, or rock.
2026-03-11 16:36:22 -04:00
6b514f338c
Add gravity-aware digging direction for ants
In side-view mode, ants carrying non-food powder material now bias their
angle upward toward the surface (30% blend). Ants not carrying anything
bias downward (20% blend) when diggable powder material is detected below.
Both biases are subtle so pheromone-following still shapes overall behavior.
2026-03-11 15:26:48 -04:00
290d27d85f
Place deposited material from ant cargo in world 2026-03-11 15:25:26 -04:00
489f121064
Encode deposit material ID in discretize pass 2026-03-11 15:25:11 -04:00
34bd1e95c2
Add powder material deposit logic for surface placement 2026-03-11 15:24:45 -04:00
43d3e56aee
Add material-aware ant pickup with carry strength check 2026-03-11 15:23:03 -04:00
94b0393abb
Wire material properties texture into AntsComputeScene 2026-03-11 15:22:25 -04:00
cb43ebfe83
Remove food from side-view world initialization 2026-03-11 15:15:57 -04:00
37d615e87a
Fix gravity logic and revert y-flip 2026-03-11 15:15:46 -04:00
7003e074c5
Fix startup world init and inverted sand gravity 2026-03-11 14:55:40 -04:00
8909dc6390
Wire side-view world init into Renderer reset 2026-03-11 14:35:43 -04:00
cd8a4ade82
Spawn ants on sand surface in side view mode
Add VIEW_MODE_SIDE define to common shader defines so shaders can
branch on view mode via preprocessor. In side view, ants init by
scanning downward from the top to find the first non-air cell, then
spawn one pixel above it facing downward. Top view keeps the original
center spawn with random angle.
2026-03-11 14:35:43 -04:00
e89ee1afa2
Add side-view world initialization with sand and sky 2026-03-11 14:35:43 -04:00
e8e5691d83
Add gravity direction and view mode to Config 2026-03-11 14:25:40 -04:00
568bfe83e3
Fix import order in App.ts after lint 2026-03-11 14:18:29 -04:00
bf34de9816
Wire sand physics pass into render pipeline 2026-03-11 14:18:29 -04:00
66d5f6b251
Add SandPhysicsScene for Margolus block CA 2026-03-11 14:18:29 -04:00
9e5af09476
Add Margolus block CA sand physics shader 2026-03-11 14:18:29 -04:00
3787dbbc3a
Add Margolus block offset utility with tests 2026-03-11 14:05:17 -04:00
89f963f9a6
Render world colors from material color lookup texture 2026-03-11 14:01:33 -04:00
29e5dbeb06
Extend draw tools to support material palette
Replace bit-flag draw modes with direct material ID painting. draw.frag
now writes the material ID float directly instead of toggling individual
cell flag bits. ScreenScene drops the PointerState enum in favor of
numeric material IDs from constants.ts, and adds Digit1/Digit2 bindings
for sand and dirt.
2026-03-11 14:01:33 -04:00
e6af97f402
Update ant compute shader for material IDs 2026-03-11 14:01:33 -04:00
e210ebc72d
Update world shader to use material IDs
Replace bit-packed cell flags in the R channel with a direct material ID float pass-through. Food clearing now writes MAT_AIR instead of clearing a bit.
2026-03-11 14:01:33 -04:00
0f9c1b47f2
Replace bit-packed cell flags with material ID constants 2026-03-11 14:01:33 -04:00
f5b04f08c6
Wire material lookup textures into Renderer 2026-03-11 13:43:04 -04:00
a1e164454d
Add GPU lookup texture data generation for materials 2026-03-11 13:43:04 -04:00
bc2c8fa270
Add material registry with built-in materials 2026-03-11 13:43:04 -04:00
dd27634f0c
Add material type definitions 2026-03-11 13:43:04 -04:00
4457368636
Add ant farm sand physics implementation plan 2026-03-11 12:44:24 -04:00
de010adf44
Add ant farm sand physics design doc
Covers GPU Margolus block CA for particle sand, hybrid material
system (shader behaviors + data-driven registry), ant digging/carrying
mechanics, dual camera (side view primary, top-down secondary), and
tiered gravity model (basic -> angle of repose -> pressure propagation).
2026-03-11 12:39:47 -04:00
1c74aabd53
Change from blue to red 2026-03-10 11:04:28 -04:00
a187ccded2
Fix zooming 2026-03-10 11:04:13 -04:00
8ad5130466
Persist config changes in local storage 2026-03-10 10:53:52 -04:00
14208e17fb
Move panels to the left 2026-03-10 10:53:52 -04:00
8dfc6f54bc
Disable culling 2026-03-10 10:53:44 -04:00
eddef83e5b
Add neocities deploy 2026-03-10 10:53:44 -04:00
b2fb120b6b
Add richer ant documentation 2026-03-09 12:12:28 -04:00
a3476d8ea7
Fix all linting checks 2026-03-09 11:26:06 -04:00
2c303b61f2
Document new ant behaviors 2026-03-09 11:26:06 -04:00
451e187032
Add colony stats readback for aggregate ant state 2026-03-09 11:15:57 -04:00