{"id":37149129,"url":"https://github.com/b3nnn/bottle-royale","last_synced_at":"2026-01-14T17:36:48.008Z","repository":{"id":40941203,"uuid":"194673370","full_name":"b3nNn/bottle-royale","owner":"b3nNn","description":"Bottle Royale - A Battle Royale Arena for JS Programming Challenges","archived":false,"fork":false,"pushed_at":"2023-01-04T03:28:12.000Z","size":2490,"stargazers_count":6,"open_issues_count":23,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T15:37:00.605Z","etag":null,"topics":["battle-royale","docker","javascript","nodejs","openpgpjs","programming-challenges","react","rethinkdb","threejs","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b3nNn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-01T12:59:35.000Z","updated_at":"2024-03-18T21:04:05.000Z","dependencies_parsed_at":"2023-02-01T18:32:20.175Z","dependency_job_id":null,"html_url":"https://github.com/b3nNn/bottle-royale","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/b3nNn/bottle-royale","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b3nNn%2Fbottle-royale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b3nNn%2Fbottle-royale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b3nNn%2Fbottle-royale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b3nNn%2Fbottle-royale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b3nNn","download_url":"https://codeload.github.com/b3nNn/bottle-royale/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b3nNn%2Fbottle-royale/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28428874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["battle-royale","docker","javascript","nodejs","openpgpjs","programming-challenges","react","rethinkdb","threejs","webpack"],"created_at":"2026-01-14T17:36:47.420Z","updated_at":"2026-01-14T17:36:48.000Z","avatar_url":"https://github.com/b3nNn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚧🚧 (DRAFT) Bottle Royale - A Battle Royale Arena for JS Programming Challenges 🚧🚧\n\nImplement your strategy for surviving with **javascript** and challenge opponents in a **battle royale** environnement.\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://drive.google.com/uc?export=view\u0026id=1kYO3YjYbErXG-fKSyKNF0vDBu7Y86x2g\" width=\"450px\" title=\"Bottle Royale\" /\u003e\n\u003c/p\u003e\n\n# Features\n- Up to **100 bots** per game scripted with **javascript**.\n- **Event Driven** and **Module Driven** API.\n- **Scenario Driven** for debugging.\n- Game view with **three.js** (live, replay).\n- **Code Obfuscation** using [OpenPGP](https://tools.ietf.org/html/rfc4880) to secure privacy of executed source code.\n- **Persistence** and **Realtime** with **RethinkDB**.\n- **Docker** for production deployment.\n\n# Guides\n### Create a bot\n\nProvide your scripts which use the **JS API** inside a bundle **directory**. See `examples/my_bot.bundle` and `examples/foo_bar.bundle`.\n- bot.js; entry point\n- discord.js*; discord communication\n\n*: optionnal\n\n### Start a match\nStart a match by running the start command:\n```sh\nnpm run watch:app -- --bot examples/my_bot.bundle --bot examples/foo_bar.bundle\n```\nor with a game configuration file:\n```sh\nnpm run watch:app -- --bot examples/my_bot.bundle --bot examples/foo_bar.bundle --config game.config.js\n```\nDisplay logs using `--debug` and/or `--debug-persistence` parameters.\n\n### Game Configuration\n\nAfter beeing initialized, a game starts after `game_launch_delay` milliseconds delay. All players have an amount of life equal to `player_health` and the storm will move for the first time after `storm_stay_delay` milliseconds delay. Then, it moves for `storm_move_delay` milliseconds and level up at the end. Everytime the storms level up, it will stay again for `storm_stay_delay` then moves for `storm_move_delay` until the end of the game.\n\n```javascript\nexport  default {\n\tgame_launch_delay: 0, // ms duration before the game star\n\tplayer_health: 100.0, // amount of health for players\n\tstorm_stay_delay: 60000, // ms duration before the storm move\n\tstorm_move_delay: 30000, // ms duration before the storm stay\n\tstorm_damage: 1.0, // damage per second while player is in the storm\n\tstorm_damage_factor: 2.0  // damage factory per level\n\tstorm_size: 1000  // storm size\n\tstorm_size_factor: 0.3  // size factory per level\n};\n```\n\n# JS API\n### Minimalist bot\n\n```javascript\nconst client = new br.Client();\nconst player = new br.Player();\n\nclient.connect(\"SNK citizendotexe\");\nclient.on('game_found', matchmaking =\u003e {\n    matchmaking.accept(client);\n    matchmaking.on('start', () =\u003e {\n        const strategy = player.behavior.createStrategy('empty-strategy');\n        \n        player.behavior.while(['alive'], strategy, () =\u003e {\n            client.log('WTF i\\'m dead too');\n        });\n    });\n});\n```\n\n### Location\n\n```javascript\nconst client = new br.Client();\nconst location = new br.PlayerLocation();\n\nclient.connect(\"SNK citizendotexe\");\nclient.on('game_found', matchmaking =\u003e {\n    matchmaking.on('start', () =\u003e {\n        client.log('my current location is', location);\n    });\n});\n```\n\n### Storm phases detection\n\n```javascript\nconst client = new br.Client();\nconst storm = new br.StormEvents();\n\nclient.connect(\"SNK citizendotexe\");\nclient.on('game_found', matchmaking =\u003e {\n    matchmaking.on('start', () =\u003e {\n        storm.on('prepare', storm =\u003e {\n            client.log('the storm is preparing');\n        });\n        storm.on('stay', storm =\u003e {\n            client.log('the storm is staying');\n        });\n        storm.on('move', storm =\u003e {\n            client.log('the storm is moving');\n        });\n    });\n});\n```\n\n### Gameplay events\n\n```javascript\nconst client = new br.Client();\nconst game = new br.GameEvents();\n\nclient.connect(\"SNK citizendotexe\");\nclient.on('game_found', matchmaking =\u003e {\n    matchmaking.accept(client);\n    matchmaking.on('start', () =\u003e {\n        game.on('landed', () =\u003e {\n            client.log('landed confirmed');\n        });\n        game.on('death', () =\u003e {\n            client.log('death confirmed');\n        });\n    });\n});\n```\n\n\u003e More coming next...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb3nnn%2Fbottle-royale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb3nnn%2Fbottle-royale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb3nnn%2Fbottle-royale/lists"}