Sound & particle effects for liquids
Thread for issue #1369:
One of the few basic effects Minetest is still missing are sounds and particles for liquid collisions. A large particle burst and a splash sound should be triggered when a player hits the water, while small particle bursts and a swimming sound should be constantly played while the player is moving and touching water.
Although this seems possible to do in Lua with some effort, I believe the engine needs a special system to produce fluid effects, in the same area of code that handles particles when digging nodes or plays the footstep sounds. For particles, we could use the existing system for node digging and have little parts of the fluid texture pop up. For sounds, we could use the existing footstep_sounds field for swimming, in case it doesn't work already for liquid nodes too.
Although this is a slightly different matter, we should also add looping sounds for fluid sources. I tried doing this in Lua some time ago, but it was virtually impossible to do properly... it needs to be implemented as a liquid source property in the code.
I'm not familiar with this area of the code, so it's unlikely I can implement it myself. I can however find or record the water sounds as well as the particle textures, once it's confirmed that code for this is being added.
One of the few basic effects Minetest is still missing are sounds and particles for liquid collisions. A large particle burst and a splash sound should be triggered when a player hits the water, while small particle bursts and a swimming sound should be constantly played while the player is moving and touching water.
Although this seems possible to do in Lua with some effort, I believe the engine needs a special system to produce fluid effects, in the same area of code that handles particles when digging nodes or plays the footstep sounds. For particles, we could use the existing system for node digging and have little parts of the fluid texture pop up. For sounds, we could use the existing footstep_sounds field for swimming, in case it doesn't work already for liquid nodes too.
Although this is a slightly different matter, we should also add looping sounds for fluid sources. I tried doing this in Lua some time ago, but it was virtually impossible to do properly... it needs to be implemented as a liquid source property in the code.
I'm not familiar with this area of the code, so it's unlikely I can implement it myself. I can however find or record the water sounds as well as the particle textures, once it's confirmed that code for this is being added.