Geolocation for Desktop

In my recently finished Ludum Dare Game, the level that you play is determined by your geolocation. In other words, as you walk around the world, the game presents you with sligthly different levels.

Calculating an user’s location was reasonably straightforward on Android, but I had no idea how to implement it on the Desktop. The basic idea is to get an user’s IP address, then access some sort of geolocating service to get the location data from that IP address. But how to do it, and what geolocating service to use?

There was this very cool Ludum Dare Entry that used Geolocation to show the location of all participants. Better yet, the source code for that was pretty easy to grok. Diving into the code, I found out that they use a service called “Geolite2” from “Maxminds”. Link diving brought me to this page, which has pretty much all the info that I need. In the short future I will be able to update my game to read your location even from the Desktop :-) (I hope!)

If you want to play my game “GeoQuest”:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.