{"id":24745656,"url":"https://github.com/pwalig/sw-space-shooter","last_synced_at":"2026-05-06T01:34:14.898Z","repository":{"id":274521871,"uuid":"921738437","full_name":"pwalig/SW-space-shooter","owner":"pwalig","description":"3D space shooter video game running on Raspberry Pi","archived":false,"fork":false,"pushed_at":"2025-06-10T15:48:11.000Z","size":1272,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T22:07:08.382Z","etag":null,"topics":["3d-graphics","3d-wireframe","c","c-plus-plus","college-project","cpp","embedded","embedded-systems","glm","mcp3008","raspberry-pi-4","raspberrypi","space-shooter","space-shooter-game","spi","spi-protocol","video-game","waveshare-lcd","wire-frame","wiringpi"],"latest_commit_sha":null,"homepage":"https://youtu.be/B6IKDP6JW5U","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pwalig.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,"zenodo":null}},"created_at":"2025-01-24T14:21:15.000Z","updated_at":"2025-06-10T15:45:27.000Z","dependencies_parsed_at":"2025-01-27T20:36:52.926Z","dependency_job_id":"04f1cd7c-eebc-4f88-8915-2985ef631096","html_url":"https://github.com/pwalig/SW-space-shooter","commit_stats":null,"previous_names":["pwalig/sw-space-shooter"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pwalig/SW-space-shooter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwalig%2FSW-space-shooter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwalig%2FSW-space-shooter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwalig%2FSW-space-shooter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwalig%2FSW-space-shooter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pwalig","download_url":"https://codeload.github.com/pwalig/SW-space-shooter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwalig%2FSW-space-shooter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264023551,"owners_count":23545689,"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":["3d-graphics","3d-wireframe","c","c-plus-plus","college-project","cpp","embedded","embedded-systems","glm","mcp3008","raspberry-pi-4","raspberrypi","space-shooter","space-shooter-game","spi","spi-protocol","video-game","waveshare-lcd","wire-frame","wiringpi"],"created_at":"2025-01-28T03:20:05.102Z","updated_at":"2025-10-28T01:08:15.667Z","avatar_url":"https://github.com/pwalig.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SW-space-shooter\n\n3D space shooter video game running on Raspberry Pi\n\n# Hardware\n\n* [Raspbery Pi 4B](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/)\n* [Waveshare 2.4 inch LCD](https://www.waveshare.com/2.4inch-lcd-module.htm)\n* MCP3008 analog to digital converter\n* 2 x joystick\n* 2 x button\n\n# Setup\n\n## Connect hardware\n\nConnect [Waveshare 2.4 inch LCD](https://www.waveshare.com/2.4inch-lcd-module.htm) according to manufacturer documentation: https://www.waveshare.com/wiki/2.4inch_LCD_Module\n\nConnect MCP3008 to Raspberry Pi SPI ports (MISO, MOSI SCLK, SPI CE1)\n\nConnect joystick and buttons to MCP3008 ports:\n\n| port | device |\n| --- | --- |\n| 0 | right thumbstick button |\n| 1 | right thumbstick X axis |\n| 2 | right thumbstick Y axis |\n| 3 | right button |\n| 4 | left thumbstick X axis |\n| 5 | left thumbstick Y axis |\n| 6 | left button |\n| 7 | - |\n\nAll buttons connected via 10K pullup resistor\n\n## Enable SPI interface\n\n```\nsudo raspi-config\n# Choose Interfacing Options -\u003e SPI -\u003e Yes to enable the SPI interface.\nsudo reboot\n```\n\n# Software\n\nGet your copy from [release section](https://github.com/pwalig/SW-space-shooter/releases) or build from source.\n\n## Building from source\n\nProject depends on [WiringPi](https://github.com/WiringPi/WiringPi)\n\nversion 3.12 was used in development\n\n```\nwget https://github.com/WiringPi/WiringPi/releases/download/3.12/wiringpi_3.12_arm64.deb\nsudo dpkg -i wiringpi_3.12_arm64.deb\n```\n\n\n[CMake](https://cmake.org/) build system is used to build this software.\n\n```\nsudo apt-get install cmake\n```\n\nIn order to build the software run:\n\n```\ngit clone https://github.com/pwalig/SW-space-shooter.git\ncd SW-space-shooter\nmkdir build\ncd build\ncmake ..\nmake\n```\n\nProject is based on [code examples](https://files.waveshare.com/upload/8/8d/LCD_Module_RPI_code.7z) provided by [Waveshare](https://www.waveshare.com/).\n\nSW-space-shooter also uses [g-turnc/glm](https://github.com/g-truc/glm) mathematics library. Entire glm library is included in this repository. There is no need to install it.\n\n## Running\n\nBefore running create folder where space-shooter will save top scores:\n\n```\nmkdir /home/space-shooter\n```\n\nThen run the program:\n\n```\nsudo ./space-shooter\n```\n\n## Play at startup\n\nTo launch the program at startup of raspberry pi:\n\nCreate file `/home/{username}/.config/autostart/space-shooter.desktop` with following contents:\n\n```\n[Desktop Entry]\nType=Application\nName=space-shooter\nExec=sudo /home/{username}/{path to this repository}/SW-space-shooter/build/space-shooter\nTerminal=true\n```\n\n# Gameplay\n\nSurvive as long as you can and shoot as many enemy spaceships as possible.\n\n**Be mindful. You have limited ammunition and shield time.**\n\nEnemy spaceships spawn radomly around the player and drop powerups when destroyed.\n\n## Available powerups\n\n* GREEN: +10 hp\n* GREY: +10 ammo\n* BLUE: +0.5s of shield time\n* YELLOW: +1 to total score\n\nEnemies have base hp of 30.  \nPlayer starts with 100 hp, 40 bullets and 1.5s of shield time.  \nEach bullet deals 10 hp of damage.  \nEach destroyed enemy adds 1 point to total score.\n\nEnemy spaceships, on contact with the player, deal damage equal to their remaining hp and get destroyed. Enemies destroyed in this way will not count to total score nor will they drop powerups.\n\nAmmunition regenerates automatically (+5 bullets every 10 seconds).\n\n## Controls\n\n* Left thumbstick Y axis - forwards / backwards movement\n* Left thumbstick X axis - roll spaceship\n* Right thumbstick  - look around\n* Left button - shoot\n* Right button - use shield\n* Hold right thumbstick button - give up and go to main menu\n\n## UI\n\nIn top left corner there are 3 bars:\n\n* RED - hp\n* WHITE - ammo\n* BLUE - shield\n\nWhen right thumbstick button is held white bar at bottom left will appear.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwalig%2Fsw-space-shooter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpwalig%2Fsw-space-shooter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwalig%2Fsw-space-shooter/lists"}