textadept: “Adept” is apt

I’m always on the lookout for good text editors, mostly because I think the fragile and uneasy triumvirate of vim, emacs and nano — which rules the Unix multiverse with a quavering fist and super-funky key controls — is ripe for being overturned. Ordinarily I would put forth jed as my candidate of choice, but textadept might be another possible usurper.

2014-10-01-6m47421-textadept-01 2014-10-01-6m47421-textadept-02 2014-10-01-6m47421-textadept-03

As I understand it, textadept is primarily intended to run under a graphical environment, but the version I installed out of AUR includes textadept-curses, which you see above. And I like what I see.

Boxed popup dialog windows. Controls that mimic the “CTRL+C for copy, CTRL+V for paste, CTRL+O for open, CTRL+S for save, CTRL+W for close, CTRL+Q for quit” keybindings that date back a decade or two. Customizable keybindings, if you hate those ones from two decades ago. Autopaired braces and brackets. Autocompletion. Code folding. Interactive search-and-replace. SHIFT+ARROW to mark text. Multiple document capability. Split-screen views. The list goes on.

The list, I should mention, doesn’t seem quite complete though. I have to admit that some of the gimmicks that were supposedly available in the ‘curses version didn’t seem to work for me, which is sad. I’m willing to overlook that, so long as I can chalk the omission up to my error or the way the AUR version is packaged.

As I understand it, textadept has made a pledge never to exceed 2000 lines of C, plus a few thousand more of Lua, but is extensible through a module system. I didn’t dig deep enough to see exactly how that worked, but I might take the time, because textadept is a nifty tool. I like how it behaves by default, which is more than I can say for any of the aforementioned triumvirate.

Whether you adopt textadept or not, the lesson to be learned here is that there are plenty of options available that are friendlier and easier to use than either vim or emacs (although nano isn’t terrible). My advice would be to seek one out, but I’m rather rotten at taking my own advice. :???:

vche: Serious as it gets

I promised something a little more serious today, and I can think of nothing more serious than a hex editor. Here’s vche:


I did run into a short list of hex editors for the console a few weeks ago, which is why vche is up now and why aphex was listed 10 days ago. Which is all the more curious because, as I say every time I see a hex editor, I almost never have any use for a hex editor.

All the same, I like a few things about vche that might not (or might) be part of the hex editor you use:

  • Plenty of color, and well arranged. It’s easy to see what and where you’ve edited.
  • Has separate versions for consoles and X-ish environments, and one that’s flexible enough for either case. I don’t know exactly why that’s necessary, but it does mean there’s a version that won’t show my favorite block character where the font fails a terminal window.
  • Has one-key presses for XOR, OR, AND and other bit operations. Again, not that I would never need that, but it’s cool.
  • Has a quick jump between ASCII and hex editing with the TAB key. It seemed natural to me, so I had to mention it.

vche has a lot of other clever tools on board. I’ll let you take a closer look and see if something tickles your fancy.

I must be honest and say that I did have a little screen corruption, but only when the help window appeared. And if I must be honest again, that help window is not a help window. All it does is tell you to look at the man page. We can do better than that, people. …

I have a few more hex editors to show, but I’ll space them out over the weeks to come. I don’t mind lumping games (particularly minesweeper games) into a single post, but I think an oh-so-serious tool like a hex editor should probably be taken on its own. :|

P.S.: If you find you like vche, you might consider adopting the Windows version for your other machines.

rogue and hack: The emu scored an excellent hit

I lied. I said I was done with everything in bsd-games, but I knew when I typed it that I still had Hack on deck. I apologize. :oops:

But I wanted to put Rogue and Hack in the same post because honestly, I don’t see much difference between the two. And they’re both quite excellent games … even if they are indistinguishable at first glance

2014-09-29-6m47421-hack 2014-09-29-6m47421-rogue

Which one is Rogue and which one is Hack? You puzzle it out. And if you need a hint, check the links.

The Internet tells me that Hack postdates Rogue by a few years, that Hack adds a few gameplay innovations, and that Hack went on to evolve into NetHack. And the Internet is always right. :roll:

Be that as it may, Rogue and Hack give me flashbacks to the days of 286 machines, when something like this was worthy of spending most of a weekend with. If I remember right, I got quite speedy with the key commands. I think I may have even installed this on my first hard drive, a 30Mb Western Digital that weighed about 38 lbs. … :\

The sad part is, I’d trip over myself to get past either of these now, if it meant I could get a shot at playing Crawl. Rogue and Hack were tremendous innovations and loads of fun, but they had their eccentricities. (Why can my adventurer only see one square in front of him?! Am I a myopic adventurer?! :evil: )

Games like Crawl and Gearhead 2 and Cataclysm and the thousands of roguelike spinoffs took the idea, and wove it into something new … and sometimes better. Rogue and Hack are good for a little nostalgia, but there are dozens of variations of either of those titles that are brilliant ideas in their own right.

I would be in error not to mention either of these though, since they are available in quite a few distros and represent a legacy. And don’t think the irony is lost, of me taking sides with games that date back a dozen years, over games that date back dozens more. Text-based gamers can afford to be picky. ;)

pacman4console: The classic, and some madness

I have a couple more games to show, so I’ll push them out the door now. After these I promise I’ll show a few programs with more serious functions. :)

The tough part about discussing games for the console is that there are some truly fantastic text-only games out there, regardless of what genre or diversion you’re looking for.

One of my most enjoyable discoveries was myman, which attempts a pixel-perfect rendition of just about every variant of the classic Pac-Man arcade game. It’s an amazing piece of work, either in a console, framebuffer or X-based environment.

But it does imply a few more resources than you might be willing to offer, if you just want a quick three- or four-minute diversion at the console. For something lighter, pacman4console is a good choice.


All the fundamentals are here, including the attract screen, a basic starting map, arrow key controls, multicolor ghosts and so forth. All except the wokka-wokka sound clips, for what I can tell. ;)

pacman4console adds a few nice fillips, for example, scared ghosts are timers that count down to their restoration. That keeps you from chomping on them as they’re about to turn back.

And the color and character themes are spot-on. It would be interesting to see a version that draws walls with blue pipe symbols rather than white blocks, but that’s a very small point.

pacman4console takes liberties with the later maps though, and will make you wish for the old days at the arcade when there were no deliberately difficult mazes. You can start a specific level from the CLI, and the upper level maps — like maze 7, 8 or 9 — are obviously intended to make your life difficult.

It’s tough to hold up pacman4console in its own light, mostly because I’ve seen myman and I know how impressive it is. pacman4console is simpler and lighter than myman though, so you can judge exactly how close you want to come to the original experience, and decide from there. ;)

ship_game: Keeping with the recent theme

This game theme started yesterday and I’m willing to just keep going with it. Here’s ship_game, made by the same author as minefield, from yesterday.


ship_game follows the Space Invaders formula, but pares it down to a bare minimum. On-screen cues call for left-and-right movement, and spacebar to fire. Scoring seems to involve hitting invaders while they are dim, which removes them from the board. New ones spawn randomly.

I’m happy to say ship_game does not insult the player for losing; in fact, ship_game appears to be the kinder, gentler relative of minefield. This pleases me.

And aside from its somewhat slow pace, wide spacing (stretching the game board over your terminal width) and lack of --help or man page information, it has very few shortcomings. It’s colorful, playable and easy to learn.

Like stardork though, it could do with a few enhancements. And I’m not clear on what’s happening when invaders are bolded, and when they are dim. More information on scoring would be nice, too.

I am willing to call ship_game a good game, with the understanding that it will take a bit more work for ship_game to be a great game.

ncursesoflife: Manipulate the show

My posts have become rather wordy of late, particularly when compared with the early days of this site. I should work on trimming back on the word count. This is a good one to start with: ncursesoflife.


It’s a smaller project, but also a newer one. Two renditions of Conway’s Game of Life have graced these pages — zivot and ncurses-life. I like ncursesoflife better than either of those, because it allows you to draw out your own patterns, and watch them evolve. (True, zivot allowed that, but zivot had problems that eclipsed its few “features.” :( )

Arrow keys to navigate. Space bar to mark or remove a cell. The “p” key is a play/pause button. Speed controls are with the plus and minus keys. And I see by picking through the code that pressing “i” blanks the screen so you can start over without quitting or erasing every cell one at a time.

Downsides: Lacks any onboard help, which seems to be a theme these days. :\ Cell growth can wrap around the screen, but your cursor can’t, which is occasionally annoying. Pressing “i” also blanks the iteration counter. Pressing “i” also doesn’t pause the game, and pressing “i” also doesn’t seem to work while the game is paused. From a player standpoint, it seems like both of those should be reversed.

Thus far, after almost two years of digging around in console applications, I think this is the version of ‘Life that I like best. There are more out there and perhaps another will take its place. We shall see. Oh yes, we shall see. … :|

stardork: Has all the right ingredients

I’ve been playing computer games since primary school. That’s doesn’t make me any kind of expert, but it does mean I can see when a program has all the right elements to mix together for a decent game.

We need some sort of skill for the player to demonstrate. It needs to become gradually harder to exhibit. There needs to be some sort of counteractive presence or force, and it needs to also gradually grow stronger. That — plus a few other things, perhaps some blinky lights and a killer soundtrack — is generally a basic recipe for a fairly decent game.

And for most arcade-ish action games (and perhaps even in other genres) you can probably see those elements. Just having them doesn’t mean the game is going to be great though.

stardork has almost all of those ingredients and yet … is still missing that certain “kwan.”


Your ship is the X. The @ symbol is a wormhole, and single dots are stars. Your mission is to make contact with the wormhole, either by flying into it or by firing a probe into it. Moving into a star causes a power drain, and reaching zero power will drain one “life.” Successfully connecting with the wormhole launches you into the next level, where the starfield becomes denser.

It’s a fairly simple recipe, and one which makes stardork more of a maze game than anything: The challenge is to maneuver your ship into a position to fire into the wormhole without touching too many stars, without losing lives and in the least number of “moves.”

stardork falls short on a couple of points though.

First, stardork keeps count of the number of moves you make to survive, but is actually counting keypresses. Invalid keys are counted as well, which seems like a minor error that needs correcting.

Second, stardork doesn’t make a distinction between moving into a wormhole or firing into it, which means it is far easier to bring your ship into line with a wormhole than to actually navigate across the screen to it. The only exception to this rule is if you and the wormhole spawn fairly close by.

Third, stardork doesn’t really challenge the player aside from directional navigation. There are no pursuing beasts, no timer to beat, and other than accidentally touching a star, no real danger. Furthermore you have directional control to every point on the compass — which means it will be a long time before the star density becomes so bad that you can’t obliquely dodge a blockade of stars.

Fourth, there are occasions when you will spawn on top of a star, which penalizes you at no fault of your own. Similarly, the stars are randomly plotted, which means there will come times when you must move through a star to achieve your goal. While there is a small measure of strategy that comes into play in those cases, you’re ultimately being penalized again for circumstances which you can’t evade through your skill set.

(And I’ll mention it, only because I harped on so many minesweeper games for the same problem: stardork needs a little more documentation on board, preferably in --help flags or a man page. The home page has most of the documentation I was able to find.)

I can think of a lot of ways to improve stardork. Add a timer or fuel meter. Add pursuers. Make a distinction between firing a probe into a wormhole and physically entering it. Add a hyperspace key, a la robots. Limit directional controls. Add gravitational forces. Allow stars to fade in and out. Let the wormhole drift. Let the player drift. Add a nonthreatening but competitive computer-driven spaceship. The variations are endless.

I’m not a programmer though, and I’d be rude to suggest too much into a project that isn’t mine and I’m not prepared to jump into. Suffice to say that technically, as it stands, stardork is a working game and doesn’t need any coaxing to offer a little distraction. I’d like to see it blossom further, but that might be asking too much as someone unable to contribute.