Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Weapon Projectiles #4

Closed
e-dong opened this issue Oct 15, 2023 · 2 comments
Closed

Implement Weapon Projectiles #4

e-dong opened this issue Oct 15, 2023 · 2 comments

Comments

@e-dong
Copy link
Owner

e-dong commented Oct 15, 2023

There are two weapons in the game:

  • photon torpedoes
  • phasers

Torpedoes

In the original game, I noticed the image is different based on the angle the player fires them. For simplicity, I may keep them the same. Explosion animations will most likely be skipped for now. There can be multiple torpedoes, so the sprite class will make these easier to manage. There should be a timeout if the torpedoes do not hit anything and disappear.

Phasers

This will probably be the simplest to implement. I can just draw a straight line. I can probably use pygame.draw to draw a line. I will need to check if the rect collides with a player

@e-dong
Copy link
Owner Author

e-dong commented Dec 9, 2023

Added a prototype version of the photon torpedoes, Used pygame.draw instead of making pixel art of the torpedoes. I created a base class SpaceEntity to represent the flying objects in space. This allows me to reuse the logic I originally created for the Human Ship.

TODOs

  • Add constraints like max number of torpedoes
  • Add logic to make torpedo disappear on hit and timeout
  • Work on phasers

@e-dong
Copy link
Owner Author

e-dong commented Jan 5, 2024

PR link: #14

@e-dong e-dong closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant