Monday, 17 November 2014


If you read this, and have a blog where you make posts about your work developing a roguelike, then consider submitting your blog for inclusion on Planet-RLDev.

Monday, 27 October 2014

Mysterious Incursion bug

In changes to Incursion back in August, I fixed compiler warnings related to casting. In theory, the changes should have been side-effect free. Testing of the specific lines of code, indicates this is the case. But people were reporting crashes related to the "room weights algorithm". In this case RM_Weights is an array of unsigned int, and c and tot are signed short.

      tot += max(0,RM_Weights[i*2+1]);
    c = random(tot); 
      if (c < RM_Weights[i*2+1])
        goto RM_Chosen;
        c -= RM_Weights[i*2+1];
    Fatal("Strange Error in room weights algorithm.");
    RType = RM_Weights[i*2];
    RM_Weights[i*2+1] = -1;

I was unable to reproduce the crashes, although others reported doing so up to 15% of the time.

Were the crashes always there and were they merely hidden by all the other crashes, which have previously been fixed? Or are they caused by some unreproducible nuance of the casting? I'm guessing the former.

There's an obvious bug in the above logic. Points to whomever spots it without looking at my fixes on bitbucket.

Thursday, 9 October 2014

Self-sown opium poppy seedlings

Opium poppies last summer.  These were grown in dirt dug from the drainage ditch at the front of the house, and it was likely sprayed at some point.  So I didn't bother to save any seed.

And the surrounding area as of today.  The green frilly leaves that dominate the area around the barrow are poppy leaves, from self-sown seedlings.  I'm quite happy with how well they've come up, given that my feathered gardeners do a pretty good job of weeding by scratching up all dirt they can access, either covered or uncovered.

I'll scatter some more seed over the top and perhaps get a succession of poppies coming up. Maybe I'll get enough poppy seeds this year to save for cooking.