'Running pygame with other threads
I'm creating a simple online game in pygame as part of personal project, basically, I've got a main class called Client, that loads some information such as ingame configuration, pygame config, etc... at the end I'm calling one my fuctions to run the network, I'm using sockets and starting two new threads, one for listening and one for sending information into the server, after that i start the pygame mainloop. It all works fine, the problem that I'm having is that when i run the game without calling for the network it run at it's maximum fps, now when i start the network threads I tend to lose about 20 fps.
I was wondering if there is a better way of doing it, as I only know of threads, and recently heard of multiprocessing but I am not entirely sure what the differece is.
I appreciate any help given, Thank you!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
