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 .
- python >= 3.6
- pygame
- sys
- 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 .
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 .