Up to Main Index Up to Journal for December, 2014
JOURNAL FOR THURSDAY 11TH DECEMBER, 2014
______________________________________________________________________________
SUBJECT: A little WolfMUD
DATE: Thu 11 Dec 21:45:27 GMT 2014
As readers following this journal will know for quite a while I've been little
unhappy about the 'structure' of the WolfMUD code.
So I had myself a WolfMUD coding blitz - well sort of. Even made quite a bit
of progress - well not quite but sort of, nearly.
What I wanted to do way play with some WolfMUD ideas in a minimal setting. So
I started coding away and in a few hours knocked up a single player WolfMUD
without the networking or multiuser stuff. I guess if it's single user it's
really just a good old fashioned text based adventure game :) I call it
WolfMUD-mini. Will I release this version? I'm not sure, it's more of a
plaything right now, but if there is interest I will.
So far would can walk around locations, get and drop items and examine them.
Items can be containers with stuff in them as well. Can't do anything with
them except get, drop and examine them to find out what's in them.
A quick demo session:
[ Fireplace ]
You are in the corner of a common room in the Dragon's Breath tavern. There
is a fire burning away merrily in an ornate fireplace giving comfort to
weary travellers. Shadows flicker around the room, changing light to
darkness and back again. To the south the common room extends and east the
common room leads to the tavern entrance.
You can see a mug here.
You can see some cheese here.
You can see a box here.
You can see a bag here.
You can see exits: east southeast south
>exam cheese
You examine some cheese. This is a chunk of cheese.
>exam box
You examine a box. This is a small, wooden box. It is empty.
>exam mug
You examine a mug. This is a large mug. It contains some coffee.
>exam bag
You examine a bag. This is a small bag. It contains:
an apple
an orange
>get mug
You get a mug.
>inv
You are currently carrying:
a mug
>exam mug
You examine a mug. This is a large mug. It contains some coffee.
>s
[ Common Room ]
You are in a small, cosy common room in the Dragon's Breath tavern. Looking
around you see a few chairs and tables for patrons. To the east there is a
bar and to the north you can see a merry fireplace burning away.
You can see exits: north northeast east
>drop mug
You drop a mug.
>l
[ Common Room ]
You are in a small, cosy common room in the Dragon's Breath tavern. Looking
around you see a few chairs and tables for patrons. To the east there is a
bar and to the north you can see a merry fireplace burning away.
You can see a mug here.
You can see exits: north northeast east
>
Not to shabby for about 500 lines of code including blank lines after a couple
of hours coding :)
Since then I've been refining my ideas and the code - which has taken longer
than the original coding session.
Was this detour worth it? Yes it was. I'm now taking a lot more of advantage
of embedding and interfaces - it all feels more Go-ish, lightweight and right.
So I am working on WolfMUD - sort of - and making good progress - sort of...
I've also switched to the new Go 1.4 as well :)
--
Diddymus
Up to Main Index Up to Journal for December, 2014