mkypub Posted February 21, 2023 Posted February 21, 2023 Good morning, I am looking for a code where I can make an online query on the website how many players are currently online, who has something like that by chance ? or can anyone give me a tip ? Greetz.
IonutRPG Posted March 1, 2023 Posted March 1, 2023 Hi What can you do easily is to: 1. Create a table either a new variable into an existing table with name "currentOnlinePlayers" ( or whatever name you want to give to it ) 2. Update using a query ( MySQL in my case ) every time a player logs in.. 3. Get that value using a query into your web application. Pros: You have it, the viable solution, but it's doable at least as a first POC ( proof of concept ) / MVS (minimum viable solution) Cons: It doesn't update asynchronous, using a thread - player needs to refresh the page to see latest update from database.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now