astronomia

Astronomia: let the exploration begin

The main objective of the game is to destroy multiple waves of asteroids with the help of a blaster mounted on the spaceship. After passing each level, the player reaches the next planet in the solar system, starting from Mercury.

Requirements:

To use this project, you will need the following:

pygame

PIL

MySQL community server

python mysql.connector

Once you login (or sign-up) your data is loaded from the mysql database/a new record is created under your username (if you are signing in for the first time) and you are taken to the main lobby, where your current spaceship’s statistics and the levels you have completed are displayed (which you can play again without losing your data). Once you click on continue/start you are taken to the main-game screen where you have to destroy all incoming asteroids in order to progress to the next level. If you lose then you are taken back to the lobby and if you win then you are taken to the level lobby for the planet corresponding to the next level. From here you can choose to go back to the lobby to see your upgraded ship/replay a level or can progress on to the next level.

Login screen:

If you are opening the project for the first time, then signing up will create a new record for you in the MySQL database. Otherwise, your progress will be loaded and you will be directed to the main lobby.

Screenshot 2022-02-10 at 12 50 06 AM

Main lobby:

Here, your progress in the game, your spaceship statistics and the design of your current spaceship are displayed. You can choose to replay a previous level or progress on to the next level.

Screenshot 2022-02-10 at 12 49 30 AM

Gameplay:

Controls:

• right and left arrow keys for rotating the ship

• forward arrow key to accelerate the ship in the forward direction

• spacebar for shooting projectiles.

(in order to slow down the spaceship you have to turn the spaceship and accelerate in the opposite direction)

gameplay.mp4


Level-1 completed:

Once you’ve destroyed all the asteroids, you are taken to the level lobby where you can choose to directly progress on to the next level or go back to the main lobby and see your new spaceship!

Screenshot 2022-02-10 at 12 53 19 AM

Main lobby(updated):

After finishing a level, you will see that your spaceship has been updated and its turning speed, acceleration and bullet speed are upgraded.

Screenshot 2022-02-10 at 12 47 54 AM

Spaceships available:

A list of all the spaceships you can get after reaching a particular level.

3

Note:

In this version all the data are stored locally on your computer. Hence you have to change the following code in the main.py file to match with your MySQL database server.

conn = conn = dat.connect(
        host="localhost", user="root", passwd="___", database="___")

GitHub

View Github