particles
New in version 1.3.0.
Starting with version 1.3.0, the pygamelib now provides a particle system. It is for now a first limited version and it has a number of limitations.
First, the particles are “non interactive” objects. They are not affected by board items or anything drawn on screen nor can they affect them. All particles are drawn on top of an already rendered screen.
This means no fancy particle physics out of the box. It doesn’t means that it is not doable. It just means that it is not existing out of the box.
Second, although I did my best to make the particle system as efficient as possible, drawing a lot of moving elements in the terminal is very slow. So be mindful of the performances when using it.
Now despite the limitations, the particle system still allow to do some very cool stuff. Here is a video example:
This is the benchmark of the particle system, the code is available on Ghithub.
Important
Like the UI module, the particles system works exclusively with the screen buffer system (place, delete, render, update, etc.). It doesn’t work with Screen functions tagged “direct display” like display_at().
- CircleEmitter
CircleEmitter
CircleEmitter.__init__()
CircleEmitter.active
CircleEmitter.apply_force()
CircleEmitter.attach()
CircleEmitter.column
CircleEmitter.detach()
CircleEmitter.emit()
CircleEmitter.finished()
CircleEmitter.handle_notification()
CircleEmitter.load()
CircleEmitter.notify()
CircleEmitter.particle_pool
CircleEmitter.render_to_buffer()
CircleEmitter.resize_pool()
CircleEmitter.row
CircleEmitter.screen_column
CircleEmitter.screen_row
CircleEmitter.serialize()
CircleEmitter.store_screen_position()
CircleEmitter.toggle_active()
CircleEmitter.update()
CircleEmitter.x
CircleEmitter.y
- ColorParticle
ColorParticle
ColorParticle.__init__()
ColorParticle.apply_force()
ColorParticle.attach()
ColorParticle.column
ColorParticle.detach()
ColorParticle.finished()
ColorParticle.handle_notification()
ColorParticle.load()
ColorParticle.notify()
ColorParticle.render()
ColorParticle.reset()
ColorParticle.reset_lifespan()
ColorParticle.row
ColorParticle.screen_column
ColorParticle.screen_row
ColorParticle.serialize()
ColorParticle.store_screen_position()
ColorParticle.terminate()
ColorParticle.update()
ColorParticle.x
ColorParticle.y
- ColorPartitionParticle
ColorPartitionParticle
ColorPartitionParticle.__init__()
ColorPartitionParticle.apply_force()
ColorPartitionParticle.attach()
ColorPartitionParticle.column
ColorPartitionParticle.detach()
ColorPartitionParticle.finished()
ColorPartitionParticle.handle_notification()
ColorPartitionParticle.load()
ColorPartitionParticle.notify()
ColorPartitionParticle.render()
ColorPartitionParticle.reset()
ColorPartitionParticle.reset_lifespan()
ColorPartitionParticle.row
ColorPartitionParticle.screen_column
ColorPartitionParticle.screen_row
ColorPartitionParticle.serialize()
ColorPartitionParticle.store_screen_position()
ColorPartitionParticle.terminate()
ColorPartitionParticle.update()
ColorPartitionParticle.x
ColorPartitionParticle.y
- EmitterProperties
- ParticleEmitter
ParticleEmitter
ParticleEmitter.__init__()
ParticleEmitter.active
ParticleEmitter.apply_force()
ParticleEmitter.attach()
ParticleEmitter.column
ParticleEmitter.detach()
ParticleEmitter.emit()
ParticleEmitter.finished()
ParticleEmitter.handle_notification()
ParticleEmitter.load()
ParticleEmitter.notify()
ParticleEmitter.particle_pool
ParticleEmitter.render_to_buffer()
ParticleEmitter.resize_pool()
ParticleEmitter.row
ParticleEmitter.screen_column
ParticleEmitter.screen_row
ParticleEmitter.serialize()
ParticleEmitter.store_screen_position()
ParticleEmitter.toggle_active()
ParticleEmitter.update()
ParticleEmitter.x
ParticleEmitter.y
- ParticlePool
- Particle
Particle
Particle.__init__()
Particle.apply_force()
Particle.attach()
Particle.column
Particle.detach()
Particle.finished()
Particle.handle_notification()
Particle.load()
Particle.notify()
Particle.render()
Particle.reset()
Particle.reset_lifespan()
Particle.row
Particle.screen_column
Particle.screen_row
Particle.serialize()
Particle.store_screen_position()
Particle.terminate()
Particle.update()
Particle.x
Particle.y
- ParticleSprixel
ParticleSprixel
ParticleSprixel.__init__()
ParticleSprixel.attach()
ParticleSprixel.bg_color
ParticleSprixel.black_rect()
ParticleSprixel.black_square()
ParticleSprixel.blue_rect()
ParticleSprixel.blue_square()
ParticleSprixel.copy()
ParticleSprixel.cyan_rect()
ParticleSprixel.cyan_square()
ParticleSprixel.detach()
ParticleSprixel.fg_color
ParticleSprixel.from_ansi()
ParticleSprixel.green_rect()
ParticleSprixel.green_square()
ParticleSprixel.handle_notification()
ParticleSprixel.length
ParticleSprixel.load()
ParticleSprixel.magenta_rect()
ParticleSprixel.magenta_square()
ParticleSprixel.model
ParticleSprixel.notify()
ParticleSprixel.red_rect()
ParticleSprixel.red_square()
ParticleSprixel.render_to_buffer()
ParticleSprixel.screen_column
ParticleSprixel.screen_row
ParticleSprixel.serialize()
ParticleSprixel.store_screen_position()
ParticleSprixel.white_rect()
ParticleSprixel.white_square()
ParticleSprixel.yellow_rect()
ParticleSprixel.yellow_square()
- PartitionParticle
PartitionParticle
PartitionParticle.__init__()
PartitionParticle.apply_force()
PartitionParticle.attach()
PartitionParticle.column
PartitionParticle.detach()
PartitionParticle.finished()
PartitionParticle.handle_notification()
PartitionParticle.load()
PartitionParticle.notify()
PartitionParticle.render()
PartitionParticle.reset()
PartitionParticle.reset_lifespan()
PartitionParticle.row
PartitionParticle.screen_column
PartitionParticle.screen_row
PartitionParticle.serialize()
PartitionParticle.store_screen_position()
PartitionParticle.terminate()
PartitionParticle.update()
PartitionParticle.x
PartitionParticle.y
- RandomColorParticle
RandomColorParticle
RandomColorParticle.__init__()
RandomColorParticle.apply_force()
RandomColorParticle.attach()
RandomColorParticle.column
RandomColorParticle.detach()
RandomColorParticle.finished()
RandomColorParticle.handle_notification()
RandomColorParticle.load()
RandomColorParticle.notify()
RandomColorParticle.render()
RandomColorParticle.reset()
RandomColorParticle.reset_lifespan()
RandomColorParticle.row
RandomColorParticle.screen_column
RandomColorParticle.screen_row
RandomColorParticle.serialize()
RandomColorParticle.store_screen_position()
RandomColorParticle.terminate()
RandomColorParticle.update()
RandomColorParticle.x
RandomColorParticle.y
- RandomColorPartitionParticle
RandomColorPartitionParticle
RandomColorPartitionParticle.__init__()
RandomColorPartitionParticle.apply_force()
RandomColorPartitionParticle.attach()
RandomColorPartitionParticle.column
RandomColorPartitionParticle.detach()
RandomColorPartitionParticle.finished()
RandomColorPartitionParticle.handle_notification()
RandomColorPartitionParticle.load()
RandomColorPartitionParticle.notify()
RandomColorPartitionParticle.render()
RandomColorPartitionParticle.reset()
RandomColorPartitionParticle.reset_lifespan()
RandomColorPartitionParticle.row
RandomColorPartitionParticle.screen_column
RandomColorPartitionParticle.screen_row
RandomColorPartitionParticle.serialize()
RandomColorPartitionParticle.store_screen_position()
RandomColorPartitionParticle.terminate()
RandomColorPartitionParticle.update()
RandomColorPartitionParticle.x
RandomColorPartitionParticle.y