Chapter 8. Items and Players

[ LiB ]

Chapter 8. Items and Players

In the previous chapter, I showed you what capabilities I wanted to put into the SimpleMUD. It's generally a good practice to spell out game capabilities even before you begin coding, so that you're not surprised when you think of something new that you want to put into the game. Now that I know what I want within the SimpleMUD, I can begin to design the software and code it.

This chapter is fairly large, but it covers a large part of the SimpleMUD. Most of the base classes shown in this chapter are reused throughout the game. The chapter also introduces you to the concepts of items and players within the game.

In this chapter, you will learn to:

  • Create entities that are matchable using partial strings

  • Create a map-based database

  • Create a vector-based database for game entities that need better lookup speed

  • Create "Smart database pointers" that allow you to access the databases transparently

  • Create logging classes

  • Create a class that represents the common attributes of players and items

  • Create the class representing items, as well as a database for them

  • Create the class representing players, as well as a database for them

  • Store items and players to disk

  • Create the connection handler that handles players logging in

  • Create the connection handler that handles editing player statistics

  • Create the connection handler that manages all game commands

  • Code the basic commands related to players, interaction, and items

[ LiB ]


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

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net