Skip to content

ITCUI-XJTLU/war-of-aliens-and-ships

Repository files navigation

The War of aliens and ships

Introduction:

As the first complete project of python I have made, the project provide me a deeper insight of Object-Oriented Programming style, which is important and meaningful for the fresh programmers like me . When we write a simple script , we have tittle access to find the beauty and advantages of OOP . However , when we try to develop a complex project , OOP can help us organize the program in an efficient and perfect way .

Run:

Prerequisites:

  • python >= 3.6
  • pygame
  • sys

Play the game :

  • Download the whole project .Since it is a complete project , it is strongly recommend you to run the project by you local environment , such Pycharm .
  • Change the pictures path in ship.py and alien.py , I use absolute path , so you need to change it .
  • Run the alien_invasion.py file ,and enjoy your game .

Game effect:

Improve:

Actually , I think the project can be improved in some ways, so I may update the project in the future :

  • Since I use pygame.sprite to organize the aliens , so the aliens have to appear in a rectange way . So I want to change to another function which can organize the different aliens move in different and random ways .

  • When I write the game , I just set the ships move left or right to decrease the difficult of the codes. So in the future , I want to set ships move to four directions . And the experience of playing the game can probably be improved .

About

use pygame to write a 2-D computer game

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages