Add real-time player count to the playersOnline variable on the Play page
Summary
Right now, src/pages/play.astro uses hardcoded numbers to show how many players are online. It works, but it doesn’t really reflect what’s happening on the server. Since there are already ways to fetch visitor counts with an API, it would be much nicer to show the actual numbers instead of placeholders.
What I’m Suggesting
Let’s swap the static value for a real-time player count pulled from an API. That way, the Play page feels more alive, and people get a more accurate sense of activity on the platform.
Why This Would Be Great
- Shows real, up-to-date activity instead of a fixed number
- Makes the Play page look more professional and engaging
- Gives users a better idea of when others are online
My suggestion to fix this
- Pick or set up an API endpoint that returns the current player count
- Replace the hardcoded value in
src/pages/play.astro with data fetched from that endpoint