Tank classes / loadouts
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
- typescript
- Domain
- full-stack, game-dev
Research direction
Start by reading server/src/types/bot.ts, server/src/types/app.ts, and services/AppService.ts to trace how bot stats are set and stored. Then follow the listed stat use through botTurret.ts, botRadar.ts, simulation.ts, arenaStatus.ts, and the UI mirrors, along with the API and MCP endpoints. Define class presets and update each layer consistently; done means the three loadouts have distinct stats that stay in sync in server simulation and UI, with per-class tests covering the new field and behavior.
Written by the indexing model from the issue text.
Description
Scout (fast, fragile), heavy (slow, armored), sniper (long range, slow reload) — tradeoffs that make team composition matter.
Effort: M
Migrated from ENHANCEMENTS.md (§2 Gameplay & fun).
Implementation notes
Priority: medium — High fun/strategy value and touches core simulation, but it's an additive gameplay feature, not a stability/security fix or a blocking core-path gap.
Purpose
Today every Bot is identical (server/src/types/bot.ts: speedMax=5, speedAcceleration=2, health=100; botTurret.ts reload +=2/tick, hit damage -=25; botRadar.ts scan range 300). Letting a team pick a scout/heavy/sniper loadout per app gives players a real tactical lever (team composition, counter-picking) and is the kind of differentiation that makes multi-bot arenas more interesting to build for and watch.
Implementation approach
- Add a
TankClassconcept (e.g.scout | heavy | sniper, maybe adefault) — likely a new field onApp(server/src/types/app.ts,services/AppService.ts, persisted column,hydrate) since a class is a property of the bot's code/build, not the arena membership. - Define per-class stat presets in one place (new small module, e.g.
server/src/util/tankClasses.ts) coveringspeedMax,speedAcceleration, starting/maxhealth, turretloadedincrement (reload rate), bullet damage-per-hit, and radarscanrange/cone — replace the hardcoded literals inbot.tsconstructor,botTurret.ts(fire/reload),botRadar.ts(scan'sdistance < 300), andsimulation.ts(bot.health -= 25etc.) with lookups against the bot's class. Botconstructor (server/src/types/bot.ts) must read the class offthis.process/Appand set instance fields accordingly instead of literal defaults.arenaStatus.tsalready forwardsspeedMax/speedAccelerationper bot — extend it to includehealth-cap/class soui/src/util/arenaReducer.ts(currently hardcodeshealth: 100at line ~167) andui/src/util/simulate.tsstay correct mirrors; simulate.ts already reads accel/max generically so it should Just Work once the wire payload varies per bot.- No bot-facing
compiler.tsAPI changes needed unless bots should introspect their own class (optional: expose viabot.getStats()/arena metadata).
Key details to plan
- DB: adding a
class/tankClasscolumn toapp— no migration framework yet (#142 tracks that gap); use anALTER TABLE ... ADD COLUMN IF NOT EXISTSalongside the existing lazyCREATE TABLE IF NOT EXISTSpattern inAppService.ts. - REST/MCP:
create_app/set_app_source-adjacent endpoints (api/app.ts,mcp.ts) need a way to set/read class; keep MCP tool caps in sync with REST per CLAUDE.md. - Determinism: class stats are static config, not randomized, so the seeded PRNG (
util/random.ts) is unaffected — but rebalance any class-specific placement/spawn logic carefully if added later. - Testing: extend
test/tankTypes.test.ts-equivalent (actual file coveringBot/BotTurret/BotRadar) andsimulation.test.tswith per-class assertions (mock tanks with different classes); extendapi.test.tsfor the new field;arenaReducer.test.tsfor non-100 health. - Depends on #142 (migrations) for a clean rollout; effort M as scoped, risk moderate — touches shared physics constants used by both server (
simulation.ts) and UI (simulate.ts), so keep them in lockstep.
- 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
-
afk-ok area:data-quality importer size:S
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
enorm-labs/event-junkie#3301 ·
Maintainers usually reply within 1 day
-
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
-
area: app type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ExpidetGames/code-reviewer#308 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day