Geolocation

0 favourites
  • 15 posts
  • I would like to request a new feature, GeoLocation

    http://tutorials.html5rocks.com/en/tutorials/geolocation/trip_meter/

  • What do you need this for? While it's kind of cool, I prefer not to develop features unless there's a specific need.

  • well you could develop a location based games :)

    also, do it yourself Joannesalfa, its very simple javascript with calljs plugin, or in phonegap / appmobi.

  • geolocation based games would be a cool feature to add to construct 2s list of capabilities but i also see how a plugin can be written very simply for this since its all javascript anyways maybe post a plugin idea in that thread

  • Since accelerometer is a feature for control already.

    Taking advantage of something like location services sounds awesome.

  • I tought about browser plug in can integrate geolocation, then 3rd third party plugin would be awesome

  • Since browsers reach so far geolocation could come in very handy. Some places ban certain things. If a game has a ban on say alcohol or mature references then it might be wise to have a separate layout with those references removed. Some areas don't allow certain payment types, the list goes on. I'll be using facebook graph to determine what language is shown, however people without Facebook integration could utilize the location to determine language. :) I'd definitely call adding it a positive. :)

  • Hi,

    Digging up an old thread :)

    I'm currently trying to develop a geolocation based game with Construct. However I'm struggling to implement a working solution.

    I tried using the ExecJS function in the Browser object to run the geolocation feature but I don't really know how to store latitude and longitude values into C2 variables.

    Here is my script so far (excuse the messy solution used, I've never used javascript before and I tried several things but always get returned zero in my latitude variable, I'm not even asked for geolocation permission)

    Browser.ExecJS("

    var position;

    function getLocation(p)

    {

    if (navigator.geolocation)

        {

        navigator.geolocation.watchPosition(function (position){

    "&Text.latitude &"= position.coords.latitude; }

    );

        }

    }

    ")

  • Manfred - it's on my todo list to add an official geolocation plugin. You should probably wait for that, or if you're desperate, use the Javascript SDK yourself - the ExecJS expression is entirely unsuitable for this type of thing.

  • Thanks Ashley,

    Great news to hear an official plugin is coming :)

    For now I'll try to cook my own plugin to see how the Javascript SDK is working and quiclky test a basic geolocation feature.

  • You can check out here for a decent starting point for a geolocation plugin:

    link

    It's still rough around the edges, but it believe it'll save you some amount of time.

    Cheers!

    edit: to see what i've added to the Podes version, check this link: link

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • JohnnySheffield

    Thanks that looks cool, I'll give it a try very soon, for now I'm getting my hands dirty to get to know the SDK.

  • Official Geolocation support would be awesome. I've also been developing Geolocation game ideas, but had to use Unity at the moment as using the Google API has been sketchy. Would much rather use Construct.

    Geolocation games are a growing area, with some great possibilities. Google bought out the 'Ingress' dev team, now a huge success - they clear see this too.

  • Great job Ashley for geolocation support in R134, it works perfectly fine compared to my messy plugin!

    Awesome!

  • Hi there,

    I'm having an issue with the geolocation plugin in r134, everythings works fine but the heading property. It's always set to "0" although it's giving correct orientation in Google Maps.

    I've tested it on several android devices with the same result.

    Does anyone manage to use it properly?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)