LoGaCulture / LUTE

LUTE stands for LoGaCulture Unity Toolkit/Engine. A Unity based tool to create narrative rich location-based games for the purposes of heritage preservation.
MIT License
0 stars 0 forks source link

Switching Locations On/Off #35

Open Jacki3 opened 2 weeks ago

Jacki3 commented 2 weeks ago

There will be times that games may need to be shut off or specific locations may need to be turned off in a specific experience.

Describe the solution you'd like We should offer a way to shut specific locations off and then orders/nodes that relate to that location will either shut off or use a backup location that derives from the location variable. These methods need to be highly accesible and robust to work with an api hook that will be managed by server-side functions.

Additional context Start with a backup list and a way to query which nodes/orders use a specific location then have an option to use the backup location or switch off entirely; finally implement a way to switch the whole game off based on these queries.

Jacki3 commented 2 weeks ago

One can use the IsWithinRadius method in SpawnOnMap which can determine if a location (a string of lat/lon) is within a radius given the centre of that circle and the radius in meters. We then need to build backup locations which will be stored in Flow Engine that will be used if the given location is within the radius. Otherwise, nodes/orders or games can be shut off if location is within radius without a backup; need to hook this into web services and build web app for this work nicely.

Using a custom API should allow other devs who do not use LUTE exclusively to do the same if they wish.

Jacki3 commented 1 week ago

Need to build a 'LocationBackup' variable which uses a a location and another unique location (or list of locations) which will then be given to our web API that returns a usable location or not - Unity then handles logic based on this return.

Jacki3 commented 1 week ago

Implemented the LocationBackup variable and editor.

The issue with the editor and using a custom property drawer is that the list of locations to be built looks a bit untidy in this fashion. It will work but the ideal solution might be to create this list seperately (on another object which can be a prefab) so this can be duplicated across locations without recreating the same list (I suppose this is 'first class' location lists).