Space Blaster

Elements and Goals of the Game:

The game is a 2D shooter where the player controls a spaceship to shoot down incoming enemy ships. The primary goal is survival as long as possible while earning points by destroying enemies. The player loses lives when enemies reach the bottom of the screen.

How the Elements Moved:

  • Player Controller: The player moves based on user input using the arrow keys. The Controller script controls the movement, updating the player's position in each frame.
  • Enemy Controller: Enemies move at a constant speed, as controlled by the Enemy script. They are spawned at random x-coordinates and follow the playership.

How the Parts Interact:

  • Collision Detection: The OnTriggerEnter2D method in the Damage the script handles collisions between enemy ships and player bullets. When a collision occurs, both the bullet and the enemy are destroyed, contributing to the player's score.
  • Shooting Mechanism: The player can shoot bullets using the left button of the mouse. The ShootingController script instantiates a bullet at the specified spawn point. The bullet moves, and if it collides with an enemy, both are destroyed.


StatusReleased
PlatformsHTML5
Authorsimranfarrukh
GenreShooter
Made withUnity
Tags2D, Unity

Leave a comment

Log in with itch.io to leave a comment.