Namespace TDMaker.Core
Classes
- BeamBinding
Pooled channel state, valid only while present in Simulation.Beams.
- CommandLog
Fixed-capacity input recording with seed and versioned binary persistence. Record only external Enqueue calls between ticks.
- CompanionSlot
One preallocated owner slot, including its pending insertion.
- CustomDataSlots
Type-keyed runtime slots, allocated once per entity during extension registration.
- Entity
A pooled runtime entity. Keep its Id, not its reference, across removals.
- EntityStore
Deferred entity storage with stable iteration order and prewarmed component bundles.
- GameState
Read-only public economy, wave, and outcome state.
- RemainsRecord
A pooled neutral body record. Retain Id, rather than the object, after it leaves Simulation.Remains.
- SimConfig
Immutable fixed-step and preallocation settings.
- SimLimits
Fixed M2 pool sizes. Saturated requests fail without allocating in the tick path.
- SimRandom
A reproducible xorshift32 random stream; zero seeds are remapped.
- Simulation
A deterministic fixed-step world. Use commands for player actions and ClearEvents after reading output.
- SimulationClock
A bounded frame accumulator implementing the product catch-up policy without engine dependencies.
- SpatialQueryBuffer
Caller-owned fixed-capacity query storage. Entries are valid until this buffer is queried again.
- TrapBinding
Pooled deployment state, valid only while present in Simulation.Traps; retain Id across removals.
- UpgradeShopRules
Storage-independent immutable star-shop transitions. Forced battle ranks never affect spending.
Structs
- CommandRecord
An immutable command and the fixed tick at which it was submitted for processing.
- DamageContext
A modifiable raw damage request, before defense and incoming multipliers.
- DamageResult
One accepted request after resolution; ignored, removed, or immune recipients produce zero damage.
- EarlyCallRewardPreview
Allocation-free snapshot of calling the next wave now; obtaining it does not mutate the simulation or emit events.
- SimEvent
A value event. Value is damage or state total; IntValue is a slot, wave, or state delta.
- SimSystemInfo
Immutable metadata for one pipeline entry, in actual execution order. No mutable system instance is exposed.
- StateHasher
Stable FNV-1a value hashing with explicit byte order; never uses runtime object or string hashes.
- TargetQuery
A target request using the shared elliptical distance metric.
- Vec2
A simulation-space vector independent of any engine.
Interfaces
- IAbilityAction
A custom ability payload; keep its immutable configuration here and per-entity state in custom components.
- ICommandCodec
Optional persistence for custom commands. Type IDs 1024 and above belong to applications.
- ICommandHandler<T>
Handles an exact custom command type without reflection or dynamic dispatch generation in the tick.
- ICustomComponent
A prewarmed custom component; its reset must not allocate.
- IDamageHook
Damage hooks run in registration order. Implementations must not allocate or recursively request damage in BeforeDamage.
- ISimProfiler
Optional observational profiling hooks. Preallocate storage, avoid allocation, and do not mutate the world from callbacks.
- IStateHashContributor
Optional deterministic state hashing for custom components, commands, systems, and other extension state.
- ITargetSelector
Optional ranged target selection. Return null to decline an attack; use Simulation.FindDefaultTarget for fallback rather than recursively calling FindTarget.
Enums
- CommandFailure
Machine-readable command failure reasons.
- DamageOrigin
Native request origin. Reflected packets are leaves and cannot trigger reflection or life steal again.
- DeploymentPhase
Observable automatic-deployment preparation.
- EntityKind
Stable system index categories.
- GamePhase
Terminal and running game states.
- MechanicEndReason
Stable reason codes used by deployment and channel end events.
- ResolutionKind
A unit's one-time resolution cause; live units have None.
- RevivalPhase
Same-identity down/rise state; only Active may move or attack.
- SimEventKind
View-facing notifications in simulation processing order.
- SimStage
Stable anchors for systems registered before the first tick.