[ LiB ] |
Until now, everything in this book has been done in C++. Until recently, almost everyone in the game industry used C++; it's been the only language that provides the flexibility and the speed that games need to take advantage of every bit of processing power available at your fingertips. It's predecessor, C, is perhaps the most popular MUD programming language in the world, and for good reason. When the UNIX operating system hit, it introduced networking on a wide and flexible scale to everyone in the world, and what better to do with UNIX than to program MUDs? Consider that when MUDs became popular, C was by and large the only good language available for UNIX, and it was also the preferred language of MUD builders. C is dying, however. It will never be completely dead (look at CO-BOL!), but its days in the sunshine are coming to an end. Many would say that C++ is dying too, but I'm not sure where I stand on that issue yet. Within the past few years , flexible interpreted languages have hit the mainstream. Among the frontrunners are PERL and Python.
Python is the language that I have chosen to use with the BetterMUD, partly because I don't understand PERL (it's so UGLY!), and mostly because Python is a very simple, powerful, and elegant language.
In this chapter, you will learn to:
Install Python
Use Python types, functions, classes, exceptions, and packages
Integrate a Python Interpreter into C++
Call Python functions from C++
Call C++ functions from Python
Integrate Python into the BetterMUD
[ LiB ] |