Uplift: Numeric Analysis

Being based on a grid, Uplift shares many qualities with volumetric numeric analysis techniques. It is, in fact, designed this way.

Numerical analysis is a technique which engineers and scientists alike turn to when a problem is difficult to solve using algebra. The weight of an object is easy to calculate, just add up the weights of all the parts, and hey presto, you’ve got the weight of the whole! (For weight in fluids, like air and water, subtract the weight of the displaced fluid as well) This is simple, and easy to formulate, that is, turn into a formula.

Formulas are good, because they:

  • give you a precise answer
  • are quick to calculate
  • are compact, and thus easy to communicate.

This kind of analysis is called “analytic” because it involves sitting down and analyzing the problem, and making a simple formula that describes the behavior.

Air convection test

Air convection test with cloud formation and shadow-driven advection (light is shining down diagonally from the left)

But some problems don’t lend themselves to analytic scrutiny, especially problems involving flow and chaos.

You see, flows can involve fluids, and fluids move around. Flows also involve energy transfer, such as heat, momentum, etc. All this movement often results in chaotic behavior which is why teachers often ask you to “consider a sphere of uniform density in a vacuum”. Sometimes these simplifying assumptions can help to apply analytic techniques, sometimes not.

And even when you can make assumptions about individual situations, the real world often hinges on chaos, that is, the things that happen because of imprecision so small that it would be impossible to eliminate it through any conceivable effort. All this adds up to a situation where, often, you don’t need a perfect answer, so much as an answer that is close enough to get by for another few days.

But the analytic approach is ill suited to codifying this kind of fine complexity.

Fortunately, there is another angle, the numeric. Numeric analysis basically breaks the problem down into lots of tiny parts that are small and simple enough to use analytic techniques on, and then crunches the numbers over and over again until a solution pops out. You may think this may sound like a lot of work and way too tedious to be useful… and you’d be right… which is where computers come in. Combined with widespread computing technologies, numeric analysis is a very feasible option for modeling complex, non-linear, unstable, and/or chaotic systems.

The easiest way to apply numeric techniques is if every element has the same shape, size, and qualities, basically, a grid of cubes. Professional software can do non-uniform element analysis (FEA, CFD, and so forth) but these require considering real objects to be made of tiny little parts, in order to properly model the effects of shape and discontinuities. It would be so much easier if the whole world really was made of identical cubes.

Which brings us back to voxels.

Uplift Magma Convection Test

Uplift Magma Test incorporating both fluid convection and heat transfer.

The 3d grid based nature of voxel simulator games (Minecraft, etc), has always suggested to me that they would be improved, both as simulations and as games, by the addition of numeric analysis techniques.Given a grid, one could easily (well, relatively easily) write a system that modeled heat flow, thermal convection, turbulence, fluid dynamics, and more.

This is important for simulation games, especially ones that deal with plants (like Uplift) because heat and water are both ideal for analysis by numeric techniques, and crucial for plant life. Unfortunately, the people who understand these techniques are usually scientists and engineers who are (stereotypically (and I include myself here as well)) very weak on presentation and usability, two elements crucial to game design. I’m hoping to break that pattern… but no promises.

So, along with scale nesting, Uplift is designed around built-in numeric analysis for fluids (air, water, lava) and heat flow. It’s not going to be research-grade Computational Fluid Dynamics or anything, but I suspect it will be good enough to result in some really interesting emergent play, as well as helping the player to build an intuition about the behavior of these systems in real life.

Leave a Reply

Your email address will not be published. Required fields are marked *