A space invader clone
Liang Yu Chen, 2024 2/15, version 2
It follows the rules of the original game, but it is not a direct copy of it. It is a simplified version.
The game is written in Unity Engine (Version: 2022.3.19f1), using C# as the programming language. The game is designed to be a MVC (Model-View-Controller) architecture, with the following components:
- Model: The game state, including the player, the aliens, the bullets, and the game score.
- View: The game screen, including the game play view, and a leaderboard view.
- Controller: The game logic, including the game mechanics, player control and UI control.
- The game uses the Unity Engine's built-in physics engine for 2D collision detection and movement.
- The game uses the Unity Engine's UI Toolkit for the game's UI.
- The game uses the Unity Engine's PlayerPrefs for saving the high scores.
- The game uses the Unity Engine's Coroutine for the game's respawn mechanism.
- The game uses the Unity Engine's Input System for player input, currently only supports mouse input.
- The game play view includes multiple game states, including the start screen, the game play screen, and the game over screen.
- The player, the aliens and the bullets are implemented using Unity 2D sprites.
- The player can move left and right using the mouse movement.
- The player can shoot bullets using the left mouse button.
- The player has limited ammo supply, and the ammo is displayed on the screen.
- The player's ammo supply is replenished when the game is restarted.
- The player's ammo count is some factor multiply by alien count, and the factor is adjustable in code, and the initial value is set to 3.
- The player can destroy the aliens by shooting them, one hit one kill.
- The aliens shoot bullets, move left and right and down, and move faster as the game progresses.
- The aliens move faster as the game progresses, and the speed is adjustable in code, and the initial value is set to 1.
- The aliens move down when they reach the edge of the screen, and move left and right when they reach the edge of the screen.
- The aliens shoot bullets at a fixed interval, and the interval is adjustable in code, and the initial value is set to 1.
- The aliens' bullets are destroyed when they reach the bottom of the screen.
- The aliens move in a formation, aliens' position is arranged in a grid, and the grid size is adjustable in code, and the initial value is set to 3x5.
- Successful hits on the aliens are rewarded with points, different aliens have different point values.
- There are 3 types of aliens, each type has a different point value, and the point values are adjustable in code, and the initial values are set to 10, 20, and 30.
- The top 10 scores are saved in the PlayerPrefs, and the leaderboard view shows the top 10 scores.
- The game ends when the aliens reach the bottom of the screen or when the player runs out of ammo or hit by alien bullets.
- The game has a scoring system, the player's score is displayed on the screen.
- The game has a start screen, a game play screen, and a game over screen.
- The game has a restart button on the game over screen, and a leaderboard button on the game over screen, and a back button on the leaderboard view.
- The game has a respawn mechanism, the aliens respawn when the game is restarted.
- The game has a leaderboard view, shows the top 10 scores and a restart button.
The game has a start screen, a game play screen, and a game over screen. The game flow is as follows:
- The game starts with the start screen, the player can start the game by clicking the start button.
- The game transitions to the game play screen, the player can play the game.
- The game ends when the aliens reach the bottom of the screen or when the player runs out of ammo or hit by alien bullets.
- The game transitions to the game over screen, the player can restart the game by clicking the restart button and view leaderboard by clicking the leaderboard button.
- The game transitions back to the start screen when the player clicks the restart button.
Video Reference On Youtube : https://www.youtube.com/watch?v=MU4psw3ccUI
Reference On Wikipedia : https://en.wikipedia.org/wiki/Space_Invaders