So in my game, I want to have a leaderboard of all of the users and show who has the most of each stats. So how would I be able to do this?
You'll need a server - you can use a python / nodejs repl for that
- Use HTTP requests to make updates to the leaderboard from your main game site.
- You'll probably want a database (you can use replit's built in one) to store the leaderboard stats.
A server is a computer (program) that handles requests and "serves" files, it has connection to the database. A client should not have a direct connection to the database (anyone would be able to modify the data; its stupid). A server / client can communicate with the other using HTTP requests.
Client - what the user sees, your game
Server - a computer (program) that provides information to the client. It handles things like user authentication, and storing data. Users don't see this.
HTTP requests - a protocol used to structure requests over the internet. It is used for the client and server to communicate.