Sign In Register

How can we help you today?

Start a new topic

Location Based Game in GameSparks

Hi GameSpark Community and Support


I am looking into GameSpark as my backend as opposed to my custom implementation. Sorry for the long post, but I think more information is useful for precise answers.


I am implementing a location based game with unity, Mapbox SDK and I came across GameSpark. Before finding GS I was at first coding the backend myself (websockets, node, mongo). Now I have a few questions which I need to know before continuing with GS and would be greatful for any inputs:


I need to save various location based information:

- location of the player

- game object IDs of things near* a player

- interactions of players with location based game obejcts

- images taken from a users mobile phone

- Metadata of the images (lat, long, rotation, description, timestamp)


* near means that I should be able to query everything in the current view of a user. Web maps mostly use tiles of 256px X 256px with slippy map naming convention e.g.: www.myawesomegame.com/{zoom}/{x}/{y}


Now my initial idea is to have a GameDataType of mapTiles with 3 indexes (Zoom, Lat, Long). This "collection" will contain the attributes and the coordinates of the gameobjects (e.g. zoom, lat, long, gameobject type, healthpoints, description, resources...). 


When a user logs in the current gameobjects in the users vicinity will be loaded. Then to make the game seemingly realtime, for every map tile a "gamespark team" will be created with a unique name (zoom-lat-long). This will enable me to update the game in real time if users interact with objects (user 1 attacks a building --> message is sent to GS --> Gamespark updates the object attributes in the mapTiles GameDataType --> Gamespark sends out a message to all other users in team aka. in the current area of user 1 --> other users game display is updated e.g. building has lower healthpoints)


Another very important feature is that users can upload images and image attributes (like in Ingress when players create new portals).


And lastly, my aim is to use the game in a research context and thus need to be able to export the data for analyses.

My questions would be:

- Is the proposed way of making teams per geographic area a good idea or how would you handle this?

- Is there a limit on how many documents can be retrieved in one query (the number 100 seems to be floating around)? How would I then go about loading game objects in the vicinity of a player if there are more than 100, with multiple messages?

- Will GS allow saving of GeoJSONs (I guess so because its basically just a json)?

- Will GS allow spatial queries again (I saw it was once possible)?
- Can I upload images to gamespark (I saw this should be possible)

- Can I export whole datasets such as all images, all location based game object attributes etc.? Or only through custom scripting? 


Implementing this would be pretty straight forward on a custom node server, but GS offers a lot of useful features out of the box...


Thanks a lot for any inputs and suggestions, would really be appreciated!


1 person has this question
Login to post a comment