Game modes beyond deathmatch
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, typescript
- Domain
- game-dev
Research direction
Start by reading server/src/util/matchSummary.ts and server/src/types/environment.ts to trace the current win condition, then review server/src/types/arena.ts and the simulation tests named in the issue. The issue outlines several modes with different requirements; choose one mode and check its dependencies before estimating the work. Done means that mode’s scoring and state are exposed through the server and UI, with the relevant tests passing.
Written by the indexing model from the issue text.
Description
Last-team-standing (current), king-of-the-hill (hold a zone), capture-the-flag, target-practice/time-trial, survival-vs-waves. Modes give different strategies a reason to exist.
Effort: M each
Migrated from ENHANCEMENTS.md (§2 Gameplay & fun).
Implementation notes
Priority: medium — Meaningful content/engagement value and touches core shared logic (win-condition, matchSummary), but it's new optional content rather than a fix to core-path stability or correctness — existing deathmatch mode is unaffected until adopted.
Purpose
Every arena today is hard-wired to one win condition — last-app-standing, decided by deriveMatch in server/src/util/matchSummary.ts and the "all apps dead" check in Environment.tick (server/src/types/environment.ts). Additional modes (king-of-the-hill, capture-the-flag, target-practice/time-trial, survival-vs-waves) give bot authors new tactical problems to write against and make the arena replayable beyond raw combat, directly extending the game's core content loop.
Implementation approach
- Add a
gameModeconcept toArena(server/src/types/arena.ts, currently just id/userId/width/height) and thread it throughArenaService.ts— persisted per arena, so schema changes here should ride with the pending migrations work (#142) rather than another ad hocALTER TABLE. - Extract the win-condition/scoring logic that's currently inlined in
Environment.tick(theappHealth/running=falseblock) and inmatchSummary.ts'sderiveMatch/compareForRankinto a mode-strategy layer soSimulation.runstays mode-agnostic; each mode supplies its own scoring inputs (e.g. zone-hold ticks, flag captures, wave number) alongside the existing health/eliminatedAt fields. - Zone/flag modes need new arena objects with position + ownership state, tracked in
Environmentand surfaced viabuildArenaStatus(util/arenaStatus.ts) andbuildMatchSummary/buildMatchStatus(util/matchSummary.ts) so the SSE stream and MCP tools expose them. - New bot-facing API surface belongs in
compiler.ts's existingarena.*pattern (next toarena.createMarker,_arena_getWidth/_arena_getHeight) — e.g.arena.getZone()/flag position queries — following the established native-_bot_*-function-plus-thin-JS-wrapper bridge; must stay read-only/no new attack surface for the isolate. - Survival-vs-waves needs a spawner concept (NPC/AI targets) distinct from
Process/Botteams — likely a lightweight non-isolate entity type insimulation.ts, since spinning up real isolates per wave enemy would blow the per-arena isolate budget. - Server + UI must move together: any new physics (zone capture radius, flag pickup/drop, wave spawn movement) added to
simulation.tsneeds a matching mirror inui/src/util/simulate.ts; new event types (zoneCaptured,flagPickedUp, etc.) needui/src/util/arenaReducer.tscases andui/src/App.tsxrendering (SVG for zones/flags).
Key details to plan
- REST/MCP:
api/arena.tsneeds a mode-select route (arena creation/config), andmatch_summary/arena_statusMCP tool schemas (api/mcp.ts) must document mode-specific fields for AI callers. - Determinism: zone/flag/wave placement must derive from the seeded
env.random()(mulberry32,util/random.ts), matching the existingcomputeSpawnspattern, sosetSeed/set_arena_seedstill reproduces a match. - Testing: extend
simulation.test.ts(mock-tank mode-logic cases per mode),simulationIntegration.test.tsfor a full isolate+sim smoke test of one new mode,api.test.tsfor the new config route, andarenaReducer.test.tsfor new event types. - Depends on #142 (DB migrations) if
gameMode/mode-config becomes persisted arena state; each mode is independently shippable (M effort each), king-of-the-hill/target-practice are lowest-risk (no new team semantics), capture-the-flag and survival-vs-waves are higher-risk (new entity types, cross-team object state). - Risk: touching
Environment.tick's win-condition andmatchSummary.ts's ranking is shared, well-tested core logic — regressions there affect every existing deathmatch arena, so the mode-strategy extraction should preserve deathmatch as the default/no-op path with focused new tests before adding others.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 8m
- Merged PRs (30d)
- 8
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LeeAdcock/robocodeJs.com
-
priority: medium tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
LeeAdcock/robocodeJs.com#411 ·
Maintainers usually reply within 1 day
-
enhancement priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LeeAdcock/robocodeJs.com#254 ·
Maintainers usually reply within 1 day
-
good first issue priority: low tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
LeeAdcock/robocodeJs.com#146 ·
Maintainers usually reply within 1 day
-
dependencies priority: low tech-debt
Difficulty 1/5 Under an hour Newbie friendliness 15/100
LeeAdcock/robocodeJs.com#413 ·
Maintainers usually reply within 1 day
-
priority: low tech-debt
Difficulty 3/5 Half a day Newbie friendliness 32/100
LeeAdcock/robocodeJs.com#412 ·
Maintainers usually reply within 1 day
All issues in LeeAdcock/robocodeJs.com
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
one-zero-eight/apply-bot#39 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bigbluebutton/bbb-ui-components-react#108 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
high priority
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CI-CMG/deep-sea-corals-exb#84 · 1 comment ·