Tuesday, September 29, 2015

Simple PlayN Tech Demo on GitHub

This weekend, I will be presenting a paper at the Consortium for Computing Sciences in Colleges Midwest 2015 Conference. My paper, "Teaching Undergraduate Game Programming with PlayN," is an experience report about using the PlayN game library in several different courses and student projects.

There are several aspects of game programming with PlayN that I find useful for teaching undergraduates, including:

  • using the main game loop to update game objects;
  • managing the build and dependencies using Maven;
  • incorporating cross-platform support via LWJGL, GWT, and Android;
  • building a TriplePlay UI;
  • fluent interface design; and
  • functional-reactive programming via React.
Rather than walk through a series of slides on these topics, I decided to build a tech demo to show these elements in action. Note that, as part of my current cybersecurity education game development project, I have been learning IntelliJ IDEA, git, and GitHub. I was inspired by Michael Bayne's Reversi tutorial, whose code he posted on GitHub, using branches to separate each step. I decided to take the same approach with my tech demo, Angry Cardinal PlayN Demo. Each branch name starts with a number, indicating the sequence I plan to show it during my talk. It would be an exaggeration to call this a game of any kind, but with a lot of imagination, one could see how it's the seed of an Angry Birds clone. Unlike Bayne's tutorial, which aims to show how all the features of PlayN can come together to make a working game, my tech demo is designed to only show a few features, using the least code I can. I believe I can mitigate the dangers of live coding by simply switching between branches during my talk.

I have never given a live demo in this way, and I'm eager to see how it is received. Configuring this demo required me to get some more experience with branching, merging across branches, and IDEA's copyright profiles.

Sunday, September 27, 2015

Painting: Shadows of Brimstone, City of the Ancients

I cannot remember where I first came across Shadows of Brimstone, but when I heard that it mixed the wild west with Lovecraftian horror, I was sold. There are two base sets, and a friend told me that City of the Ancients was one of the most fun cooperative dungeon crawls he had played. This one includes tentacle demons and night terrors, whereas Swamps of Death has endless zombies, so I placed my order for City of the Ancients.
Obligatory Box Art
This was my first time building models from the sprue, so I bought myself a pair of sprue cutters and got to work. Honestly, I thought it would be more fun, but mostly it was tedious. I was able to delicately balance the figures around assorted desk stuff in order for the limbs, tails, and tentacles to dry in place.

Workspace, Demons, and Heroes
Once the assembly was done, there was still a lot of patching up to do. I mixed up some Milliput and got to work.
The Milliput Plague affects us all
The next step was to attach the miniatures to their bases---another step I never had to do before, having been mostly painting pre-assembled board game miniatures. Most were no trouble, but the U.S. Marshal has a "lean" to his pose. A clever balancing act helped me to ensure he was affixed at the proper angle.
Cheaper than clamps
The first figures that I painted were the void spiders, all twelve of them. Some of my other sets included multiples of monsters, but I really think that twelve is too many. Brimstone comes with a metric ton of cardboard: it seems they could have had more variety in the monsters. These were kind of fun to paint except that there were so blasted many of them. I spray-primed them white and then used blue-purple washes and drybrushing. The mouth was done more conventionally, with a black ink wash to get the depths of the mouth and between the teeth.

A horde of void spiders
A horde of void spiders, but in a different pile
I should mention, either before or while working on the void spiders, I ran out of white paint—my second bottle to finish, following black a few months ago. Next time I was out, I picked up a new bottle at Hobby Lobby... or at least, I thought I did. I noticed that the texture seemed really strange, which at first I attributed to not having properly shaken the bottle. A few more spiders, and I was sure something was strange. Turns out, I had picked up “Foundation White,” which is really a primer and not the same as “White”.
White vs. Foundation White. Not interchangeable.
For basing, I used a mix of fine, medium, and large ballast, in approximately at 8:4:1 ratio. Although the game allows the characters to go to different worlds, I decided for simplicity's sake to try to make the bases match the Brimstone mines. Turns out Americana Spiced Pumpkin is almost a perfect match for the orange shade used on the game's tiles. I had primed the miniatures before doing the basing, using a Krylon black primer aerosol.

The primer is less rough than the base, but not as much as I would have liked.
You cannot see it so well from the picture, but I must have done something wrong with the priming. I suspect I was too far from the figures, because the texture that came out was really coarse, similar in feel to when I tried the Liquitex Basics Gesso on my grells. The primer absorbed thinned paints and washes like a sponge, leaving me very little control. I went ahead and finished the tentacles—which are not very interesting models anyway—but it was unpleasant enough that I did not want to continue this way.

Finished tentacles. Tabletop-quality, but not much more.
I threw the rest of the miniatures into a bath of Simple Green for a day or two, brushed them down, and re-primed (and re-based) them. This time, I was careful to do them in smaller batches, and on a table rather than the garage floor. The results were much better, although still not with the smoothness of the Vallejo surface primer I would normally brush on and which I used to touch up areas missed by the spray.

Undercoated on a much nicer layer of primer

The next batch I worked on were the stranglers. One of my goals for this set, which I could not meet appropriately on the tentacles, was to work on having higher contrast. I think I frequently make the mistake of thinking something looks great in my hand under my painting lamp, but when it's out on the table, it lacks the contrast to be interesting. I built up the stranglers from a dark undercoat, trying to keep shaded areas dark to make the muscles ripple. This was tricky in part because the models are not actually very detailed: some of what you see is "faked" with paint, not sculpted into the model. I was pretty happy with the flesh colors and then moved on to the mouth (sorry, no halfway photos here, though I wish I had some). I mixed a fleshy glaze and applied it in multiple layers around the "lips" area, matching the visual design of the box and rulebook art. At first, I was very unhappy with the appearance, and I was worried I had wrecked them. I took some more time to mix intermediate shades and try blending them in, and I tried to bring out more highlights at the edges and ridges. The result, I think, is one of the best blending jobs of any figure I've done.
Stranglers, amassing to form a target
Next up were the night terrors. The art on these figures is interesting, as they appear almost non-corporeal, which certainly matches the name. I built up in layers from almost black up to a mix of blue and white with a hint of green. I was pretty happy with these and took this picture thinking I would be done.
Night Terrors... but not quite yet complete
Looking at them the next day, I got to thinking about my goal to practice high contrast. These guys already have a lot of contrast... but is that my own delusion? What if I added even more contrast... what if I really turned it up to eleven? The card art certainly takes the highlights up closer to white than I had painted them. I decided to try it.
Super-contrast on the left, original on the right
I am sure I giggled with delight at the effect. I went through and touched them all up.
Night Terrors, actually complete
This brought me to the Goliath—a name which conjures up the notion that this creature was created only to be destroyed by so many Davids, but that's game design for you. I think I re-started this model twice before I got colors that really clicked. I believe I was trying to make it look muscular, similar to the stranglers, but in re-working it, I realized I needed more texture. Again, the model itself is kind of drab, devoid of detail, and I needed to use the paint to add texture, not just try to emphasize what was there.
Here are an undercoat and base color. Will it work this time?
After getting the two base layers down in a fairly straightforward approach, I started adding spots and bumps to the back, following the sculpted pattern but really trying to bring it out. For the “arms,” I put in thin parallel stripes, again to give more texture. After several layers of highlights, I had a flesh style that I was really happy with. The mouth tentacles are completely smooth, and I also decided to add some more textural interest there. The eyes are barely sculpted, and so I think this part is merely sufficient but nothing outstanding. The undersides of the arms were a little disappointing. Looking at it now, it doesn't look bad, but it's not quite what I wanted. I think I ran out of steam here. I tried using a bright yellow and then a sepia wash to bring out the shadows, but that just made the whole thing look dingy. I spent a lot of time just covering up areas where the wash had left unseemly spots. Despite this frustration, I think the overall model is quite good, having good contrast, interesting texture, and looking a bit frightening. Sorry that the images are a little overexposed.
*Ahem*
*kaff*
*hack hack hack*
*BLEARGH*
I happened to be working on this across the first weekend of the semester. I had already told my students in my course introduction that miniature painting is a hobby of mine. On the second Monday of the semester, I mentioned that they probably were involved in a range of activities: seeing old friends, making new friends, traveling home to spend time with family before big projects are assigned. I suggested that, perhaps, they wondered how their humble professor spent his weekend? Then I brought up this image and told them that I had spent it painting a demon's butt.

It's true, I spent hours staring at those cheeks.
This brings us to the heroes. The first one I painted was the Saloon Girl. I wonder, if she marries the U.S. Marshal, will she become Saloon Woman? Anyway, something interesting about this game is that each character card is reversible, with a different gender on each side. I first saw this in Legends of Andor, but that game used standees, so it was easy for them to include both male and female versions. Brimstone, on the other hand, only provides one gender of figure. I can't say I blame them, but I did wonder... what's a male Saloon Girl? Turns out it's a piano player. Hm. In digging up this picture, I came across an interesting theory that even this side is just a woman with a fake mustache, dressed up so she can come along monster-killing with the gents. It's hard to say without being able to tell what this character's skill is like with an actual piano.

"Performer"
Anyway, the figure was fun to paint. I used to fear reds, but now that I understand more about how to paint them, I see them as an exciting challenge. The Saloon Girl's outfit is highlighted up to orange, but it still reads as "red." Looking once again at contrast as a goal, I think this turned out well in several parts of this model, including the black trim that is highlighted up to grey. Her face is a bit flat, and I find faces hard to paint anyway. I tried to match the colors in the card art for all these characters, and I do wonder why the artist chose Christmas colors. I think I'll call her Merry.

Saloon Girl
Saloon Girl
Remember back when I said that I scrubbed these miniatures down after a bad priming job? Well, this was not entirely without casualties. The U.S. Marshal's rifle had a weak spot from the time I received it, and my old toothbrush was too much for it: the end of it broke off, never to be found.


Necessity, like Frank Zappa, is the mother of invention. I decided to try rebuilding the gun, making this my first real figure modification. I suppose if you split hairs, it's a repair job, but calling it a mod makes it sound more intentional. I found a straight pin that was the right diameter for the barrel...

and with a few snips of my wire cutters, some filing, superglue, and a touch of Milliput, my Marshal had a new weapon.

You may also remember that this guy leans backward. Many of the figures came off of their bases when I scrubbed them down, including him, which I took as an indication that he wasn't well on there in the first place. I decided that, after getting into the hobby about 1.5 years ago, it was time to start pinning. The first time I took my pin vise to a miniature, it was a bit daunting, but everything went smoothly. The first two I pinned were actually the Bandido and Gunslinger; the Marshal came afterward.


Compared to the Saloon Girl, the Marshal was a pretty dull miniature. I decided to put him in a matching vest and trousers, so there are not a lot of colors. The wooden handle to his rifle has some texture to it, and I used brown-red ink to try to make it look like stained wood. I built up the base with Milliput to make him standing on a slight slope, which helps correct his leaning pose as well.

I had moved on to the other heroes when I looked back at the Marshal and, as with the night terrors, wondered what would happen if I took up the contrast and highlights even more. I'm glad I did, as the final version is much more vibrant than before, when it was just too much brown. (Sorry, no comparison photos.)
U.S. Marshal
U.S. Marshal
The Bandido was much more fun to paint, with lots of accessories. I like how he has a very different look than the dull 19th-century men's fashion of the Marshal and Gunslinger. I'm happy with the contrast on his shirt, pants, and accessories. The green and white pattern on the hat is inspired by the card art and is mostly freehanded. It's not perfect, but it's sufficient. If anyone asks, it's not woven into the hat: the Bandido painted it himself. Also, once again, fun with reds, this time taking the highlights on the sash toward a mix of orange, yellow, and white. He's purposefully the hero around the most large stones, by the way, since he's the guy with the dynamite.
Bandido
Bandido
The last of the lot is the Gunslinger. I was going to refer to him as Gunhaver, but the trouble is that they all have guns. I mentioned 19th-century fashion above, and I was being serious. I looked around the Web a bit to see how others had painted their sets, and I am amazed at the number of people who have the Gunslinger in blue jeans and a black coat. I think this makes him look like a 1990s fashion reject rather than a stranger with no name. I ended up on the Wikipedia page about 1880s fashion and I thought, "There's a Wikipedia page about 1880s fashion?!" The Internet is an amazing place. Let me be... if not the first, then one of the few... to thank the community that maintains that page. As I suspected from my rigorous research (i.e. watching Deadwood), a gentleman certainly would have worn a matching jacket and trousers. As in the card art, I used a purple-pink waistcoat to add some color to what would otherwise be a dark model.
Gunslinger
Gunslinger
Here are all the heroes, standing together, ready to face evil.

Bring it on, evil.

Here they are, facing evil, and perhaps regretting that decision.
Don't look behind you...

Finally, to wrap things up, some happy family photographs.

Those tentacles are clearly less interesting than the rest.
Tall people... er, things... in the back

Some days, when I look at the variety of pictures I take during this projects, I think about building a lightbox, but where would I put it?

Thanks for reading!

Wait, what's that? How's the game, you ask?

I have no idea. We're still playing the Pathfinder Adventure Card Game.

Saturday, September 26, 2015

Painting: Heroes for the Pathfinder Adventure Card Game

I bought the Pathfinder Adventure Card Game: Rise of the Runelords Base Set shortly after it came out in 2013. I was happy to sleeve all the cards for ease of shuffling, and I organized a weekly game night with some friends while simultaneously starting a game with my wife and son. Running two campaigns at a time meant an awful lot of bookkeeping, as I deconstructed and reconstructed character decks. When my friend's Seoni died in a tragic card-counting error, that was straw that broke the camel's back: I was completely burned out on this game.


The game sat on my shelf for about two years, but a few weeks ago I developed a hankering to bring it out again. My eldest son is even stronger now with reading, math, and reasoning, and I thought he might really enjoy it. We borrowed a complete set from a friend since I have only the first and second adventure decks, and we have been enjoying playing a scenario most nights of the week.

I purchased the Reaper Bones miniatures corresponding to our three characters, and I started painting Ezren, the wizard I play. I had heard that Bones miniatures did not need to be primed, so I started in on the skin and part of the tunic, but I found it to be a very frustrating experience. I use Vallejo paints, which even for the base coat need to be thinned, and I thin them with water. The Bones material seemed to repel the thinned paint. Thinking about using non-thinned paints for the base coat forced me to reconsider my whole approach: wouldn't it be fun for each of us to paint our own character? I got back into the painting hobby in December 2013, but my wife painted her first miniature at this year's GenCon. My son started painting shortly after I did, although not as frequently as I do: we used to paint together at the kitchen table, but I have accumulated a table-full of supplies, and I do most my painting in my office after the kids are asleep. Most of my son's miniatures are from the Bones line, since he and his little brother like to spend their allowance money on these. I decided this would be a good opportunity to practice a more expedient painting style: the three-step painting process of base-wash-highlight that I have encouraged by son to use. I love my Vallejo paints, but it would be both expensive and wasteful to outfit my boys with these, so for this project I used his craft paints—the kind you can get for less than a dollar on sale.

I have used craft paints for some basing work, the specific colors we have being particularly well-suited to my Shadows of Brimstone figures (see this relevant blog post). I knew that they were much gloopier than my usual paints, but what I didn't expect was how long they stayed wet. I am used to painting in thin layers that dry quickly, so that by the time I work my way around a model I can go back and put another thin layer where I started. By contrast, simple layers here were taking ten minutes or more to dry. This helps me understand why so many of my five-year-old's models have colors running together: he cannot wait for one to area to dry before working right next to it!

I normally use a mix of Pledge floor polish and ink for my washes, but I have recently been experimenting with matte medium, and I decided to try Les' wash recipe. I had mixed up the base of his wash recipe some time ago, but I was disappointed with its performance—quite possibly user error, of course. I added a very little bit of sepia and black inks to make a wash, and we three painters used this on the whole model. My wife was concerned that she was overzealous in the application, but I really think it helped bring out some details. She also used some straight inks to spot wash some areas.

Again in keeping with the theme of showing fundamental techniques, I did all my highlighting with drybrushing, mixing together slightly lighter tones than I used before the wash. My son did not actually do this step with us, however: this was a late-night couple's painting experience. I brushed on gloss varnish and then hit the models with two layers of dullcote. Here are the results!

Valeros, Ezren, and Kyra
Valeros, Ezren, and Kyra
We probably spent between 90 and 120 minutes on these figures. It's hard to estimate how much time we spent since we were also managing our two- and five-year-olds as they painted some figures: the five-year-old finished seven models in the time it took us to get our base coats done! Valeros is only my wife's second painted figure, and I think she did an amazing job with it. It's a rather complex figure, and her exasperated "This is not a beginner's figure!" is accurate. My eight-year-old's Kyra also looks pretty good. He still has some trouble seeing the need to get into all the seams between pieces; if he did, I think the wash would help even more at bringing out the shadows. I helped him out ever so slightly by putting in a slightly darker ink wash just around Kyra's face, to help separate the skin tone from the headgear.

It was a fun family-painting experience, and the figures are much more interesting on the table than the flat cards normally used. Instead of placing these cards at the locations each character is exploring...
we have a tableau more like this:
Notice that the miniatures are placed where would have otherwise put the cards. Shortly after I took this picture, my brilliant wife pointed out that we could put them right on the location cards instead. One cannot do this with the cards, since they would obscure important details, but the minis actually look pretty nifty standing upon their locations.

We just finished Adventure Deck 4, its final scenario being one of the few that we have had to run more than once. Kyra had really bad luck, accidentally running into the villain and getting beat down three times. The game does have some "same-ness" to it, in that the strategy around each scenario is fundamentally the same. However, it doesn't take long to play, especially without the added bookkeeping of managing two campaigns at once, and this makes it a good end-of-a-busy-day kind of game.

Wednesday, September 23, 2015

Measurement essays, non-pipes, and a visual poem

Back in February, I wrote an essay entitled "On measurement in Computer Science." This was an invited piece for a student's honors project—a collection of essays from a variety of perspectives on the theme of measurement. I am pleased to report that the student—Rebecca Jackson—has completed her collection and her honors thesis. The collection is This Is Not a Pipe: Essays on Man as the Measurer of All Things, available online via ISSUU. Her thesis comprises both the collection and an author's statement, and like all Honors theses, it is available through Bracken Library.

Rebecca was kind enough to send me my own personal copy:

Cracking it open, I was pleased to see the illustrious company that my essay kept: essays by some of my favorite people on campus, including John Emert (Math), Patrick Collier (English), and Melinda Messineo (Sociology). Clearly, Rebecca has good taste in essayists.

Rebecca also included a thoughtful personal note thanking me for my contribution. When I opened the card, this loose sheet fell out:

At the end of the note, Rebecca mentioned that she included a visual poem that was inspired by my essay. Truly, this is one of the greatest gifts I have received.

Also, when I was opening the envelope, I sliced my thumb somehow. "What is this marking on the envelope?" I wondered. "Oh, it's my blood." This led to the discovery that my departmental office does not have the first aid kit that everyone thought it did. My friends in the Math department down the hall were happy to provide me with a small bandage, and I think this prompted my department staff to order a first aid kit of our own—so I guess it all turned out for the best.

Monday, September 14, 2015

Achievements for Teachers

One of the rooms I teach in just received a brand new whiteboard for the front of the room. It used to be that the front was a blackboard, and the sides and back were whiteboards. Now, it's whiteboards all around, which is great... except for one thing. The markers that were left in the room were nauseating: take off the cap, and the whole room would get light-headed. Have students at each board, and it was truly toxic.

I worked with the friendly staff of my department and got permission to throw away all those markers and replace them with nice low-odor markers. I unceremoniously dumped the old ones in the bin at the beginning of class, prompting one of the students to claim that there should be achievements for teachers. I asked why, and he said, "For the markers!" I asked if these achievements would be tied into students' teaching evaluation responses, and he immediately recognized that they would need to be validated by some trusted third party.

I love this idea! Maybe I just got the Budget Renovation Achievement for "Using university resources to make a learning space better without breaking the bank." Could we give achievements that would incentivize other positive teaching activities: learning students' names, incorporating active learning, giving meaningful feedback on assignments? Markers may be just the beginning...

Monday, September 7, 2015

Making public the supplemental videos for CS222

Last Fall, I started recording short screencasts to support teaching CS222. These primarily were used to continue conversations that had happened in class, but where I did not want to devote more in-class time to them. That is, these were supplemental videos to specific contexts. I used YouTube to disseminate the videos, but I kept them unlisted: only students who had the link were able to find these videos. I received positive feedback from a few students about these videos. I did not think deeply about their longevity, although even as I made them, I wondered what I would do with them after the semester was over.

This semester, my respected colleague David Largent is teaching a section of CS222 for the first time, and so I shared the playlist with him. He suggested that these videos might be useful to current students as well, even though they were not part of the original contexts. I thought about this for some time time, and I have decided to try acting on his suggestion.

The playlist of supplemental material for CS222: Advanced Programming is now public on YouTube. The only item removed from the original, unlisted playlist is a lengthy sample solution to a two-week project. I have not yet decided if I want to re-use that particular assignment or not, so that one is still hidden.

Please feel free to give me some feedback on the videos, whether you are a current CS222 student or not. If they have general value, I might continue to make them public.