How do I emulate / simulate Geolocation?

Get help using Construct 2

Post » Wed Mar 29, 2017 10:18 pm

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?
B
6
S
1
G
1
Posts: 14
Reputation: 878

Post » Wed Mar 29, 2017 11:53 pm

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 ?
B
6
S
1
G
1
Posts: 14
Reputation: 878

Post » Thu Mar 30, 2017 12:18 am

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.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Thu Mar 30, 2017 12:31 am

oosyrag wrote: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!
B
6
S
1
G
1
Posts: 14
Reputation: 878

Post » Thu Mar 30, 2017 12:56 am

Construct.net, it is web based. You'll also get the first year for free if you got c2 recently.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Thu Mar 30, 2017 11:48 am

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.
B
6
S
1
G
1
Posts: 14
Reputation: 878

Post » Thu Mar 30, 2017 7:30 pm

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.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Fri Mar 31, 2017 10:41 am

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.
B
6
S
1
G
1
Posts: 14
Reputation: 878


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Nicolas951, tarek2, Yahoo [Bot] and 9 guests