nczempin / fluxagama

2d vertical shooter based on PyGame.
3 stars 0 forks source link

move to pygame sprites #19

Closed nczempin closed 12 years ago

nczempin commented 12 years ago

A prerequisite for animation as well as for pixel-based collision is that we change the representations of player ship, shot(s) and enemies to use the pygame sprite class.

PavelCz commented 12 years ago

player ship uses sprite

PavelCz commented 12 years ago

shot now uses sprite, too

nczempin commented 12 years ago

So this leaves the enemies to use sprites for now.

We need to think about this a little differently, because there's no need to copy each image per individual enemy (they are re-used). Instead, the Enemy class should have a method that returns the image that should currently be drawn (this also makes it easier later to add sprite animations). For now this method can just check the Enemy's type and find the appropriate image from that information.

nczempin commented 12 years ago

Enemies are pretty much using sprites; not completely, but the intent of this issue was to get us started using sprites. More issues are to follow.