That MUD Thing
Posted in MUD Development
First watch, 3 bells (9:49 pm)

Well it's been an awful long time since I did any work on my MUD. Tonight I thought I'd write some test code to process a world map. I created a text file with two types of terrain, water and land. The base world size is 180x90, and for simplicity is an ASCII text file.

So I put together a class, read the file in, and then use a function to extract a localized map based on an x- and y-coordinate and a radius.

The first image here is the localized map, the second is a snapshot of the same area from the worldmap text file, with x=125 and y=25 and a radius of 5. I added a highlight to show the part of the map the client is localizing.

localized map

world map extract

The next couple of things to do are:

I haven't worked on this project for quite a while now, but I've had other things going on. Some day I'll actually have this thing up and running.

PS: The class that does all this work, both .h and .cpp, are a combined length of 100 lines including comments and whitespace.

Leave a Comment »