Wednesday, August 30, 2017

Your load is too heavy: Zork deep reading

This past weekend a screenshot went around Twitter (my part of Twitter at least!)

weight = num_items * Max_held_mult;
  if( weight <= random(100) ) ?label8;
  print "You're holding too many things already!";
  move noun to player;
(-- @icculus, Aug 26)
The clear reading of this code (as the screenshot says) is that the inventory limit in Zork 1 is random, not a fixed number of items. Each item you pick up makes it more likely that you'll hit a "holding too many things" error. But since it's a random chance, you can just try again -- it might work next time.
This was passed around in a commentary cloud of "This game was unfair," "games in the 80s were terrible," and so on. (See this NeoGAF thread, for example.)
This is fascinating! I played Zork, as I played all the Infocom games, and I didn't remember this inventory detail. It felt dimly familiar when I was reminded of it, though.
Research time!

Monday, August 28, 2017

Using SkiaSharp in Unity

For the past two weeks I've been trying to make SkiaSharp work inside Unity. It has been zero fun but I got it to work. Painfully and creakily, but it works. I suspect I'm the first person to do this so I'm going to document the process here.
Yes, this is for a game project. I'll let you know when it's closer to release.
Background: Skia is an open-source 2D graphics library from Google. It lets you fill and stroke vector shapes (polygons, circles, spline curves, text). 2D graphics features are easy for native apps and web pages, but Unity doesn't have any such feature.
(There's LineRenderer but that's very limited. No polygon fill, no true curves.)
Skia is a native library -- you can download compiled libraries for Mac, Win, Linux, etc. Then the Xamarin people created SkiaSharp, which is a C# wrapper for Skia. Problem solved, right? Drop the library into Unity, build Mac and Windows apps, go.
Nope. It was a headache. But I made it work, in a very clunky way.
UPDATE, SEPT 4: Many thanks to Marshall Quander, who read my original blog post and clued me into the right way to set things up. Or, at least, the less-wrong way. This post is much shorter now!
I'm not going to describe every blind alley. (See the end of this post for a taste.) Instead, I will give a recipe for creating a tiny Unity project which displays some 2D graphics. Follow along!

Sunday, August 27, 2017

System's Twilight emulator packages

A couple of weeks ago I promised to set up emulator packages to play System's Twilight on modern machines. These are now ready!
These packages are based on Mini vMac, an open-source classic Mac emulator. Special thanks to David Pfaltzgraff-Carlson, who set up Cliff Johnson's puzzle games using Mini vMac in this manner. I just copied his package configuration.
(Yes, these packages include an unlicensed Mac ROM. The ghost of Steve Jobs can come yell at me about it.)

Friday, August 25, 2017

Two-word parser, 1966 AD

It's common to note that the Apollo 11 guidance computer had just 4K of RAM, less than (a microwave | a toaster | your car keys) whatever the current IoT gizmo of the day is. The complete source code was posted to Github in 2016, to the delight of space geeks everywhere.
(I see that the repo maintainer has been accepting patches all this time, which will be handy when... when... I'm not sure how to finish that sentence. But you see a typo, you fix a typo. I get it.)
I remember the articles popping up a year ago. What I don't remember is this control panel, which I saw last weekend during our Air and Space layover:

Image from NASA via Wikipedia
I'm pointing at the labels on the left: VERB and NOUN. What?

Thursday, August 24, 2017

Eclipse report

We had 90% eclipse success. There were high hazy clouds, so the stars didn't come out, but we saw corona. We watched the full star turn, from nibble to bite to high totality and back out the other side. We made crescent-splinter shadows with our fingers. We saw both diamond rings. We caught the blazing-pink edge of the chromosphere. Venus was naked-eye visible. My eclipse partner B. had binoculars, and saw Mercury.
Zero is the wrong number of times to see a total eclipse in your life.

I'm going to tell this out of order. I'm not telling it for you, really. I'm turning and polishing the story for my own future self. If you saw totality you have your own story to polish; you don't need mine. If you're browsing for vicarious eclipse reports, you should be looking at photographs, good grief. I came to praise the sky, not photograph it.

Monday, August 14, 2017

System's Twilight design notes from 1994

On May 10, 1994, my friends and I bundled ourselves into a car and drove from Pittsburgh up to Lake Erie. I forget exactly what town we stopped in. But we stopped there, got out of the car, put on our eclipse glasses, and watched the annular eclipse of 1994. It was fantastic. We got the little leaf-shadow rings and everything.
Why do I mention this? Because (if I recall correctly) after we got home, I bundled up the first playable beta of System's Twilight and send it off to playtesters.
A week from today is the total eclipse of 2017. I'll be heading to Kansas City, unless travel disasters ensue -- which they might! But that makes it an apposite week for this bit of history:
All my design notes for System's Twilight! I've had the folder on my shelf all this time; I just sat down and scanned the pages.
If you played the game way back when, you will find these pages amusing, or at least laden with twisty nostalgia. If you haven't played the game, the notes will be incomprehensible. Either way, enjoy!

Tuesday, August 1, 2017

Nouns: a new tiny Twine game

Several years ago, PR-IF launched the Apollo 18+20 project, creating one short IF game for each track on the album Apollo 18 by They Might Be Giants.
Now another MIT group has launched nanobots, a Twine anthology honoring a newer TMBG album. Which is called, if you hadn't guessed, Nanobots.
I don't know the creators, but I jumped in to create track 15: Nouns. It's my first Twine release, albeit a very short one. But then, the song Nouns is very short as well.