Nearly completable…

As the title says, I think I am only one feature away from the game being completable… Or at least in theory, because there will inevitably be some unpredictable bugs. ?

This feature is item handling, which eluded implementation last week because dialogues took a bit more than I had hoped for. However, everything is set for it (and I primarily mean that item scripts should already run properly) and it shouldn’t be too hard. I hope to do this (and related bug fixes) in the next day or two so I can finish documenting stuff that I haven’t already before the pencils down.

Just a good old regular update

My work for this week was mainly concentrated on the main game loop and the bytecode interpreter.

When implementing other parts of the engine, I tried following specifications and implementing the correct semantics, and not just transliterating the source code from the original engine. The main loop is much trickier to get right, however, as it is supposed to be re-entrant (luckily, only two levels deep) since some GPL commands expect to be able to call it to provide for interactivity while they execute (for instance, when playing animations). The original engine uses two loop status variables to distinguish between the various states of the loop and whether the current instance is a top-level loop or a nested one. It was my decision to mirror the original code for the loop much more closely because of that. (After GSOC, I’ll look into writing some unit tests for the engine and then try to refactor away some of the nastiness in the design without completely breaking everything. Wish me luck on that.)