I'm building an XP meter for RPG games. And I have this layout where I can set values to the players XP and put their names in there. And I want the players to be able to see this on their computers or on their phones and tablets. It's already online here:
I have this admin screen where I can set the values, and the default screen is just showing the values without the controls.
The problem is that if I log in and change the values, it loads my values. But others can't see this in their browser. They don't see the meters and names. It looks like it saves the values locally on my PC or in my browser or something. I was hoping it would still be visible since I put it on the webserver.
I really want to make changes in the admin panel, and others should be able to see the changes on their device when they visit the page.
Does anyone know how to do this? :/
Develop games in your browser. Powerful, performant & highly capable.
The values are indeed saved locally on your (user's) device. The game client is also downloaded locally on each user's PC, and run using the capabilities of each user's system, even though they got it from a website.
You'll need some way to communicate the data of interest to your server PC, and a way to get data from the server. A common way to do this with a web server is through AJAX, PHP, and MySQL.
Another way to do it (probably not what you're looking for) is to have peers connect and communicate directly with each other (through a host), through something like the multiplayer plugin. However data normally isn't persistent with this method either, unless you have a way to keep a dedicated host up. The dedicated host would handle storing, retrieving, and syncing data with connected peers.
Ah I see.
Ok atleast I have SOME options in this then haha. Thanks a lot for the info! I'm gonna look around and see what works best for my situation :)