Its been an a couple years since i have programmed at all. So take my current advice with a grain of salt as it could be off.
If i remember correctly...Sprite groups "basically" just automate the update and draw methods. So if you wanted to remove it as a Sprite Group you would first get rid of the explosion class from inheriting from pygame.sprite.Sprite. Then run update and draw methods yourself.
An explosion is just running through a list of explosion images slowing them down for you to see. This example switches a number every second. You can utilize that same concept to flip through a list of explosion images. But make them faster that 1 second (1000 milliseconds would be more like 100 milliseconds, etc).
Sorry i couldnt help any more, i just havent been programming during the pandemic as i have been busy doing other things.
If i remember correctly...Sprite groups "basically" just automate the update and draw methods. So if you wanted to remove it as a Sprite Group you would first get rid of the explosion class from inheriting from pygame.sprite.Sprite. Then run update and draw methods yourself.
An explosion is just running through a list of explosion images slowing them down for you to see. This example switches a number every second. You can utilize that same concept to flip through a list of explosion images. But make them faster that 1 second (1000 milliseconds would be more like 100 milliseconds, etc).
def update(self): if pygame.time.get_ticks()-self.timer > self.delay: self.timer = pygame.time.get_ticks() #flip_to_next_image()where flip_to_next_image() would be an Explosion method flipping to next image and detecting if at the end of the list to ensure it doesnt fail. timer is initialized to 0, and delay is 100 for 100 milliseconds. Which would execute flip_to_next_image() every 10th of a second.
Sorry i couldnt help any more, i just havent been programming during the pandemic as i have been busy doing other things.
Recommended Tutorials: