How do I emulate / simulate Geolocation?

0 favourites
  • 8 posts
  • I am trying out the Geolocation plugin and use the Chrome Device Tool where i can change the geolocation - but it does not work with my game.

    I have set up a simple text sprite where i want to write the geolocation in but the result is 0 (what afaik means that there is no geolocation found).

    What am i doing wrong?

    I tried the ripple Chrome plugin but that did not work either.

    Do you guys build a game and upload it to your device to test it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, i found out that is is based on the "Secure Origin" policy that Google started a few years ago.

    This makes testing of my game a real hazzle, because i manualy have to set up the 192.xxx.xx:5000 address whenever i start chrome to be secure.

    Has anyone had success with this?

    What is the most easiest way to test a GPS connection with Construct 2 ?

  • Maybe preview on LAN with WiFi?

    Or try it on the Construct 3 beta that is running right now, since you'll be able to use C3 on your phone.

  • Maybe preview on LAN with WiFi?

    Or try it on the Construct 3 beta that is running right now, since you'll be able to use C3 on your phone.

    I just bout Construct2 a few days ago - haven't seen that there is a 3rd version popping up.

    Thanks for the info!

    Where can i download it?

    Greetings from here!

  • Construct.net, it is web based. You'll also get the first year for free if you got c2 recently.

  • Thanks for the information.

    But the main question is if native API support can be tested right away or if you have to compile/build the game first.

    What i have found last night is this:

    1. i create my game with construct 2

    2. i export my game to a folder (takes about 2 minutes) for mobile via the Cordova option

    3. i start the Phonegap Desktop application so that i can test out live my game

    The problem is when i need to change anything, i have to restart everything from the first step

    It would be awesome if you could have some kind of "live preview"

    Thanks again and greetings.

  • The live preview is web based, but should be fine for testing. If you specifically want to test the Cordova export, you'll indeed need to export each time.

  • Thnks oosyrag for that info.

    As i mentioned on an other post, the problem with the web-based live preview is that Google Chrome does not support

    unsecure origins for the Geolocation. I have seen that i can set up a "whitelist" containing my IP, but that is nothing that

    an amateur like me realy would love to do, as it sounds a bit difficult.

    Do you know if the live preview on mobile will be possible with Version 3 of Construct?

    Greetings and thanks.

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