scroll.server/crates
WiseDev 054321ad50 simulate movement, targeting and damage on the server
crowns now move because the server finally hurts things. each tick it
retargets, moves, resolves attacks and buries the dead, in that order.

the numbers are the client's own. Speed is position units per tick, so a
knight at 60 covers 1.2 tiles a second; SightRange and Range are in the
same units with 1000 to a game tile, and the target's CollisionRadius is
added on the far side of both. distances compare squared with the
client's saturation rule - beyond 46340 on either axis, or on overflow,
the distance is INT_MAX rather than a wrapped negative. the attack timer
counts milliseconds fifty at a time and fires once LoadTime + HitSpeed
have passed, then rewinds to LoadTime. tower damage comes from
projectiles.csv, not from the Damage column of buildings.csv, which is
empty for them.

a princess tower leaving the board is struck from leader_towers, which is
what getStars reads, so crowns follow from the same list the client
keeps.

what is deliberately not modelled yet: pathfinding, so units walk
straight at their target instead of along the roads and over the bridges;
collision, pushback and avoidance; projectiles as travelling objects,
since the damage lands the moment the attack fires; and buffs. field_48
on the combat component is renamed hit_timer after what it holds.
2026-08-23 13:10:30 +03:00
..
auth-service stop minting a new account on every login 2026-08-23 08:54:43 +03:00
game-service simulate movement, targeting and damage on the server 2026-08-23 13:10:30 +03:00
gateway push messages to the client during a battle 2026-08-23 13:03:07 +03:00
logic simulate movement, targeting and damage on the server 2026-08-23 13:10:30 +03:00
logic-derive move all crates into crates/, glob members 2026-08-23 08:15:45 +03:00
scroll-server supervised mode: run the services as child processes 2026-08-23 09:46:59 +03:00
service-rpc push messages to the client during a battle 2026-08-23 13:03:07 +03:00
storage fix chest shop prices and gate the free chest 2026-08-23 09:02:49 +03:00
titan build and send the battle sector state 2026-08-23 10:24:20 +03:00
titan-derive build and send the battle sector state 2026-08-23 10:24:20 +03:00