XNA and geospatial data

xna exampleSo, now that our conference presentation is over, I thought I would tell a little bit about what I have been working on for the last few months that has eaten into my blogging time, among other things. After we finished our prototype virtual world last spring, recreating historical Morgantown, WV in ArcScene using SketchUp models and GIS data layers, we realized that we were about at the max of the functionality we could leverage. I started looking at other ways to combine 3D reconstructions with embedded data delivery, and read about Microsoft’s free game development environment, XNA Game Studio Express. Now, when I say free, there are some caveats, because you have to have a computer that’s capable of running some pretty powerful graphics and there are some restrictions on use. You also do need some coding experience to get up and running quickly, but you don’t need to be a full-time developer to pick up the necessary skills. Finished games can be run on Windows or on the Xbox 360 console, and using the game framework opens up all kinds of possibilities for amazing graphics and interactive functionality.

So, what is our project? Basically, we are working on utilizing geospatial data (and eventually spatial analysis functionality) within a virtual environment. Microsoft’s XNA Framework provides libraries and tools that handle many of the more difficult tasks in developing a video game, such as keeping track of time, updating and drawing as you move around, navigation functions, etc. Plus, the templates and samples that are available at the XNA Creators Club site are really helpful in getting you started, along with resources that individual developers have made available online through their own websites, such as Riemer’s tutorials. Using these resources, we have created a virtual microworld of downtown Morgantown c1900, and utilized the XNA functionality to add day/night changes, fog, and even weather (just rain so far) through a 3D particle system. We’ve only just begun to look at the physics capabilities, such as water with volume, advanced collision and interaction between objects, and will be adding more functionality related to that over the next few months.

Why do all this, then, when you can buy a video game? Basically, because our focus in this project is on how you can recreate and explore places from the past, especially when you are trying to get at those intangibles that make a place, such as the physical environment, the sounds and even smells of that place. GIS is about representing the world digitally, but has traditionally used layers of abstraction where a 2d map-based interface represented real-world features. Now we have the hardware and software capability to move increasingly away from abstraction and toward more realistic digital representations, and to move beyond only the visual. In the entertainment world of video games, developers and marketers understand, I think, that realism makes for a more satisfying experience (and thus more profitable game) and they are spending the money and effort to push the technology to ever more amazing results. On the professional and research side, I think many of us still don’t take these technologies seriously for their potential opportunities, maybe because the word “game” or “gaming” makes it seem frivolous. However, just the work I have done so far, and I have a long way to go yet before I have a finished product, has really convinced me that this is worth pursuing. Clearly some of the work that is being done related to VirtualEarth 3D and Google Earth, as well as Second Life and other virtual world ventures demonstrate that interest is building.

However, beyond the wow factor, the key to our project is the connection to the geospatial data, and it’s one of the reasons why I went with the XNA Framework. Since I’m already familiar with .NET, and I’ve done my previous work in custom .NET based ArcObjects stuff, it was easier for me to pick up C#, which is the language that the XNA Game Studio Express uses. I’ve already been asked a few times about why I haven’t gone with OpenGL, since XNA is DirectX-based, and my answer is that we’ll probably generate an OpenGL version, but the learning curve for that is much steeper for me, and with XNA and C#, I had a basic prototype up and running in a couple of days. The plan is to link our virtual microworld with data from our GIS spatial databases, and embedded representations of that data at locations within the world. We’ve already been successful in doing that with historical photos of specific buildings and with audio. So, to end my ramblings for now, I will bring you updates as we add functionality, and post some video of the game in action. And, I would add, if you are thinking about how 3D visualization and simulation might help you in your work or research, take a serious look at some of the gaming development resources that are out there, because the barrier to entry is lowering all the time, and the power of some of these technologies are amazing. We won’t really know how useful these tools can be until enough people start using them for applications from a wide range of disciplines and industries.

2 thoughts on “XNA and geospatial data

  1. I am a software developer in Charleston, WV working on a GIS intensive application. I’ve been asked to do a lot of different research, part of which involves XNA and how we might use it. I would really like to get in touch with whoever posted this…

Comments are closed.