{"id":19637537,"url":"https://github.com/najlae01/space-shooter","last_synced_at":"2026-04-10T21:03:56.599Z","repository":{"id":245966492,"uuid":"819133431","full_name":"najlae01/space-shooter","owner":"najlae01","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-25T15:21:47.000Z","size":378643,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-09T17:05:31.045Z","etag":null,"topics":["cs50","fun","gamedev","mlagents","reinforcement-learning","unity","unity3d"],"latest_commit_sha":null,"homepage":"https://youtu.be/LxLcnDThGqY","language":"Python","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/najlae01.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}},"created_at":"2024-06-23T21:48:22.000Z","updated_at":"2024-06-25T15:26:50.000Z","dependencies_parsed_at":"2024-11-11T12:48:17.325Z","dependency_job_id":null,"html_url":"https://github.com/najlae01/space-shooter","commit_stats":null,"previous_names":["najlae01/space-shooter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najlae01%2Fspace-shooter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najlae01%2Fspace-shooter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najlae01%2Fspace-shooter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najlae01%2Fspace-shooter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/najlae01","download_url":"https://codeload.github.com/najlae01/space-shooter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240941508,"owners_count":19882062,"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":["cs50","fun","gamedev","mlagents","reinforcement-learning","unity","unity3d"],"created_at":"2024-11-11T12:35:15.717Z","updated_at":"2026-04-10T21:03:51.567Z","avatar_url":"https://github.com/najlae01.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Galactic Defender\n\n## Overview\n**Galactic Defender** is a space shooter mobile game where players control a spaceship to navigate and survive against waves of enemies. The game features auto-firing bullets, allowing players to focus on dodging enemy attacks and maintaining strategic positioning within the game boundaries. The ultimate goal is to achieve high scores and progress through increasingly challenging levels.\n\nYou can watch the demo [here](https://youtu.be/LxLcnDThGqY).\n\n## Game Scenes\n\n### 1. Start Scene\nThe Start Scene is the initial entry point for the game. Here, players can tap on screen to start the game.\n![startScene](https://github.com/najlae01/space-shooter/assets/88176530/147fc0c9-5e53-487d-8e84-639a81185eb9)\n\n\n### 2. Levels for Testing\n![scenes](https://github.com/najlae01/space-shooter/assets/88176530/8f75f8d4-d570-4711-935b-398f543bf84c)\n\nThese levels are designed to test and challenge players with varying conditions:\n- **Win Condition Time**: The duration within which players must complete the level's objectives and enemies' type.\n![winCondition](https://github.com/najlae01/space-shooter/assets/88176530/a7a8fa1a-6627-4acc-8731-110bd1d6d3ec)\n\n- **Different Enemies**: Players face a variety of enemies, each with unique behaviors and characteristics to enhance the gameplay experience. The enemy types include:\n    - **Meteors**: Meteors vary in size and speed, adding to the difficulty as players progress.\n    - **Green Enemies**: These enemies move steadily towards the player's ship and cause significant damage upon collision. They introduce a direct threat that players must navigate around to survive.\n    - **Purple Enemies**: Equipped with canons that fire bullets at intervals. They require players to constantly stay alert and maneuver strategically to dodge incoming fire while returning attacks.\n![enemies](https://github.com/najlae01/space-shooter/assets/88176530/f5ed479e-5d58-4a9a-8e55-5075fae0a433)\n\n- **Enemy Spawning Time**: The intervals at which enemies appear.\n![enemiesSpawnTime](https://github.com/najlae01/space-shooter/assets/88176530/84f8cef9-fac5-4772-ad2a-32ef4eaaae22)\n\nProgression mechanics:\n- Players unlock new levels upon successfully completing the current level.\n\n![winScreen](https://github.com/najlae01/space-shooter/assets/88176530/b1fd91e5-a76b-47ce-9891-6dfdae67c031)\n\n- If a player fails, they can replay the level or choose another unlocked level.\n\n![lostScreen](https://github.com/najlae01/space-shooter/assets/88176530/73563262-1a16-46e6-bd10-3452f296d513)\n\n\n### 3. End Game Scene\nThis scene appears after the player wins or loses a level. It displays the player's score, the high score, and provides options to either quit the game or play the next level (Win case), replay the level (Lose case). Please refer to the figures above displaying the end game state.\n\n\n## Game HUD\nThe game HUD includes a health bar located at the top left side of the screen, allowing players to monitor their ship's health. The score is displayed at the top right corner, keeping players informed of their current points.\n\n\n## Game Controls\n\n### Manual Control\nPlayers can manually control their spaceship's movement across the x and y axes using touch input:\n- Dragging on the screen moves the spaceship.\n- Movement is constrained within set boundaries to keep the gameplay focused and challenging.\n\n### Auto-Control Mode (Upcoming Feature)\nIn this mode, the spaceship is controlled by reinforcement learning algorithms. Players can switch between auto-control and manual control modes.\n\n![autoControlMode](https://github.com/najlae01/space-shooter/assets/88176530/6b77ec78-430a-4ee2-8025-e4b9e90091f3)\n\n\n## Extra and Upcoming Features\n- **Auto-Control Mode**: Using Unity's ML-Agents plugin, this feature will allow the spaceship to be controlled by AI.\n\n### Training Scene\nThe Training Scene is used to train the model using the ML Agents plugin and by setting multiple scenarios.\n![trainingScene](https://github.com/najlae01/space-shooter/assets/88176530/3f8a1fd8-60d9-41e9-a142-bc628be03ae3)\n![Capture d’écran (4947)](https://github.com/najlae01/space-shooter/assets/88176530/d7a70868-8268-48e4-a37b-dd81e9f93c17)\n\n### Rewards and Penalties\n- Agent receives rewards for maintaining a safe distance from enemies and successfully navigating levels.\n- Penalties are applied for colliding with enemies or projectiles, moving out of bounds.\n\n\n## Installation\n1. Clone the repository.\n2. Open the project in Unity.\n3. Ensure you have the Unity ML-Agents package installed for the auto-control mode.\n4. Build and run the game on your preferred mobile device emulator or physical device.\n\n## How to Play\n1. Launch the game to enter the Start Scene.\n2. Tap to start a new game.\n3. Navigate through levels, avoiding enemies and projectiles.\n4. Progress through the game by completing levels and achieving high scores.\n\n## Quit Game\nPlayers can quit the game from the menu displayed after winning or losing a level by tapping the quit button.\n![lostScreen](https://github.com/najlae01/space-shooter/assets/88176530/8ad3b2b5-1f46-4dfb-a1ca-ee3c9841abf4)\n\n\n## License\nThis project is the final project of the CS50 game dev course.\n\n## Development and Future Work\nFurther training and optimization of the reinforcement learning agent are needed. Continuous testing and parameter adjustments will improve the auto-control feature for a better gaming experience.\n\n## License\nThis project is the final project of the CS50 game dev course.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnajlae01%2Fspace-shooter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnajlae01%2Fspace-shooter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnajlae01%2Fspace-shooter/lists"}