{"id":23324565,"url":"https://github.com/capnspacehook/impulse-wars","last_synced_at":"2025-10-28T10:31:54.527Z","repository":{"id":267486072,"uuid":"901403392","full_name":"capnspacehook/impulse-wars","owner":"capnspacehook","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-06T03:49:32.000Z","size":1053,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-06T04:27:55.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capnspacehook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-10T15:40:10.000Z","updated_at":"2025-02-06T03:49:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c9aa6e9-d50e-413f-a219-d48ccba0452a","html_url":"https://github.com/capnspacehook/impulse-wars","commit_stats":null,"previous_names":["capnspacehook/impulse-wars"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capnspacehook%2Fimpulse-wars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capnspacehook%2Fimpulse-wars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capnspacehook%2Fimpulse-wars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capnspacehook%2Fimpulse-wars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capnspacehook","download_url":"https://codeload.github.com/capnspacehook/impulse-wars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238634030,"owners_count":19504770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-20T18:18:38.592Z","updated_at":"2025-10-28T10:31:54.522Z","avatar_url":"https://github.com/capnspacehook.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Impulse Wars\n\nA C reinforcement learning environment that is very closely based off of the game Retrograde Arena. \n\n## Controls\n\n### Controller\n\n- move: left stick\n- aim: right stick\n- shoot: right bottom trigger\n- brake: left bottom trigger\n- burst: right top trigger or bottom face button\n    - hold to charge and release to burst\n- discard weapon: left face button\n\n### Mouse and Keyboard\n\n- move: WASD\n- aim: mouse pointer\n- shoot: left mouse button\n- brake: spacebar\n- burst: right mouse button\n    - hold to charge and release to burst\n\n## Basics\n\n- blue walls are standard walls\n- yellow walls are bouncy\n- only way to kill opponents is to push them into red death walls\n- shooting them is the primary way to do this\n- different weapons spawn randomly on the map and can be picked up\n- shooting imposes recoil\n- movement can't completely counteract recoil\n- braking can help with recoil and help control movement\n- braking consumes energy\n- energy passively very slowly refills \n- energy can be refilled by picking up weapons and by hitting opponents\n- if energy is fully depleted no energy can be used until it is fully replenished\n- bursting can deflect projectiles and push opponents away\n- bursting consumes energy and can be charged for greater effect\n\n## Advanced\n\n- movement speed is halved for a short period of time if energy is fully depleted\n- while charging a burst the brake can't be used\n- any energy gained or lost when charging a burst directly affects the burst charge\n- a picked up weapon can be discarded at the expense of some energy\n\n## Meta\n\n- bursting can be used aggressively by running down opponents and bursting point blank\n- this can be countered by braking and taking advantage of the opponents spent energy bursting\n- excessive braking can be countered by powerful weapons\n- powerful weapons can be countered by bursting to deflecting projectiles or braking\n\n## Building\n\nBuild the Python module with `make`. You can then run the `main.py` file to train a policy or evaluate one. \n\nPython 3.11 is what I'm developing with, I make no promises for other versions. `scikit-core-build` is used to build the Python module, but will be installed automatically if the correct make command is invoked. `autopxd2` is used to generate declarations in a PXD file for the Cython code, which will automatically be installed as well. There are a few parts of my C headers that `autopxd2` fails to parse, but they are guarded by defines. \n\n## Structure\n\n### Python\n\n- `main.py` contains the main training/evaluation loop\n- `policy.py` contains the neural network policy\n- `impulse_wars.py` defines the Python environment\n- `cy_impulse_wars.pyx` is the Cython wrapper between Python and C\n\n### C environment (`src` directory)\n\n- `include` directory contains a few deps from GitHub I converted to be header only\n- `helpers.h` defines small helper functions and macros\n- `types.h` defines most of the types used throughout the project. It's in it's own file to prevent circular dependencies\n- `settings.h` defines general game and environment settings, as well as weapon handling settings/logic\n- `map.h` contains all map layouts and map setup logic\n- `game.h` contains the game logic\n- `env.h` contains the RL environment logic\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapnspacehook%2Fimpulse-wars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapnspacehook%2Fimpulse-wars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapnspacehook%2Fimpulse-wars/lists"}