Enterprise Edition... Space Invaders?
What do you get when you cross business logic and 80s arcade video games? An open source Space Invaders clone that's being used to illustrate the power of a business logic integration platform for game design.
Chris Lewis, a Ph.D. student working on "the intersection of software engineering and video game development" developed a clone of Space Invaders in Java, and broke out the game logic for Space Invaders into a rules engine. The point? To illustrate how you can create a specification to give to programmers that's easy to read and debug:
The magic of Space Invaders Enterprise Edition is actually under the hood. I've separated out the game logic from the Java source into a file parsed by a rules engine. This means we can easily view the game design, without it getting muddled with too much implementation code.
Rule engines are commonly used in enterprise-level companies to decide things like how much your car insurance premium will be. Let’s start using this for something more fun!
His post breaks out the rules for Space Invaders to be read by Drools, and also shows the original code for zapping aliens. The Drools code is easy to read, even for non-developers. The original Java code? Not so much. The Drools engine wasn't originally designed for such shenanigans, of course, but Lewis makes a strong case for expressing game logic as rules to be implemented by game developers.
Lewis is working on a related project called Zenet, which is trying to provide monitoring and repair for software systems. The work Lewis is doing focuses on games, but the project is also being explored for software engineers working on fault-tolerant systems. The Zenet page describes it as "exception handling for an entire system's operation." Wouldn't that be interesting, both for games and enterprise systems? Zenet isn't far along yet, the Zenet Project site only offers stub pages for downloads and documentation, but it's worth keeping an eye out.
In the meantime, you can get Space Invaders Enterprise Edition as a cross-platform Java executable. Enjoy your retro gaming experience, and tell your boss that you're contemplating rules engines to streamline those TPS reports.
Joe 'Zonker' Brockmeier is a freelance writer and editor with more than 10 years covering IT. Formerly the openSUSE Community Manager for Novell, Brockmeier has written for Linux Magazine, Sys Admin, Linux Pro Magazine, IBM developerWorks, Linux.com, CIO.com, Linux Weekly News, ZDNet, and many other publications. You can reach Zonker at email@example.com and follow him on Twitter.