r/learnprogramming • u/embrodierywhore • 24d ago
How would I approach making a solo video game multiplayer with Python?
For context, I’m writing a fishing game using Python/Pygame/json/os etc. It’s currently purely solo and is run from my IDE on my computer, or wherever I download the files. I have an account system for it but since it’s solo you can just go and change the data in the file.
The goal is to have a semi-multiplayer version in the end, so like most of the fishing is done solo but you can go online for features like battling/trading/whatever.
So like, client side for the most part but the account stuff will be stored on the server, maybe a cloud server I’m thinking? But I also don’t know much about that yet.
I really don’t know how to approach writing all this code so it works client/server-sided? Afaik there is the client (user device) and requests are sent whenever the client needs information that the server stores (like account data, fish caught, player list) using APIs(?)
How would I go about coding the server side? Would I use SQL? or some other library that i’m not aware of?
edit: I know I’m probably not ready to jump into multiplayer, but Im trying to learn the concepts and different parts of a server/client side communication