ludic.things: a removed Thing's record placed again, oldest first past a lag of 32; things_reserve sizes the grid once

thing_put and thing_spawn made a new record for every Thing placed, and the world places and removes
them all day (an animal's sign and bed, a drop, a fish), so play grew by a record per placement.
Removed records wait in a queue compacted in place; once 32 wait, the oldest is set back as new
with a new uid. ludic.base's grid_reserve makes the buckets for n rows now, since a rehash in play
leaves the old bucket array behind. Tests: a record comes back only past the lag, as new, with a
new uid, the indexes agree, and the spare queue stays bounded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 11:52:23 +03:00
parent 5d71892b7c
commit 1af62d0879
7 changed files with 101 additions and 2 deletions

View file

@ -13,3 +13,4 @@ import "near.ludic"
import "chunks.ludic"
import "dispatch.ludic"
import "system.ludic"
import "spare.ludic"