{"id":19989232,"url":"https://github.com/maaack/silentnight-api","last_synced_at":"2025-06-23T12:37:04.913Z","repository":{"id":140862154,"uuid":"51268659","full_name":"Maaack/SilentNight-API","owner":"Maaack","description":"An API into a stealth/discovery space combat game.","archived":false,"fork":false,"pushed_at":"2016-03-03T05:12:57.000Z","size":117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T21:48:23.821Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Maaack.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":"2016-02-07T22:05:56.000Z","updated_at":"2019-10-23T02:43:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd1d0027-1265-491b-a30a-7dd60d70b9b5","html_url":"https://github.com/Maaack/SilentNight-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Maaack/SilentNight-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maaack%2FSilentNight-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maaack%2FSilentNight-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maaack%2FSilentNight-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maaack%2FSilentNight-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maaack","download_url":"https://codeload.github.com/Maaack/SilentNight-API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maaack%2FSilentNight-API/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261480688,"owners_count":23164965,"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-11-13T04:45:57.018Z","updated_at":"2025-06-23T12:36:59.900Z","avatar_url":"https://github.com/Maaack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Silent-Night-API\nAn API into a stealth/discovery space combat game.\n\n# Basic Idea\nMulti-player stealth combat asteroids game. Game world is simulated on the server, in brief snapshots done by request. The player is given a small view into the world through the game API, that allows them to control their ship with a range of commands.\n\n# Environment Setup\nDocker\n\n```\n$ sudo apt-get install docker\n$ sudo apt-get install docker-compose\n$ git clone https://{{YOUR_USERNAME}}@github.org/Maaack/Silent-Night-API.git\n$ cd Silent-Night-Api\n$ sudo docker-compose up\n```\n\n\nLinux - Ubuntu\n```\n$ sudo apt-get install postgresql       # PostgreSQL\n$ sudo apt-get install libpq-dev        # postgresql dev library\n$ sudo apt-get install python3-pip      # for installing libs for python3\n$ sudo apt-get install git              # for version control\n$ sudo pip3 install --upgrade virtualenv virtualenvwrapper\n\n\n$ mkvirtualenv --no-site-packages snapi     # makes python virtual_env\n$ mkproject silent-night-api                # creates project directory\n$ workon snapi                              # will activate virtual_env\n(snapi)$ git clone https://{{YOUR_USERNAME}}@github.org/Maaack/Silent-Night-API.git\n(snapi)$ cd silent-night-api/\n(snapi)$ pip install -r requirements.txt    # install all requirements\n(snapi)$ vim local_settings.py              # ask me to make a sample of these, I haven't yet. I should.\n```\n\n# Structure\nDjango Based REST API\n\nGame stuff is in the `game_api` folder! All models that are persistent have schema's so they are stored in the database between requests. Everything else is python objects. The objects will need to be serialized so that they can be stored in a snapshot model to save the current state of the game world. Snapshots might need to be saved every couple of seconds so that the physics simulator doesn't have to simulate for huge leaps of time on each request.\n\n# Endpoint Example:\nRequest:\n`GET: /game/{game_id}/ship/{ship_id}/full-ray-scan`\nReponse:\n```JSON\n  {\"rays_received\" :\n    [\n      {\"id\": 35, \"angle\":36, \"distance\": 120},\n      {\"id\": 36, \"angle\":37, \"distance\": 121},\n      {\"id\": 87, \"angle\":88, \"distance\": 38},\n      {\"id\": 121, \"angle\":120, \"distance\": 120}\n    ],\n  \"max_ray_distance\": 140.0,\n  \"max_ray_resolution\": 30.0 \n  }\n```\n\n# Additional Resources\nWriting your first Django App Tutorials: https://docs.djangoproject.com/en/1.9/intro/tutorial01/\n\nDjango REST framework Documentation: http://www.django-rest-framework.org/\n\nPymunk Documentation: http://www.pymunk.org/en/latest/\n\nAPI Cheatsheet: https://github.com/RestCheatSheet/api-cheat-sheet#api-design-cheat-sheet\n\nREST API Quick Tips: http://www.restapitutorial.com/lessons/restquicktips.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaaack%2Fsilentnight-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaaack%2Fsilentnight-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaaack%2Fsilentnight-api/lists"}