of course I have read some threads about this “bleeding edge” for some people. So in my case I wanna set up networking eventually over “asyncio” but didn’t now who it is effectively usable in networking (sending, receiving or both?)
also to maximize speed for reading and sending of data I am glad to hear some tips.
and for those who wanna see my tests in multiplayer:
Don’t use an error flag. Just us break if you want to exit the while loop.
Don’t return inside the while loop. It means you don’t process more than one message per-function call, which probably means it seems like your game is lagging. You should try and handle all received data until the socket.error exception is raised, then return.
get it to work! thanks can you give me a hint for setting up for asyncio? (run_forever, run_until_complete) <- most suitable for this?
setting it up only for receiving or also for sending?
Asyncio is one option. I’ve not actually thought about whether it’s good enough for performant games. I suspect it’s probably ok for most users at this stage, but when you’re getting started, perhaps stick to using raw UDP sockets.