Up to Main Index                              Up to Journal for July, 2021

                     JOURNAL FOR SATURDAY 10TH JULY, 2021
______________________________________________________________________________

SUBJECT: Experiment — bug fixes and new commands
   DATE: Sat 10 Jul 21:33:43 BST 2021

Over the last week I’ve been working on implementing an event system into the
experiment and adding action events. Some progress has been made in that
direction, I now have a nice crackling and popping fire once again:


  [Fireplace]
  You are in the corner of the common room in the dragon's breath tavern. A fire
  burns merrily in an ornate fireplace, giving comfort to weary travellers. The
  fire causes shadows to flicker and dance around the room, changing darkness to
  light and back again. To the south the common room continues and east the
  common room leads to the tavern entrance.

  You see exits: east, southeast, south
  >
  a fire pops, sending little embers dancing up the chimney.
  >
  a fire flares for a moment as the logs shift and settle.
  >
  a fire sizzles and pops.
  >
  a fire flickers, flames dancing along the logs.
  >
  You hear talking nearby.
  >
  a fire gently crackles.
  >


Nice and cosy eh? :)

I’m still iterating on the overall implementation of the event system. What I
have is… clunky. The new implementation is simpler than the current WolfMUD
event model. As a bonus, this implementation does not have a lot of goroutines
hanging around waiting to service the events. In fact there are no additional
goroutines at all until an event fires :)

It’s not all fun and games. The new event system is interacting badly with the
rest of the code at the moment. Data races are a frequent occurrence with a
sprinkling of deadlocks now and again just to spice things up. As mobiles are
held in Thing.In and not Thing.Who, mobiles tend to duplicate into, rather
than move to, a location every time they wander off — I have a REALLY ugly
MOVE command hack for that issue at the moment, but it needs a proper fix.
Question is: should all mobiles and players be put into Thing.Who? I’ve also
managed to break the tavern door!

These issues are mainly why I’ve been sitting on my changes and not releasing
updates. My plan is to release more frequently than usual on the experiment
branch — but I’m not going to knowingly release unusable broken junk.

Having said all that, I have just pushed out some updates. A data race between
building the world and then using it has been fixed. The GET and DROP commands
now notify observers correctly. Thing now has an Int field for storing
collections of integer values. The anyKey definition has been fixed — should
be uint32 and not string. The data for Action, Clean-up and Reset events is
loaded from the zone files and stored in Things — currently unused but can
been see using the #DUMP command on a Thing if you are curious.

The actor’s original input, less the command itself, is now available in the
core/state.input field. For example, “SAY Hi! How are you?” would have
state.input as “Hi! How are you?”.

There are two new commands: $ACT and SAY (with an alias of "). Both of these
commands need the actor’s original input. $ACT and SAY are used a lot in
action events — adding the commands now made sense.

Updates now out on the experiment Git branch.

--
Diddymus


  Up to Main Index                              Up to Journal for July, 2021