Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 04-30-2006, 03:46 PM   #11 (permalink)
 
Ultra Techie

Join Date: Oct 2005

Posts: 961

Mr_Threepwood

Default

So far the game makings been going well, I have a good structure.

The game gui talks to the game engine, the game engine talks to the text interpreter and the current room.

I'll make it better once I can actually get the text interpreter working better. So far the only word it recognizes is "look", thats easy to change though, I'll just make an array of recognizable words to check.

However I am noticing how much work actually goes on behind the scenes of even a text based game. I mean just to get one command going through I have to break up the command into an arraylist of substrings (making sure i take out spaces and convert to lower case). Then I have to individually check every string to see if it matches a word.

It'll be cool once I get this better and better, so far the guis just a piece of crap with an input and output field, and a button to send text.

I need to think of somebetter way then individually making every room object, but I cant think of any way around it since some rooms will have different code then others.

I mean some rooms have some of the same commands so I made an abstract class which all other rooms will extend, to cut down code and make it more eligant. But regardless each room will have its own string of words on top of the universal string of words.
__________________
A+ certified.
I now am on the interweb:
www.thescurvyshack.com
Mr_Threepwood is offline  
 
Closed Thread

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
Trackbacks are On
Pingbacks are On
Refbacks are On