v3.0 alpha reached


Another productive week with a lot of milestones and one rabbit hole that will pay off someday, but not today. Everything that was broken is working, and I believe I've hit the alpha milestone. Now it's time to play a bunch of games start-to-finish (with save/restore points used heavily) and compare against other interpreters to see how Status Line holds up.

State of the Union

  • z5 and z8 games working
  • z3 (Seastalker) and z4 (Beauracracy) regression tests passed (so far, so good)
  • All test suites pass
  • Somewhat snappier performance than v2.0 on older games
  • Tons of bug fixes from v2.0
  • Much better adherance to z-machine standards (esp. 1.0)
  • Save / restore working again (see "Casualties" below)
  • Full-color display ("EGA") working (see Piccadilly below)
  • New italic and bold fonts installed and working
  • Better mixed-font handling
  • Timed input working (see Freefall below)
  • Accurate cursor control and related display effects working (with obvious exceptions)

Simplify, simplify, simplify

Many of this week's gains were achieved by removing code. Some of the legacy code complexity was a by-product of my previous self struggling to understand the rules of the z-machine and how it handles things like "a blinking cursor" or "when and how to put a new line" and so forth. With hindsight and a fresh reading of the rules for the machine, I saw that in some cases I had simply over-engineered things. Allowing myself the flexibility to relax and do what feels right for the Pico-8 platform made it much easier to find easier solutions to vexing problems.

Testing, testing, testing

Most of the gains for the week came from simply playing games and fixing what was broken. The virtual CPU has been performing admirably for me for quite a while. A lot of the troubles were in the display subsystem, and I think I have a strong implementation after this week. A number of games revealed interesting issues with how I handle so-called "tables" and screen splitting/clearing. Once again, simplifying the implementations removed the bugs. Tip of the hat to Tetris "Freefall" and "A Train to Piccadilly" for helping me identify some previously unknown bugs in timed input and print_table routines.

A Train to Piccadilly, exhibiting text formatting and multi-color display.
Freefall, a clone of Tetris, showing timed input for realtime user control.

Casualties of the z-machine war

Tiny window

There are certain things that the tiny window of the Pico-8 simply cannot handle. There is no workaround available for these except to just try hard, do our best, and not crash.

Photopia's pull-quote boxes are just too wide for the screen (the rest of the game looks and plays great!)
Sherlock self-detects when it cannot show some information and just gives up.
Beyond Zork. What a mess!
Save games

Save game states are, unavoidably, incompatible between v2.0 and v3.0. To support z5 and higher I need to store more (new) detail about the z-machine state than before. This changes the structure of a save file enough to break compatibility with v2.0 of Status Line. I looked into Quetzal standardized save files, but I don't have enough room in the Pico-8 program limit to add everything needed to support that.

Unicode-ish

Investigating support for simple Unicode wound up being a deeper rabbit hole than I expected. Ultimately, it is out of scope for v3.0 but I think I have a strategy to add rudimentary, "unicode-ish" support. This will support the initial 255 characters, encompassing the Latin-1 Supplement. I wasn't going to tackle this at all, as fonts in Pico-8 require a great number of silly tricks to mix-and-match. However, advent.z8 wouldn't display anything at all until I implemented the opcode `print_unicode`. 

Since I had to implement that opcode, I thought, "I'll draw up a unicode font and stick it in." and that was naive. However, certain pieces are falling into place and I think it is possible once I feel comfortable with the state of the project post v3.0 release. In the meantime, here's a sneak-peek at the character set.

Get Status Line

Leave a comment

Log in with itch.io to leave a comment.