Games are good, but algorithms are awesome.

We've spent many nights writing proofs on edges and vertices, and too few nights making things out of them. At Penn Play, we felt that we could bring some exciting aspects of theory into the game world. MARS WARS gave us the opportunity to do just that, combining complex game mechanics with elegantly simple play. We based our game on a homebrew implementation of PageRank. Here's how.

This is Mars. No violence on the Red Planet, please.

The player at first sees the red landscape of Mars, with 1 lonely base city. Eventually, the player creates a network of trade routes between cities. They can see which cities grow in power, and why. Eventually, their goal is to take over the cities of the opposing player through economic influence and assimilation.

Why PageRank

As the player creates a graph of cities and 1-way trade routes, our algorithm calculates the economic influence on each of the nodes in the graph. At some point, the player's opponent will create an edge to one of the player's cities. This makes the player's city stronger! However, once the player's opponent is influencing the player's city more than the player is, the city is assimilated to the opponent. Brutal, complex economic warfare through PageRank. You have to help your enemy in order to beat them.

Transmission and Display

We loved implementing the theory behind this project from scratch. We also loved the challenge of developing for the web, determining efficient protocols for communication between players and the server. Creating a visual experience from scratch in javascript that expressed the complexity of the game with a sci-fi feel, we hope players will have fun scratching their heads as they take and lose cities, and come to a better understanding of the algorithm that ranks the web.

Thanks

While this was a two-hacker project, we could not have created something this fun without the official soundtrack, written and composed by Daniel Durham, and custom art, courtesy of Eric Quesada.

Share this project:

Updates