Tuesday, February 13, 2018

Game Jam

I made a game last weekend!  It's stupidly hard (and just plain stupid) but I'm a certain fashion of proud of it.

It began with an email I skimmed and ignored last week.  Itch (an indie-friendly gaming site and distribution platform, think Steam but with no real entry barriers) frequently hosts game jams, which are week- or weekend-long (and other durations I'm sure) events where a genre is chosen and game makers are encouraged to quickly build a new game, optionally around some given theme(s).  One-mechanic games were on the docket this time.  I generally don't have time to participate in these jams, so I paid it no mind.

Then a work buddy of mine had a case of beer on which the word "Escape" was written, split by the seam in the cardboard.  He jokingly said we needed to make a game about an ape escaping.  We had some fun chatting about that.  There could be fruits or something to collect, but you would be scolded for doing so.  "Why would you waste time collecting stuff when you should have been escaping?"  Each level could just be the displayed image, with a corresponding bit map of which pixels are grab-able.  With the one-mechanic idea freshly ignored in my brain, the ape could constantly swing his arms, and you could swap which hand he was gripping with using one key or button.  ...This could almost work out.

It's Kim's busy season (beginning of the year, accounting) so she was going to be working Saturday.  That left me plenty of time, should I choose to spend it not sleeping.

Well that was that.  Surely I'm a quick enough programmer to make a one-button game about Esc the Ape escaping!  The event kicked off, and the themes announced were "water", "capitalism", and "man versus machine".  ...Well, that was fine, those themes are optional anyway.

Kim to the rescue, as usual.  I talked to her about this ridiculous plan, and without even knowing the themes, she had a suggestion. "The ape could be collecting anything, even coins.  What does an ape need with a gold coin?"  And there it was.  I could even slap a mild capitalism theme onto this thing.

Anyway, I had already developed some rudimentary code to help turn my scribbles into animations and games.  So I made some scribbles...

...and, with a day-plus of programming, turned them into this game!  Enjoy!


[ afterward... ]
I got some great feedback.  Fellow indie developers are a great audience, and willing to find good nuggets even in rushed, sloppy work like this.  :^)

[ even more afterward... ]
The people who ran the game jam streamed themselves playing all of the entries.  Couldn't make it past my first level, but I have to credit them for trying.  :^)

Wednesday, January 10, 2018

How to Fix: Firefox 57+ Status Bar

I used to use an extension called Status-4-Evar, which did a lot of neat things.  Mozilla has been ruining Firefox's status bar for a long time, and this extension let us get it back the way we wanted.  For me, I want an area of the screen where URLs and status text can appear, but does not vanish or move depending on where my cursor is.  I also don't want it to overlap with useful page real estate.  Basically everything the new Chrome-style corner status bubble is, I do not want.  Recently, Mozilla made more changes which make Status-4-Evar incompatible with new versions.

Many people would prefer to have their downloads and other extension icons down in the bottom bar as well.  That's where I used to have them, but it doesn't bother me terribly to have them up in the top bar instead.

This fix addresses only my consistent-status-area concern, not the icon stuff.  There are solutions out there which re-position and re-purpose the bookmark toolbar and let icons live there.  This is a much simpler and admittedly less-flexible hack.

Credit where it's due; I started with this:

My solution is to create "~/.mozilla/firefox/(my profile)/chrome/userChrome.css" containing:
#browser-bottombox {
 height: 1.4em;
 border-top: solid thin #505050;
.browserContainer>statuspanel {
 left: 4px !important; bottom: 2px;
 transition-duration: 0s !important;
 transition-delay: 0s !important;
.browserContainer>statuspanel>.statuspanel-inner>.statuspanel-label {
 margin-left: 0px !important;
 border: none !important;
 padding: 0px !important;
 background: rgb(0,0,0,0) !important;
 color: silver !important;

window[inFullscreen="true"] #browser-bottombox {
 display:none !important;
window[inFullscreen="true"] .browserContainer>statuspanel[type="overLink"] .statuspanel-label {
 display:none !important;

Your mileage may vary, and unless you use a dark theme (like I do) you'll probably want something other than color: silver for the actual status bar text.

Mozilla, get your house in order.  Let us customize our browser; you are not Google or Apple, that is why we like you.

Tuesday, January 09, 2018

Arcade Sticks and MAME and Key Events, Oh My

This is a solution so simple I feel very silly for not thinking of it sooner.

from a virtual console: (as in ctrl+alt+f1 etc)
    xinit /usr/games/mame -- :1

So my actual problem, for anyone who's curious, is that while using MAME to play some arcade games, my window manager (spectrwm) was capturing the "Alt" key (player 1's second button by default) and doing whatever actions alt+this and alt+that were bound to, depending on what other buttons (keys) were being pressed.

"Just remap the buttons" is a common answer, and not a bad one in many situations.  But the keyboard I use when playing arcade games is this big ol' thing:
It looks and feels like and is in fact built from arcade joystick hardware, but for maximum compatibility it acts like a keyboard when plugged into a computer.  It does indeed support remapping its "keys", but I'm running linux for cripe's sake, there had to be a better way.

I started down this logical path:  VirtualBox (virtual machine container; think VMware but open) steals the entire keyboard so that Alt and other modifier keys end up going to the virtual machines it runs, rather than the host.  Now and then, I get trapped on a certain screen for a moment because I can't just alt+number my way to another one.  It's a mildly annoying but useful feature.  MAME, the software I use to run old arcade games, doesn't seem to have any such option, but it really ought to.

VirtualBox and MAME are both open, so I could dive into the code and see how the keyboard grabbing is done in the former, and possibly graft it into the latter.  I imagine the abstractions used in each case are quite different, but I bet given time I (or someone) could figure it out without too much hassle.

But if I'm going to dive into code, maybe there was something simpler I could do.  Spectrwm, my window manager, is tiny compared to VirtualBox or MAME.  It does almost nothing, which is why I like it.  One of the things it does manage is the ability to assign special behaviour to certain programs.  (It calls these special cases "quirks".)  Perhaps I could dig in there and have it ignore all hotkeys when a certain program (mame) is active.

Then it hit me, again, that I'm running linux, for cripe's sake.  Just because I'm using spectrwm on my X server doesn't mean I can't run another X server with no window manager at all.  And sure enough, if I fire up a second instance of X thusly:
    xinit /usr/games/mame -- :1
...then I have a completely isolated X running only MAME, and can switch between it and my main X session anytime.  For me, this is the best of all worlds.  I can keep up spectrwm and mame updated without having to manage any local patches, and I can mash any combination of those big joystick buttons without any unintended behaviour.

Some keyword search phrases, for any future schmucks having similar trouble:
  • mame grab alt key
  • mame spectrwm keys
  • mame window manager keys
  • wrap x keyboard events
  • linux x grab all keys
  • mame grab keys like virtualbox

Monday, November 13, 2017


This is Book.  So named for looking like he's got writing on him, and since "Boo" and "Bo" for short also suit him.  His mellow temperament also reminds us of Shepherd Book from Firefly.

To expand on that particular metaphor, he inadvertently spooks our in-house mental patient, whose most positive reaction to him so far has been along the lines of "keep walkin', preacher man".

We adopted Book as a late anniversary present to each other, and Autumn (River?  ;^) hasn't fully forgiven us since.  They can be civil at close quarters as long as they're sleepy or getting snacks, but otherwise Book is eager to play and Autumn is eager to growl, hiss, and be a drama queen until pesty little brother goes away.

It will be in Autumn's interests to warm up to him sooner than later, since at 8 months Book is showing every sign that he's going to be a big beefy boy.

Welcome to the family little guy, we're happy you seem to like us all.  ...Even though your big sister's a brat.  ...And your human parents are silly enough to keep adopting you young energy-filled cats.

Tuesday, August 08, 2017

Move Moments

We bought a house.  We've been moving into it.  There's more to tell there than is worth telling, and certainly more than is worth reading about.  But the other day we moved a big couch and chair, which required renting a van.  In lieu of my usual long-winded babbling, here are a few captured moments.

 It's just a bruise.  But yeah, it scared me at first too.

 The van and garage doors shared a moment.

Brainstorm: hide away bedside cords from the cat.
(Our implementation was simpler but works :^)

Monday, June 26, 2017

Doodled Dudes

One thing that I haven't seen dug up from the 1980s, slathered in modern attention-deficit-mediocrity and re-sold to us is those little finger puppet monsters.  They contained no sound chips, activated no unlockable video game content, and were cheap enough to come in happy meals.  Probably.  Who knows if I can remember the 80s correctly.

Alternate opening paragraph:

Nowadays everybody's 3D-printing fidget spinners.  Perfectly fitting for today - can't sit still, noisy, no personality.  Me, I've got a not-completely-atrophied imagination and my little 3D pen came with some flexible rubbery plastic stock.  So now if my fingers need to do some fidgeting, here's what I've got:

Precision, detailed figures they are not.  But, they're cute enough not to have been banished from my desk yet.