Skip to content

CodeArena — Write your bot. Run the battle.. Open-source JavaScript tank bot arena for developers.

CodeArena tank arena battle scene

JavaScript botsServer-authoritativePhaser arenaOpen sourceWebSocket matches10×10 physicsFog of warMIT licensedJavaScript botsServer-authoritativePhaser arenaOpen sourceWebSocket matches10×10 physicsFog of warMIT licensed

About

What is
CodeArena?

CodeArena is an MIT-licensed, server-authoritative tank battle platform for developers. Author synchronous JavaScript bot controllers, run fair sandboxed matches over WebSockets, watch continuous physics in a fixed 10×10 Phaser arena with fog and cover, then iterate. Join the Discord community and contribute engine, UX, or docs on GitHub.

  • Code

    Synchronous JS controllers: stage state in, one discrete action out.

  • Battle

    Movement, turrets, shots, cover, fog—rendered live while you watch.

  • Fair

    Tight CPU budgets and a server that owns every tick.

Getting started

How it
works

From zero to a live tank fight: set up locally, ship a JavaScript controller, run a room, then iterate—or contribute upstream.

  1. 01

    Clone or open the project

    Get the CodeArena monorepo from GitHub and follow the setup guide for Node, pnpm, and MongoDB.

  2. 02

    Write a JavaScript bot

    Implement a synchronous controller that maps arena state to a discrete action enum—no async I/O inside the bot.

  3. 03

    Start a match

    Launch a room from the dashboard, share the lobby code, and watch the Phaser bird’s-eye fight live.

  4. 04

    Iterate and contribute

    Tune your bot after each run, then improve the open-source engine, UX, or docs with a focused pull request.

Open source

Build
with us

MIT-licensed. Looking for contributors. Keep PRs focused—open an issue for larger shifts.

  1. 01

    Engine & simulation

    Physics, combat rules, fog, and fairness live in the TypeScript engine—tight tests and rule clarity are high-impact contributions.

  2. 02

    Arena UX & Phaser

    Improve bird’s-eye clarity, replays, lobby flow, and the feedback loop that makes developers re-run matches.

  3. 03

    Docs & first issues

    Setup guides, diagrams, bug reports, and good-first-issue triage help the next contributor ship faster.

FAQ

Questions

Straight answers for developers evaluating CodeArena as a coding game, learning tool, or open-source project.

What is CodeArena?

CodeArena is an open-source tank arena where developers write JavaScript bot controllers and battle in a live, server-authoritative Phaser simulation with continuous physics.

Do I need to pay to use CodeArena?

No. CodeArena is free and MIT-licensed. You can play, fork the code, and contribute without a paid plan.

What language are bots written in?

Bots are synchronous JavaScript controllers: they read stage state and return one discrete action per tick. TypeScript can be compiled to JavaScript before paste or deploy.

How are matches kept fair?

Bot code runs in a sandboxed server environment with CPU budgets. The server is authoritative for every simulation tick, so clients cannot cheat physics or outcomes.

Is CodeArena good for learning game AI?

Yes. The tight write–run–watch loop, discrete actions, and visible Phaser replay make it a practical way to practice pathing, targeting, and decision logic in JavaScript.

What stack does CodeArena use?

The monorepo uses TypeScript, a custom simulation engine, Phaser for the bird’s-eye view, WebSockets for live matches, and MongoDB for users and bots.

How can I contribute to CodeArena?

Read CONTRIBUTING.md on GitHub, open focused pull requests for the TypeScript engine, Phaser arena UX, or documentation, and discuss larger ideas in issues or Discord first.

Where can I talk with other bot authors?

Join the CodeArena Discord to share bots, ask setup questions, and help shape the roadmap with maintainers.

Community

Join the
Discord

Meet maintainers and bot authors—share builds, ask questions, shape the roadmap live.