You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
There are two weapons in the game:
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 playerThe text was updated successfully, but these errors were encountered: