Help with setting up a game based on GPS locations

Godot Version

4.1

Question

First I’m totally new to game development but know programming and I got asked to research the possibility to build an extreme simple ‘game’ based on GPS locations.

The ‘game’ will be in an actual corn field with a maze in it. The player (the person with a phone) walks in that maze and have to find a way to go to a certain GPS location in that field within a certain amount of time.

I have put an image together to show what I’m thinking of. The question is how can this be implemented in Godot? Can you give me some pointers? There are plugins to get the actual GPS location into Godot, so that’s not a problem.

you can check out this video, but it may be a little out of date.
Advanced Godot | Getting User Location In Android (youtube.com)

Thanks for the link. But I already are getting my current GPS position in Godot, so that’s not the problem. The problem is how to move the phone screen on the map and for that I came across https://www.youtube.com/watch?v=RlSpjIb7TLo so I slowly am getting somewhere.

Do you mind sharing how you’re currently getting GPS coordinates?

Hmm, I can only post 2 links in a reply, so here is another.

You can easily build an Android plugin with the help of the template GitHub - m4gr3d/Godot-Android-Plugin-Template: This repository serves as a quickstart template for building a Godot Android plugin for Godot 4.2+.

There are several plugins for this:

In the end, none of the plugins satisfied me, so I developed my own Android plugin to send over the location data and also the compass angle (yes I know, this is already in Godot but not in the way I wanted it).

But getting the location data isn’t the whole story, you also have to somehow display them in your game to move your character etc. I have done that by converting the location to UTM coordinates and by using a basepoint I can calculate the distance and apply a scale to it so the character is moving around in the ‘playfield’. That works pretty well for my situation, but maybe not for others.

Thanks for the links and quick breakdown! Appreciated :+1:

I found WolfBearGames implementation to be working well for me. The only problem is I’ll need to convert it from using gsm services to AOSP location api.

Here are the projects which I put together and the updated code for Godot 4.2.2+: