[ LiB ] |
By now, you've seen how maps, stores, items, and players work within the SimpleMUD. It took quite a bit of code just to get them all working together, and in the end, you had nothing more than a simple online world where all you could do was to run around and talk. (And if you managed to hack in some money through the datafiles, you could play around with items, too.)
But where's the fun? The adventure? The action ? In this chapter, I introduce you to the final part of SimpleMUD: enemies and combat, as well as the game loop.
In this chapter, you will learn to:
Implement enemies
Use enemy instances and enemy templates, using a simple system designed to minimize memory usage
Create a simple game loop to manage timed events
Handle play/enemy combat and death
Make the changes needed to integrate combat into the SimpleMUD
[ LiB ] |