I'd say Dwarf Fortress, but that's probably stretching things a bit as it's not actually a console application.
As for a' basic summary' I actually made an engine for a rogue-like styled game that runs in the Window's console. I started working on it early September 2010 and had a working engine by around December. I started this roughly 2 months after I got into C++ so it's far from being as clean as it could be.
The engine can run a game with a UI containing 4 windows and a command line. The four windows consist of a game window, menu window, message window, and character window.
The engine has 6 core functions:
1 2 3 4 5 6
|
void CommandInput(unsigned short color, string& primeCommand, string& subCommand);
void GetUserInterface(unsigned short borderColor, unsigned short titleColor);
void SendCharacterInfo(unsigned short lineNumber, unsigned short textColor, string message);
void SendGameMessage(unsigned short textColor, string message);
void SetMenu(int itemCount, unsigned short menuColor, struct MenuItems);
void CharMovement(short& X, short& Y, int& input);
|
CommandInput() handles command line entries, color dictating the text color for the commands you enter, primeCommand and subCommand deal with the fact that I made it possible to input two commands separating them via comma.
For example: look, north
look being the primary command, and north being the sub command for the primary command.
It also makes sure you stay within the command bar and can't type outside it. I essentially had to program my own cin.
GetUserInterface() would only really be called once, and generates the UI with the colors provided.
SendCharacterInfo() Handles the Character window, and could be used for pretty much whatever you plan on using said window for, such as character health.
SendGameMessage() is the longest individual function and allows you to send messages to the message window, starting with a default color that you initially provide. The function would proceed to format the message to word wrap logically (based on word, it also accounted for words longer than the width of the window, etc.) and then filter through color tags which would allow you to color individual segments if you so wished to, with a tag like: $<HalfRed> or $<HR> to make the text a dark red color. The tags would simply change the text color and wouldn't be displayed obviously. The last thing it does is display a set of flashing arrows and the word ENTER at the bottom if the sent message is longer than the message window can contain, or to let you halt the message and wait for the user to push enter indicating they're done reading it before the window is cleared.
SetMenu() handles the menu window and uses a structure where you could set the menu name, and up to 15 menu elements, to the color of the parameter sent.
CharMovement() just handles the basics of catching user input and settings values by reference that could be used to move the character.
This whole engine uses a console operation class library I had built a month earlier to handle stuff like SetCursorPosition(), SetCursorSize(), ClearScreen(), SetTextColor(), SetCellColor(), etc.
After building the engine, I used components of it to program a map editor using the same UI the game would run in. Once I was done with that I built a basic game which contains 9 individual maps and some basic game elements, but only 2 of the maps were finished and no AI or more serious game design was put into it as I really just wanted to build the engine and only built a simple game with it as a proof of concept.
I've uploaded a picture of the map editor, incase you're interested:
http://i306.photobucket.com/albums/nn253/AkrionXxarr/Programming/AGE_Editor.png
The message is a result of typing:
save, ?
into the command line.
I can certainly say that this was the most fulfilling project I have ever worked on so far, and has probably helped accelerate me into a better understanding of programming as a whole more than any other project I've done.