I’m trying to write a multiplayer card game for a friend. I want to make it simple enough that they (who are new-ish to Python) can easily understand the code, while still being fully featured.
I would like to have multiple clients connecting to the server, and it was my idea to send “messages”, which are JSON. As the messages arrived, they were appended to an “ID”, and then put in a queue, which is a list. The game engine code could just pop off messages, process them, and then append messages to the outgoing queue.
I was wondering what the easiest way to implement this would be, or if there is a simpler way I should be considering.
I’ve seen some people using socketserver, others using asyncio, and some people using threading.