Particle density in Gamemaker

Hi everyone,

We have a great liquid simulation game being developed by some students in the class. After player testing, one of the suggestions was to expand the game to include two colour liquids and allow mixing. They have achieved that, so an extent…. one other suggestion was to change the density of one of the liquids, so that one colour would settle out at the bottom, eventually.

This is a fine idea, but it gets complicated because of the way the simulation is implemented. Having thousands of water drops in Gamemaker is potentially a huge load on the cpu and memory. One way around this is to use the in-built Gamemaker particle system. Particles are much more lightweight than objects and instances. Unfortunately, to achieve this, many of the properties are set as a group, system wide. In my preliminary research,  you can set the flag for particle density, but this applies to all particles.

However, I might have found an alternative that achieves a similar effect. You can set the gravity for an individual particle:

Good luck!


Leave a Reply

Your email address will not be published. Required fields are marked *