Python Forum
[PyGame] Chopper wash effect efficiency questions.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Chopper wash effect efficiency questions.
#6
HERE is a screen capture of a recent version of the effect in-game. I was messing with raycasting and placing the bullet-strike effect, so it looks broken because it is.

From the beginning the issue was performance. This lags, because it is in-game, but I have optimizations to implement which should allow several times more sparks. Current optimizations include sparks being point sources rather than rects or circles or images, sparks are actually in the background layer so they aren't .set_at() while everything else is drawn and the spark's color doesn't change. An earlier version had color transitions, and also use .get_alpha() to add spark_color to the pixel so they carried the bg color.

My major optimization is to replace the current system where the movement of the sparks is randomized each update, with one in which sparks grab the next move from a long preexisting tuple of moves. I think I accomplish the same game effect with fewer than 1/4 the current number of calculation. I will optimize the fire sprite similarly.
Reply


Messages In This Thread
RE: Chopper wash effect efficiency questions. - by michael1789 - Jan-16-2021, 08:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGame] sound effect delay and program laggy xBlackHeartx 26 13,293 Oct-09-2019, 11:36 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020