on-internet
← Community

Optimizing Rain Simulation

Stack Overflow ·

Hey this is a personal project i'm working which is using Kinematics to simulate rainfall. However I noticed that there's alot of processing issues as it moves very slow depending on the amount of of raindrops that spawns. More specifically if the raindrops that spawns are <= 2. I tried using sprites although I'm not sure if I used it effectively. Please review. Here is the raindrop class. class Rain(pygame.sprite.Sprite): def __init__(self, screen, clock): pygame.sprite.Sprite.__init__(self) self.screen = screen self.clock = clock self.screen_width = self.screen.get_width() self.screen_length

Comments

Sign in or sign up to comment and upvote.

No comments yet.