cpsc436-pandaxpress / CPSC436-Project

Platformer Game
1 stars 2 forks source link

210 - Added shield powerup that makes panda invincible #225

Closed cowmanjoe closed 5 years ago

cowmanjoe commented 5 years ago

Shields are generated with the level system and can be picked up to make the panda invincible for a duration of time (8 seconds right now). I also made the spikes act as solid blocks so the panda can walk on them when invincible. This required editing (adding even more if statements) to the physics system, but hopefully that system will be cleaned up with Box2D.

Closes #210 and #211.

prayansh commented 5 years ago

Or actually do u think it would look better if we changed the panda sprite to have an alternating red/blue/yellow tint while its in the invincibility mode, somewhat similar to when mario gains his star powerup?

cowmanjoe commented 5 years ago

Yeah, I think it makes the most sense to have an effect on the panda itself rather than the screen. I also think that the health bar going blue is a good indicator that the panda is invincible, so we don't necessarily need an additional effect. I think what would be more important is to have some kind of indicator that the timer is running out. If we can show that through your effect with alternating colours (maybe they start speeding up or something like that), then that would be great.

cowmanjoe commented 5 years ago

As for the powerup component that makes sense to me. If I understand correctly I'm imagining instead of the shield component we use a powerup component which has its "type" stored in an enum. Then, in the physics system, upon the panda's collision with it, we pass that "type" into the panda's set of powerups received in that update frame.

prayansh commented 5 years ago

yup thats exactly what i had in mind

prayansh commented 5 years ago

I can work on enhancing the visual effect when player gets invincibility once #226 gets merged in

cowmanjoe commented 5 years ago

@prayansh Are you going to work on that in another branch? Should we merge this one first or the #226?

prayansh commented 5 years ago

I can go either way. Do you want to incorporate the Enum changes first, and then we can merge this in. and I will update #226 to have the visual effects for the invincibility then