Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

New MERCish codebase...

14 views
Skip to first unread message

FireBrand

unread,
Aug 28, 1996, 3:00:00 AM8/28/96
to
I have been, for the past eight months, implementing, on and off, a ROM2.4 clone. Before you start hissing, let me assure you that it was an utterly unique and interesting ROM clone. The areas were all custom and the setting was a space opera sci-fi universe, suitably dramatic. The game was also a rather sneaky educational vehicle, and served its purpose as such. There was not much left of the old ROM base in it, but it was still obviously hacked from the same source. OK, now that I have outlined the history, lets get to the current situation. I am in the process of completing a new codebase that runs the old physmud 1.3 area files. (physmud 1.3 was the clone base, in final stage.) The new base, physmud++, is, obviously, written in C++. It also features a number of new features, most of which I have never seen done elsewhere. Among the features are: partial compile mob/obj/roomprogs (yes, they do feature loops, pauses, and most any other feature you could ask for, and yes, they are faster than the ROM "special functions". They can also be activated from _any_ point in the code, including the initial I/O. composite objects (multiple types like a laser pistol that doubles as an arc welder, attached objects, such as a glove compartment or mounted guns on a vehicle.) advanced exit design, unlimited exits, and many "life" features for rooms, not excluding the fact that each room can have its own periodic effects, and that actions can be programmed into rooms. integrated, editable OLC (with an editor that rises to VT220 when available, spell checking a future possibility.) OLC is free for use by even first level mortals, though there is no garantee that their areas will ever be used. (they are not actually in the game, so it is safe.) puzzle solving and MI style commando missions, worth just as much, in terms of experience, as mob combat. free fall zones, with a proximity system instead of a room system grav zones with no floors are drop zones without a jetpack, any player with too high a density sinks in water, some places have toxic or vacuum atmospheres many, many more such features..... There is only one little problem. (Well, two, but my GF getting ticked at me for spending too much time coding doesn't really count.) The problem is this: in one part of my code, I created a linked list of the type: class object private: object *next; object *last; object *first; int objecttype; public: void add(object *); void remove(object *); object * _next(object *); void readin(ifstream &); void writeout(ofstream &); which is a gross simplification, and ignores class derivation, and I think some of those pointers might be references. In any case, the punchline is this: I was hoping there was a way objecttype could be other than an integer. You see, it is a standin to cast the class "object" into a derived class "objectgun" for example, or "objectvehicle". Is there a way I can do this without a macro switch for the cast? A way to referece the class structure, as an abstract? If anyone knows such, I would greatly appreciate it. Maybe email it. Thanks. FireBrand of Singularity (Nathan Yospe, yo...@hawaii.edu)
0 new messages