Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Shooting Bullets In this lab, you should add the ability to shoot bullets, which involves a new file called bullet.py and some modifications to some

Shooting Bullets

In this lab, you should add the ability to shoot bullets, which involves a new file called bullet.py and some modifications to some of the files we already have from Lecture 8. Use the files alien_invasion.py, settings.py, game_functions.py and ship.py as a starting point.

Follow the instruction from page 256 till 264 of the book to add the ability to shoot bullets. You should write code that fires a bullet (a small rectangle) when the player presses the spacebar. Bullets will then travel straight up the screen until they disappear off the top of the screen.

Self-exploration

Aliens

Follow the chapter 13 in the book to create the first alien and build the fleet of aliens. Move the fleet right and change direction on reaching the edge of screen. Detect bullet collisions. Speed up the bullets. When aliens reach bottom of the screen, end the game.

Scoring

Continue with the code developed until the end of chapter 13 and finish the Alien Invasion game. Add a Play button to start a game on demand or to restart a game once it ends. Also change the game so it speeds up when the player moves up a level, and well implement a scoring system. By the end of the chapter, youll know enough to start writing games that increase in difficulty as a player progresses and that show scores.

Follow the instruction from page 291 till 317 of the book to complete the game

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions