Use thePygamelibrary Use the AlienInvasion code from the book as a starting point and change it to
Fantastic news! We've Found the answer you've been seeking!
Question:
- Use thePygamelibrary
- Use the AlienInvasion code from the book as a starting point and change it to add the project requirements.
- Enemies are generated at a random X position and then move downward on the screen.
- You can use the Pythonrandint() methodLinks to an external site.to determine the starting position.
- Enemies are generated at random times. Import theprovided module "alien_timer_functions.py"Download provided module "alien_timer_functions.py"to determine when to make new enemy.
- Enemies should move from Top-to-Bottom until they disappear off-screen or are destroyed.
- Enemies do not move back and forth (left and right) as they did in the original game from the book.
- Objects (bullets, aliens) should be removed after they fly off-screen; like the way that the bullets are removed in the Alien Invasion game. Try adding a line of code to tell you how many aliens still exist in your game: e.g. print(len(self.aliens))
- May add your own graphics and/or sounds --https://opengameart.org/Links to an external site. Or just use the graphics from the Alien Invasion gameOr just use the graphics from the Alien Invasion game
- Graphics can be as simple as they were in the Alien Invaders game
- Software design should classes separated into multiple modules and imported into the main
- program file (The code should not be in a single file).
- Using modules for classes (such as player, health_bar, enemy, advanced_enemy, bullets, settings, etc...If you didn't do very well with the Alien Invasion game coding before, here's a copy of the game as it should be at the end of Chapter 14. you can download it and use it as a starting point for the project.
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date: