Posts tagged “Archimedes”

◂ Back to all posts

Some facts about beavers

  • Beavers live on wood, bark and aquatic plants. I would have guessed that they ate fish, but they don’t.

  • Beavers can hold their breath for up to 15 minutes.

  • Beavers build dams to raise the water level, creating a still pond to provide them with shelter. They build a lodge in the pond to …

Continue reading

Puzzle concepts

I’ve been doing more experimenting with the engine, trying to come up with a workable puzzle concept. Below are some videos and reasonings.

First off, the game objective. Assuming that it’ll have something to do with the fluid, one possibility is that the player has to make the fluid …

Continue reading

First gameplay

I had hoped that the editor would allow me to quickly test gameplay concepts by using “soft rules”: rules that are communicated to the tester verbally by me, instead of being enforced by the program. For example, I could say “Now try moving the orange ball into the blue rectangle, …

Continue reading

Sandbox editor

To be able to test different configurations, I had a rudimentary text-based file format to describe levels in. It was fairly simple and easy to edit, but still, hand-typing coordinates is not my idea of fun. It was time to build a graphical editor.

I plan to release the editor at some point, maybe …

Continue reading

The aspect ratio problem

In the days of MS-DOS, things were simple. If you developed a game, you usually wrote it for one specific VGA or SVGA resolution, such as 320x200 or 640x480. If someone’s video card did not support this resolution: tough luck.

Nowadays, there is such a variety of screen resolutions that this …

Continue reading

Stam solver working

This week I worked hard on getting the fluid solver in the style of Jos Stam working. The basics were easy enough, but Stam makes some simplifying assumptions, so the continuation was not quite trivial. But combined with what I learned in my earlier work on the free-surface simulator, I managed to …

Continue reading

Fluid solver on the GPU

Work on this project has been standing still for some time while I was working on another project. But this week I picked up work where I left off: making the fluid simulation even faster. Since the SOR solver I was using lends itself well to parallelization, and video cards are good at running …

Continue reading

Optimization story

The fluid simulation was beginning to approach results of decent quality. However, it was still far too slow. Most of the screenshots I’ve shown so far were done on a 64x64 grid, which barely ran in real-time even on my fast Intel i7 machine. For a full-screen game, I’d need at least …

Continue reading

The joy of graphical debugging

I’m a very visual type of guy. A picture really does say more than a thousand words. It should come as no surprise that my way of coding and debugging reflects this.

How does one debug a fluid solver? It is possible to step through the code, but that does not provide much insight. Most of the …

Continue reading

Free surface problems solved

Last week, I wrote to my fluid dynamics professor for advice on the free surface fluid simulation. It was a positive surprise to see that I had run into exactly the same problems as he had in his research. I must have been doing something right then!

You might recall that one of the problems was …

Continue reading

Fluid still failing

It’s been a busy week with little to show for it. As I wrote last time, I more or less gave up on the SPH particle-based method, and opted to fix my grid method instead. That turned out to be harder than I expected.

As a first attempt, I tried a hybrid front-tracking method known as the MAC …

Continue reading


To find the source of the instabilities, I pulled my code apart into more independent steps, that could individually be turned on or off. This did result in a speed hit, but allowed me to quickly trace the source of the problems to the advection routine. This is the part that moves the water along …

Continue reading

Lid driven cavity

Since no existing code fit my requirements, I started working on my own fluid simulator a few weeks ago. The idea was to try both a grid-based and a particle-based method, and see which worked better for my situation. I started with the grid-based version.

My code was not based on Stam’s work, …

Continue reading

Previous work

I looked around for existing code or libraries to do the fluid simulation for me. There are some, but most are either GPL-licensed or too expensive, so they are out of the question for a small-time independent developer like me. Some publications exist on the topic, most notably Jos Stam’s …

Continue reading