diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-25 22:46:13 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-25 22:46:13 +0200 |
commit | 4099e3ab6efb48eb527f796b530bb703958111e1 (patch) | |
tree | d578cc79ca432b2de89b99613b12806db0d11522 | |
parent | c30222cf9a5f173f30e5b6193714401dc0e3569f (diff) | |
download | planetwars.dev-4099e3ab6efb48eb527f796b530bb703958111e1.tar.xz planetwars.dev-4099e3ab6efb48eb527f796b530bb703958111e1.zip |
add local development instructions to README
-rw-r--r-- | README.md | 23 |
1 files changed, 16 insertions, 7 deletions
@@ -2,18 +2,27 @@ Planetwars is a competitive programming game. You implement a bot that will be pitted against all other bots. -You can try it out at https://planetwars.dev +Try it out at https://planetwars.dev ! -current features: -- write your bot in python -- save your bot so that others can play against it -- saved bots are automatically ranked in the background. +Current features: +- write and publish a python bot in the demo web interface +- develop a bot locally and publish it as a docker container +- published bots will be ranked in the background -At the moment only python is supported, but a more generic docker-based system is in development. +## Creating a bot locally +For development, you can play a game with a locally running bot using [`planetwars-client`](https://github.com/iasoon/planetwars.dev/tree/main/planetwars-client). \ +Once you are happy with your bot, you can publish it to the planetwars server as a docker container. +1. Register your bot. In order to publish a bot version, you first have to register a bot name. You can do this by navigating to your profile after logging in (click your name in the navbar). +2. Bake your bot into a docker container. If you'd like to test whether your container works, you can try running it using `planetwars-client` by using `docker run -it my-bot-tag` as the run command. +3. Log in to the planetwars docker registry: `docker login registry.planetwars.dev` +4. Tag and push your bot to `registry.planetwars.dev/my-bot-name:latest`. +5. Your bot should be up and running now! Feel free to play a game against it to test whether all is well. Shortly, your bot should appear in the rankings. -Project layout: + +## Project +The repository contains these components: - `planetwars-server`: rust webserver - `planetwars-matchrunner`: code for running matches - `planetwars-rules`: implements the game rules |