c4beeae38f
Top-down twin-stick bullet-hell, Godot 4.7, server-authoritative dedicated server with client-side prediction. Clients send input only; the server resolves every hit for both players and enemies (no PvP). - SimWorld: whole simulation as plain RefCounted objects (no nodes, no physics server), ~0.24ms/tick at peak load -- runs headless for free and drives 78 tests in under a second - BulletPool: struct-of-arrays bullet storage, replicated as spawn/despawn events rather than per-tick state - Emitter framework (Ring/AimedSpread/WallGap/ArcSweep) shared by trash enemies and bosses -- a new boss is data in src/content/content.gd, no simulation changes - The Warden of the Fold: stationary 4-phase boss built entirely on that format - Lobby hub with a portal into on-demand dungeon instances; one process hosts the hub plus every concurrent dungeon - Emergency escape: 3s server-owned channel, cancelled by damage - tools/check.sh, test.sh (GUT), smoke.sh (real server + bot clients over ENet), bench.gd; git hooks wired to the same scripts - docs/ARCHITECTURE.md, NETCODE.md, WORKFLOW.md, ROADMAP.md
23 lines
912 B
GDScript
23 lines
912 B
GDScript
class_name SimEvent
|
|
extends RefCounted
|
|
## Discrete things the authoritative simulation decided. The server drains this
|
|
## list every tick and ships it to clients on a reliable channel; clients apply
|
|
## them to their replica. Continuous state (positions, hp) goes in snapshots
|
|
## instead -- events are only for things a client can never re-derive.
|
|
|
|
enum Type {
|
|
BULLET_SPAWN, ## uid, pos, vel, radius, life, kind, team, accel, turn
|
|
BULLET_DESPAWN, ## uid -- early death only; expiry is derived on both sides
|
|
PLAYER_HIT, ## peer, damage, hp
|
|
PLAYER_DIED, ## peer
|
|
PLAYER_RESPAWNED, ## peer, pos
|
|
ENEMY_HIT, ## id, damage, hp
|
|
ENEMY_DIED, ## id
|
|
BOSS_PHASE, ## phase index
|
|
BOSS_DIED,
|
|
ESCAPE_STARTED, ## peer
|
|
ESCAPE_CANCELLED, ## peer
|
|
ESCAPE_COMPLETED, ## peer -- the instance layer acts on this
|
|
PORTAL_USED, ## peer -- the instance layer acts on this
|
|
}
|