Plants by Tinybop

Forest in Summer (credit: Plants press kit by Tinybop)

Forest in Summer (credit: Plants press kit by Tinybop)

At Tinybop, I helped code Plants, an interactive kid’s app that explores the diversity of life in a collection of ever-changing biomes.

Plants uses game development techniques but is not a game: It is a research-driven interactive simulation that encourages exploration and discovery through play. I was responsible for many of the app’s mini-simulations:

  • Animal behavior
  • Stars and moon phases
  • Fire propagation
  • OpenGL shader effects, including: Fire, Smoke, Ice, Grass & Cloud Animations
  • Dynamic scene generation & object placement

Development used Objective-C, Cocoa Touch, the Cocos2D sprite framework, the Chipmunk2D physics library, and GLSL.

About the Animal Simulation

The animal behaviors had to conform to Tinybop’s research on each animal’s seasonal activities, as well as their nocturnal or diurnal behaviors. A data-driven behavior system was created that read in specially prepared data created in a spreadsheet.

At runtime, the simulation system created a dynamic finite state machine for each animal that adapted as days, seasons and weather changed. Randomness was added by assigning probabilities to actions, and a simple hierarchy of needs prioritized each animal’s need to eat, sleep, flee from predators, or escape natural disasters such as a fire.

Animal pathfinding is multi-level: At the first level, an underlying grid of tagged zones guides the animal’s, foraging and shelter-seeking behaviors using the A* algorithm. (This same grid also controls dynamic environmental effects such as the spread of grass fires in the Pampas.) Once a coarse path was plotted, ray casting handled local obstacle avoidance, allowing animals to walk around trees or jump over streams.

05-Plants-Forest-Summer-2048x1536

Forest at night (credit: Plants press kit by Tinybop)

14-Plants-Desert-Rainy-2048x1536

Desert rainy season (credit: Plants press kit by Tinybop)

A grass fire spreads in the Pampas

Screen Shot 2014-04-29 at 2.47.33 PM copy

A system of tagged zones guides animal navigation

pasted-image

Data used to program the animal behaviors

iOS Simulator Screen shot Jan 31, 2014, 4.06.43 PM

Development screenshot: Resolving a user-generated path into a series of short paths that handle obstacles

Comments are closed.