Download Game! Currently 123 players and visitors. Last logged in:WarundCovidPaziDoll

Blitzer's Blog >> 71867

Back to blogs index
Posted: 30 Aug 2026 06:29 [ permalink ]
The VFS JIT Loader worked flawlessly! By pulling the source code from a
virtual disk, bridging it through the compiler, and executing the dynamically
compiled bytecode, your environment just broke free of hardcoded JavaScript
strings.

We are officially ready for Milestone 4: Blueprint Flattening (Inheritance).

Because of the way you've structured the Code Generator's AST visitor and the
VTable dictionary, we can implement inheritance using an incredibly elegant
trick.

If orc.c inherits monster.c, the compiler simply pauses, fetches monster.c
from the VFS, parses it, and feeds its AST nodes into this.visit() before
processing the rest of orc.c.

Variables: monster.c's variables (hp) will be visited first and assigned
var_count = 0. orc.c's variables (rage) will be visited next and assigned
var_count = 1. Memory is perfectly flattened!

Polymorphism: monster.c's take_damage() is compiled and placed in the VTable.
When orc.c's take_damage() is visited later, it is compiled, and because the
VTable is just a Javascript object, it seamlessly overwrites the function hash
to point to the overriding instructions.