I have a game working in a browser on local host. I have the same game in a mobile android version.
What i want to do is make sure some data are synchronized between the very same website game and android game. The data is in the array in each game.
thus, any time the user makes any changes in the data stored in the array on the website, i want that data to be changed automatically on the android version of the game, and the other way round that is once the user makes changes in the data stored in the array on the mobile version of the game, i want that data to be automatically changed in the website version of the very same game.
What is more, i want to make it as simple as possible preferably using front end only without resorting to a server side.
My goal is to make it work for any and every user using both the website game and mobile version of the game. I assume i will most likely need some unique keys allowing to identify each game pair too. I have no idea how to do that since one game will be pretty much the same sitting in a browser, and the other game should be downloadable from google play for instance. Then each game will have to somehow communicate with its sibling. PLEASE HELP!
please be kind to give me a detailed explanation, ideally some code for reference.