Book Layout

[ LiB ]

This book contains four major sections:

  • Part OneThe Basics

  • Part TwoCreating a SimpleMUD

  • Part ThreeCreating a BetterMUD

  • Appendixes (on the CD)

Part OneThe Basics

The six chapters in the first part of the book deal with all the topics you need to understand to program the two MUDs in the book.

Chapter 1Introduction to Network Programming

This chapter teaches you most of what you need to know about computer networks, how they work, and how they are used.

Chapter 2Winsock/Berkeley Sockets Programming

This chapter covers the Winsock/Berkeley Sockets API, which is the defacto standard when programming network applications in C++. It's a relatively old API, however, and you may find yourself annoyed at how many simple little tasks require lots of code. That's why Chapter 5 exists.

Chapter 3Introduction to Multithreading

Multithreading is a very important part of network programming, since you can never be sure when networks are going to work reliably.

Chapter 4The Basic Library

This chapter shows you all the classes and functions that are within the BasicLib library that I made for the book.

Chapter 5The Socket Library

Because programming in the original Sockets API is incredibly frustrating, I decided to make your life easier and create a socket library that wraps up most of the functionality into simple-to-use classes. The SocketLib uses the TCP Internet protocol exclusively, but that's fine, since MUDs almost always use TCP anyway.

Chapter 6Telnet Protocol and a Simple Chat Server

This chapter teaches you about the Telnet protocol, which is the most often used in MUDs, as well as how to create a simple Telnet-based chat server using the SocketLib from Chapter 5.

Part TwoCreating a SimpleMUD

These four chapters explore the creation of the SimpleMUD in detail.

Chapter 7Designing the SimpleMUD

This chapter takes you through all the design issues of SimpleMUD, showing you what the MUD can and cannot do.

Chapter 8Items and Players

This chapter steps you through the creation of the basic physics layer as well as some logic layer stuff, mostly dealing with the item and player entity types. This chapter also goes over the creation of the basic networking module for the SimpleMUD built on top of the SocketLib.

Chapter 9Maps, Stores, and Training Rooms

This chapter builds on what you learned in Chapter 8, adding a map system to the SimpleMUD, as well as the special room types that represent stores and training rooms.

Chapter 10Enemies, Combat, and the Game Loop

This final SimpleMUD chapter and ties everything up into a full game. Enemies are added to the game, as well as combat, and the game loop which takes care of all timed events in the game.

Part ThreeCreating a BetterMUD

This part of the book describes the creation of the BetterMUD, an extremely flexible MUD that is built around a flexible logic level built in Python.

Chapter 11The BetterMUD

This chapter covers all the design issues related to the BetterMUD.

Chapter 12Entities, Accessors, and Databases

This chapter goes over all the base entity classes, the concept of database accessors, and the base database classes as well. None of the classes discussed in this chapter are classes that can be instantiated , but rather base classes that will be used to build the final entity and database classes in the next chapter.

Chapter 13Entities and Databases Continued

This chapter builds on what you learned from the previous chapter, to create the final entity and database classes that will be used within the game.

Chapter 14Scripts, Actions, Logic, and Commands

This chapter goes over all the flexible concepts in BetterMUD. Everything discussed in this chapter provides the foundation for the flexible logic system, which is the main feature of BetterMUD.

Chapter 15Game Logic

This chapter describes the physical engine of the BetterMUD, which includes entity management and the timer system.

Chapter 16The Networking System

This is a relatively short chapter that describes the networking system of the BetterMUD. I don't spend much time on this chapter because there have already been five chapters in this book dealing with network programming, so most of this part of the BetterMUD is just replicating what you've seen before.

Chapter 17Python

This chapter is an introduction to the Python programming language and describes how to integrate the Python interpreter into your game.

Chapter 18Making the Game

This is the final chapter dealing with the BetterMUD, and it focuses mainly on making Python scripts used to mold the BetterMUD's logic system into something that resembles a game. I go over the main concepts of creating Python command objects and logic scripts to control item management, encumbrance, simple spells, arming weapons, initialization scripts, currency, merchants , and finally simple time-based combat.


The appendixes contain all the auxiliary information you might need to know. They are on the CD but not printed in the book.

Appendix ASetting Up Your Compilers

Setting up the compilers for the code in the book was a difficult task for me, since I had to make sure the code ran on three different compilers at the same time. Because of the complexity of this task, compilation information and instructions are gathered into this appendix instead of being covered in separate chapters.

Appendix BSocket Error Codes

There are so many things that can go wrong when you're dealing with socket programming, and there are a ton of error codes detailing what went wrong. This appendix lists all the common error codes and what they mean in plain English.

Appendix CC++ Primer

C++ and STL are requirements for this book, but no one can possibly be required to remember every little quirk and detail about them. Because of this, I've included this simple primer that enables you to refresh your memory on the features you may have forgotten.

Appendix DTemplate Primer

This is a bonus chapter from my Data Structures book on how to use templates.


This is a glossary of all the fancy terms and acronyms used throughout the book.

[ LiB ]

MUD Game Programming
MUD Game Programming (Premier Press Game Development)
ISBN: 1592000908
EAN: 2147483647
Year: 2003
Pages: 147
Authors: Ron Penton

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: