Up to Main Index                             Up to Journal for March, 2013

                    JOURNAL FOR WEDNESDAY 27TH MARCH, 2013
______________________________________________________________________________

SUBJECT: What's the difference between a duck?
   DATE: Wed Mar 27 22:33:11 GMT 2013

The riddle is:


  Q: What's the difference between a duck?
  A: One of it's legs are both the same.


Let me explain what relevance that has to the latest WolfMUD developments.
Sitting comfortably? Then I'll begin...

So I'm working on the record jar and loader for WolfMUD and deicide to remove
the hard coding for the 'zinara.wrj' data file and load all data files
matching '*.wrj' that are not 'config.wrj'.

To test this I need another data file, hrm. So I created an 'easter.wrj' which
contains a single item:


  // Copyright 2013 Andrew 'Diddymus' Rolfe. All rights reserved.
  //
  // An overlay for use at Easter ;)
  //
      Ref: EGG1
     Type: Item
     Name: A chocolate egg
  Aliases: EGG
   Weight: 2

  This is a small egg made from chocolate.
  %%


The idea is to use 'easter.wrj' as a sort of overlay and add an Easter egg to
the Zinara locations[1]. So far so good... then I broke the space / time
continuum thingy. I added the egg to a second location. Oops.

Now I had the same egg in two different locations at the same time! I could
log in twice and pick the egg up and have it in each player's inventory. I
could drop it and still have it in two locations. Everything seemed fine
until the two eggs were dropped in the same location or both picked up by the
same player. When that happened egg and anti-egg met and poof! - only one egg
was left :(

It's sort of what I was expecting - only I expected one egg to vanish as soon
as it was picked up. Either vanish from the other location or vanish from the
other player's inventory.

Thinking about it what happened made sense as the locations and inventories
are just pointers to a single egg.


  Q: What's the difference between an egg?
  A: Poof!


In other news the latest update trying to fix newlines and colors decolourized
the 'You can see a crowd here.' message. A fix for this has been pushed to the
dev branch already.

--
Diddymus

  [1] At one point I had Xmas and Halloween overlays for the Java version :)


  Up to Main Index                             Up to Journal for March, 2013