33 lines
1.7 KiB
Plaintext
33 lines
1.7 KiB
Plaintext
========================================================================
|
|
Minetest Advanced Particle Spawner Proof-of-Concept
|
|
------------------------------------------------------------------------
|
|
|
|
This is a pure server-side lua implementation of a proposed API for
|
|
advanced particles spanwers for Minetest, which allows some particle
|
|
effects to be achieved that are not possible with the existing particle
|
|
spawners.
|
|
|
|
The behavior defined by the API in this mod is currently implemented by
|
|
sending a swarm of add_particle packets to the client (individually for
|
|
each particle) BUT it could be done much more efficiently in the engine
|
|
by sending a single add_particlespawner_advanced packet to the client.
|
|
|
|
The key difference from this API compared to the standard particle
|
|
spawner one is that you can define the particle's parameters as a
|
|
linear function of a constant, time, and 12 random variables. The
|
|
12 random numbers are enough for each of the original random variables
|
|
to have an independent/uncorrelated random value (i.e. you can implement
|
|
a standard particle spawner's behavior using the advanced one) but
|
|
interesting things happen when you reuse a single random value between
|
|
different parameters.
|
|
|
|
Included are a bunch of demo nodes, each of which creates a special
|
|
particle effect that cannot be achieved with ordinary particlspawners
|
|
every 2 seconds. Use a /giveme command to give yourself demo nodes:
|
|
/giveme advparticles:demo#
|
|
...where # is 1, 2, 3, etc. Place the node to see the effect created
|
|
around that node. Punch to remove.
|
|
|
|
------------------------------------------------------------------------
|
|
========================================================================
|