diff --git a/packages/ludic.character/ports.ludic b/packages/ludic.character/ports.ludic index a53a55a0..d1a78bab 100644 --- a/packages/ludic.character/ports.ludic +++ b/packages/ludic.character/ports.ludic @@ -104,8 +104,8 @@ export state CharacterState { chr_safe_x: float = 0.0 chr_safe_z: float = 0.0 chr_fact_q: Queue = chr_fact_q__new() - chr_fpool: []CharacterFact = chr_fpool_new() # every fact record made, reused once no drain holds it - chr_ffree: []CharacterFact = chr_ffree_new() + @max(1024) chr_fpool: []CharacterFact = chr_fpool_new() # every fact record made, reused once no drain holds it + @max(1024) chr_ffree: []CharacterFact = chr_ffree_new() chr_fnext: int = 0 } function chr__top_plain(x: float, z: float, r: float, from_y: float, step: float, base: float) -> float { return base } diff --git a/packages/ludic.fishing/state.ludic b/packages/ludic.fishing/state.ludic index 6bc9ee2d..2590f7df 100644 --- a/packages/ludic.fishing/state.ludic +++ b/packages/ludic.fishing/state.ludic @@ -25,8 +25,8 @@ export state FishingState { fishing_run_next: float = 0.0 fishing_dice: Rng = null fishing_fact_q: Queue = fishing_fact_q__new() - fishing_fpool: []FishingFact = fishing_fpool_new() # every fact record made, reused once no drain holds it (facts.ludic) - fishing_ffree: []FishingFact = fishing_ffree_new() + @max(1024) fishing_fpool: []FishingFact = fishing_fpool_new() # every fact record made, reused once no drain holds it (facts.ludic) + @max(1024) fishing_ffree: []FishingFact = fishing_ffree_new() fishing_fnext: []int = words(1) fishing_n: int = 0 # the record: caught, the biggest (cm), a legend landed fishing_big: int = 0 diff --git a/packages/ludic.jobs/state.ludic b/packages/ludic.jobs/state.ludic index 509038c8..76e29a61 100644 --- a/packages/ludic.jobs/state.ludic +++ b/packages/ludic.jobs/state.ludic @@ -22,8 +22,8 @@ export state JobsState { jobs__seed: int = 1000 jobs__dice: Rng = rng_new(1000) jobs__q: Queue = jobs__q__new() - jobs__fpool: []JobsFact = new []JobsFact # every fact record made, reused once no drain holds it (facts.ludic) - jobs__ffree: []JobsFact = new []JobsFact + @max(1024) jobs__fpool: []JobsFact = new []JobsFact # every fact record made, reused once no drain holds it (facts.ludic) + @max(1024) jobs__ffree: []JobsFact = new []JobsFact jobs__fnext: []int = words(1) } diff --git a/packages/ludic.npc/person.ludic b/packages/ludic.npc/person.ludic index 7615671c..db647d7c 100644 --- a/packages/ludic.npc/person.ludic +++ b/packages/ludic.npc/person.ludic @@ -8,14 +8,14 @@ export state NpcState { np_clock: float = 0.0 np_recent: []string = np_recent_new() # the last few names that left, a ring np_rnext: int = 0 - np_walkers: []NpcPerson = new []NpcPerson - np_posts: []NpcPerson = new []NpcPerson + @max(64) np_walkers: []NpcPerson = new []NpcPerson + @max(64) np_posts: []NpcPerson = new []NpcPerson np_max: int = 10 # walkers at most np_n: int = 0 # walkers about np_dice: Rng = rng_new(20260925) np_facts: Queue = np_facts__new() - np_fpool: []NpcFact = np_pool_new() # every fact record made, reused once no drain holds it - np_ffree: []NpcFact = np_list_sized() + @max(1024) np_fpool: []NpcFact = np_pool_new() # every fact record made, reused once no drain holds it + @max(1024) np_ffree: []NpcFact = np_list_sized() np_fnext: int = 0 np_next_h: float = 0.0 # the hour the census is next looked at np_hold: bool = false # held where they stand (a shot of their poses) diff --git a/packages/ludic.physics/state.ludic b/packages/ludic.physics/state.ludic index ba01b327..44cf4664 100644 --- a/packages/ludic.physics/state.ludic +++ b/packages/ludic.physics/state.ludic @@ -36,9 +36,9 @@ export const PH_CAP: int = 512 # contacts drained a step, queries' buffer export state PhysicsState { ph_world: pointer = null - ph_shapes: []pointer = new []pointer # a shape id is its place here; null once freed - ph_spare: []int = new []int # the freed places, handed out again (shape_ids.ludic) - ph_own: []int = new []int # by a body's index: the shape it owns, freed with it (owned.ludic) + @max(262144) ph_shapes: []pointer = new []pointer # a shape id is its place here; null once freed + @max(262144) ph_spare: []int = new []int # the freed places, handed out again (shape_ids.ludic) + @max(262144) ph_own: []int = new []int # by a body's index: the shape it owns, freed with it (owned.ludic) ph_step: float = 0.016666668 # seconds a step ph_sub: int = 1 # collision steps in each ph_max_steps: int = 4 # a slow frame catches up this far and no further @@ -51,12 +51,12 @@ export state PhysicsState { ph_nf: int = 0 ph_rx: float = 0.0 # where the last phys_resolve put a body ph_rz: float = 0.0 - ph_walkers: []pointer = new []pointer # a walker id is its place here; null once removed + @max(64) ph_walkers: []pointer = new []pointer # a walker id is its place here; null once removed ph_ids: []int = words(PH_CAP * 2) ph_vals: []float = floats(PH_CAP * 4) ph_facts: Queue = ph_facts__new() - ph_fpool: []PhysFact = ph_fpool_new() # every fact record made, reused once no drain holds it - ph_ffree: []PhysFact = ph_ffree_new() + @max(1024) ph_fpool: []PhysFact = ph_fpool_new() # every fact record made, reused once no drain holds it + @max(1024) ph_ffree: []PhysFact = ph_ffree_new() ph_fnext: int = 0 } diff --git a/packages/ludic.telemetry/state.ludic b/packages/ludic.telemetry/state.ludic index 2c3ee351..df0b850e 100644 --- a/packages/ludic.telemetry/state.ludic +++ b/packages/ludic.telemetry/state.ludic @@ -68,8 +68,8 @@ export state TelemetryState { telemetry__props: TelemetryProps = telemetry__props_new() telemetry__out: StrBuf = null # a batch or the file, written here telemetry__url: string = "" # host and path, joined once at the config - telemetry__fpool: []TelemetryFact = new []TelemetryFact # fact records, reused once no drain holds one - telemetry__ffree: []TelemetryFact = new []TelemetryFact + @max(1024) telemetry__fpool: []TelemetryFact = new []TelemetryFact # fact records, reused once no drain holds one + @max(1024) telemetry__ffree: []TelemetryFact = new []TelemetryFact telemetry__fnext: []int = words(1) telemetry__dirty: bool = false # the ring differs from the file telemetry__h: int = -1 # the batch in flight diff --git a/packages/ludic.vehicles/ports.ludic b/packages/ludic.vehicles/ports.ludic index 4682596c..a6c10395 100644 --- a/packages/ludic.vehicles/ports.ludic +++ b/packages/ludic.vehicles/ports.ludic @@ -63,8 +63,8 @@ export state VehiclesState { ve_ly: float = 0.0 ve_lz: float = 0.0 ve_fact_q: Queue = ve_fact_q__new() - ve_fpool: []VehicleFact = ve_fpool_new() # every fact record made, reused once no drain holds it - ve_ffree: []VehicleFact = ve_ffree_new() + @max(1024) ve_fpool: []VehicleFact = ve_fpool_new() # every fact record made, reused once no drain holds it + @max(1024) ve_ffree: []VehicleFact = ve_ffree_new() ve_fnext: int = 0 } function ve__dry(x: float, z: float) -> float { return -10000.0 } diff --git a/packages/ludic.wildlife/species.ludic b/packages/ludic.wildlife/species.ludic index ab2020bb..a30524de 100644 --- a/packages/ludic.wildlife/species.ludic +++ b/packages/ludic.wildlife/species.ludic @@ -35,8 +35,8 @@ export property WildSpecies { export state WildlifeState { wl_facts: Queue = wl_facts__new() - wl_fpool: []WildFact = wl_fpool_new() # every fact record made, reused once no drain holds it - wl_ffree: []WildFact = wl_ffree_new() # of those, the ones free at the last look + @max(1024) wl_fpool: []WildFact = wl_fpool_new() # every fact record made, reused once no drain holds it + @max(1024) wl_ffree: []WildFact = wl_ffree_new() # of those, the ones free at the last look wl_fnext: []int = words(1) # the next of them to hand out wl_own: WildTable = null # a guest's own animals, put away whole while it draws the host's wl_host: WildTable = wl__new() # the table the host's are drawn into: made once, cleared per join