Chapter 10. Twisted networking
This chapter covers
In this chapter, we’ll be revisiting the adventure game you wrote in chapter 6 and extending it so you can log in and play it with other people via the internet. Normally these games are referred to as MUDs, which stands for Multi-User Dungeon. Depending on the person creating them, MUDs can range from fantasy hack-and-slash to science fiction, and players can compete or cooperate to earn treasure, points, or fame.
To get you started quickly, we’ll use a framework called Twisted, which contains libraries for working with many different networking protocols and servers.
The first step is to install Twisted and get a test application running. Twisted comes with installers for Windows and Macintosh, which are available from the Twisted homepage at http://twistedmatrix.com/. Some versions of MacOS ship with Twisted already installed, in which case it’s easier to use that version. If you’re using Linux, there should be packages available through your package manager.
The installer will pop up a window as it compiles things, but once you see the window on the right in figure 10.1, Twisted is installed!
