Giter Site home page Giter Site logo

battlecode23's Introduction

Battlecode 2023

🚩

Note, Competitors

This is the development repo! You most likely won't need anything in here; do not clone this. Instead, follow the instructions here to get started.

Repository Structure

  • /engine: Game engine in Java
  • /specs: Game specs in Markdown (and HTML generation)
  • /schema: Game serialization schema (basically, an encoding of all units and events in a game)
  • /client: Game client (visualizer and playback) in TypeScript
  • /example-bots: A bunch of example bots for the game!

Development

Engine

Windows users: Instead of ./gradlew, use gradlew for all commands.

(whenever Gradle has problems with something, run ./gradlew clean and see if it helps)

To run a game, run

./gradlew headless

The replay file will be in /matches. Use headlessX for bots that are in battlecode20-internal-test-bots. You can specify the robot code and map like this: ./gradlew headless -Pmaps=maptestsmall -PteamA=examplefuncsplayer -PteamB=examplefuncsplayer.

Client

(Make sure you have a recent version of npm: sudo npm cache clean -f && sudo npm install -g n && sudo n stable && PATH="$PATH".)

Navigate to the client folder and run npm run install-all. You can then run

npm run watch

which will launch the client on http://localhost:8080 (if available).

Notes for porting to a new repo

When the next edition of Battlecode comes around, it will probably useful to reuse a fair amount of this codebase. Maintaining git history is nice. Use git-filter-repo for this:

pip3 install git-filter-repo

Make sure you have a recent git version (run git --version and make sure it's compatible with git-filter-repo).

As an example, the following steps were taken to port from battlehack20 to this repo:

First, create a fresh battlecode21 repo on GitHub. Clone it. Then, starting in that repo:

cd ..
git clone https://github.com/battlecode/battlehack20 battlehack20-export
cd battlehack20-export
git filter-repo --tag-rename '':'bh20-'
cd ..
cd battlecode21
git pull ../battlehack20-export —allow-unrelated-histories

(Git filter-repo can do lots of cool things; see its documenation, old examples in our repo, etc. for ideas. For example, renaming directories is possible. )

Then, port all of the codebase! Don't forget to update the files in the highest level of the repo too, such as this readme itself, and the release script.

battlecode23's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.