This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:mgough:mud-modernization [2010/10/30 23:18] – mgough | user:mgough:mud-modernization [2010/12/18 02:29] (current) – mgough | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Resurrecting The Forest Heart MUD Codebase ====== | ||
+ | I've been a fan of old-school multi-player MUD games for years. | ||
+ | |||
+ | That being said, much of this code was made before C/C++ strict standardization, | ||
+ | |||
+ | The original, unmolested code can be found in a collection here: http:// | ||
+ | |||
+ | ===== Initial Overview ===== | ||
+ | After decompressing the archive, navigate to directory " | ||
+ | The directory structure is set up to isolate source, include, player, etc.. files for easier navigation. | ||
+ | < | ||
+ | area clans files inc logs notes player | ||
+ | </ | ||
+ | |||
+ | The *.cc files are located under the src/ directory, and any include files (*.h) will be found in the inc/ directory. | ||
+ | |||
+ | Navigating to the src/ directory brings up all the *.cc files as well as the Makefile. | ||
+ | |||
+ | Firstly we will get A LOT of spam from errors and warnings. | ||
+ | |||
+ | This is accomplished by editing the following line: | ||
+ | < | ||
+ | 7 CFLAGS | ||
+ | </ | ||
+ | To | ||
+ | < | ||
+ | 7 CFLAGS | ||
+ | </ | ||
+ | |||
+ | Now, run " | ||
+ | < | ||
+ | c++ -c -ggdb -O | ||
+ | In file included from struct.h: | ||
+ | from abil.cc:6: | ||
+ | array.h: In function 'void copy(Array< | ||
+ | array.h:78: error: array bound forbidden after parenthesized type-id | ||
+ | array.h:78: note: try removing the parentheses around the type-id | ||
+ | In file included from struct.h: | ||
+ | from abil.cc:6: | ||
+ | fight.h: In function 'void spam_char(char_data*, | ||
+ | fight.h: | ||
+ | struct.h: | ||
+ | fight.h: In function 'void spam_char(char_data*, | ||
+ | fight.h: | ||
+ | struct.h: | ||
+ | fight.h: In function 'void spam_char(char_data*, | ||
+ | fight.h: | ||
+ | struct.h: | ||
+ | In file included from struct.h: | ||
+ | from abil.cc:6: | ||
+ | output.h: In function 'void fsend(thing_data&, | ||
+ | output.h: | ||
+ | output.h: | ||
+ | output.h: In function 'void fsend_seen(char_data*, | ||
+ | output.h: | ||
+ | output.h: In function 'void send_color(char_data*, | ||
+ | output.h: | ||
+ | output.h: In function 'void send_color(char_data*, | ||
+ | output.h: | ||
+ | output.h: In function 'void send_color(char_data*, | ||
+ | abil.cc: | ||
+ | output.h: | ||
+ | make: *** [abil.o] Error 1 | ||
+ | </ | ||
+ | |||
+ | Yikes!! And that is just from trying to compile the FIRST file - If your real daring, remove the -w compile flag and try to find the errors, its much like Where' | ||
+ | |||
+ | Do not be afraid though, taking each error one at a time makes life easier. | ||
+ | |||
+ | ===== Typical Errors Found ===== | ||
+ | There were really only a few common errors found, but they were repeated throughout the code. | ||
+ | |||
+ | The prime suspect I ran into was selective prototyping. | ||
+ | |||
+ | Typecasting on the left... or lcasting. | ||
+ | < | ||
+ | (int)x = y; | ||
+ | </ | ||
+ | This problem haunts my dreams still... it was done in a billion places, and there' | ||
+ | |||
+ | The final error that was found throughout the code was functions requiring a char, but the variable being a const char, or visa-versa. | ||
+ | |||
+ | So if there was a function " | ||
+ | |||
+ | In the end though, it DID compile without errors (but with plenty of warnings). | ||
+ | < | ||
+ | mgough@lab46: | ||
+ | Trying 10.80.2.38... | ||
+ | Connected to lab46.corning-cc.edu. | ||
+ | Escape character is ' | ||
+ | |||
+ | 0 players on. | ||
+ | System started 36 days 9 hours 41 minutes ago. | ||
+ | Getting site info ... | ||
+ | Welcome to WezlMud v0.1b | ||
+ | Enter 1 to create a new character. | ||
+ | Or enter your name if you already have one... | ||
+ | | ||
+ | </ | ||
+ | 36 days of uptime is respectable for any software. | ||
+ | |||
+ | Would I do it again? Probably.. but I'm probobably a bit crazy too... | ||
+ | |||
+ | If you get bored, feel free to log into lab 46 and.... | ||
+ | < | ||
+ | telnet lab46.coring-cc.edu 5006 | ||
+ | </ | ||
+ | And have fun! | ||
+ | |||