Power-ups
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, typescript
- Domain
- game-dev
Research direction
Start with server/src/types/environment.ts and Environment.tick(), then trace the collision and event flow in server/src/util/simulation.ts, ui/src/util/simulate.ts, ui/src/util/arenaReducer.ts, and ui/src/App.tsx. Use the seeded PRNG and the existing simulation and reducer tests as the starting points. Done means power-ups spawn, are collected or expire with effects applied, and the server, client simulation, events, rendering, and relevant tests stay consistent.
Written by the indexing model from the issue text.
Description
Pickups for health, temporary shield, speed, or rapid reload that spawn in the arena. Cheap to add, big on dynamism.
Effort: S–M
Migrated from ENHANCEMENTS.md (§2 Gameplay & fun).
Implementation notes
Priority: low — Fun/gameplay-variety feature with no effect on core UX for most users, stability, or correctness — pure enhancement, not core-path.
Purpose
Power-ups (health, shield, speed boost, rapid reload) add tactical variety and reward map awareness/positioning, giving bot authors a new strategic axis beyond pure aim/movement code — pure user-facing value, no stability motivation.
Implementation approach
- Model power-ups as new simulation-owned entities alongside
Bullet/Botinserver/src/types/environment.ts(e.g. aPowerUptype withid,x,y,kind,expiresAt), spawned/despawned inEnvironment.tick()using the existing seeded PRNG (env.random(),util/random.ts) so spawns stay deterministic and reproducible viasetSeed/set_arena_seed. - Extend
server/src/util/simulation.ts'srun()proximity-check pattern (it already does bot-vs-bot and bullet-vs-bot distance checks withMath.pow/distance < 32) to add pickup-vs-bot collision, applying effects tobot.health,bot.speedMax,bot.turret.loaded, or a newbot.shieldfield. - Mirror the same math in
ui/src/util/simulate.ts(client interpolation) exactly as bullets/movement are mirrored today — the file's header comment explicitly calls out keeping it consistent with the server. - Add new SSE event types (
powerUpSpawned,powerUpCollected,powerUpExpired) alongsidebulletFired/botDamagedin the emit sites, and matching cases inui/src/util/arenaReducer.ts(switch-likeif (data.type === ...)chain) and rendering in the arena SVG (ui/src/App.tsx). - No new bot-facing API is strictly required (effects are passive), but optionally expose
bot.getNearbyPowerUps()/shield status viacompiler.tsfollowing theexposeGetter/_bot_*pattern used forbot.getHealth. buildArenaStatus(server/src/util/arenaStatus.ts) andbuildMatchSummaryshould include active power-ups/shield state in the snapshot.
Key details to plan
- No DB changes needed if power-ups are transient/in-memory only (per-match state on
Environment), avoiding the migrations gap (#142). - Determinism: spawn timing/location must derive from
env.random(), notMath.random(), to preserve seeded-match reproducibility. - Sandbox: no new
ivmsurface if effects are host-applied only; if bot-visible getters are added, follow existingexposeGetter/ExternalCopypatterns — never exposeivmitself. - Testing: extend
server/test/simulation.test.ts(mock-tank physics) for pickup collision/effect application, andui/test'sarenaReducer.test.tsfor the new event cases;simulationIntegration.test.tsif a bot-visible API is added. - Rate/resource impact is negligible (no new timers/isolates).
- Effort S–M as scoped; risk is low-moderate mainly from keeping
simulation.ts/simulate.tsin sync.
- 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 1/5 1-3 hours Newbie friendliness 75/100
siyuan-note/siyuan#20629 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Volume eject does not refuse system, root or /home mountsPossibly taken @bernardopg claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
spacedriveapp/spacedrive#3159 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
melgarafael/DeskcommCRM#3000 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
callstackincubator/simlock#639 ·
Maintainers usually reply within 1 day