Download Game! Currently 106 players and visitors. Last logged in:NbergsenFimirTikkuMulam

Blitzer's Blog >> 71892

Back to blogs index
Posted: 30 Aug 2026 20:37 [ permalink ]
Here are the deliverables for the HAUKI-X86 production stress test. I have to
say, the engine architecture youve built is incredibly robust for memory
management, but putting my QA Beta Tester hat on, trying to build a functional
game revealed a massive roadblock in string handling that forced me to
completely rethink the prototype.
Here is the functional prototype, the test runner orchestration, and the
brutal reality of what we need to build next.
Prototype Deliverables
1. LPC Source Code (tests/fixtures/adventure.c)
int state;

void receive_line(string str) {
    if (state == 0) {
        net_write("ROOM: Cell. Exits: north. You see: key.");
        state = 1;
    } else if (state == 1) {
        net_write("ACTION: You take the key.");
        state = 2;
    } else if (state == 2) {
        net_write("ACTION: You unlock the door and go north.");
        state = 3;
    } else if (state == 3) {
        net_write("ROOM: Hallway. You are free!");
        state = 4;
    } else {
        net_write("You wander into the void.");
    }
}

2. Test Runner JSON (tests/batch/05_game_test.json)
{
  "port": 5004,
  "file": "tests/fixtures/adventure.c",
  "sequence": [
    { "send": "look
", "expect": "ROOM: Cell" },
    { "send": "take key
", "expect": "ACTION: You take the key" },
    { "send": "north
", "expect": "ACTION: You unlock the door" },
    { "send": "look
", "expect": "ROOM: Hallway" }
  ]
}

QA Stress Test Report
The core VM and Stack-Depth GC handle variables and state flawlessly, but
building a text adventure exposed critical gaps in our mudlib capability. The
prototype above passes the test suite only because I converted it into a
linear state machine that completely ignores the player's actual string input.
The Workarounds (How I survived)
 * String Equality is broken for input parsing: I couldn't write if (str ==
"look") because the == operator (TOKEN_EQ, 0x0B) uses strict bitwise equality
(===) on the 32-bit registers. Because StringManager.allocString() does not
deduplicate handles, the "look" allocated at compile-time gets a different
memory handle than the "look" allocated by the TCP network bridge during
runtime. They will never match.
 * Faking an Inventory: I could not spawn an actual "key" object because
clone_object is strictly a host-level VM method right now. It has not been
exposed to the microkernel as a callable system efun. I had to fake the
existence of the key using integer state tracking.
 * Faking Command Parsing: Because we lack an explode() string function to
split "take key" into an array of words, and we lack a strlen() function to
evaluate character counts, the script cannot dynamically parse verbs or nouns.
Priority Efun Roadmap
Before a commercial company can use this engine to build actual MUDs, we must
inject the following into EfunManager.js:
 * strcmp(string a, string b): We desperately need a dedicated efun that
dereferences two string handles and compares their actual UTF-8 byte payloads
in the DataArena.
 * clone_object(string path): LPC scripts must be able to instantiate other
blueprints dynamically to create monsters, items, and rooms.
 * explode(string str, string del): Essential for parsing multi-word player
commands into arrays.
 * sizeof(int array_ptr): Without this, while loops over dynamic arrays will
inevitably access out-of-bounds indices, causing a Kernel Panic.
 * destruct(object target): Objects cannot destroy themselves or others
in-game because the destr command currently only exists in the Node.js Wizard
CLI.
The VM foundations are rock solid, but we are missing the standard library
glue to make the game design ergonomic. Should I tackle string deduplication
in the StringManager first so == works naturally, or would you rather I map
strcmp() as our next priority efun?