7 Days of Roguelike Development to Die

Well, I'm exhausted, but I have a working shipped. I may come back tonight and do some more, otherwise a post-7DRL update will fix the missing bits.

Play, and if you liked it, shower me in gold, or at least rattle some change at my tip jar. If you have other feedback, comment but be kind, I'm so very tired.

Archive of my dev diary/comments:

  • Day 1 (Sun, 2020-03-01)

    Getting started now. Will be working until next Saturday!

    Tiling, basic animation, and keyboard input.

    Minor annoyance, discovered Oryx’s “wee fantasy” figures, which are otherwise quite excellent, are left-handed. Flipping the images gets them all fixed except right-facing still has a shield in left hand. I don’t mind a few sinister figures, but that’s too much to ask of heroes not named “Link”.

    Basic random character and stat display.

  • Day 2 (Mon, 2020-03-02)

    Didn’t get a lot of uninterrupted time today, but made useful progress finally:

    Items now exist, can now be got (auto when you move; I might add a Get command), put down, readied/removed, and used.

  • Day 3 (Tues, 2020-03-03)

    Very productive day. Mana recovery, added a Get command, visibility calculations so walls occlude vision.

    Changed the way I write objects and monsters to use prototype objects (an object system on top of an object system, but it’s more convenient).

    Monsters (well, just Goblins today) are placed and can be fought. They don’t move yet.

  • Day 4 (Wed, 2020-03-04)

    Very little free time today, but I got a monster list completed, with a lot of tricky multi-level monsters, and I can spray them all over the junk level. Got some design notes for spells and missiles, and how I’ll split up the levels tomorrow. Then try some kind of AI once I have a place to navigate.

  • Day 5 (Thur, 2020-03-05)

    Floating damage numbers & effects. Basic mob AI, no pathfinding yet. Sleep, Invisible, Heal spells.

    Running low on time, so much stuff left to do and I just did some detail work today, didn’t even get missiles in (and Fireballs, which are a slow case of missiles that explode). Levels, absolutely first thing tomorrow.

  • Day 6 (Fri, 2020-03-06)

    DON’T PANIC. Well, panic a little. Got door opening (but not closing, needs a whole new command), Portals (AT LAST), and 6 level generators + tutorial level. They’re very simplistic levels, and it’s possible to be trapped in some, but usually works?

    Tomorrow I should really get missiles flying, trapped levels, maybe an overview map are optional. Strength/“experience” gain is a little harsh right now, but balance is low on my priorities.

    Found an absolutely horrible off-by-1 math bug in a library I’ve been using for years. Programming: It’s always harder than you think.

  • Day 7 (Sat, 2020-03-07)

    Exhausted, I don’t ever work this many days in a row anymore. So I got the overview map done, and rebalanced it a bit more sanely. It is playable and a fun challenge until you get curb-stomped by wights or stuck in a dead-end world.

    I have until tonight (Saturday) at midnight, so if I feel up to it later I’ll get to some of my TODO list.

    Playable version is up now, let me know what you think!

  • Day 7, Later

    Got back to adding missiles and fireballs! Done! Ship it!

    (Levels still kind of suck, I’ll improve those later. But the gameplay should be finished.)

Last Stand of the California Browncoats

Amusing that the start of the apocalypse is now in the past (the main books are set 20 years later), but I really want to point back at these, and in particular the prequel story, when people could have stayed home, avoided the plague, but instead wanted to go cosplay Firefly for a weekend.

Feed's a great epidemiology story, and a fairly good vlogging/social media (they say "blog" but only appear to do video) story, with zombies as almost a totally irrelevant side effect.

The main two caveats I have are technical: The blood testing system is basically what Theranos was pushing, and it probably can't be made to work, the sample sizes are too small. And later has a tiresomely impossible (at least with their tech) medical technology. There's a creepy personal thing, too, but you know, people gotta get their bone on with someone/thing.

I think I haven't read a bunch of the short stories, only the above and "How Green This Land, How Blue This Sea", which is a little silly because it's about Strines vs zombie kangaroos.

"Mira Grant" has a few other horror books, the Parasite series is very zombie-like as well; she's grim and serious but has just a little genre fanservice goofiness to lighten the mood. But the author under her real name, Seanan McGuire, also writes urban fantasy books, and they're dire. Easily some of the trashiest "I'm Wonder Woman and I wanna fuck a monster" books since Laurell K. Hamilton's Anita Blake went off the rails straight into bondage-mutilation-porn-land.

Scheme-Test-Unit

Moving my library from Chicken to Chez (when I moved it from Chez to Chicken originally, it was much smaller and I only used a few asserts to test), I discovered that:

  1. Chicken's test egg is pretty nice but non-standard.
  2. SRFI-64 (from Thunderchez ) is OK as far as it goes, but has an inadequate test runner (the default just lists PASS/FAIL with no explanation for each test, and has one total). Ridiculous when you have dozens or hundreds of tests.
  3. There's no good alternative. There's a SchemeUnit which is for PLT Scheme née Racket, and a couple others which aren't SRFI-64 and aren't for Chez.

So I ended up writing my own:

Here's how it works:

#!/usr/bin/env scheme-script
;; example-test.ss

(import (chezscheme)
    (srfi s64 testing) ;; thunderchez
    (scheme-test-unit)
)

(define (all-tests)
(test-group "All Tests"

(test-group "Math"
    (test-equal "add" 4 (+ 2 3))
)

(test-group "Strings"
    (test-equal "append" "foobar" (string-append "foo" "bar"))
)

) ;; test group "All Tests"
) ;; all-tests

(define (main argv)
    (scheme-test-configure argv)
    (all-tests)
)

(main (command-line-arguments))

----
% chmod 755 example-test.ss
% ./example-test.ss --help
Usage: scheme-test-configure [-v|--verbose|-q|--quiet|-o FILENAME|--output FILENAME]
% ./example-test.ss
*** All Tests START
*** Math START
- add [(+ 2 3)] expected <<<5>>> but got <<<4>>>
*** Math END, PASS: 0 / FAIL: 1
*** Strings START
+ append [(string-append foo bar)]
*** Strings END, PASS: 1 / FAIL: 0
*** All Tests END, PASS: 0 / FAIL: 0
FINAL PASS: 1 / FAIL: 1

My own test cases come out:

% ./marklib-test.ss -q
*** Control END, PASS: 4 / FAIL: 0
*** Logic END, PASS: 12 / FAIL: 0
*** Math END, PASS: 18 / FAIL: 0
*** Strings END, PASS: 29 / FAIL: 0
*** Any END, PASS: 31 / FAIL: 0
*** Hashtable END, PASS: 9 / FAIL: 0
*** List END, PASS: 6 / FAIL: 0
*** Maybe END, PASS: 6 / FAIL: 0
*** Stack END, PASS: 10 / FAIL: 0
*** Vector END, PASS: 8 / FAIL: 0
*** Data Structures END, PASS: 0 / FAIL: 0
*** Dice END, PASS: 7 / FAIL: 0
*** All Tests END, PASS: 0 / FAIL: 0
FINAL PASS: 140 / FAIL: 0

Programming on Your Phone

Pythonista lets you use your pocket UNIX workstation as a workstation. I use Pythonista, if not every day, very heavily on the days I use it. As always it's crippling of Apple that there's no upgrade pricing, so I can't give him more money every year that I keep using it. The new keyboard module is an interesting script launcher, but I already wrap a bunch of utilities in a main menu program.

There should really be more of these mobile programming environments. In the early days, Apple severely restricted you from shipping one; you could kind of cheat with JavaScript, and a few games snuck in some bytecode interpreters, but scripting was right out. They loosened up eventually, but are still dicks about you saving code anywhere it could be shared, so for example I have to keep my Pythonista stuff in iCloud, not DropBox where it'd make more sense.

  • Panic's Coda and Coda for iOS (née "Code Editor" WTF) is the only other one that's really functional; I've built real web sites out of it, but I mostly use it for ssh. Sweet baby Cthulhu, I hate Panic's crooked-text "designer" sites, I hit Reader view on those instantly. Designers shouldn't be allowed access to CSS or JS.
  • Hotpaw BASIC still works (as does his Chipmunk BASIC on the Mac), but hasn't been updated in 2 years. Not that I want to program in BASIC, but it's better than no programming at all.
  • The iPad used to have a very nice "BASIC!" (with a structured BASIC and a bunch of system functionality), and a very limited "iSkeme" (scheme interpreter, R5RS-ish? with nothing but text I/O), but they were killed in the 64-bit-pocalypse. Update 2020-09: miSoft Basic! has been updated. Searching for this is utterly impossible!
  • Workflow (née Apple Shortcuts) is great for putting a few tasks in a row but you'd go insane trying to write anything complex from drag-and-drop clicky boxes.
  • Apple's Swift Playgrounds on iPad is a tutorial, not really usable for applications AIUI.
  • There's a bunch of "kids learn to code!" apps that are mostly ripoffs charging $60/year to play robot tanks. Do not buy anything like this.

I dunno if the 'droids have anything comparable, I'm sure they can root their phone and try to use vi in a busybox shell, but that's not a reasonable work environment for a thumb-sized on-screen keyboard.

7DRL

I'm planning on doing the 7DRL challenge, which runs from Saturday Feb 29 to Saturday Mar 7.

I did some design work this morning, picking out tilesets and making some index card notes for my 7DRL. Think I have kind of a neat world model, and different combat/levelling system.

I expect to have my Chez graphics library fully ported by then (I can draw sprites now! Events are much harder.), but getting it to compile on Mac, Windows, & Linux? Way out of scope, as I found out when I did Eldritch, catastrophic waste of effort for a freebie game. So I'm probably doing it in JS, just so much easier to upload a web page.

What I'm Watching: BoJack Horseman

Finally finished BoJack Horseman's final sixth season, which could've been just 3 eps without any loss. Just endless character vamping; not even development, because they can't develop further and there's no arc, just everyone gets a pony and a birthday cake courtesy of the writers, except BoJack who continues to fuck up.

Season 3 was really the peak of the show, and would've been better if they'd wrapped up seasons 4-6 in season 4.

Disliked the supposedly emotional songs, which in previous seasons had been a little trite but fine, this one it's heavy-handed and mediocre lounge-pop.

The death dinner show, "The View From Halfway Down", was great, perfect, the kind of closure and horror of death we all need from this, except that it dragged on forever and I loathe BJ's family.

None of the people who get their lives together in S6 are capable of doing that, every one of them would be a terror to live with. OK, Mr Peanutbutter, sure, he's an oblivious narcissistic asshole so he's capable of happiness because of it. But Diane's not capable of not wrecking her life; control-freak Princess Carolyn's not capable of not overmanaging control-freak Judah, that'd last 10 days if they're lucky; Todd's attention span is slightly shorter than the lifespan of the little people he's supposed to be taking care of.

I honestly expected more of a "BJ is driven into the desert and digs his own grave" or just end the death dinner show in death. Maybe a funeral closer? But you can't put a dozen people pissing on his grave in an animated show, even one for adults. And killing him would prevent the inevitable revival series in 3 years.

★★★½☆ for the show as a whole, ★★★★½ for bits of it, please don't bring it back.