Text Console Library

When you first start coding in C/C++ your first programs are done in the console. The problem with the console nowadays is that the conio.h library no longer lets you do all the fun things it used to, like set the text color, set cursor position, clear the screen, etc. You can only print text out in a stream just like the olden days of the 70's and teletype printers. Lame.

This is the problem that all beginning game coders run into and it really takes some of the fun out of learning when you can't even sit down and try to write Pac-Man in text mode.

So I poked around and found a little snippet of code, added my own functions and now I have a nice little text console library you can use. Just add the console.h and console.cpp files into your empty Win32 console project and you can actually make text games. Without this kind of library you can't really make any kind of fun text game other than an adventure.

I threw together a short sample program to demonstrate what you can do. It's a simple maze that has a random exit ('X') in it; touch it and you win. The source is named main.cpp. The game? ULTRA-X OF THE FORBIDDEN REALM!

To add even cooler stuff to your console games you should download FMOD and link it into your project. Instructions on how to do this are on FMOD.ORG and are easy to follow. Imagine that - a text game with background music and sound effects.

Grab the code here (Windows only)

R.I.P. John J. Anderson

One of my favorite writers and game authors from the 80's was John J. Anderson. I first got acquainted with John from his excellent game Sea Dragon (published by Scott Adam's company Adventure International) and then Eliminator.

I used to read his columns in Creative Computing magazine and he was a very bright guy, crossing over between the Apple II and Atari 800 with ease. He was one of the few authors back in the day to write code for both platforms because it required quite a bit of knowledge to do both well. Not only did you have to be completely fluent with 6502 assembler but you also had to know the entire memory map of the system and all the important switches and places in RAM and ROM. John was a master of 8-bit systems alongside Jim Nitchals and David Lubar.

John Anderson died on October 17, 1989, seventeen years ago. R.I.P. John.

AWESOME UPDATE: Evidently, the John Anderson who died in this news article was NOT the game programmer, but the journalist. The game programming John Anderson contacted me and said he's quite alive still.

The Fracas Reveal

Some of you may have noticed one of the random messages along the top has been "Stuart Smith, where are you?" I am, of course, referring to the author of the great Adventure Construction Set and Ali Baba and the Forty Thieves from Quality Software.

One of my small hobbies is locating lost greats from the dawn of the game industry with most of my focus on the Apple II authors. Stuart Smith is one of those lost authors I have yet to find.

One of the earliest and probably first-published titles Stuart worked on was Fracas, a lo-res turn-based RPG that could eat up a LOT of hours. I recently ran the game again and remembered that it was written in Applesoft Basic, a language that I'm very familar with.

While scrolling through the game listing (this is a game from 1980, mind you) I immediately noticed the line:

5 DEF FN RN(I) = INT( RND(1)* I )

and I thought "oh yeah, I never did figure out what the hell that DEF FN keyword was used for." Then I resolved to learn what it actually did so I looked up an Applesoft reference manual and found out.

Wow. I cannot believe I never learned the value of DEF FN and the countless times I could have used it in my games! It's really simple: you are defining a function that you can call without a GOSUB and it can take a parameter. Basically an inline function.....in Applesoft Basic!

Amazing. And to think that I learned this from a game written at the dawn of the PC gaming age.

Doom Archaeology

I've been doing some digging around in the original Doom development directory since I'm working on consolidating all my data in a sane arrangement. The Doom source that was released years ago wasn't the nice raw development directory otherwise you would have all seen the NeXTSTEP DoomEd source, Doom map source files, and what I have here: unreleased Doom MIDI files.

There's a reason these weren't released - they're not very good, at least not as great as the music we actually shipped with the game. Some of the songs are just repetitive riffs. All the songs are named unXX.mid where XX is a number.

Some of the standout tracks are:

opening: this was an idea for the original Doom title screen song.
un17: Would have actually fit in the game.
un30: I like it's funkiness. Reminds me of Wolfy.
un36: I hated this song. I assigned it to e3m6 originally and everytime I ran that level I just cringed. I eventually removed it.
un39: Would have been a cool intermission screen.
un52: A better version of this song was in the game.

I think a few of the songs are early versions of some that were in the game. So for any of your Bobby Prince fans out there, here's more of the man's work.

Get it here