Adventures in AR: Introduction
![]() |
| I can see my house from here! |
During my third year at RIT I took a web apps development course. For the final project, we had to create an app utilizing Google Maps. Naturally, I tried making a game out of it. The idea was pretty simple: the game would mark different types of locations in the vicinity and the player would "loot" the locations for supplies. My intention was for the world to be post-apocalyptic, but it took some imagination considering the player was staring at Google Maps with crappy icons slapped on top. I didn't even end up finishing in time for the deadline and had to cut a lot of features, but it got me interested in augmented reality games.
Keep in mind, this was a couple years before Pokémon Go came out. When PoGo hit the scene, everyone became interested in AR. It was awesome to have so many developers working with the technology. I mean, it sucks that a whole lot of people were trying to cash in on the fad, but there were a still plenty of people sharing ideas, techniques, and code. I hadn't done much with AR, but recently, I came across an article featuring a Pokémon Go clone made with OpenStreetMap and Unity. I was intrigued. I gave the article and related posts a once over, dug through the code, and decided to take a stab at my own little AR game.
I decided to go with an HTML5 game, mainly so that it could be played on mobile without me having to actually build and distribute an app. I also really enjoy working on web games, so there's that. But of course even when making a web game, I opted for Haxe, my latest language of choice. Unfortunately, most of the existing Haxe game engines I've worked with are not all that great for web games. I considered creating a small engine for working with the Canvas API, but I really didn't want to burn myself out on some kind of a pre-project project. Luckily, some wonderful internet person set up all the externs for working with Phaser in Haxe, which worked out beautifully. There was something kind of amusing to me about using Haxe to build a Phaser game.
With the code from the article as a reference it was easy enough to get the map data rendered. With a good bit of fiddling, I got to the point where the map loading and GPS aspects of the game were basically complete. Feel free to take a peek at the source code and see what I've got so far.
Wow, I don't think we've ever gotten through a project's history in a single post. There's a first time for everything, I guess. The post is a bit shorter and probably more scramble-brained than usual, but this project is fairly recent and I don't want to get bogged down in where I've been. It will hopefully be much more interesting to look at where I'm going. Next time we'll talk about the actual 'game' part of this AR game.
