Main Implementation Site?

Posted by Dubthach on Mon 21 Jan 2002 09:39 PM — 3 posts, 23,405 views.

#0
Howdy.

I must say, your codebase looks very interesting. I have a couple questions...

1) Is there an open mud that is run by the implementor of DoT? If so, I'd like to go try it out. I checked out the web site for DoT, but I didn't find this information clearly marked.

2) Yours is the first codebase I've seen that uses C++. In looking through the code, it seems like most of it is still C. Could you comment on which aspects of the game use C++ specific constructs so I can look at them? As an aside, I'm not an expert at either language.

Thanks,
Dubthach
Australia Forum Administrator #1

A list of MUDs running DoT is at Dawn of Time Based MUDS. Many of those have the developer (Kalahn) logging in regularly and making changes in conjunction with the local admins.

As for the parts that use C++, I'll let Kalahn comment on that.

United Kingdom #2
Quote:
1) Is there an open mud that is run by the implementor of DoT? If so, I'd like to go try it out. I checked out the web site for DoT, but I didn't find this information clearly marked.

As Nick said, I am involved with a number of the DOT based muds. The public muds I primarily use for development are Blood Moon and Stormbringer. The other muds I log in from time to time to help out/answer questions etc.

I intentionally stopped running my own mud in order to focus on the development of the codebase which is what I enjoy doing.
Quote:

2) Yours is the first codebase I've seen that uses C++. In looking through the code, it seems like most of it is still C. Could you comment on which aspects of the game use C++ specific constructs so I can look at them? As an aside, I'm not an expert at either language.

It compiles with a C++ compiler, but I wouldn't go as far as calling it an object orientated codebase (from the sounds you may have been expecting that or C++ to be hugely different from Ansi C (depending on your experience with C++)). There are parts of the dawn code which are object orientated though, for example the tracks system is made up of an object which is the tracks in a room. One of the nice things it does which wouldn't work if it was ansi C is allocating memory to itself on an as needed basis.
ch->in_room->tracks->add_track(ch, door, TRACKTYPE_MOVE); 
works and doesn't crash even if ch->in_room->tracks==NULL.

There are other changes that make use of features provided only in C++, char_data is a class within dawn, there is no send_to_char(), instead there are a number of member functions within the char_data class (used in the format ch->print())

Quoting a piece from chardata.h
void print(const char *buf);
void printbw(const char *buf);
void printf(const char *fmt, ...)
void printfbw(const char *fmt, ...)
void println(const char *buf);
void print_blank_lines(int blank_lines_to_print);
void printlnbw(const char *buf);
void printlnf(const char *fmt, ...)
void printlnfbw(const char *fmt, ...)
void wrap(const char *buf);
void wrapf(const char *fmt, ...)
void wrapln(const char *buf);
void wraplnf(const char *fmt, ...)
void titlebar(const char *header);
void titlebarf(const char *fmt, ...)
void olctitlebar(const char *header);
void olctitlebarf(const char *fmt, ...)
void print(int seconds, const char *buf);
void printf(int seconds, const char *fmt, ...)
void println(int seconds, const char *buf);
void printlnf(int seconds, const char *fmt, ...)
void sendpage(const char *txt);

The seconds parameter is a delay feature, ch->println(5,"Hello"); would send 'Hello' to ch in 5 seconds time.

The approach that I have taken when developing DoT has been that there is no point in doing something unless what you gain is worth the work. Converting DoT to be a totally Object Orientated codebase wouldn't be worth the effort. You would be better off writing a mud from scratch, since that is what you be basically doing. The C++ changes in dawn all relate to real development benefit or making use of a C++ feature for the learning benefits.

- Mike
Aka Kalahn