Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 8th, 2007, 3:10 PM   #1
Tsar_of_Cows
Newbie
 
Join Date: Jun 2007
Posts: 15
Rep Power: 0 Tsar_of_Cows is on a distinguished road
C++ IDEs/Java Libraries/Making a Text Based Game!

I've set myself the task to, over the summer, write a text based game.

I have a pretty decent idea of what the backend is going to look like, but I intend to have a text based interface, which looks something like 3 linux shell windows open at once.

I'm aiming for the look and feel of a command line enviroment, with basically 3 command line boxes, one of which is a sort of narration box containing current tasks, the second of which is for recording the player's notes, and the third of which is for progressing in the game by typing commands and making choices.

Now I could throw this together in Java, but there are a few things I really want that I either don't know how to do in Java or I don't think the basic Swing libraries have that capability:
  • I want it to really look like an old command line: white terminal font on black.
  • I want it to come up full screen, rather than windowed on the desktop. I'm not sure that the bog standard JPanel has that ability.

So I was wondering two basic things:
1: Does anyone know of any Java Libraries that can do this convincingly?
2: Would I be better off doing this in C/C++?

I ask the second question because the Java interfaces (or the classes I've worked with to make them) have a tendency to look really flashy and garish no matter what you do - I want the exact opposite: clunky and basic!

If I would be better off working in C++ it then becomes a question of which IDE (I'll need an IDE that suggests possible methods as I have zero experience in C [except for programming lego robots], and preferably one with a nice and easy drag'n'drop style visual GUI builder. There are quite a few out there and I don't really know what's good or bad about them, so I'm hoping for personal preferences/experiences, and it is utterly essential that the IDE is a free one (Tsar.setCheapskate(1); )!

I also then need to know what libraries I'll need to get my hands on, basically because I've only used C for programming some afore mentioned lego robots in Interactive C, so I don't know what C/C++ normlly comes with vs. what I'll need for my needs (complicated cmd line interfaces, basic I/O text file handeling, and some number crunching but nothing fancy).
Tsar_of_Cows is offline   Reply With Quote
Old Jun 8th, 2007, 5:56 PM   #2
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,676
Rep Power: 14 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by Tsar_of_Cows
Now I could throw this together in Java, but there are a few things I really want that I either don't know how to do in Java or I don't think the basic Swing libraries have that capability:
  • I want it to really look like an old command line: white terminal font on black.
  • I want it to come up full screen, rather than windowed on the desktop. I'm not sure that the bog standard JPanel has that ability.
You want real old-school appearance, you've gotta go 80x25 or 40x25 with a green or amber display; white phosphors were a luxury of later progress.

As for what language to do this in, it's not really a language issue. It's an issue of how the target system handles text mode screens. In Windows, you should be able to set up a shortcut and adjust the properties to run it full-screen rather than windowed; this should apply regardless of what language you use.
__________________
My microwave has settings for snake, gremlin, and puppy.
lectricpharaoh is offline   Reply With Quote
Old Jun 8th, 2007, 7:09 PM   #3
Tsar_of_Cows
Newbie
 
Join Date: Jun 2007
Posts: 15
Rep Power: 0 Tsar_of_Cows is on a distinguished road
Well it's a language issue as far as I'll write it in whatever language I can get helpfull class libraries (i.e. ones containing the type of widgets I'm looking for).

As far as getting something to run full screen, I'd prefer it ran itself in full screen rather than doing something external to the program with shortcuts.
Tsar_of_Cows is offline   Reply With Quote
Old Jun 8th, 2007, 8:32 PM   #4
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,676
Rep Power: 14 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by Tsar_of_Cows
Well it's a language issue as far as I'll write it in whatever language I can get helpfull class libraries (i.e. ones containing the type of widgets I'm looking for).
I usually think of 'widgets' as referring to GUI elements, like buttons and the like. What do you mean, given that you want it text-only?
Quote:
Originally Posted by Tsar_of_Cows
As far as getting something to run full screen, I'd prefer it ran itself in full screen rather than doing something external to the program with shortcuts.
To do the full-screen thing isn't a huge deal, at least not in C, C++, or C#. You can create a window (form, in C#) with the appropriate styles to prevent it having a title bar and border, and then give it the topmost property. Then the whole thing is the client area, and you can do whatever you like. Of course, this isn't a text-mode program, but on the other hand, you get precise control over the style and size of the font, and you could add graphical elements, should you like (simulated knobs on the display, for example).
__________________
My microwave has settings for snake, gremlin, and puppy.
lectricpharaoh is offline   Reply With Quote
Old Jun 8th, 2007, 9:52 PM   #5
Tsar_of_Cows
Newbie
 
Join Date: Jun 2007
Posts: 15
Rep Power: 0 Tsar_of_Cows is on a distinguished road
Quote:
Originally Posted by lectricpharaoh View Post
I usually think of 'widgets' as referring to GUI elements, like buttons and the like. What do you mean, given that you want it text-only?
Well it will have to be widgets - although I'm thinking of a text interface, the idea is for it to be an elaborate one, with three text boxes on the screen at once. In terms of Java, that would be like a JFrame as the containing form, with 3 text fields i.e. widgets.

Now the problem is this:
-Java JFrames allways look flashy. (And I can't seem to stop them displaying in normal windows colours)
-Java JFrames don't seem to have an immediate way of making them full screen.

I suppose I've fallen into the old garbage in - garbage out problem, my original post was pretty vague, and I appologise. What I'm looking for is a way of doing what I want to do (three text input/output widgets on a frame in full screen) and make it look right in the process. "Right" means like an old DOS or other command line interface, with the flashing text input block and the chunky writing.

My problem is that the normal swing widgets are overly flashy for what I want to do and I'm looknig for a solution, whether it be programming it in a different language (assuming that language has widgets and classes which can more easily do this) or whether it be a class package for Java.
Tsar_of_Cows is offline   Reply With Quote
Old Jun 8th, 2007, 10:22 PM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 8,368
Rep Power: 22 DaWei will become famous soon enoughDaWei will become famous soon enough
Three text input/output widgets on a screen is not going to look like an old glass tty environment.

I have seen something in between. You might want to look at it for grins. It's called WinAdv21, and it's based on the original Adventure text-based game that used to ship with Unix. It has an output window that looks like a command window, except it's black on white and produces output only. It has a second input window. The input window has both a command-line input text box and a few buttons (OK, Yes, No, Quit, some directional buttons). The third window is really just an image with drop-down menu for font selection, quit, about, stuff like that.

Even if the looks of this game don't thrill you, it'll take you a while to beat it. This is a game that you 'see' in your mind, like reading a book. I did once make a reasonably complete map of the cave.

This game is the source of the 'xyzzy' phrase, and others like 'pflug'.

Here's how the game opens: "You are standing at the end of a road before a small brick building. Around you is a forest. A small stream flows out of the building and down a gully." At that point, you give a command.

Commands are one are two words, 6 chars max, I think. In the original version, all text was compressed. Some words (the most common) were represented by only a fraction of a byte. This was necessary because this game ran on machines with as little as 64K of memory, clocked at 1 or 2 MHz. The compression also made it difficult to "look" at the program with a hex editor and pick up messages and clues.

If you type a command that isn't understood, the game says, "I don't understand that", then you try again. At one point I was fairly frustrated, so I typed in, on occassion, "shit". The response was, "I don't understand that". Once, really frustrated, I typed in f**k. The response was, "Watch it!!". Cracked me up.

The game was written for the author's little girl. It became a favorite of many, many top notch programmers. It's mentioned in Tracy Kidder's book, "The Soul of a new Machine."

I still show it to people, and play it occassionally, though I've known the secrets for a couple of decades. Expect to get killed and start over numerous times.
__________________
Contributor's Corner:
Politically Incorrect
DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jun 9th, 2007, 2:42 AM   #7
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,676
Rep Power: 14 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by DaWei
it's based on the original Adventure text-based game that used to ship with Unix.
I remember playing Adventure on my mom's XT when I was a kid, ahh good times. I also enjoyed some of those old Infocom text adventures, and while I often toyed with the idea of making a text adventure in a similar vein, I never actually got around to doing so.
__________________
My microwave has settings for snake, gremlin, and puppy.
lectricpharaoh is offline   Reply With Quote
Old Jun 9th, 2007, 6:15 AM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 8,368
Rep Power: 22 DaWei will become famous soon enoughDaWei will become famous soon enough
You are standing on the edge of a chasm. It is too wide to jump.

>Jump chasm

You just fell into the chasm and broke every bone in your body. You are dead.

>
__________________
Contributor's Corner:
Politically Incorrect
DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jun 9th, 2007, 11:29 AM   #9
Tsar_of_Cows
Newbie
 
Join Date: Jun 2007
Posts: 15
Rep Power: 0 Tsar_of_Cows is on a distinguished road
Quote:
Originally Posted by DaWei View Post
Three text input/output widgets on a screen is not going to look like an old glass tty environment.
I'm aware of this.

I'm not trying to mimic an older game.

What I'm trying to do is make something which looks like three command line interfaces on the screen at once.

The problem is, that I'm framing these interfaces in a JFrame which, whatever I seem to do, looks flashy and silver. I want it to be black, so that it blends in with the other parts of the interface. Not only that, but i am looknig for a way of maknig the JFrame occupy the entire screen, so what the user sees is what appears to be three command line interfaces on the screen at once and nothing else.

I'm looking for either a way of getting the JFrame to do exactly what I want, or an alternative package I can use which will do this more easily, or in a more convincing way.
Tsar_of_Cows is offline   Reply With Quote
Old Jun 15th, 2007, 12:11 PM   #10
Tsar_of_Cows
Newbie
 
Join Date: Jun 2007
Posts: 15
Rep Power: 0 Tsar_of_Cows is on a distinguished road
Ok, here's what I've got: linky

As you can see in the centre bit, the text boxes are fine, but I can't get the JFrame they're in to not be hideous silver.
Tsar_of_Cows is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Text Based Game demon101 PHP 8 Jan 6th, 2008 4:46 PM
Programmers wanted for an online text based game esimagin Paid Job Offers 1 May 18th, 2006 6:13 PM
Text based game jayme Existing Project Development 25 Dec 15th, 2005 8:26 AM
Text based game jayme C++ 12 Nov 22nd, 2005 12:03 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:59 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC