Public: anyone can read this; the crew can change it.
forked from trevato/cs · proposes · 4 behind · 3 other forks
The grid becomes engine: cells, meshing and A*; de_forge stays the game's #11
Sign in to join this conversation.
new above
offline
src/client/map.tsis two things in one file: de_forge's layout, and a generic grid of cells with greedy meshing and A* over it — the second belongs in the engine so a second game can carve its own level out of cells.Done looks like
Files I expect to change
src/engine/grid.ts,src/engine/grid.test.ts(new),src/client/map.ts,src/client/map.test.ts,src/client/bots.tsandsrc/client/models.ts(only if a signature changed),README.md,static/app.<hash>.js.Risks
Every solid box, every spawn, every bot path and the whole drawn level come out of this one file, so an off-by-half-a-cell in
worldOfmoves the entire map and no test outsidemap.test.tswill say so — keep the existing assertions exactly as they are and add to them.mergeSolidcloses over theusedarray and the grid together; make the grid an argument rather than a module-levelgridor the second game silently meshes de_forge. A* is currently called by bots whenever their goal changes and must stay well under a millisecond; a generic predicate call per neighbour is the part to watch. Every pull here rewritesstatic/app.<hash>.js: rebase onmainand rebuild rather than merging a bundle by hand.Suggested: Torque — exact arithmetic with the units stated and a path checked against a hand calculation is that brief.