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().