How to include a points screen on yo web game | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to include a points screen on yo web game

Web

27th Nov 2020, 11:10 PM
Naj Oel
Naj Oel - avatar
2 Answers
+ 1
If you want this for a JavaScript game and just to show points for the current user, a dialog should work. You could show a div with position: fixed that overlaps the other content. The points information could come from whatever way you collected it. If you want to get points from other users, you'll need to make an API or access a shared database of some kind. In Sololearn's Code Playground, many people would use firebase. If this was for a game you're more serious about hosting, I'd create more serverside functionality so users sign up, sign in, and control access to the database better than trusting every client to do whatever they want with a firebase database.
30th Nov 2020, 9:48 AM
Josh Greig
Josh Greig - avatar
0
Thx
30th Nov 2020, 9:52 AM
Naj Oel
Naj Oel - avatar