I'm trying to get an understanding for how to configure a backend of an online videogame (arcade-module).
Asyncio is relatively tangible for me, I think I just need to play around with some test examples to see what the module can do.
But I'm having a harder time reasoning around WebSockets and how to combine the two.
Most tutorials start off fine, but suddenly jump "...Now I'm going to paste this pre-written code" - and you've successfully lost me.
So now I'm looking for any golden gems to help me achieve this, your help finding these would be very appreciated!
#๐ Golden Gems for learning (videogame) networking with WebSocket and Asyncio?
14 messages ยท Page 1 of 1 (latest)
@hot willow
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
i would start by devising a protocol between the server and the clients
the way you send data to your clients is a web socket
you use websockets with asyncio by using a websocket library that supports asyncio
like websockets
!pypi websockets
Will the game and the back-end be expected to communicate over the internet?
I dont recommend opening up your server to the internet with just webscokets. Just a warning to be careful when opening up anything to the internet. There are bots that search the web for common vulnerabilities.
You could use SSE instead of websockets. They're generally a bit better because they can be multiplexed over a single http2 or http3 connection
This looks pretty helpful
https://www.youtube.com/watch?v=2SMkk63k6Ik
Caleb Hattingh
https://2018.pycon-au.org/talks/45332-multiplayer-2d-games-with-python-arcade/
The Python Arcade library makes it very easy to create 2D games--especially for beginners--and there are many examples provided with the package. This talk will show how to make a multiplayer computer game using Python Arcade, both over a local netwo...
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.