Chapter 11. Kiddy Cartel—Creating Your Own MMO

  • Installing mySQL

  • Relational Databases: A Quick Rundown

  • Kiddy Cartel: The Rules and Specifications

  • Creating Your Base Actions

  • Creating a Command with Sub-Commands

  • Creating a Command without Sub-Commands

  • Look at All of the Commands…Now What?

In this chapter you will learn what goes into a massively-multiplayer online (MMO) game. At the end of this chapter you will have created an awesome MMO game called Kiddy Cartel. The object of this game is to take on the persona of a kid and build an empire through purchasing lemonade stands, mowing lawns, and attacking competing neighborhoods. Sound like fun? Let’s get started.

First, a few notes about Kiddy Cartel. This game uses turns. That means that every time you perform an action it takes n number of turns. It is also a text-based game, so if you want graphics you will need to add them. Each account you create will control only one neighborhood, so if you want to control multiple neighborhoods you’ll need to create multiple accounts.

Also, this game will need to use a relational database, so what better relational database than mySQL? It is freely available on www.mysql.com, and mySQL Version 4 is included on the CD that came with this book. You will also need a library call PEAR. PEAR stands for PHP Extension and Application Repository.

If you installed PHP from the CD, then PEAR and its default libraries and manager are already installed on your machine if you are running a UNIX platform. If you’re running a Windows platform you will need to install the PEAR manager.

To install the PEAR manager, simply run the go-pear.bat file in the setup directory after you have installed PHP. If you did not install PHP from the CD included in this book, then I suggest you go to http://pear.php.net and view the installation section of the documentation to install PEAR.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset