View Single Post
Old 03-25-2015, 12:26 AM   #5
Seshin
New Member
 
Join Date: Mar 2015
Posts: 2
Seshin is on a distinguished road
Re: Help With MUD Design In C

You've got your mind in the right place, but goto blocks are not recommended at all. Ever.

The first game I wrote was an interactive fiction game in a Borland C compiler on a very very old Pentium. I remember several methods at the time, the most popular one being something like this:

typedef struct {
int roomId;
char *shortDescription;
char *longDescription;
} room_t;

Then I created a bunch of room_t's based on the contents of some text files, each of which were named according to where they were on a 2d map. For example: imagine a 2d array of int variables, and then a folder of text files called x_y.txt.

I hope that helps with some of this.
Seshin is offline   Reply With Quote