Click here to download a demo

Forum thread

This asset provides you with realistic fluid simulation and visualization for your games. It includes a guide, a well-commented example, and documentation for each script making it easy to implement it into your game. The physics and visualization are done with shaders, making the fluid simulation very fast. The asset is highly customizable, letting you tweak the fluids extensively. It can be used to simulate fire, smoke, gas, dye, dust, wind, water droplets, cloud formation, and much more.


  • Can simulate fire, smoke, gas, dye, dust, wind, water droplets, cloud formation, and much more.
  • Using new mathematics from 2014 making fluid simulation faster than ever before.
  • Instances can be pushed around by the velocity field of the simulation.
  • Custom collision masks from sprites and surfaces.
  • Can be tweaked to imitate versions of explosions and tornadoes.
  • 9 different example implementations of fluids.
  • Can be used in small, large and infinite game worlds.
  • Everything is highly customizable, built on top of a fundamental fluid simulation.
  • Custom shaders.
  • Choose between two shader languages, HLSL 9 and GLSL ES.
  • A guide for implementation.
  • Commented and organized code.
  • Fast and optimized, made with efficiency in mind.
  • Custom time step.
  • Customizable acceleration equation.
  • Optional dissipation of fluid velocity and material.
  • All in GML, HLSL 9, and GLSL ES.

End User Licence Agreement (EULA).

Changes in 1.2.1

Small documentation fix.

Version 1.2.1. Published April 11, 2017

Created with GameMaker: Studio v1.4.1763

Age Rating: 4+

Average Rating

Your review

You can only review assets you've bought.


Bridie D 26 April 2017


This is a very cool asset that is really well documented, so it's pretty easy to get up and running! I also had a little problem, and the dev responded to me very quickly and was really helpful! I thoroughly recommend this :)


Cem B 01 April 2017


Dude! What magic is this? I don't need it but still bought it to support the dev. Good job.

This review was left for a previous version of this asset.


Gilles P 31 March 2017

Amazing stuff Expert Level Asset

It took me 1 hour to import the asset, first fix the shader type as per instructions and then copy and simplify every bit of code for the effect I wanted from the main demo object to my own simpler controller. I would give a -1 for the huge demo object BUT +1 for how easy it was to navigate my way through, finding each case statement for the demo in every event. The room end is missing a destroy BTW

I removed the unwanted arrays that obfuscated the obvious... I now have an instance for the effect I want. I tweaked the code so that I can have multiple rectangle instances, side by side, tiled through the room. Had to tweak the coord mapping code to allow x,y position other than absolute 0,0 position... Will need to also adjust for the stretching...

Anyway.. long story short, I have a start on this. took an hour to figure it out. I'll be playing with this for a few days. lots of fun ahead

This review was left for a previous version of this asset.

Package contents

Total size 118 KB

Fluid 15.4 KB Fluid Dynamics
Backgrounds Fonts Objects Rooms Scripts
fd_draw_self_to_collision_mask_surface.gml 942 Bytes fd_draw_sprite_to_collision_mask_surface.gml 1.08 KB fd_draw_surface_to_collision_mask_surface.gml 1.06 KB fd_GUIDE.gml 5.52 KB fd_rectangle_add_material.gml 833 Bytes fd_rectangle_add_velocity.gml 1.26 KB fd_rectangle_assure_surfaces_exist.gml 2.64 KB fd_rectangle_clear.gml 352 Bytes fd_rectangle_create.gml 2.07 KB fd_rectangle_create_view.gml 1.29 KB fd_rectangle_destroy.gml 502 Bytes fd_rectangle_draw.gml 755 Bytes fd_rectangle_draw_part.gml 3.99 KB fd_rectangle_draw_stretched.gml 844 Bytes fd_rectangle_draw_view.gml 1.13 KB fd_rectangle_enums.gml 569 Bytes fd_rectangle_get_acceleration_a.gml 232 Bytes fd_rectangle_get_acceleration_b.gml 232 Bytes fd_rectangle_get_acceleration_x.gml 232 Bytes fd_rectangle_get_acceleration_y.gml 232 Bytes fd_rectangle_get_collision_mask_sprite.gml 252 Bytes fd_rectangle_get_collision_mask_sprite_image.gml 257 Bytes fd_rectangle_get_collision_mask_surface.gml 381 Bytes fd_rectangle_get_initial_value_pressure.gml 248 Bytes fd_rectangle_get_material_dissipation_type.gml 254 Bytes fd_rectangle_get_material_dissipation_value.gml 256 Bytes fd_rectangle_get_material_height.gml 238 Bytes fd_rectangle_get_material_maccormack_weight.gml 267 Bytes fd_rectangle_get_material_surface.gml 792 Bytes fd_rectangle_get_material_time_step.gml 240 Bytes fd_rectangle_get_material_type.gml 230 Bytes fd_rectangle_get_material_width.gml 236 Bytes fd_rectangle_get_pressure_height.gml 238 Bytes fd_rectangle_get_pressure_iteration_type.gml 250 Bytes fd_rectangle_get_pressure_width.gml 236 Bytes fd_rectangle_get_repeat.gml 224 Bytes fd_rectangle_get_shader_language.gml 234 Bytes fd_rectangle_get_velocity_dissipation_type.gml 254 Bytes fd_rectangle_get_velocity_dissipation_value.gml 256 Bytes fd_rectangle_get_velocity_height.gml 238 Bytes fd_rectangle_get_velocity_maccormack_weight.gml 256 Bytes fd_rectangle_get_velocity_surface.gml 989 Bytes fd_rectangle_get_velocity_time_step.gml 240 Bytes fd_rectangle_get_velocity_width.gml 236 Bytes fd_rectangle_get_visualization_shader.gml 244 Bytes fd_rectangle_material_surface_was_created.gml 563 Bytes fd_rectangle_replace_material.gml 837 Bytes fd_rectangle_replace_material_advanced.gml 852 Bytes fd_rectangle_replace_velocity.gml 1.26 KB fd_rectangle_reset_target.gml 1.01 KB fd_rectangle_set_acceleration.gml 1.84 KB fd_rectangle_set_collision_mask_sprite.gml 736 Bytes fd_rectangle_set_collision_mask_surface.gml 493 Bytes fd_rectangle_set_initial_value_pressure.gml 495 Bytes fd_rectangle_set_material_dissipation_type.gml 864 Bytes fd_rectangle_set_material_dissipation_value.gml 473 Bytes fd_rectangle_set_material_maccormack_weight.gml 848 Bytes fd_rectangle_set_material_size.gml 691 Bytes fd_rectangle_set_material_time_step.gml 526 Bytes fd_rectangle_set_material_type.gml 819 Bytes fd_rectangle_set_pressure_iteration_type.gml 2.79 KB fd_rectangle_set_pressure_size.gml 613 Bytes fd_rectangle_set_repeat.gml 389 Bytes fd_rectangle_set_shader_language.gml 3.37 KB fd_rectangle_set_target.gml 2.76 KB fd_rectangle_set_velocity_dissipation_type.gml 965 Bytes fd_rectangle_set_velocity_dissipation_value.gml 477 Bytes fd_rectangle_set_velocity_maccormack_weight.gml 708 Bytes fd_rectangle_set_velocity_size.gml 613 Bytes fd_rectangle_set_velocity_time_step.gml 561 Bytes fd_rectangle_set_visualization_shader.gml 1.33 KB fd_rectangle_shift_content.gml 1.45 KB fd_rectangle_update.gml 15.5 KB fd_rectangle_update_view.gml 694 Bytes fd_x.gml 207 Bytes fd_y.gml 207 Bytes
sh_fd_add_velocity_glsl.shader 1.22 KB sh_fd_add_velocity_hlsl.shader 1.53 KB sh_fd_advect_material_a_16_glsl.shader 2.93 KB sh_fd_advect_material_a_16_hlsl.shader 3.13 KB sh_fd_advect_material_a_8_glsl.shader 2.61 KB sh_fd_advect_material_a_8_hlsl.shader 2.82 KB sh_fd_advect_material_rgba_16_glsl.shader 3.19 KB sh_fd_advect_material_rgba_16_hlsl.shader 3.4 KB sh_fd_advect_material_rgba_8_glsl.shader 2.65 KB sh_fd_advect_material_rgba_8_hlsl.shader 2.83 KB sh_fd_advect_velocity_0_glsl.shader 3.23 KB sh_fd_advect_velocity_0_hlsl.shader 3.42 KB sh_fd_advect_velocity_1_glsl.shader 3.39 KB sh_fd_advect_velocity_1_hlsl.shader 3.57 KB sh_fd_calculate_pressure_jacobi_glsl.shader 1.43 KB sh_fd_calculate_pressure_jacobi_hlsl.shader 1.6 KB sh_fd_calculate_pressure_srj_glsl.shader 1.65 KB sh_fd_calculate_pressure_srj_hlsl.shader 1.83 KB sh_fd_calculate_velocity_divergence_glsl.shader 1.27 KB sh_fd_calculate_velocity_divergence_hlsl.shader 1.48 KB sh_fd_example_create_acceleration_field.shader 488 Bytes sh_fd_replace_material_advanced_glsl.shader 853 Bytes sh_fd_replace_material_advanced_hlsl.shader 1.14 KB sh_fd_subtract_pressure_gradient_glsl.shader 1.59 KB sh_fd_subtract_pressure_gradient_hlsl.shader 1.77 KB sh_fd_visualize_colorize_glsl.shader 652 Bytes sh_fd_visualize_colorize_hlsl.shader 864 Bytes sh_fd_visualize_pixel_art_fiery_smoke_glsl.shader 1.03 KB sh_fd_visualize_pixel_art_fiery_smoke_hlsl.shader 1.24 KB sh_fd_visualize_pixel_art_fire_glsl.shader 984 Bytes sh_fd_visualize_pixel_art_fire_hlsl.shader 1.17 KB sh_fd_visualize_pressure_glsl.shader 697 Bytes sh_fd_visualize_pressure_hlsl.shader 907 Bytes sh_fd_visualize_thick_smoke_glsl.shader 1.66 KB sh_fd_visualize_thick_smoke_hlsl.shader 1.82 KB sh_fd_visualize_velocity_divergence_glsl.shader 780 Bytes sh_fd_visualize_velocity_divergence_hlsl.shader 992 Bytes sh_fd_visualize_velocity_glsl.shader 2.39 KB sh_fd_visualize_velocity_hlsl.shader 2.61 KB
Sprites 701 Bytes 786 Bytes 698 Bytes 706 Bytes 704 Bytes 758 Bytes 709 Bytes 884 Bytes 704 Bytes 687 Bytes 1.05 KB 693 Bytes 899 Bytes images

What is the issue?

Back to Top