• Forum
  • Lounge
  • Best C++ game using only console you kno

 
Best C++ game using only console you know of?

By console I mean the basic default DOS-y realm-of-"Hello World!" console!
What could mean "Best": Funnest? Most interesting? Most educational? Most complex? Etc...
Any of those choices, and they can be directed at the code or coding process, not just the run-time program or game-play. The game could be boring yet it's code may provide something interesting to see. Perhaps it's not the game or the specific code that's educational, but that your choice's code shows a viewpoint or technique that you'd recommend others to recreate in their own way; to experience the design/coding/debugging/etc processes and experience something beneficial. Perhaps the coding contains lessons that teach easier or more efficient ways to program, or perhaps they are advanced or purposely difficult programming methods that are meant as a challenge or puzzle-solving process(a good exercise for not only problem solving and logic, but also for the situation of modifying/fixing of someone else's overly-complex or hard-to-read code).

Basically..
What is the most interesting C++ game you've seen that utilized only the default console window?
I would imagine a text-adventure could get very far perhaps, but I have a feeling there have been or "can" be some pretty cool programs made within it's limitations.
Mention even a basic summary of a program you've seen(or made yourself, or what you'd imagine could be possible), or if you have/know where the code/program is for it then I know at least I would check it out.

This simple request that would benefit from even your smallest input which can and will spark ideas and creativity from both sides of the C++/programming proficiency spectrum. Experts may ponder the idea and decide to give themselves a challenge of making something fun, educational, or interesting within those limitations. Then, may share their work which can be picked apart and analyzed for many to learn from. I notice Beginners(including me) have trouble thinking of specific programs to write that will improve their coding. Beginners can see what is possible within their deceivingly plain textual interface, and this can motivate and inspire them. They too may want to join in on the self-challenge within their skills and knowledge.

So, yeah... *prepares brain for information absorption*
The only games I've tried that were even remotely playable were roguelikes, like Moria and ADOM:

Moria: http://en.wikipedia.org/wiki/Moria_%28video_game%29
ADOM: http://en.wikipedia.org/wiki/ADOM

Of course even those were greatly outshined by their more modern counterparts, like Elona (normal graphics game, not a console game):

http://en.wikipedia.org/wiki/Elona_%28video_game%29
Playing ADOM now and I love it, I really love games that go really in-depth with skills and actions and, woo! I thought "Wasteland" was pretty complex, but in certain ways this is more.
Thank you!
ADOM is pretty cool, but it has nothing on Elona. I've wasted days on Elona. (although it's not a console game so you might not be interested)
Huh, I played that Elona shooter game, it was kinda fun (although difficult).
It would have to be NetHack. I personally don't like it, but I do recognize the genius in it.
Yeah, I played a bit of NetHack, but it got kinda boring. I don't particularly like games where you can easily get completely screwed by the RNG.
I found NetHack and Moria around the same time, and found Moria to be way better.

Although I think NetHack came out earlier which might explain it.

ADOM is better than both, although I didn't get into it as much as I got into Moria because by the time I found it I had a computer that could run emulators, so console games didn't interest me much anymore.

But yeah... the whole roguelike scene. It's pretty much the only kind of game that's playable in the console.
Well, these games are, frankly, too old to be C++, but as for console games:

Ladder (CP/M)
Ghost (CP/M, DOS) [Pacman clone with really smart ghosts and much more interesting mazes]
Console games... What about 3d graphics and cell processors

Although that Ghost sounds fun.
ADOM. Hands down. My best friend's older brother introduced it to him when he was a kid, and my best friend showed it to me in early high school. I agree with Disch, it's definitely better than Moria, I really wish it was a bit bigger though.
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.
Topic archived. No new replies allowed.