Arena hazards & terrain
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript, typescript
- Domain
- game-dev
Research direction
Start with server/src/util/simulation.ts and the terrain generation and rendering files ui/src/util/terraformer.tsx and ui/src/components/arena/arenaTerrain.tsx. Trace how Environment.random() and buildArenaStatus carry seeded arena state to the UI, then compare server movement with ui/src/util/simulate.ts. Done means terrain affects movement, bullets and damage consistently on both sides, with the layout reproducible from a fixed seed and tests covering collisions and determinism.
Written by the indexing model from the issue text.
Description
Walls/obstacles that block movement and line-of-fire, damage zones, or speed-altering terrain (the renderer already draws terrain tiles). Adds spatial strategy.
Effort: M
Migrated from ENHANCEMENTS.md (§2 Gameplay & fun).
Implementation notes
Priority: medium — Adds valuable tactical depth and touches core simulation/determinism code, but it's a new gameplay feature, not fixing a stability/security/core-UX gap for existing users.
Purpose
Turns today's purely decorative terrain (ui/src/util/terraformer.tsx, ui/src/components/arena/arenaTerrain.tsx) into a gameplay-affecting layer — walls that block movement/fire, damage zones, and speed-altering ground — adding tactical depth (cover, chokepoints, hazards) that many bot authors will want to design around.
Implementation approach
- Terrain must become server-authoritative: today
generateTerrain()runs client-side with plainMath.random()on mount, fully decoupled from the server's seeded PRNG (server/src/util/random.tsmulberry32,Environment.random()/setSeed) — this breaks the "seed reproduces a match" guarantee (set_arena_seed,speedDeterminism.test.ts) unless hazard layout is generated server-side (e.g. inEnvironment/Arena,server/src/types/arena.ts,server/src/types/environment.ts) fromenv.random()at arena creation/restart and shipped to the client instead of regenerated locally. - Add a hazard/tile grid to
Arena(or a newtypes/terrain.ts), included inutil/arenaStatus.ts(buildArenaStatus) so the UI and MCParena_statussee the same layout;arenaTerrain.tsx/arena.tsxrender from that data instead of callinggenerateTerrain()locally. - Physics changes belong in
server/src/util/simulation.tsalongside the existing boundary check (newX < 16 || ... env.getArena().getWidth() - 16, ~line 184) and bullet-hit loop (~line 130): add hazard collision (block movement, emitEvent.COLLIDED), speed multiplier application, and periodic damage while occupying a zone; bullets need a blocked-by-wall check before the existing hit-distance test. ui/src/util/simulate.tsmust mirror the same movement/collision math (it currently has no boundary/hazard clamp at all) to keep client interpolation consistent with the server tick, per CLAUDE.md's explicit warning.
Key details to plan
- No bot-facing
compiler.tsAPI changes are strictly required for MVP (hazards are environmental), but consider exposing hazard awareness viaradar.scan()/events later. - New/changed SSE events need
ui/src/util/arenaReducer.tshandling (e.g. aterrainHit/hazardDamageevent or reusingbotDamaged/botStop), tested likearenaReducer.test.ts. - Determinism: hazard placement must derive from
env.random(), notMath.random(), and regenerate identically onrestart()/fixed seed — extendsimulation.test.ts/simulationIntegration.test.ts(wall/hazard collision cases similar to the existing "fires COLLIDED when a bot drives into a wall" test) andspeedDeterminism.test.ts. - No migrations system exists yet (#142); if layout is persisted (vs. regenerated per run), keep it in the in-memory
Environment/lazyCREATE TABLE IF NOT EXISTSpattern, not a real migration. - Depends conceptually on any future arena-customization/editor issue; effort M is reasonable but risk is medium-high given the client/server terrain desync that must be fixed first.
- 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 72/100
stellar/stellar-dev-skill#151 ·
Maintainers usually reply within 1 day
-
area:arcade game ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
fderuiter/deruiter.dev#2281 · 1 comment ·
Maintainers usually reply within 1 day
-
scope: data grid type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
fix(frontend): correct VITE_IS_DEVELPOMENT typo in shared/app.ts and align dev environment flagsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
vicharanashala/ajrasakha#1439 ·
Maintainers usually reply within 1 day
-
Add: TV5Monde AsieOpenapproved check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day