Sowing Real Geography in Online Gaming

Location-Based Agricultural Game Makes GIS a Central Component

Each time a player performs an action that everyone needs to know about, the game server instantaneously pushes that information to the other players.

Each time a player performs an action that everyone needs to know about, the game server instantaneously pushes that information to the other players.

In the map-based board game A Complete Tour Round the World, devised by English mapmaker Thomas Jefferys in 1770, factual geographic information was key. As players moved their tokens around the map, they were required to read aloud a description of each place on which they landed, lending the game a strong educational element. But in the more contemporary strategy-centered board game Risk, wherein players try to seize territory from one another, the game's geographic content is quite disconnected from real-world geography and the populations that actually inhabit the six continents depicted in the game.

Thinking about this encouraged Ola Ahlqvist, an associate professor in the geography department at Ohio State University (OSU), and his colleagues to see if they could develop tools that others could use to create location-based learning games that made geography—and GIS—a fundamental component for game players.

"This all began back in 2007 as an independent study project by an undergraduate student [who] wanted to create a computer-based game that involved the building of railway lines to specified locations in Canada—similar to the popular Ticket to Ride board game," said Ahlqvist. "We decided to see what would happen when we infused small pieces of real information into the game we were developing. For example, if you tie the gross domestic product or the population to a country that is depicted in a board game, you will have a much more realistic view of the actual potential for the development of a railway or success in invading another country, as the case may be."

And so GeoGame—a simulation framework for games of strategy based on the ArcGIS platform—came to be.

An Open Communication Framework

With the vast collection of maps and databases available online, Ahlqvist began creating a prototype to test whether or not a game could be played in real time on an actual online map. Students involved with the project built APIs to demonstrate the concept. Ultimately, Ahlqvist received a two-year grant from the National Science Foundation to study how to implement GIS technology in the online gaming environment for educational purposes.

Random events like pest attacks are embedded into the simulation.

Random events like pest attacks are embedded into the simulation.

"What we wanted to do was build the framework for developing real-time online games on top of a true GIS so that we could use actual data with the processing capabilities of the geospatial toolset to create simulations, which are very much like games," explained Ahlqvist. "You can simulate hydrology, for example, and say, 'Okay, let's see what happens if it rains more. How would that affect the flooding downstream?' That's a simulation. It doesn't have a gaming aspect to it. But if you insert something like a competition for resources and how downstream flooding affects those resources, then it can become a game."

The development team—which is now made up of OSU faculty members and graduate students in geography, computer science, physics, and education—constructed a web-based platform that runs a massively multiplayer online game (MMOG) on top of ArcGIS to create a learning environment that allows users to interact with real-world data and simulation models. The computing environment includes two server applications: ArcGIS Server maintains the GIS data, while the GeoGame web server handles the game transactions.

"The game server constantly listens to the clients or game players," said Ahlqvist. "It's almost like an open channel that we created between the game server and the players. So every time a player performs an action that requires everyone to know about [it], the game server instantaneously pushes that information to the other players."

But this kind of open web communication was revolutionary when Ahlqvist and his team first started developing GeoGame—before WebSockets, which makes open communication between a user's browser and server, became an accepted standard.

"Our development team had to figure out how to do this because there were no APIs available for ArcGIS that would perform this function," said Ahlqvist. "Usually, when you send a request to a server, you send it, it is received, and then the communication loop is automatically closed. In our software, it was important to have a continuous two-way communication to push any updates caused by one player's action from the server to other players so they can act on it in real time."

The developers used ASP.NET's SignalR library to instantly communicate any changes from the server side to all the connected clients. Now, the newer stream services for ArcGIS could provide similar functionality.

The simulation gives players a sense of what life is like for farmers in places like Indonesia. (Photo courtesy of Ola Ahlqvist.)

The simulation gives players a sense of what life is like for farmers in places like Indonesia. (Photo courtesy of Ola Ahlqvist.)

Where Geography Is Real

The prototype game that Ahlqvist and his team ended up creating is called Green Revolution. The idea for the content came from an OSU instructor teaching a world regional geography course who thought that the variables available in GIS could help her students analyze agricultural trade-offs. As the name suggests, the team based the game on the Green Revolution, an initiative from the mid-twentieth century that increased agricultural production in the developing world using techniques such as planting high-yield cereal crops, using chemical fertilizers, controlling water supplies, and practicing new cultivation methods.

"We developed this simulation to give players a real-world challenge and a sense of what life is like for farmers in the developing world," said Ahlqvist. "Players take turns, and each determines what to do before every growing season. Should you take your cash and buy fertilizer, buy enhanced seed, maybe invest in irrigation or mechanized labor? Or should you save your money for a bad year when there's a drought or a pest attack? Random events like this are embedded into the simulation."

Since GIS is a fundamental component of the game framework, players can purchase actual parcels from a real map. This leads to some interesting cost analysis, according to Ahlqvist.

"For example, if you buy land close to a water resource, it would be cheaper to irrigate than if you are far from that river and have to install long lines of irrigation pipes," Ahlqvist said. "However, the land further from the water source may be cheaper to buy. We implemented a simpler water model with actual water flow to add another dimension to the game."

The team also built social impacts into the game. For instance, players can determine the family structure. If an entire extended family lives together on a farm, there are more helping hands, but the land also has to support a large number of people. So players have to take that into consideration when making their purchases.

"We can add similar processes if we wanted to calculate the market value of the harvested crops, as well as other simulation models, because they are designed in a modular way and the game employs a true GIS," Ahlqvist explained.

The development team made the GeoGame framework highly adaptable for different locations and scenarios, so different feature or geoprocessing services—such as climate, soils, water resources, demographics, weather, traffic, and social media—can be added to the game rules.

"I believe that [the GeoGame framework] has great potential for analyzing interdisciplinary topics in education, research, and policy making through its use of the geospatial perspective," concluded Ahlqvist.