Ticket #64 (accepted enhancement)

Opened 3 years ago

Last modified 3 years ago

Add Shields graphic

Reported by: gsweeney Owned by: DuMuT6p
Priority: major Milestone:
Component: Video Version:
Keywords: shields hud video Cc:

Description

(feature suggestion from Chris)

Shields! (requires some OpenGL knowledge / willingness to learn)

Change History

comment:1 Changed 3 years ago by knowknowledge

We don't have any shields right now. As you probably noticed, the Outfit class has a placeholder name for 'sheildStrength', but it's never being used.

The closest thing that we have right now are the 'shield flares' that the projectiles leave behind when they are destroyed. Look at Projectile::Update to see how these were implemented. In a nutshell, when the Projectile is sufficiently close to a ship or player, it Damages the ship, Deletes itself and then creates a new Animation for the shield flare.

I suggest that instead of calling Damage directly, we should create a new Ship function "void HitBy?(Projectile*)". (I'm not thrilled with the name 'HitBy?', but you get the idea.)

When a ship is HitBy? a projectile, it should record that hit somewhere (the angle of impact and when it hit, maybe even who shot the projectile). The HitBy? should handle what part of the ship was hit (Hull or Shields) and decrement values accordingly.

For the next X seconds after a Hit, the Ship should draw it's shields. I expect that we'll want different kinds of Shield visuals at some point, so keep that in mind, but for now you could probably just draw a simple circle around the ship.

So far, nothing I've mentioned requires the creation of a new class, but I think that's where we'll go eventually. That will require overloading Outfit (like Model, Engine, and Weapon already do), creating a new xml file for shields, and more. Avoid this for now if you can. I suggest baking shields into the Ship or Model in the beginning and then extracting them to a new Class once we've answered some of the implementation questio

comment:2 Changed 3 years ago by DuMuT6p

  • Owner changed from somebody to DuMuT6p
  • Status changed from new to accepted
Note: See TracTickets for help on using tickets.