The Space Shooter Game

The Space Shooter It is a Game application built with python 3.7 using Pygame , Os and Shelve modules of python. It uses Pygame library for the GUI and sounds of the game. Os module is used to join paths for filenames to their associated directories. Shelve module is used to store high score of the player as a record file which is stored in the same directory. The Space shooter is an arcade game developed from classic arcade game genre, old game but with a new context, more glamorous and more vivid graphics. Our galaxy is under attack by alien’s ships and UFO’s, they are here to invade our galaxy by destroying all the planets and lifeforms of our galaxy. Now, you are the only fighter capable in our galaxy who can fight these aliens and protect our galaxy from these aliens. You have to destroy all the alien’s starships and UFO’s and you also have to be careful from the meteorites that are already there in our galaxy’s space as they can also destroy your spaceship. You can shoot high powered red colored laser bullets which can damage any meteorite as well as alien’s spaceships. You can move in X-direction by pressing LEFT or RIGHT arrow to move left and right in the space respectively. You can shoot laser bullets by pressing SPACE button. This project is based on the classic arcade game and is made using basic game loop technique. It uses sprites for all the animations. A sprite is a bitmap graphic that is designed to be a part of larger screen. It can either be a static image or an animated graphic. In a game application, everything is done in the GAME LOOP that is run infinitely until the game is not over. The game loop takes all events from the user and based on those events it updates all the sprites on the game screen accordingly and then it renders all the sprites on the main screen. On the start screen, the animation for start screen is displayed and by pressing ‘N’ new game will be started. New game is started by initializing all sprite groups, meteorite’s groups, enemy’s groups, bullet groups and initializes the player. When game is running, if ESCAPE is pressed then game is paused and PAUSE screen is displayed on which there are instructions to resume the game, to load the new game and to mute the background music of game. When user opts to load new game on game’s PAUSE screen then firstly game is over and GAME OVER screen is displayed on which by pressing N new game can be loaded and if CROSS button of the game window is pressed then also it displays the GAME OVER screen. On the GAME START screen, if CROSS button of game window is pressed then it leads to GAME OVER screen. On the GAME OVER or GAME START screen, if N is pressed then new game is started and if CROSS button of the game window is pressed then the game window is closed. By pressing SPACE button, laser bullets are shoot which can damage the meteorites and enemies and ultimately destroys them. You also have to be careful from getting hit by green laser bullets shoot by the enemy UFO’s and green spaceships by moving left and right in the space and also be careful from meteorites as they can damage your spaceship. Player gets 3 lives and a full health in the start and these are shown in the top of the game screen. Whenever player destroys an enemy’s spaceship or UFO or a meteorite, player’s score is increased that is shown in the middle portion of the top of the game screen. When player has no life left and player’s health gets to zero then game is over and if player’s score is greater than current high score then on GAME OVER screen, new high score will be displayed. For GUI of game, pygame’s Sprite class is extensively used by overriding it’s methods for all sprite’s movements. And for sounds of the game, pygame’s mixer.music module and mixer.Sound class is used. Pygame.mixer.music is used to play the background music of the game and mixer.Sound class is used to play shooting and explosion sounds of game. High score is saved in ‘.db’ record file using Shelve module of python.
Alternatives To The Space Shooter Game
Select To Compare


Popular Games Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Python
Video Game