Home  +  Forums  +  C++ and Sockets  +  C++ and SQL: MySQL, sqlite, ODBC  +  Miscellaneous Projects
Logo
~Sockets~
~New~
~Examples~
~Contact~

C++ MudBase

About | Download | Source code documentation

The C++ MudBase is a small embryo of basic mudrelated functions that could be extended into a fullfeatured game. It contains a basic map system with editor, a character definition, and an easy to extend command parser. The source code is released under the GNU GPL license.

The Map

The map consists of different areas. Each area consists of interlinked chunks with an absolute size which is the same for all chunks in the area. Chunks can be linked in all directions as well as up and down. Different areas can be linked together using portals. The C++ MudBase contains a basic map editor.

The Character

The character class contains only the information needed to support the map and editor function. Each character must also select a Race, which will determine in-game attributes such as sight.

The command parser

Each command is a C++ class which extends the Command class. When all necessary methods are implemented and the new class added to the global commands list, all parsing and help text generation is done automatically.

The Database Support

The C++ MudBase supports sqlite through the sqlitewrapped C++ wrapper. That wrapper also exists for MySQL and ODBC. The sqlite and MySQL wrappers are cross-platform. Database access classes are generated by sql2class, a sql to C++ code generator.

Networking

All socket communication is implemented using the C++ sockets library, which also is cross-platform.

Page, code, and content Copyright (C) 2021 by Anders Hedström