Im facing a problem in my browser game, its a risk style game, so i have regions with colors after who owns it.
Each path line of this svg data is stored in the database with a unique id, and the class is created by "faction" and then the unique region ownership added after from 1-5 which dictates the owner.
When a region is captured, the region ownership changes, and if the page is refreshed, it will have the correct color, but this is obviously not gonna work with up to 200 regions changing all the time, the page would have to refresh constantly.
The class is here:
And the regions look like this:
So question in short.
How do i update a class in real-time to all clients on the page?
Thank you so much in advance
Aucun commentaire:
Enregistrer un commentaire