Skip to content

Second wave scene (enemy bullets) #8

@petros

Description

@petros

Note: #9 needs to be implemented first

Add a new scene as the second wave.

The first wave is a 100 enemy ships starting at the top and going down in random speeds. They can only destroy the player's ship through a collision.

The goal of the first wave is to kill as many enemy ships as possible. The ones that make it to the bottom of the screen, escape.

The second wave can be the same with the added difficulty of enabling the enemy ships to shoot bullets.

We already have a Bullet class, but we assume the Player is the only one that can shoot a bullet. We now need to somehow track multiple bullets from both enemies and the player.

The book recommends this approach:

  1. Use the same class (no need to create a separate one)
  2. Make the class know whether it's a player bullet or an enemy bullet
  3. Figure out the direction of enemy bullets. Is it going to be random? Will it know where the player's ship is so that it chooses the right angle?
  4. Possibly use a different image for enemy bullets.
  5. We'd have to find the right balance when it comes to how many enemy bullets we can have at the same time. We don't want to make it too difficult, for example, by having a rain of bullet.

The goal should be the same. Avoiding getting hit by an enemy ship, an enemy bullet, and kill as many enemy ships as possible.

The goal is to kill all enemy ships.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions