Nonogram Database

I am working on a nonogram (aka griddler, paint by number, picross, hanjie, etc) app for Ubuntu Touch.

Along the way, I’ve discovered that there are very few freely distributable puzzles floating around.

In an attempt to change that (for myself and future app developers), I’m collecting the ones I can find in one place.

If anyone knows of any good caches of freely distributable puzzles, please let me know and I’ll add them.

In the meantime, I’m going to strip files from the few open source apps I know about and see if I can get members of some popular nonogram sites to release their puzzles under a free license.

Universal Emulator Frontend in Ubuntu 12.04

I wanted to set up a system hooked up to my TV that let me play NES or SNES games from the comfort of my couch. It was an interesting project, and I wanted to share my findings.

Setup

I have a spare laptop with an NVIDIA card running Ubuntu 12.04. If you also have an NVIDIA card, I highly recommend using the latest experimental NVIDIA drivers. They really increased the performance of and reduced the heat from my laptop.

Gamepads

I ordered two Logitech wireless F710 gamepads. They have a tiny USB dongle that they talk to wirelessly. They work great out of the box, but note that they must be on different USB socket groups. I first tried plugging them into USB sockets right next to each other and one of the gamepads didn’t work. When I put the USB dongles on different sides of the laptop, both gamepads worked again. ::shrug::

I recommend putting a sticker on gamepad 1 so you know which one it is.

Frontend

I installed XBMC then used it to download an add-on for its Programs section called “ROM Collection Browser”.

Using the ROM add-on, you can scan your ROM collections for each emulator. Be prepared for it to take a long time to download screenshots and covers if you have a lot of ROMs. The best feature is the ability to mark ROMs as “favorites” so if you have a huge collection, you don’t have to browse through all the crap each time.

XBMC lets you change the navigation bindings so you can use your gamepad.

NES Emulator

I’m used to the fceu family of emulators (gfceu, fceux, etc). But they did not support binding the direction buttons on my F710 gamepad. Those buttons send “hat” presses instead of simply button presses.

Looking further, I found an NES emulator I had never heard of. Mednafen not only can handle the “hat” presses on my gamepad but can also emulate GameBoy and a few other systems.

Note that the man page shipped with it is not helpful. You’ll need to browse the online documentation.

Press “ALT+SHIFT+1” to set up bindings for gamepad 1 and “ALT+SHIFT+2” to set up bindings for gamepad 2.

Press “F2” to set up a binding to exit the emulator. This is an important theme! Once XBMC launches an emulator, you need a way to quit it with just the gamepad. When it closes, XBMC comes back. But since you don’t want to use an easy-to-accidentally-hit key or a key that a game is likely to use, you have to be careful. Thankfully, the F710 gamepad has a middle button that normally just turns it on. But once the gamepad is on, the button also sends a normal key press. And no game would need to use this special middle button. So make sure to bind the middle power button to the exit command of mednafen.

Also pass “-fs 1” at least once to turn on fullscreen mode. The option is saved, so you only need to give it once.

When you add your NES collection in XBMC, note that the path to the mednafen command is “/usr/games/mednafen“.

SNES Emulator

I prefer the zsnes emulator for SNES games.

It doesn’t have any weird gotchas. Press “Esc” to bring up its main menu. Use the “Input” menu to set up the gamepads. Use the “Misc” menu to assign the exit button.

And don’t forget to enable full screen.

When you add your SNES collection in XBMC, the path to the zsnes command is the expected “/usr/bin/zsnes”.

Arcade Emulator

I found that the mame emulator works great for arcade games.

Press “Tab” to bring up its main menu. Under “Input (general)”, you can find the close command that is currently bound to “Esc” and replace it with your middle gamepad button. I found that most games needed me to individually set up “Input (this game)” bindings.

When you add your arcade collection in XBMC, note that the path to the mame command is “/usr/games/mame“.

Using the TV

I did hit one weird problem using the TV. Both mednafen and zsnes, if fullscreen, would switch which monitor was turned on. To stop them from doing that, I had to manually set each emulator’s fullscreen resolution to the size of TV.

Tada!

Anyway, that’s “all” it takes. Now you have an awesome emulator station. You can also use the “Advanced Launcher” XBMC add-on to add launchers for Ubuntu games that work well with gamepads, like Jamestown.

To avoid using the mouse or keyboard at all, you can set your user to automatically log in and add XBMC to your startup applications.

Playing Well: Golden Rule

This is part of a series on how to play games well: Stoicly and enjoyably. Not to triumph, but to have fun.

This one is simple. Merely putting yourself in the other players’ shoes is the key to winning or losing well. Sounds obvious, but it’s easy to forget in the heat of the moment.

This is a very subjective rule and audience-dependent, but it’s flexibility is a feature. I’ll just give some examples of things that I find can often be off-putting and worth avoiding.

  • Taking overt pleasure in the conquest instead of the play.
  • Conversely, being angry, depressed, or obsessed about the fact that you’re losing.
  • Blaming luck.
  • Noting the cleverness of your own moves.
  • Suggesting that if a certain thing had happened differently, you would have totally won (obviously all players can construct fictional pasts where they won, but it’s not terribly interesting or helpful).
  • Similarly, the “I would have won in X more turns” argument.
  • Taking too long.

Now, these can all be done in good ways. It’s just that they can easily be unwanted.

Just think about the ideal behavior of someone you’ve just beaten. Now do that when you are beaten. Same for the ideal behavior of someone who’s just beaten you.

One interesting corollary here is that when you are doing well, it’s encouraged to note the bad luck of your losing opponent. Or if you’re doing poorly, how awesome a certain move of theirs was. It gives people the chance to talk about it without having brought it up (assuming you actually do want to talk about it :)).

Playing Well: No Stress Losing

This is part of a series on how to play games well: Stoicly and enjoyably. Not to triumph, but to have fun.

How to deal with failure? Everyone loses, but not always well.

One easy strategy is to realize that the past has already happened. It can’t be changed; period. Nor can the present really. You can control what will happen a nanosecond from now, but not what is happening this moment.

The past of a minute ago is as much a part of the historical record and unchangeable as “before you were born.” And no one sits around worrying about stuff that happened then. You just accept it as your time-inheritance.

So what’s the point in worrying about something you have no control over? Use the past to inform your future behavior, but don’t cry over spilt milk.

Don’t sit there depressed about what you’ve gotten yourself into. Just concentrate on how you’re going to dig yourself out or how you’ll do things differently next time.

In the same spirit, if someone just screwed you over, don’t stress about it to the point of ruling out cooperation in the future. Not that you should forget what happened, but dwelling on it will cause you to miss opportunities for collaboration.

One useful exercise is to imagine that you just walked into the room and took over a spot for someone that left. Then ask yourself, “Now what?” Because that’s what you do every second: take over from a younger, handsomer you.

Ideally this way of thinking about the past will make you happier. You can live in the moment and not stress about the foolish mistakes of you-from-two-minutes-ago. Though hopefully you can learn from them.

Battlestar Galactica And Singularities

Two quick recommendations today!

BSG

One is Battlestar Galactica the board game. It’s very good; basically Mafia the board game.

The players (all characters from the show) are each given secret cards that say whether they’re human or cylon. Halfway through the game they’re each given another one (a ‘sleeper cylon’ flavor).

The humans’ goal is to survive (not run out of food, fuel, people, or morale) until the fleet reaches their destination. The cylons’ goal is to sap those resources and slow the fleet down.

Often the secret cylons sabotage while amongst the humans. So it makes for lots of interesting accusations and all that jazz.

The Singularity

The other recommendation is the book Accelerando by Charles Stross. I read it back when it was up for the Hugo in 2006, but I had forgotten the name until recently.

It’s about humanity reaching a singularity and is full of interesting ideas and technologies. Worth a read if like science fiction. It’s even available as a CC-licensed download, so no reason not to read it!

Ode to Playing Cards

♣ So old that the delightfully symbolic is comfortably familiar, ♠
♦ Playing cards are the Everyman’s Everygame. ♥
♥ Cerebral, twitchy, or drunken; amassed or singular; ♦
♠ All you need to start a game is a name! ♣

In all seriousness, I’ve renewed my appreciation of playing cards. But surprisingly, I’ve been having little success aggressively pushing a game of Canasta on my friends at every opportunity.

Also surprisingly, many of you don’t even own packs of cards. You fuckers are getting care packages.

Linux Games

Now is the perfect time for a revival of Linux gaming. By that, I mean middle-tier commercial games running on Linux natively.

The state of the desktop and Ubuntu in particular is advanced enough to be comfortable for many casual users. I know people for whom I feel gaming is the big drawback, the reason why it’s not worth living in Linux. It’s certainly a common lament on the Internet.

People keep saying ‘this could be the year of desktop Linux,’ enough so that the phrase is a joke. I’m not going to claim that (if it even has any meaning), but it’s ready. Gamers are just the sort of user that would warm to Linux. People that don’t balk at installing custom drivers for their video card or going through the kind of hoops that most games ask of you can certainly handle the learning curve of Linux. Or at least are familiar with searching online for troubleshooting.

If Linux could at least start being competitive on the games front, it would be a big win for it. It doesn’t need to be all games, or even many top-tier games. The goal would be reducing the need to reboot. Enough that one can live in Linux, and use Windows just for a couple games.

Technically, the biggest barrier is probably OpenGL. OpenGL works fine in Linux, but there are now common user-space programs that also want to write to the screen through 3D hardware. Like Vista’s UI. Video drivers are going through some API changes to flawlessly support that (and for other reasons), and we’re still in transition. An example of the problems this can cause are having to turn off desktop 3D effects before playing a game. A bit of a turn off.

Also audio. Audio works fine on Linux, but it’s not a cross-platform API. A developer would have to do the work of creating a little abstraction layer themselves. And learn ALSA.

Strategically, the biggest barrier is obviously Microsoft. They encourage DirectX, Games for Windows, and their whole ecosystem. Which buys a developer a lot these days, in terms of easy portability to the never-more-relevant console world via the XBOX.

I doubt it’s currently worth it for any single developer to bother with a Linux port. It would be too much work. They’d have to hire expertise in porting, they would have to figure out how to distribute it, which is non-trivial. If I wasn’t intimately involved in Linux land, I would be very intimidated by what I’d have to know to make a game that worked on the largest amount of distros. And to make it integrate well into the user’s computer (you know, install into the menus correctly, be a package that can be removed, installed, or updated via the user’s package manager), would be an extra level of complexity.

However, all’s not lost! The best hope I have is for someone at Valve to see the Linux light — or a competitor to arise and see the light. 🙂 If they ported Steam over, it would solve the distribution issues. The developer would still have to write a game that could work in Linux, which is non-trivial. But once accomplished, they just have to flip a Steam bit and be done with it. The various ‘accessories’ around a game, like an installer, an updater, and OS integration don’t need to be written. I think it would be a compelling story for a developer. There’s vague (denied) rumors of Valve already looking down this road, but I’m not holding my breath.

Still a lot of work to port a game. But smaller game houses already do that work, because they’re more desperate for any slice of the market. Games like Rain Slick Precipice or Savage. Steam carries those kinds of games (and does carry Savage).

It’d be a good way for them to generate some buzz and goodwill without too much effort (they only really need to make a little bit of middleware work). And if it succeeded, they’d be ever more entrenched as the distribution medium of choice. But still, it’s a gamble in which few game companies have had interest. But I maintain that now would be a good time for them to try it (recession notwithstanding).

Magic, Vs Style

A while ago, Casey introduced me to the card game Vs System. It had a neat resource system where you could play any card as a resource of the same type. In Magic terms, you could play a black card as a Swamp, a green card as a Forest, etc.

What’s that you say? “What a brilliant idea!?” I agree! I’ve been thinking about how exactly such a system would work in the Magic universe.

It turns out that Wizards has already toyed with this idea, via their Magic Online Vanguard series of avatars. The Dakkon Blackblade avatar reads:

You may play any colored card from your hand as a copy of a basic land card chosen at random that can produce mana of one of the card’s colors.

Since I’m considering playing not online, but in meat space, where it can be a pain to make random decisions and keep track of them, I’d probably just make that:

You may play any single-colored card from your hand as a copy of a basic land card that can produce mana of the card’s color. You may play any non-land colorless or multi-colored card as a land that can produce one colorless mana.

Here’s how I think this plays out, after having played it this way a couple times:

  1. No mana flood or screw ever — you can’t have too little or too much mana, though you can definitely still get yourself in the position where you don’t have the right colors. Sort of. If you put in too many gold or colorless cards, then you can run into problems. So just be careful about providing enough solid color cards. If you were to use Dakkon’s rules (pick a random color), this point is relieved somewhat.
  2. The mana curve shifts right. Expensive cards are much more playable (you can guarantee playing it by just waiting X turns).
    Thus, bombs are more omni-present. I don’t think this is necessarily a bad thing (might make the game more interesting as a whole). People should just pack more insta-removal and Naturalizes. Plus, each player should have bombs, and neither player should be
    stuck at 2 mana. More grand clashes.
  3. Choosing which card to use as land and which to play was excruciating sometimes. Every hand was like a little puzzle. “If I spend this for mana, I can play these four other cards, but if I wait, I can do this and this on turn 5.” etc. This will get worse as the quality of decks goes up. It sucks to have to use an Oblivion Ring as a Plains. You have to really plan for the future. Lots of opportunity to mess up. I several times cursed using a certain card as land later in the game.
  4. Mana ramping is still good (playing cards like Druids that give you more mana faster). Mana smoothing becomes worse, but not useless, because it lets you play both your good black cards in your hand, rather than tossing one to play the other.
  5. Splashing colors is far less dangerous. Though you still need to draw at least two cards of the appropriate color to play any of them. So you have to be smart about your splashing. But that one red card in your hand that normally is useless just become a land.
  6. Color hosers and various sideboard cards will be maindecked. Situational cards of all stripes become playable. In fact, although I know this is a completely irrational response, I was often relieved to see a useless card in my hand, because it meant an easy choice for what to play as land.
  7. I don’t think the game necessarily slows down. I just think it makes all phases of the game important. You can still have a deck that rushes early before its opponent gets all the bombs he stuffed his deck with. Getting in that 10 points of damage before the end-game is still huge. But it does make it harder to maintain that early advantage.
  8. Land removal is crappy. It was always crappy, though, unless your deck was very well tuned for it (sligh red for example). There is an argument here that land removal becomes very close to discard, since your opponent is likely to replace the land with a new card from their hand. And discard is very good, since your opponent likely has bombs… But it’s a bit circuitous, and land destruction doesn’t usually net card advantage.
  9. Speaking of which, card advantage of any sort becomes huge. You’re not wasting your draws on puny Forests anymore, unless you want to.
  10. Not only does revealing cards from your deck as you play lands show your opponent what your deck is like, it shows your opponent what your hand is like and/or what you’re thinking (I got real worried when I saw that Ring being tossed). There is an interesting opportunity here to send signals to your opponent.
  11. During playtesting (with very terrible, hastily-thrown-together decks), after we got around six mana sources, we kind of stopped playing them, and started playing off the top of the library. A little like Off the Top, which was somewhat worrisome to us. But we figured normal Magic is like that too, once you get six lands. This just was more efficient about getting to that point and staying there.

Anyway, I’m super pumped to play this way. But no one else seems to be as excited (with the notable exception of Matt Cheung, my fellow playtester). QQ

Unity Games

Elaine and I recently went to Unity Games, at Ben’s suggestion. It was way more awesome than I had thought it would be.

You pay $15 at the door (or $12.50 ahead) and you go into this giant hotel ballroom. There’s the standard quick-set-up tables in rows with geeks sitting in them, but along the wall are all these card tables with stacks and stacks of obscure board games.

Each stack seemed to be brought by a different participant and you just borrowed a game, played it, and then returned it to the same stack. It was a very great way to play new games, and the people there were nice.

Notably, we found two new awesome games, and one particular stinker:

Dominion
This game is a great little card game. You and the other players each try to build your own deck of cards, containing a mix of money, victory, and action cards. You draw from your own built deck, so choose your ratios wisely. Whoever ends with the most victory cards wins. Unfortunately, it’s only for 2-4 players, but we played it with 5 once, and it didn’t explode. By playing with a different set of available action cards each game, you get pretty good replayability.
Robo Rally
Yes, this game is as old as dirt, but it was the first time I played it. I bought it later, I liked it so much. You play a robot in a factory trying to reach various flags before the other robots do. But the catch is that you submit move instructions to the robot at the same time as everyone else. When they get executed simultaneously, hilarity often ensues. The various maps, with their extra challenges and team play, add a lot of replayability. Plus, you can play with 2-8 players, which is a nice range.
Timber Tom
This game looked really neat, with a crazy three-dimensional board and little figurines, but we ended up voting No Confidence within 15 minutes. It was just too much work for not enough fun.

Unity Games happens every 6 months. I’d recommend it!

Chaotic

My brother Steve has long enjoyed playing and analyzing games, like I do. So he was excited to start an internship with the company that makes the Chaotic trading card game, over in San Diego.

He has basically a great job, helping design and test new cards. He reminded me about the game recently, and I checked it out more thoroughly.

It has some neat mechanics. I’ll describe them in Magic terms, because that’s how I forever relate to card games, and how my friends would understand. Sorry, Steve.

Basically, you put all your creatures for the game out on the table at the start, each with a hidden aura. You have two shuffled pile of instants, one for creature attacks, one for anytime. The attack pile is limited to 20 points of what I assume are ‘quality’ points — each card consumes some amount of that 20 points, and presumably they balance better cards by making you spend more of the points, though I haven’t yet seen examples of that.

When you put your creatures out, you put them on an inverted triangle layout. So does your opponent, with the two top sides of the triangles touching:

▯
▯ ▯
▯ ▯ ▯
▮ ▮ ▮
▮ ▮
▮

And to attack, you have to move your creature up to one square away, onto an enemy creature. So there’s a bit of positional strategy.

When you first attack a creature, both hidden auras are revealed. Then you keep going through rounds of battle, playing new attack spells, until one creature dies. The other creature then becomes healed and moves onto the spot (or stays there if defending). When all your creatures are dead, you lose.

One interesting twist on the game is that each card has a code on the bottom, that you can enter onto their site. This adds the card to your virtual collection, with which you can play free online too. Magic should do that. No reason not to, since they have the whole online collection/interface thing well tested; they just need to drop a code on the front of the cards.