Posts tagged “algorithms”

◂ Back to all posts

A little puzzle experiment

Here’s a thing I’m working on:

Screenshot of WIP islands game

The aim is simply to classify each square on the grid as either land or water. Your clues consist of the following:

  • A list of all islands in the grid. Islands are four-connected: two squares that touch only on their corners do not connect.
  • A set of …

Continue reading

The navigator

The Navigator is the part of the AI that is responsible for pathfinding. Actually, his algorithm is fairly straightforward. Given an objective by the Manager, the Navigator determines the shortest path through a series of waypoints that are defined in the level file, then hands each waypoint in turn …

Continue reading

Driver code

There are a handful of racing games that let you race purely against your own best time, but the majority of them let you race against others. It adds an element of competition that you don’t get when racing alone. The solitary racer is someone who spends hours trying to figure out the optimal …

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

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