{"id":27624535,"url":"https://github.com/hardbyte/spaceracers","last_synced_at":"2026-03-11T15:37:18.721Z","repository":{"id":266631265,"uuid":"894974556","full_name":"hardbyte/spaceracers","owner":"hardbyte","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-10T14:42:38.000Z","size":4787,"stargazers_count":2,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-12T07:51:19.477Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/hardbyte.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-27T10:38:19.000Z","updated_at":"2025-04-30T00:39:54.000Z","dependencies_parsed_at":"2024-12-05T09:28:39.486Z","dependency_job_id":"27e7f7e5-ae71-4dbe-8f5e-622bdd90e6a7","html_url":"https://github.com/hardbyte/spaceracers","commit_stats":null,"previous_names":["hardbyte/spaceracers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hardbyte/spaceracers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2Fspaceracers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2Fspaceracers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2Fspaceracers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2Fspaceracers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardbyte","download_url":"https://codeload.github.com/hardbyte/spaceracers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2Fspaceracers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30386176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T14:10:17.325Z","status":"ssl_error","status_checked_at":"2026-03-11T14:09:37.934Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2025-04-23T11:53:23.733Z","updated_at":"2026-03-11T15:37:18.693Z","avatar_url":"https://github.com/hardbyte.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\n# SpaceRaceRS\n\nSpaceRaceRS is a multiplayer game where players pilot spaceships in real-time across varied 2D maps. Movement and collisions\nare governed by a physics engine, and the game’s server handles all core logic—position updates, collision detection, \nrace progression, and more. Client(s) communicate with the server via simple HTTP endpoints to register for a match,\nsend control inputs (thrust, rotation), and receive the latest world state.\n\nFeatures\n\n- Physics-based movement: Ships drift and collide with obstacles using the Rapier 2D physics engine.\n- Lobby system: Players join a lobby, and the server automatically transitions to Active state when a game is ready.\n- Multiple maps: Tiled-based map loading with support for obstacles, start zones, finish zones, etc.\n- Extensible: The server is modular, allowing a variety of front-ends (e.g., web clients, custom desktop GUIs).\n\n\n\n## Usage\n\nRun the HTTP server with a simple UI:\n\n```shell\nRUST_LOG=warn,spaceracer_server=debug cargo run --bin spacerace-server --features ui\n```\n\nOr run with wayland support:\n\n```shell\nRUST_LOG=warn,spaceracer_server=debug cargo run --features ui,wayland\n```\n\n\n# HTTP Interface\n\n### Lobby Endpoint \n\nRegister a player in the next game by POSTing to the `/lobby` endpoint.\n\n```http request\nPOST http://localhost:5000/lobby\nContent-Type: application/json\n\n{\n  \"name\": \"Player Name\",\n  \"team\": \"The A Team\",\n  \"password\": \"password\"\n}\n```\n\nResponse will be something like:\n\n```json\n{\n  \"player_id\": \"Player 1\",\n  \"game_id\": \"c5d43c81-bca2-4c2f-aa8b-35d8e5a9ff72\",\n  \"map\": \"Aga\"\n}\n```\n\n### State Endpoint\n\nRetrieve the current state of the game (positions, velocities, etc.):\n\n```http request\nGET http://localhost:5000/state\n```\n\n### Control Endpoint\n\nControl your ship:\n```http request\nPOST http://localhost:5000/control\nContent-Type: application/json\n\n{\n  \"password\": \"password\",\n  \"thrust\": 1,\n  \"rotation\": 0\n}\n###\n```\n\n\n\n## Example Client\n\nA simple client is provided in the `spacerace-client` directory. To run it, use the following command:\n\n```shell\nPLAYER_TEAM=Humans PLAYER_NAME=Brian SPACERACERS_SERVER=http://localhost:5000 cargo run --package spacerace-client\n```\n\n# Creating or Editing a Map\n\nSpaceRaceRS uses Tiled `.tmx maps`. To create or modify a map:\n\n### Install Tiled\nDownload Tiled and create or open an existing .tmx file.\n\n### Add Object Layer\nCreate an “Object Layer” for obstacles, start regions, or finish regions.\n\n### Mark Objects\n    \nuser_type = \"start\" for polygons that represent start zones.\nuser_type = \"finish\" for polygons that represent finish zones.\nAny other polygons become obstacles by default.\n\n### Properties\n\nskin (optional): A background image path, e.g., \"assets/images/background.png\".\nship (optional): The sprite path for ships, e.g., \"my_ship.png\".\ngravity (optional): A float specifying downward force.\n\nPositioning\nThe map is centered on (0,0). Tiled’s default origin is top-left, so the loader automatically re-centers objects.\n\nThe final bounding is map.size.x by map.size.y.\n\n### Integrate\n\nAdd your .tmx map path to load_all_maps() in map.rs.\nReference it in your Lobby or game creation logic.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardbyte%2Fspaceracers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardbyte%2Fspaceracers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardbyte%2Fspaceracers/lists"}