nsuds: A text-based tour-de-force

I saved nsuds to the end of the month specifically because I could see that it was a fine piece of work.

2015-03-29-6m47421-nsuds-01 2015-03-29-6m47421-nsuds-02 2015-03-29-6m47421-nsuds-03 2015-03-29-6m47421-nsuds-04

I should point out that I’m no kind of sudoku fan. I know the rules and I’ve played the game more than once, but it’s not something that grabs my attention or captures my spare time. I find it a bit repetitive, if I must be honest.

But nsuds manages to take that simple game and turn it into a text-based tour-de-force. If you remember my list of high points for text-based software from the start of this year, nsuds manages to hit everything — cleanly, and with considerable authority too.

Does what it promises? Check. Has color? Yes, lots of it. Uses a full-screen interface? Yes, with popup-menus, LED-style clock readouts and scrollable window boxes. On-screen help? Yup, with a lovely scrolling popup window that explains all the keypresses and options available as you play.

Ladies and gentlemen, this is how it’s done.

In fact, my only complaint would be the way it handles very large terminals. Small ones are okay: There is some clipping, but it doesn’t kill the process. Large windows are mostly painted but very large spaces are left untouched — until a popup window pounces on the entire space. Which looks a little silly. :roll:

I won’t bother to go into actual gameplay, because aside from arrow and number keys, there’s very little that you need to learn about nsuds. And what’s left is available from the popup help screens.

It’s almost a shame that this much effort and style went into a game as simple and unassuming as sudoku. Imagine what the authors could do with a game of considerable depth and substance. … :|

In any case, I can only hope that they find their way into deeper waters. The world needs programmers who aren’t afraid to make magic for the console. A well-deserved gold star for nsuds, and the hope that more is forthcoming: :star: Enjoy! :)

hydraslayer: A mathematical approach to the roguelike

As promised, no roguelike is shown here unless it can brag of something unusual. Here’s hydraslayer, which may have a small measure in common with encircled, of all things:


The “unusual” part of hydraslayer is in its mathematical puzzle style: The number of heads on each hydra will predicate which weapons and items you want to use in combat. It may be that your sabre can slice five heads off a hydra in a single sweep, but it’s not usable against something with only four.

And it may be that your dagger can cut off two heads at a time, but if you attack something with three heads, then it’s possible that the monster will regrow even more afterward.

So there’s some thinking involved, and some prudence in which weapons and items you can employ. Knowing that a hydra has nine heads and you have weapons that will work against five or two means you might want to cast about the dungeon in search of something that won’t get you killed while you work out the math.

hydraslayer simplifies the class and race designs of most roguelikes and allows you to pick between three or four with discrete abilities. For example, Titans can carry extra gear, but have to use special items as soon as they are picked up. Give a little, get a little. Twins, by comparison, are an adventuring pair with switchable controls, hopefully gaining a little advantage in some situations.

Color is great, and there are some small-scale animation effects, like stars that spin around a hydra glyph when you stun it with a potion. I like that.

What I saw of the math was never more difficult than a short string of mental addition. Even the toughest monsters I saw were negotiable so long as I took the time to think about the effects of a weapon, and work it down to a manageable size. So don’t be intimidated by a “math” roguelike.

Help screens are numerous and the tutorial will walk you through the basics and then drop you straight into level one. Geographically speaking, the game seems comfortable at 80×24 and larger, but the maps and interface don’t stretch any further.

hydraslayer is in AUR but the PKGBUILD doesn’t quite work right; the download link on the home page will give you the same material in a larger pack of roguelikes, and hydraslayer will build and run from that file without any of the other components.

I like hydraslayer; it’s sufficiently different to be noticeable, but not so obscure and convoluted that it becomes unappealing, like encircled. It has all the right components and makes a special effort to be challenging, and at the same time fun, unusual and playable. A healthy gold star for hydraslayer: :star: Enjoy! :)

ckhet: I have no idea what I’m doing

I found a game called ckhet, which is supposedly patterned after a boardgame called Khet, but I haven’t a clue how to make it work.


I understand that the red line is a laser and the idea is to control its reflection by turning pieces, but I’ve never played the boardgame and this particular version is rather tight-lipped.

I can tell you that you’ll need to start ckhet once in a terminal as a “server,” and connect through another with ckhet localhost for a two-player game. For a single-player game against the AI, you need to give the “server” a robot as a flag; check the -h list for how to do that.

Once the game is running, there seem to be only two or three controls: space or Enter to select a piece, and the bracket keys to rotate it once left or right. What the goal is beyond that, or how to win the game … I’m not sure. No man page that I could find, and the best source of information was in the README or on the Wikipedia page for the boardgame. :(

It’s a good looking game and seems to have a strong idea of how to conduct itself, but for now, I’m just a little clueless on how to play the game at all.

pyro and pacman-for-python: Piggybacking python

I’m going to piggyback one program onto another today, because it doesn’t really have enough oomph to stand on its own. And in this case, the two titles have their core language in common. Here’s pyro, to start us off.


pyro’s home page says it hopes to be “the first major roguelike game” written entirely in python. Of course, that claim may go back to 2006, and I’m not sure if it made it in under the wire. Nowadays there are quite a few roguelikes that use python2.x and some at python3; I don’t know which ones would deserve the “major” appellation.

pyro does not strike me as particularly innovative in terms of roguelikes, and in some senses seems to be lacking a few important points. If the home page is correct and the game isn’t quite finished then I’m willing to forgive that.

Color use is good, but you must have a terminal of at least 80×25 (not x24) or you’ll get python errors. Character creation is very rudimentary, where selecting a class pins you to a race (or perhaps vice-versa), and classes seem tied to your choice of “god.” There is no chance to tweak ability scores or other statistics, even though the readme files suggest a lot of the game’s mechanics rely on those.

Occasionally there are incomplete screens or placeholders for certain features. pyro’s closing screens mention that there would be a save feature there, at some point. The command key rundown is visible with the question mark key, but there seem to be some points (most glaring is spellcasting) that are missing.

My biggest complaint would just be movement keys, which by default are number pad directions. That means laptop users like me are going to be fiddling with the Fn and NumLk keys a lot. No doubt an enterprising player-stroke-programmer could knuckle down and edit the source files to change those, but I’m not very enterprising, and besides, for what I’ve seen of pyro, it doesn’t really grab me.

Taken as a whole, pyro has the groundwork for a decent python roguelike all in place, and just needs to be updated and embellished. Like so many other programs I see though, it’s fast approaching that 10-year mark where the likelihood of getting that attention is very, very slim.

Now for the second title, as promised: pacman-for-python.


Eugene Antimirov’s Pac-Man derivative is simple and straightforward, and incorporates enough AI to make it a workable clone, even if it does miss big chunks of the original game.

Arrow keys move your atpersand around the screen and clearing the maze of dots (periods) ends the game with a congratulatory message. Touch a ghost and the game ends with a sad announcement.

No power pills though. No multiple lives either. No attract screen or welcome message. And aside from simple direction finding, the ghosts don’t patrol or circle. The maze is determined by the contents of map.dat, which you can edit as a plain text file. So if you want something with more symmetry, you can build it. Or just open the entire field to dots. :|


I noticed one other thing that pacman-for-python needs to overcome: There’s a blatant discrepancy between the speed of the ghosts and the speed of the player.

Probably just by virtue of mechanics, it’s possible to zip around the maze at a high speed because the key repeat and refresh rates are so much faster for the player than for the ghosts. Ghosts seem to move about once a second; by holding down a direction key your glyph can move three or four times as fast.

Which means even the best AI isn’t going to have much luck in catching you, since you’re five steps away before it gets the chance to make one move. It’s probably a point that can be resolved easily, with a small delay in the player’s movement code.

That’s all for now. I should tie up these games by the end of the month, and we can move back to boring old utilities and system monitors, file catalogs and music clients. Yawn. … :???:

z-day: A slightly different perspective on slaughtering zombies

I have a couple more roguelikes on my list, which will probably carry us right up to the end of the month. This is z-day, which I include mostly because it’s written in python, and because suggests a few changes to the tired old roguelike interface.


By any yardstick, z-day is a bit primitive. It lacks a lot of the features you might expect — or want — from a roguelike, but I’m willing to overlook most of those because the home page hints that the game was never really finished. That’s fair.

Most of the reason to include it (aside from the copious amounts of color ;) ) is the inventory-only approach. Almost every key corresponds to some sort of item in your inventory, and pressing the appropriate key triggers its use.

That’s the case with almost everything except ranged items, which will require you to use the “z” key to fire. Other than that, arrow keys will move you and “a” and “u” are dedicated to equipping or using.

So there don’t seem to be any provisions for character abilities or background, no proficiencies to master or improve.

z-day breaks down your physical state into two categories, wounds and stamina. Wounds, as you might imagine, reflect how much damage you’ve taken, but stamina suggests how much more you can take. You might suffer a blow from a zombie while your stamina is high and shrug it off, but the same impact while your stamina is low might kill you.

That too is a different approach to the classical 1978-bound “hit point” model, and therefore worth mention. z-day also is stretchable to almost any terminal size. And it has a few other nifty tricks, but nothing huge that you won’t overlook on your own, if you try it.

In the category of downsides, z-day has some mapping issues that cause the screen to map and remap as you get close to the edges, which can be irritating. And there’s the question of whether the “a” key is somehow dedicated to inventory, or if an item in the “a” slot will be activated when you press it. Same for a few other letters.

I’m also a little distressed that throwing away an item destroys it irrevocably, supposedly because it’s “lost” in the mess. I’ve seen this in big-name top-tier games too, and in this day and age it strikes me as a huge cop-out. Much smaller, much less resource-hungry games are capable of managing loose scattered items on a map, so I see that as a considerable disappointment.

Other than that z-day strikes me as functional, and possibly the beginnings of a decent game. I don’t see it in either Debian or AUR, but the source file ran fine for me with just python2 zday.py.

gnupong and yapong: One bad, one … better

I’m dreading talking about gnupong and yapong, mostly because I’m in that “weak sauce” area again.

Pong itself is no masterpiece of programming, and in this case we’re reaching so far back into game history that even the finest, freshest, most faithful rendition of the original game is going to be a bit … sparse.

These two are on my list though, so I feel obligated to include them. The first is gnupong, which has dates in its source files that reach back to 1998.


If that looks pretty weak to you, it is. This is more a one-person variation on the original Pong than a clever imitation at the console. And given that it has an upright orientation over a horizontal one, it has more of a feel of Arkanoid than Pong proper.

No score display, until the game is over. No help on controls, until you read through the source files (hint: “a” and “l” for left and right). No help on speed controls or quitting the game, and when you miss a ball, it all comes crashing down.

I’m almost embarrassed to include it.

yapong, on the other hand, is a better attempt.


Here we have the original side-by-side arrangement, the vertical controls (up and down for the right player, “a” and “z” for the left) and proper rebounding action for the ball. Score is on-screen and visible, and the game doesn’t smash-to-black every time one side makes a mistake.

Space drops the ball and continues play after a point, with “q” as a dropout key. Check the help flags for difficulty and animation controls; in my case yapong -l 1 was a good shortcut for a playable game at 2.6Ghz.

No AI players though. And still no color, although I expect the argument could be made that the arcade version had no color either, so it’s an issue of fidelity.

Regardless, I will set these aside for now, as two titles that are done and done. One bad, but one better. :|

P.S.: yapong is in AUR only; gnupong will compile if you add using namespace std; after #include <iostream> in pong.cpp … according to my notes. ;)

cursedmate: Right ingredients, but not yet perfect

I’m not sure if I should call cursedmate a Snake game or a Dig-Dug clone.


After all, there seems to be an excavation theme at work here, and we’re collecting the pound symbols. But nothing ever collapses.

And we’re technically staking out a path, but it doesn’t seem to matter if you cross over it or not.

So it’s a middle ground of some sort, with the theme being a hacker evading fed(z). Pound symbols are zerodays (or maybe they’re xploitz, the game seems to use two different names) and red letter O’s are the bad guys.

Finish a level by collecting all the xploitz, whereupon you’ll get a rank or wisecrack for your progress, an then pass through a tunnel to a new board. Later boards have faster fed(z) that snatch the zerodays if they touch them, or are decorated in different patterns or colors.

cursedmate is python-driven, and isn’t a bad game on the whole. The animation and movement effects are smooth, and pop-up menus and displays don’t get in the way of the action.

One small irritant: The transition screen takes a few seconds to pass through, but doesn’t have a way to escape it once it begins. Not that it’s a big deal, but skipping through the animation to the next level would be nice.

Further, cursedmate is not terrifically difficult. I think I cleared the first 10 levels of the game the first time I played it, and without even thinking about the fed(z). AI movement is obviously random, which means you only need to worry if you’re within a cell or two of a fed(z), and even then the odds are they won’t randomly leap onto you.

And once or twice the game crashed without warning, mostly at a point where the level was almost finished. But I’m not sure if that’s something I did, or something that was happening in the background.

Oh, and in case it matters to you, there is some off-color language included here and there.

cursedmate feels like it’s one step away from a very good game, but needs a little more polishing before it reaches that top tier. It has all the right ingredients — color, animation, a goal and some worthy adversaries — but it seems to lack that special oomph that makes it more of a game and less of a programming experiment. :|