Basic networking with Pygame

后端 未结 5 1817
不知归路
不知归路 2021-01-31 19:32

I need to do some basic networking for a Pygame project.

Basically, it\'s a 2D single player or cooperative game. The networking only needs to support 2 players, with on

5条回答
  •  日久生厌
    2021-01-31 20:01

    You can use Twisted for networking with PyGame. The "game" project on Launchpad has some examples of how one might integrate the main loops together; basically, use twisted.internet.task.LoopingCall to draw PyGame frames and handle input, while letting the Twisted reactor of your choice run normally.

提交回复
热议问题