UPDATED 12:55 EDT / APRIL 03 2015

NEWS

How chaos theory comes into play in designing video games

Mouse TrapIn theory, programming a video game should be nice and mathematical, with each line of code following an ordered structure that produces straightforward, predictable effects. You tell the program to spawn a monster, it spawns a monster. But as game designs become more and more complicated, adding things like realistic physics and destructible environments, the outcome of an action is not always predictable, which can result in all kinds of unexpected glitches.

Veteran game developer Kevin Ryan attributes these unexpected outcomes to the butterfly effect, an element of chaos theory that says that very minor changes can cause a chain of events that result in a disastrous outcome. The butterfly effect is named for the common example of a butterfly flapping its wings, which results in subtle atmospheric changes that cause a hurricane hundreds of miles away.

Ryan was the creator and coder of The Incredible Machine, a whimsical 1992 game that allowed players to build complicated Rube Goldberg machines that moved objects around with conveyor belts, springs, and other contraptions. More recently, Ryan created Contraption Maker, a spiritual successor to The Incredible Machine that is available through Steam.

 

“The butterfly effect becomes very obvious”

 

In an article on Gamasutra, Ryan explained the difficulties he ran into when creating the game, attributing many of the problems to chaos theory and the butterfly effect.

“When you have a contraption made up of possible hundreds of parts that are interacting with each other for hundreds or thousands of frames then the butterfly effect becomes very obvious,” Ryan wrote. “Move a tennis ball over by just 0.0001 units and it may bounce off a teeter-totter a fraction of a second later and then make something else bounce left instead of right and divergence is off to the races.”

Ryan explained that “as long as the initial starting positions of all the parts were the same then the contraption should always run exactly the same.” But because Contraption Maker is cross platform, the way things things move could change between different platforms based on how they calculate certain numbers.

According to Ryan, the eventual solution used “an automated determinism check” that persistently monitors the way objects are behaving compared to a predetermined value. This allowed the developers to catch and correct errors as they made updates to the game.

photo credit: Rube Goldberg setup, Saturday via photopin (license)

A message from John Furrier, co-founder of SiliconANGLE:

Support our open free content by sharing and engaging with our content and community.

Join theCUBE Alumni Trust Network

Where Technology Leaders Connect, Share Intelligence & Create Opportunities

11.4k+  
CUBE Alumni Network
C-level and Technical
Domain Experts
15M+ 
theCUBE
Viewers
Connect with 11,413+ industry leaders from our network of tech and business leaders forming a unique trusted network effect.

SiliconANGLE Media is a recognized leader in digital media innovation serving innovative audiences and brands, bringing together cutting-edge technology, influential content, strategic insights and real-time audience engagement. As the parent company of SiliconANGLE, theCUBE Network, theCUBE Research, CUBE365, theCUBE AI and theCUBE SuperStudios — such as those established in Silicon Valley and the New York Stock Exchange (NYSE) — SiliconANGLE Media operates at the intersection of media, technology, and AI. .

Founded by tech visionaries John Furrier and Dave Vellante, SiliconANGLE Media has built a powerful ecosystem of industry-leading digital media brands, with a reach of 15+ million elite tech professionals. The company’s new, proprietary theCUBE AI Video cloud is breaking ground in audience interaction, leveraging theCUBEai.com neural network to help technology companies make data-driven decisions and stay at the forefront of industry conversations.