Metal Warrior 4 Old version
---------------------------

This is a March 2003 snapshot of Metal Warrior 4, after almost 1 year of work, before an engine overhaul and finally getting my ass into gear. 

What the snapshot includes is an intro scene that contains roughly the same events as the finished game's beginning, and a playable level from the supposed beginning of the game at the Agent headquarters, featuring conversation & getting your equipment, but no combat.

The old version has numerous differences to the finished game, and it is a direct descendant of the preview versions. It includes a quite ambitious C-like scripting language, CovertScript, which is run as bytecode (like Java) on a multithreading-capable virtual machine. The bytecode is demand-loaded into free memory in 1KB pages, using a pagefault handler like in most modern operating systems, and the engine also uses dynamic memory allocation for most data like sprites, level maps and music.

Gameplay is roughly same as in the finished game, except that climbing happens sideways, and status displays are a bit different. The human sprites are taller and stiffer than in the final. The screen is being updated only at 25Hz frequency, compared to 50Hz of the final game, but the graphics are more colorful: each char can have its own color, instead of each 4x4 char block.

If you play the available level you see that it is very limited & scripted, much more so than the final game. The story idea I had at the time was much more cinematic & linear, opposed to the exploration and freeform combat in the final game. Uncertainty with the story was a major reason of why development was uninspired and slowed down. It was only at the time of the engine rework, when I also came up with a simple but efficient main story idea: exploring & collecting necessary items from different, physically connected enemy facilities. This was inspired a lot by Impossible Mission 2.

In the preview it is assumed that some time passes between the intro & the game start, as Ian joins the Agents and receives his basic training. The final game is instead one continuous timeslice, except for one brief period of the hero's unconsciousness near the beginning and some mythical "travel screen" interludes.

The engine had a few key failures that also contributed to slow progress and which would in the end make it intolerable to write the full game. First, there was no "global" world state: each level (map) was resetted to its initial state when the player entered it. Second, the gameworld objects like doors were extremely stupid: each had to be specifically scripted if there was to be any checks like player having the correct key to enter. Overall, the engine design was too general and overambitious for a C64 game.

When the engine overhaul (April-June 2003) happened, it consisted roughly of these things:
- Removing the bytecode interpreter, replaced by loadable ASM code modules for scripting
- Adding persistent, global gameworld state: status of important items, level objects and    enemies in all levels stays constantly in memory. Meanwhile less important enemies are       random generated at each level change, and dropped weapons & ammo just have to         disappear, because there obviously is not enough memory to store everything.
- Adding a system for level objects (doors, openable closets, switches, locks etc.) so that  they don't require scripting 
- Optimizing some sprite display & AI code, changing color resolution (color-per-block       instead of color-per-char)
- Adding interpolation to sprite movement for illusion of 50Hz framerate (it's still     internally 25Hz)

After the rework, the actual game content (levels, enemies, scripting etc.) was created in 2 months. However, it's not like all the time before the rework was wasted: instead the game likely benefitted from a lengthy "preproduction" phase as lots of ideas could be tested and discarded when not working. Also, almost all imaginable story permutations were considered, so what there is in the final game story-wise, is probably very close to optimal.

Btw. not to spoil much, but evidence suggests that most people who have completed MW4 to date have missed certain sidequests, which can add more depth (or weirdness) to the story. Hint: if you haven't witnessed a nuclear detonation you haven't seen everything :)