feat(ludic.physics): phys_own - a body owns a shape made for it alone, and phys_remove frees it with the body

A chunk's trunks and boulders put in and taken out made a new shape each time and freed none. The
table is by the body's index, made once at the world's size. tests/reuse_test: 1000 owned bodies put
and removed hold no more shapes and 32 bytes of heap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 13:52:07 +03:00
parent 404ee2ee3b
commit 5cd53d4024
6 changed files with 54 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import "ludic.base"
import "native.ludic"
import "state.ludic"
import "shape_ids.ludic"
import "owned.ludic"
import "shapes.ludic"
import "bodies.ludic"
import "queries.ludic"