informa
2 min read
article

Feature: The Key To A Coding Secret From Indie Hits

In Gamasutra's latest feature, writer and developer John Harris discusses cellular automation, a technique for simulation currently found in such indie hits as M
In Gamasutra's latest feature, writer and developer John Harris discusses cellular automation, a technique for simulation currently found in such indie hits as Minecraft and Dwarf Fortress. What is cellular automation? "It allows water to flow, gases to spread, boulders to fall, and other systems propagate and change over time. To perform these feats, it runs a complex system that, each frame, decides on the contents of each cell of a grid-based game world," writes Harris, who is currently using the technique in the development of his own game, In Profundis. "While cellular automation must be designed with an eye towards minimizing processor time, it is not necessarily the case that it runs slowly. In Profundis' is fairly complex at it stands, and can handle large amounts of flowing liquid and spreading gas while still maintaining frame rates upwards of 45fps," Harris writes, before going into detail on how his game specifically handles the simulation. You can watch a video of In Profundis' cellular automation for water by clicking here. "The takeaway point here is that I covered all the relevant possible situations that a cell containing water could exist in, and just coded what should happen for each one. I didn't worry about what water should do as a body; I just focused on simulating a little bit of it, and iterated that through the whole screen in a loop," Harris explains. The full feature is live now on Gamasutra, and goes into great depth on the ins and outs of the system.

Latest Jobs

Treyarch

Playa Vista, California
6.20.22
Audio Engineer

Digital Extremes

London, Ontario, Canada
6.20.22
Communications Director

High Moon Studios

Carlsbad, California
6.20.22
Senior Producer

Build a Rocket Boy Games

Edinburgh, Scotland
6.20.22
Lead UI Programmer
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more