Fluid Flow Simulation

WASM in your browser

This is a simple project meant to practice and learn about WebAssembly. This was written using Rust and converted into WebAssembly.

For the fluid flow simulation, I used a technique described in the paper Curl-Noise for Procedural Fluid Flow by Bridson, Hourihan, and Nordenstam.

PLAY SIMULATION

Click to load WebAssembly

The Objective

There is no win condition; it’s meant as a simple demo for WebAssembly and doubles as a chill, simple sensory game. This should work on both a desktop and a compatible smartphone.

Back in my day… (I’m not old, just nostalgic)

If you grew up with access to the internet and a computer in the early 2000s and 2010s, you might have fond memories of playing Flash games through your browser. I spent a lot of time on sites like:

Some of us even created simple webpages hosted on sites like Wix and embedded those Flash games onto them, labeling the category of the website as “educational” to circumvent school blocks.

I promise we were still doing schoolwork, usually. We were often rewarded with “computer time” if we finished our exams or assignments early during study hall. This is when people either watched videos, took online quizzes, or played whatever Flash games they could access through the school firewall.

I know that today there’s no real need for that; most people just bring their phones and play whatever they want to pass the time. But back then, the most fun you could have with your phone was probably Snake on a tiny display using T9 keys to move.

Goodbye Flash

                           _____  _____
                          <     `/     |
                           >          (
                          |  _      _  |
                          | |_) | |_) |
                          | | \ | |   |
                          |           |
           ______.______%_|           |__________  _____
         _/                                      \|     |
        |                  F L A S H                  <
        |_____.-._________             ____/|___________|
                          |* 01/01/1996|
                          |+ 12/31/2020|
                          |            |
                          |            |
                          |   _        <
                          |__/         |
                           / `--.      |
                          %|           |%
                      |/.%%|          -< @%%%
                      `\%`@|     v       |@@%@%%     - 
                    .%%%@@@|%    |     % @@@%%@%%%%
               _.%%%%%%@@@@@@%%_/%\_%@@%%@@@@@@@%%%%%%

Now that Flash is dead, I’ve always been interested in what would eventually replace it.

Today there are many tools to create and render browser-based games, but WebAssembly has always been really cool to me because of the near-native performance it promises. It’s not perfect, and not really meant to replace JavaScript frameworks that currently exist, but it’s still fun to explore.