2016-09-09-resurrecting-zombies.md 3.7 KB


title: Resurrecting Zombies tags: haxe, games, zombie protagonist description: Digging up and dusting off some decade-old code to see if it works with a months-old compiler.

category: coding

About ten years ago, I decided to write a flash game. I used unconventional technologies (Haxe for the code, and darcs for the source control). After tinkering with it for a year or so, I never touched it again (This, I fear, is not uncommon in the world of side projects).

Until now! I've got a new site, and I'm trying to clean up some old stuff, so it's time to dig up the code, dust it off, and see if it works, and how it works.

Darcs

Originally, I self-hosted the code, accessing it via using darcs over ssh on my server. Eventually, I used a hosting service for darcs (patch-tag.com). When that site folded a few years back, I failed to get a copy in time, and assumed that the source was lost.

But, wait, I found a tarball of the source! It has no history, but at least it's something. Hopefully it's the most recent version.

But, wait again, I found a buried source directory that actually included the _darcs information! Excellent! I had a copy of the full history after all.

Now, I love darcs[^pijul]. I use git professionally, of course. It's incredibly fristrating to use git after being acclimated to darcs -- so many things become awkward, or translate poorly. Yet git is the lingua franca of modern source control, and to deny that is to claim that forests don't exist. Therefore, I must convert to git.

Darcs has some minimal, but excellent documentation on exporting to git. Which I use. But a git log shows me only one commit. What's up with that? I want my full commit history, please. Several hours later, I finally just try darcs log in the darcs repo:

$ darcs log
patch 93e98bccb6c6773f349d394eb27bf311081b0fac
Author: jmelesky <code@phaedrusdeinus.org>
Date:   Tue May 12 15:11:18 PDT 2009
  * import from darcs1 repo

Well, that answers that. I apparently destroyed the history myself, seven years back. More's the pity. That does answer whether I'm dealing with an ancient darcs repo, or a slightly less ancient one.

Haxe

Now that we're in a git repo, let's see if we can compile this son of a gun. Haxe is easy to install, but has changed quite a bit since it was young and edgy and called "haXe". I've got a file called build.hxml[^hxml] in my repo, but apparently haxe no longer uses that sort of build file.

Instead, I'll start with something that's my best guess based on modern compiler usage:

 haxe -cp . -main ZombieProtagonist -swf Zombie.swf
./Actor.hx:47: characters 8-19 : Actor should be Void
.... (lots more errors)

Well, I guess the language has progressed a bit. Or, I suppose, this is a version which never compiled. I think the former, though.

More work to be done. In the meantime, the project is up on github. Tune in next time to see more of my continuing struggles to create a SWF file.

[^pijul]: If I were to start over again today, I might be tempted by pijul, which has most of darcs' strengths, and few of its weaknesses. But I'm not, so I won't.

[^hxml]: The documentation for the old compiler indicate that this was really a thing, which is good, because the modern stuff doesn't mention it at all. I got a bit concerned for my past sanity.