Back in a minute 1.2 released!

The first public release of my BASH game Back in a minute has finally been released on my coding blog: Back In a Minute First Public Release, Version 1.2!

Back in a minute running in gnome-terminal
Back in a minute a.k.a biamin

You can download a tarball or clone my git repository. Please enjoy!

It feels great to finally give something back to the Free and Open Source software community! The ~2200 lines of code reflects a need for optimization, but I am not planning to do any major overhauls on the current game. (It runs fine and is stable.)

If you ever wanted a random, Warhammer-like BASH terminal adventure game, you’re in for a treat! The world of Back in a minute has 4 playable races, 6 enemies, 8 items and 6 scenarios in 270 sections of the world map. And if you tire of the default map, you can create your own using the map template generator that is built in!

Have fun and a great weekend! It is time to make dinner and mix myself a drink:)

Introducing Back in a minute blog!

Last year, having finished my CD-to-FLAC automation script called FLACRIPPER, I jumped head first into my next project: Create a fun game that is completely written in BASH. I started out with these ideas:

  • It must be quick
  • …but also vast, if you want it to be
  • It must be a full world (have a navigational map)
  • It must have monsters you can fight
  • It must be random

This was the start of which later became Back in a minute.

I started coding while reading a lot of political philosophy, simply because I needed a break from books. Creating something that’s in your head on paper is pretty much my everyday life, but there is usually little feedback except when you receive a grade on a paper. Which is pretty arbitrary and not very constructive.

Coding, on the other hand, provides instant feedback! In addition, it does train the same ontological skills that I need in philosophy, so it isn’t a complete waste of time. One big difference is that an article can have spelling mistakes without affecting the content, whereas code simply breaks down in a pile of error messages..

Having coded on and off for half a year, I understood that while being a favourite pastime I couldn’t force my readers (what readers?) to read about it, so I played with the idea of creating a separate blog for the project. When I came to the point of having a working game, I was pretty much planning a sequel. This prompted me to create a separate blog:

I present to you the official Back in a minute homepage!

Please note, there is currently no code in the repositories, because there are 2 bugs I want to iron out first so the game is 100% playable from day one. Last night I watched a Kickstarter update from Tim Schafer‘s development of Broken Age, of which Act 1 was released to backers just yesterday. Anyway, he said that as a game developer at the end of creating a game, there are a hundred things you’d like to do; but there are only 10 things you _can do_, and those are the things you _have to do_.

Without any comparison to the inspiring genius of Tim Schafer, who gave us Monkey Island and Grim Fandango among others, it gave me a push in the right direction. ‘Cause I’ve been struggling with a «social media» feature of my game, which posts a row from the highscore list on Twitter etc. But it has created more problems than it solves, and yesterday I realized that it has nothing to do with the game. So I’m re-doing it in a more basic manner, by simply creating a copy-pastable message in the terminal using echo the player can post him or herself.

That leaves 2 (known) bugs for me to fix, commenting the code a bit more verbosely, and making it more readable (casing). I began writing it in gedit, which is okay for smaller projects, but as soon as I got more than 1500 lines of code it became too slow. I am now using geany, and considering learning emacs instead. That’s what Jesus would do. Anyway, you can follow the development on Back in a minute blog, which was created so those who don’t care don’t have to be bothered! :D

FLACRIPPER released! (updated)

I am going to be ripping a whole lot of CDs in order to digitize my CD collection (500+ CDs). I want lossless or close to lossless FLAC files of every single one. But I am lazy. And the GTK based rippers are slow and cumbersome (i.e. require my attention). Why not just drop down to the commandline and run cdparanoia? But then I’d still have to FLAC’em and tag’em, sort out the folders and correct wrongly named files..

This is where you go "There’s an app for that!" and narrowly escape my swinging fist. Of course there is. There are millions of apps– I mean programs that does this. But this is also the perfect excuse for actually getting to know bash scripting in GNU/Linux, and at a comfortably simple level. So for the last 3-4 days I’ve been writing a bash utility called FLACRIPPER that does exactly what I wanted and MORE. Which explains the 1.2 version number:)

FLACRIPPER in action
Ripping Stranger in Moscow because it’s the shortest single I have

The GPL v3 licensed source is here:
Flacripper (directory):
Flacripper (latest):
Please report bugs in the comments or by this form.

Essentially, it’s just a smart bash script that runs Monty’s cdparanoia and Josh Coalson’s flac. But it also queries the CDDB ( music info database using cddb_query, auto-tags files with metatag after you’ve confirmed them (see screenshot), creates directories and keeps a log of your ripping. Script has been updated to accept commandline arguments (see below).

Just edit the .sh file in your favourite editor (e.g. nano). It’s pretty simple:


# Path to your music root directory (NO trailing slash!)

# FLAC compression level (0 is none, 8 is full)

# Keep original WAV files? (default: disabled)

# Enable log? (saves flacripper.log in $musicdir)

# Enable log check? (default: enabled)
# Exits if disc ID is found in log file, but without regard
# for earlier erraneous rips and CDDB ID duplicates.

# Confirm CDDB information? (default: enabled)
# Leave enabled to avoid CDDB misinformation. Laziness is key.
# (e.g. "Michael Jackson" vs. "Jackson, Michael" artist field)

So far it’s only been tested on my Fedora 17 machine, but it should work on any GNU/Linux operating system as long as these dependencies are met: cddb, cdparanoia, eject, flac and metaflac.


# DEPENDENCIES: cddb, cdparanoia, eject, flac, metaflac
wget .
nano # Edit config section if you want to
mv flacripper
chmod +x flacripper
mv flacripper /usr/local/bin/

The out of the box experience will rip your CD to WAV, convert these to flac using compression level 2, create folders in your root music dir /ARTIST/ALBUM and tag the flac files according to the CDDB query. If the CDDB query fails, which can happen on brand new CDs as well as obscure ones, flacripper will dump you into an ncurses based interactive editing mode PRIOR to ripping. Cdparanoia is excellent, but can be slow if your media is scratched/old, so the idea is to get all the information gathering done before the machine takes over.

If your CD is known you’ll usually: put it in the drive, type flacripper go [ENTER] and hit [ENTER] to confirm artist and album info. That’s it. If your CD is unknown to you’ll be asked to enter Artist, Album name, Genre, Year and the track list before the machine takes over.

What have I learned?
Much thanks to The Linux Commandline and Shell Scripting Bible by Richard Blum, I was able to solve most problems without resorting to google, which was sort of the point. I’ve come to learn a lot about sed, awk and tr, which are excellent tools for manipulating piped output, and without which I wouldn’t know where to begin. But I have much to learn, so I decided to release my godawful code under the GPL v3. I know there are many places where I could probably just reverse the stream to avoid temp files, but I’m not too confident about that just yet. Thanks to the brilliant guys @ for their dialog –form write-up and BeGood at for a nice renaming while-loop. Happy ripping!

EDIT: UPDATED to version 1.2.2
Fixed a bug where a couple of missing quotes left 2 meta tag fields empty in configured mode. Updated the script so that it runs like a regular GNU/Linux utility:

  • To run in configured mode: $flacripper go 
  • To run in simple mode: $flacripper –quick 

I also added –help and –usage, the latter being displayed also if flacripper is run without arguments. –help will display the current configuration settings in addition to usual help information. Finally, I added a cleanup function to do a little housekeeping if flacripper receives SIGHUP, SIGINT or SIGTERM signal.

EDIT: UPDATED to version 1.2.3
Fixed a couple of bugs stemming from the feature creep above. Also added directory listing so you can browse the sources. I expect no other changes to the script from now on except bug fixes, though I am toying with the idea of an experimental post to $socialnetwork option.. But I need to move on to actually ripping CDs now, studies, and any bugs you can find or fixes you submit. Thanks!