Tuesday, August 26, 2014

Long, Rambly Travelogue of a Trip to Portland, D&D with The Doubleclicks

Prologue

So, you may know about The Doubleclicks already - they sing songs about dinosaurs and literature, and to the point of this rambly post, Dungeons & Dragons. If you're not interested in songs, Dungeons & Dragons, or listening to me ramble, you should probably stop reading now. I'm largely doing this to collect my memories, but if you come along for the ride in the process, enjoy!

Back at the beginning of the year, The Doubleclicks posted a Kickstarter Project to fund their brand-new album "Dimetrodon". I looked down the list of rewards - autographed CD would be nice, but I've been happy to buy CDs, go to the shows, and get them autographed there, so that seems like it wouldn't help me much. Tote bag - eh, nice, but I've got a lot of tote bags as it is. Even putting tote bags in tote bags, I have a hard time managing them. Oh, look, there's a pledge level where you can play D&D with The Doubleclicks! That's interesting.

But you know, not all editions of D&D are the same. 4e was a super tactical game with collectible cards and the magic system was weird, at least according to the vague sense that I had got from The Internet. Lots of diehard loyalists (maybe largely people who had started with 3.5e and didn't consider the new edition an improvement) were infuriated, and stayed with their old system, or went to Pathfinder, or took up ballroom dance. I didn't ask them.

So, knowing there was controversy, I reached out over email and asked what edition would be included. I think we need a new word, similar to l'esprit d l'escalier where you realize what you should have put in the email, right after you hit "Send".

Angela wrote back right away:

Hello David!

Thank you so much for the e-mail!

Our DM will be determining the edition of DnD, but it should be easy enough to pick up even if you haven't played this edition before.

But I knew that it didn't really matter - I'd play 4th edition if that's what was on the table.

Shortly thereafter, The Doubleclicks put on a show in town at the Wayward Coffeehouse


I had got to the show a little bit later than I had wanted and no reasonable seats seemed obvious at that point, but Angela pointed out a seat right in front. It was one of those comic cliche moments where I looked behind me, "what, is there somebody important, some good friend of yours that you've been saving that seat for? Oh, me, what?"

After the show, I thanked them for another awesome set, and introduced myself as one of the D&D-level backers. It's weird to me to try to understand the asymmetry of people in other people's minds. I listened to a lot of Phil Collins at an earlier point in my life, but I couldn't just pick up the phone and talk to him about a recent break-up. The Doubleclicks aren't arena-filling rock stars, exactly, but still, they play to big shows, and though their songs speak to me, they're not speaking directly to me. All I have reason to expect is to be treated as a friendly face in the audience.

A few months later, they do a few shows connected to the Emerald City ComiCon, including one at the Hard Rock Cafe in Seattle. I get there early, and I hear a bunch of sirens. That's normal, cities have emergencies. Oh, it's a bunch of fire trucks, converging on the HRC. That's not so normal.


Turns out, there was a grease fire, the whole place had to be evacuated, but everything was fine. 


The show went on, and people that didn't arrive as early as I did didn't even know there was an adventure. Immediately after the HRC show, there was another show at the Ray Gun lounge, some 10 blocks up the hill.


At this point, I'm feeling like I'm in the category of "enthusiastic fan that the band reluctantly recognizes".

Fast forward several months, they appear on Wil Wheaton's TableTop show, playing Lord$ of Vega$. I'm pretty sure I avoided that game when it first came out, because I find the misuse of characters on the keyboard annoying. You can also guess that shortening Microsoft's name to "M$" doesn't appeal to me. Except that it reminds me of the declaration of a string variable in Applesoft BASIC, which was created by Microsoft. So many layers.

So, they play another show at Wayward, I drag a friend with me, with a copy of LoV, which we proceed to set up while waiting for the show. A random stranger inviteed themself (hisself? herself? It wasn't clear to me what pronouns to use, and I really wanted to be respectful) to join our game. During the play, while setup was happening, Angela came by, offering advice and gentle chiding. Phil Collins has never chided me about any boardgame play.

Preparation

But when does it get good?

The Doubleclicks have released their album, it's doing well, it's got dimetrodons on it. (Somewhere, maybe in this very room, I have a plastic model of a dimetrodon that I made when I was maybe 7 years old. It's in a box labelled "DAVID'S DIMETRODON", in case you see it.) Arrangements are made for a date that works. I can be the flexible one - I've got vacation days, I'm happy to road trip to Portland. The date is picked, and I get email saying that a 1st level 5th Edition character would be a fine thing to bring along. Or not, there'll be pregens available.

But I get the starter box set for 5e, find the character creation there not quite to my satisfaction. I download the Player's Handbook (no, it's OK, TSR Hasbro WotC want to ease the burden of learning a new system, so they're putting the PHB and DMG online in print-at-home formats).

Somehow, I'm inspired to mash up these characters

  

to create a dwarven cleric, sent out from her temple to retrieve a holy artifact, but along the way to take care of those she finds along the way.

Now, in The Doubleclicks' song about Dungeons & Dragons, there's a dwarf that features prominently, and I really don't want to play that character. There are other perfectly good dwarves that I could be drawing inspiration from, but I want to be careful not to play the dwarf with an axe that drinks way too much ale. Well, they all do that. Still.

Movin' Right Along

The drive down was essentially uneventful - more traffic than I had anticipated, and I had got a later start than I had planned, so I ended up watching my navigator estimate arrival times ping-ponging between 3pm and 4pm, which was acceptable, but I was looking forward to getting out of the car. As I went, I kept jabbing at the car radio, trying to tune in something interesting to listen to. Around 40 minutes from Oregon, I picked up a Portland station, Charlie FM that was playing an all-80s weekend. Why thank you, Portland, now I do feel welcome.

I did a quick job of unpacking, and off to see the Portland Art Museum. Turns out, it was free fourth Friday or some such, unless I wanted to see the special exhibit of pieces from the Tuileries. No, please, take my money. Show me the Greek sculptures and the paintings of King Louis so-and-so.

From there, I proceeded to stop at a Men's Wearhouse, where a gentleman was only too happy to sell me some shirts and ties ("it's two for one day"), which I figured would be good, because my next plan was to find some dancing.

You may know me well enough to know that I've been taking dance classes off and on for several years. And that I enjoy going dancing on weekends. Even in places I'm unfamiliar with. And so, I ended up at the Norse Hall, learning some Tango moves that I didn't know before.


I danced for a while, and then decided that I had had enough, and so ended Friday.


Saturday, In Stereo

Wide awake bright and early, in part because of the bright sunlight, in part because my hotel room was right above the light rail tracks, I broke my fast with a tasty bread pudding french toast at the hotel restaurant, and off I went to Powell's Books, more than a city block's worth of new and used volumes. 



I started out across the street at their math/science/technical section, and got a perfectly good armload full of math puzzles and history of mathematics, including a volume of Euclid's Elements and a biography of Norman Wiener and John Von Neumann.

Across the street to Powell's proper, they took my bag of books at the door, and gave me a number.


64 is a nice number. It's divisible by 2. Also by 2. I wandered around, found a variety of books, and realized that a question I had about whether clerics were constrained to use blunt weapons could be answered by the big wall of Dungeons and Dragons books in front of me. I could research here, or... I bought the 5e Player's Handbook. Might be handy later on, anyway.

I also found their shelf of Kakuro puzzle books.


You may notice that none of those books were written by me, even though I have a number of Kakuro books to my credit. Self-publishing through Lulu just barely counts, though, so I wasn't surprised. I've been meaning to revisit my tools for generating Kakuro puzzles, so please to be calling it research, I took several of the pictured books with me.

Again, laden down with an armload full of books, I wandered through the maze and found my way back to the wall (right hand rule worked to my advantage again). The gentleman at the cash register asked if I wanted a bag, if I wanted to use the totebag I was purchasing, or if I wanted to put everything in the bag I had checked. I told him that I figured we'd probably have to do all of the above, but he surprised me and fit everything into two bags. Good work, sir.

There are many nice things about the Hotel Deluxe, but one thing I appreciate is that it's just far enough away from Powell's to discourage a guy from buying any more than 2 dozen books in one trip.


Free from my literary baggage, I proceeded to the Oregon History Museum, where they told me about Mt. St. Helens and dredging the Columbia after the May 18th, 1980 eruption. There was a time capsule from 1985 predicting what Portland would be like in 2010. There was an exhibit on Oregon wine. It turns out, I'm bad at identifying fragrances in wine, but 1985 Portland was bad about predicting the future. We'll call it even.

On to lunch, where sushi arrived on a train:

At this point, I felt I had walked and been active enough not to feel guilty seeing a movie. There's a movie place called Living Room Theaters that was playing Life After Beth, a Rom/Com/Zom/Dram with people you've seen before, like John C. Reilly, Molly Shannon, Paul Reiser, and Cheryl Hines. Not that they're the stars, they're just in it. Fun. If you liked Shaun of the Dead, this should be on your list.

I explored more of the neighborhood around my hotel and found these:



You're not really trying to quote Skynrd, are you?

I know you don't want us to really play Skynyrd 
The request is, at this point, absurd 
Even if your bros are patting your back 
You're still the guy who yelled Freebird 

And from there, off to dance again. Turns out, again at the Norse Hall, but with a different group. This group was all about West Coast Swing, which is fine - I like WCS, it's a little more challenging than East Coast Swing, but it gives you more options for playing around with the beat. I danced with many of the women there, including a cute woman who reminded me of a taller version of a woman that used to work at the live theater I volunteer at, and a woman who seemed disinterested in eye contact. I'm not perfect at that, myself, so I won't harp.

And so it was Saturday, and it was Good.


Sunday, the Day of the D&D

If you've skipped over the boring part about dance and books, you're almost at the D&D bits. I promise.

I woke up around 3am and after trying to get back to sleep, I noticed red and blue lights blinking through the curtains.


No audible alarms, no indication that there was anything going on inside the building. Still, firetruck. Interesting. I tried to get back to sleep, the firetruck left.

Have you noticed that if you have a clock radio, it probably has a button labelled "sleep" that will play 60 minutes of music and then turn off, but at a hotel, the clock radio does not have that button? I had the all-80s station on up to that point, and I had heard maybe 4 instances of Joan Jett and the Blackhearts' "I Hate Myself For Loving You", which is a perfectly standards-compliant rock anthem. The one bit that sticks with me is the alternating notes on "You took my pride away-ay-ay-ay-ay". That reminds me of something else, but for the life of me, I can't think of what it is. Maybe the theme to a TV show I watched as a kid. Post in the comments if you can see into my brain.

I turned the radio off and tried to get to sleep. I tossed and turned and considered Dwarven religion, particularly as it applied to chainmail. In my mind, Dwarves don't call it chainmail at all - they have a word Wef that describes the mesh of chainmail, which is connected to the Common words "weave" and "web" and probably "weft", but let's not get too technical. If you sunder a link from a chain the whole chain is lost, but in a Wef, the rings support each other, making it stronger than any one of the links. So, too, are we in community with each other, bearing each other's burdens. When I heal you, when I feed you, it makes you stronger, and that makes you-and-I stronger, and that makes the party stronger, and that makes us all stronger. This is the Wef.

It actually went on a ways from there, a grand splorch of backstory that I could draw on for my Mrs Garrett / Augra dwarf cleric. Probably not going to come up.

I got a bit of sleep, eventually. The hotel didn't burn down at all. I went off to the Oregon Museum of Science and Industry (OMSI), which I had been to a few times before - the first probably in the Washington Park location, which I just remember being up a hill, and I also remember that they had a terminal where you could interact with ELIZA. The river is a better location, and ELIZA doesn't hold up well after all these years. I again wanted them to take my money, so I asked for the combo of the exhibits, laser show, and IMAX movie. The exhibits included the animatronic dinosaurs you may have seen in the Really Big Chickens video



When I got into the laser show, I was the only single guy (ladies...), so the usher let me in on a secret, that the best seat in the house was just to the left of the laserist's booth. So, that's where I sat. As the laserist was getting ready, I asked if I could photograph her console. She volunteered to take a picture, too. "You want the laser console, or the whole thing?" "Whatever you think is awesome."


Seriously, it's like Darth Vader's bathroom in there.

The laser show was a bunch of music from movies, like The Circle of Life, Close Encounters of the Third Kind, The Imperial March, Danger Zone, some Daft Punk piece from the TRON sequel, and the Universe Song, which I think would make a fine Doubleclicks cover.

Whenever life gets you down, Mrs.Brown
And things seem hard or tough
And people are stupid, obnoxious or daft
And you feel that you've had quite enough

Just remember that you're standing on a planet that's evolving
And revolving at nine hundred miles an hour
That's orbiting at nineteen miles a second, so it's reckoned
A sun that is the source of all our power

The sun and you and me and all the stars that we can see
Are moving at a million miles a day
In an outer spiral arm, at forty thousand miles an hour
Of the galaxy we call The Milky Way

And so on. 

The IMAX movie was a 3D affair about dinosaurs, which again, seemed fitting. I learned that the character of Indiana Jones was probably based on a real life paleontologist who did pioneering work in the Gobi Desert. There was also the claim that paleontologists were discovering more new species today than ever before, which surprised me - I had figured there was a boom back in the late 1800s, and it's just been renaming Brontosauruses into Apatosauruses ever since.

Aside, and spoiling the mostly chronological flow of this, the first exchange I had with Angela was in the autograph line, where I said that I appreciated their song about Velociraptors, at which point, she asked what my favorite dinosaur was. I was startled to actually be having sentences that meaningfully followed eachother, approximating a conversation. I picked the Procompsognathus, which was what my thesis was on, more or less. The little chicken dinosaurs that were in Jurassic Park, the novel, but didn't make it into the movies until movie #2, and only for a bit, if I recall correctly. Who knows?

I'll bet that I have some secret SEGA docs around here talking about different dinosaurs that were going to be in the Jurassic Park movie, including discussion about making Velociraptor man-sized. 

And from there, on to Guardian Games, which is only a few blocks away from OMSI. My phone was happy to park me somewhere near a tile store, and I wandered around a bit before I recognized I was parked at the back of the building, and I could have parked closer in, but bah, it's fine. I browsed Guardian Games, being early, and before I knew it, I had another armload full of games.


If you've played Dungeon World, you may recognize it jammed in there near Fiasco. I sit two desks over from Sage LaTorra at work. There are days I still get a frisson of excitement, knowing I work with famous people.

I decided that I still had a lot of time to kill, and so I set off to find an ATM, which involved wandering the neighborhood in 90ish degree weather, which wasn't bad, but didn't help me steer away from the stereotype of the pudgy, sweaty gamer that Guardian Games was already filled with.

I came back, got a smaller armload of games (several Lost World books, because you can't get enough of those), and finally found my way to the table where we'd be playing. I was introduced to Paul, the other Kickstarter backer, and we chatted a bit. "Did you bring them gifts?" "Um, sort of." "Is that creepy?" "Dude, at this point, I can't even tell."


I once worked at a company where the president of the company refused to put the company logo on coffee cups, claiming that companies that did that failed. I gave The Doubleclicks some Doubleclicks Search swag.

As the Doubleclicks arrived, the Guardian Games staff wanted to make sure we had everything we needed, or maybe we'd like to get some drinks. Angela expressed her desire for "Hella Cider", which was echoed around the table - three of those.

And so we sat down to play a pregen module (from a D&D day, I guess - I had played a tiny bit of something like this years and years ago at Planet Hollywood in Seattle, so that brackets when it would have been). I was the only one who had a handmade character, and everybody else played pregens. We had a good balanced group:

Paul - Pow'el, Human Fighter
Aubrey - Rouk Et, Halfling Rogue
Angela - Portentia, Elf Wizard
Me - Audra Hilltopper, Dwarf Cleric

Portentia established herself as being the brash, nerdy, obnoxious sort. Pow'el was a dandy. Rouk Et reminded me of Dirk Benedict from The A Team - lying and conniving, but smooth. I did what I could to establish Audra as the matronly sort who had a kind word and a lesson at the end of things.

Portentia proved to be a great asset to have outside the room when we were talking to people - negotiations and reaction rolls were best handled by the halfling and human. When Portentia got bored with the NPCs we were trying to talk to, she'd retreat and write in her journal, which it took me over a day to connect to a lyric in "Nothing to Prove".

Comical bits abounded as the elf and the dwarf tried to deal with the lashed together logs that made up the ferryboat across the bay.

Some railroady NPC bits, some investigation, and finally, we were on the big graph paper tactical map. We set about exploring, engaging in combat, like you do. Mostly, I didn't need to be in the front line, but mostly, that's where I ended up. We all had some terrible rolls, the worst was when the human and dwarf slipped into a watery pit with some sort of coral vampire thing. We extricated ourselves, and I managed to get us back to healthy-ish hit point levels, when the Guardian Games guy came by and warned us that they'd be closing in 45 minutes, and was there anything we'd like for last call? Oh, my. Some healing potions would be nice.

We pressed on, and found some skeletons that leapt to attack us. Somebody (Angela?) decided that dinosaurs would make fine miniatures, so they weren't skeletons at all, they became dinosaurs attacking us.

We dispatched them without difficulty, and proceeded to resolve two other challenges, completing the adventure with 16 minutes on the clock.

Plenty of time for victorious picture taking.

  
 Paul is totally washed out in that last photo. Either that, or the light within him is illuminating the room.

I got everyone around the table to sign my D&D 5e starter set, as if it was a high school yearbook. Dear Dave, you're an awesome guy. Have a great summer. See you next year. Signed, that one girl I never talked to through the entire year, but next year, when yearbooks come out, we'll have something to talk about again.

And things wrapped up. They went out into the parking lot to grab the beginning of This video and we all went off our separate ways. And then there was a tweet that got me more Twitter exposure than anything else I've ever done.

And, in the End...

The rest plays out how you'd expect. I went back to my hotel room and began to crash. This day that I had been anticipating for months, seemingly for years, had come and gone. And it was fun. But now it was over. And so, I'd go back to work, and the Doubleclicks would go on and do their awesome stuff. and Paul would do whatever it is that Paul does.

I've got my character sheet, I've got photos, I've got memories. Now that I've jotted all this down here, I don't have to worry about my weak brain keeping those memories in place, I can look at this page, assuming it stays around.

And, you who have read this far, if you're not me, you may not have seen The Doubleclicks live. I strongly encourage you to check out their tour schedule. Show up early, sit close. Buy a CD, get it signed. Say Dave says 'hi'. Or link your fingers together like a chain. We all need to stick together. That's the Wef.

Monday, August 25, 2014

PLY lexing and parsing


Having not posted for a while, it's overdue to report some progress here. There's not much in the way of visuals, but the above "screenshot" shows what I've been up to - I've been working on writing my own language, which has a very C-like feel to it. There are functions and curly braces, so nothing too exciting there.

I think that I want to add multiple return values, something like this:

(boolean, uint) find (string x, char c);

This would declare a function called "find" which takes a string and a character and returns a boolean and an unsigned integer - the boolean would indicate if the character was found, and the integer would say where.

I know that there are ways to accomplish this through magic numbers, like allowing the function to return a signed value and then returning -1, but that's a little clumsy for this example, and there are cases where it's even worse.


The bit that I'm showing off here is that, using PLY, a Python Lex/Yacc implementation, I've got code that recognizes a factorial function, shown in the screenshot. (As opposed to issuing errors on language use that it doesn't recognize, ie 'syntax errors'.) It doesn't build an Abstract Syntax Tree (AST) yet, but the productions are in place, and it's relatively easy (or so the PLY code tells me) to build up a tree from what I have.

One thing I'm discovering is that it's tricky to debug errors in language grammar specifications.

Tuesday, July 8, 2014


I've been toying with the notion of building a virtual machine as a means to make more game code more portable. What you see here is a rather flickery proof of concept.

I started off with a super simple pygame bouncing ball app - something like 20 lines, about evenly divided between setup code and the per-frame animation. I translated the Python code into my own invented assembly language, which I proceeded to assemble into machine code for my invented virtual machine.

The initialization is 34 bytes long, which initializes the speed, size, and position of the ball. The per-frame code is 108 bytes long, which moves the ball, tests to see if it's hit the edges, and if so, multiply the relevant velocity component by -1. At the end of updating the velocity, there's a call to draw the screen and draw the ball.

One of the next steps would be to write a compiler, rather than code in assembly.

Another thing to do would be to expand the app to do more, like actually accept user input.

Yet another thing to do, before or after the above steps. is to port the VM to other platforms, like JavaScript in the browser, Objective C on iOS, and Java on Android.

Sunday, March 30, 2014

Moving right along


I added a variable, "carY" that gets updated every frame, and then I use that to offset the world position for purposes of looking up what to draw.

The animated GIF is generated using byzanz, which seems to be just about capable of doing what I need.

I looked a little bit into codeIncomplete's code for drawing, and he's filling polygons rather than doing the scanline approach that I'm doing. That's fine; I might do that, we'll see.

Saturday, March 29, 2014

Not that I'm working on the old schedule, you understand...


However, I've been itching to do something with a "pseudo 3d road renderer", as described at CodeIncomplete and Lou's Pseudo 3d Page. I played a certain amount of Pole Position, Out Run, and Road Blasters as a youth, and even though I know a photorealistic rendering pipeline pretty well, I kind of like the compromises and hacks that went into making early driving games.

The above is a fairly quick prototype of the sort of thing I have in mind, with trigonometry worked out pretty much by hand, with a little bit of peeking at CodeIncomplete's page, above. My method is to start at the bottom of the screen, and each horizontal pixel ("scanline"), I compute the "world y" position that corresponds to this scanline, and then project the road width into cameraspace, and use that to scale a line of a sprite. I also stretch out a single pixel of that sprite for the grass on the edges of the road. Based on the world y, I choose the light or dark assets, giving that characteristic strobing effect that you see in Out Run. (Also, Buck Rogers: Planet of Zoom.)

I think I want to decrease the contrast between stripes, I want to make the solid yellow and white lines narrower, and I may consider reorganizing my code to be based on "segments", as described in the CodeIncomplete article, rather than scanlines. I may also break the lanes up so that I can have a 3 lane highway, and then a lane disappears, smoothly turning into a 2 lane highway.

There's quite a bit more that I aspire to put into this (hint), but I'll keep most of those cards close to my chest for now.




Wednesday, January 1, 2014

The End: Part 2, the Endening


As promised / threatened, I tinkered with some of the misbehaving stuff.

Before blathering on about it all, here's a link, should you want to poke at the game that all of 2013 was building up towards. I've already built it up too much. The Tower of the Rat King : Deluxe


  • Rat King Sprite - the guy on the right hand side with the brown thing on his head. That's a crown, suitable for the Rat King.
  • Rat King using magic - I meant to get that in earlier, but it was pretty easy to plug in the magic system. He now cycles through the three spells in the game, which player characters can't do. (Arguably, wouldn't want to do.)
  • AI getting lost - I've got a system where the AI will communicate amongst its little group to indicate where PCs have been seen. This allows groups to effectively have a scout see the party, and the entire NPC gang spill around a corner, rather than each NPC doing line of sight alone. I had inverted the sense of a test somewhere, and the NPCs were chasing after locations where the PCs used to be, rather than where the PCs actually were.
  • Mind your subclass cut-and-pasting, you'll break all of magic. - true story, I copied a function for selecting what spell to use out of the base Character class up into an NPC class, and forgot to update the signature, and all of a sudden, my PCs couldn't use magic. Whoops.
  • Random other plumbing cleanup - the spells weren't properly triggering the damage all the time, seemingly because I was passing the wrong arguments in in a callback something something. Maybe I got confused from doing a tiny bit at a time, maybe there are still lurking bugs there.