Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Require Assistance O_o

Author
Message
SpellSword
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: Cyberspace
Posted: 21st Jan 2003 04:31
*Stops banging his head against the wall long enough post a message*

I'm trying to make a text adventure style game, my problem
that the only way I currantly know how to make the game
means that it has to stop and wait for the player to type
something.

What I want is to have the game still be working (Stuff
happening) wether or not the player is typing.

Also if anyone has any idea how I could make the text
scroll up when it's replaced by newer text (Like in most
text-only games) I'd be interested in seeing how thats done.

Hopfully I'm missing something small, (Maybe INPUT's the
wrong command to use for this?) I'm still pretty new at this.

Here's a small snippet of the code I'm working on.




Am I on the right track?

If I can make it so that the game keeps moving while it
waits for the player to type then I can start making time
based puzzles.

(Actualy I already figured out a way to make use a time
limit, but I don't think it's the best way. There must be
another.)

------------------------------------------
When I dream, I carry a sword in one hand,
and a gun in the other...
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 22nd Jan 2003 00:30
Here's some advice:
Doesn't upper$() make the whole string uppercase? i.e. upper$("hELlo ThEre") = "HELLO THERE"
With this you don't need to check your input twice.

To make the text input in real-time, you could have a huge select case statement which checks the scancode() and adds a letter for each keypress. Something like:


This could be quite tedious to input, plus you'd need to stop repeated keys, and also make it fast enough for fast typers not to have missing letters because they typed too fast. Just a suggestion.

I would go about a text game in a completely different way. I'd have a text parser which gets the words in my sentence and checks what the verbs and objects are (e.g. TAKE BOOK, verb$="TAKE", object$="BOOK". Then you'd have a big select case statement for verb$



and in each case you'd set responses for the appropriate objects and a default response (You don't see that here...) if no objects are selected. Last time I tried, you couldn't nest select case statements, I don't know if you can yet. If you can't, it means a lot of if statements to determine the object selected.

Then I would have several arrays. One contains the location descriptions, and one contains the directions you can go and destinations you can reach from that location. For example:



You'd keep object descriptions and locations in other arrays like the location ones, except the object position would reference a location, -1 being in the inventory. Also, you'd want an array of flags to keep track of in-game events. They don't have to be in any order, as long as you know which one relates to which event. For example, flag(30) could be initially 0 and then change to 1 when you blow up a bridge.



Is any of that useful to you?
SpellSword
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: Cyberspace
Posted: 22nd Jan 2003 04:43
Thanks!

That makes so much sense!
(I don't understand all of it, but I get most of it.)

I shall renew my efferts and begin re-coding emediatly.

Thank you!

*Dashes off to code.*

------------------------------------------
When I dream, I carry a sword in one hand,
and a gun in the other...
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 22nd Jan 2003 18:17
Just ask me about anything you don't understand / get stuck with. I have a little experience in this field.
freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 22nd Jan 2003 18:26
cool to see that people are busy with text-only games... do you have finished one? would be cool to try it out, never played a text-only game...

Dr DooMer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 22nd Jan 2003 19:48
There used to be a lot of them a long time ago. I've never played one either, but one of the biggest ones was called "Zork Nemesis" or something. You can probably download it as freeware or abandonware if you look around enough.

I've played graphical games controlled by text input, like Hugo and Leisure Suit Larry. They weren't too bad...

"I am a living, thinking entity who was created in the sea of information."
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd Jan 2003 21:13
personally i was hooked on Hitck Hickers Guide to the Galaxy ... and one called Dragon Something - it has a TV series which went with it, which is why i thought was pretty kickass.
I think it was only a British thing thou, so anyone who isn't really my age from the UK probably won't have a clue what i'm talking about
it was a really weird thing, kinda like dungeon master - but i dunno more for younger kids.

i used to love watching dungeon master
then they started to go all hi-tech and i dunno it kinda lost its appeal when everything became computer generated.

take a look at the example for input, i can't remember what one it is - but i think its called Perfect Keyboard Entry. Uses the entry buffer which is far easier for text and much faster

caused a flurry of text input programs when it was first released - but as usual you'd see the effect and they'd kinda wear out in thier novelty and never see the end results.

i wish i could remember who was the lil expert on the text input thou

Anata aru kowagaru no watashi!
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 23rd Jan 2003 00:00
Here is a good site to get some text adventures:
http://216.187.116.126:81/Advents/iflib.htm

I was hooked on 'The Legend Lives!' by the same people who did the unnkulian unventures, they are really funny.

I have a text game I made in QBasic a while back, it took me about 3 days to write, inculding all the planning. That should give you some indication to how good it it. It's too embarrasing to release to the public.

I've also used TADS, which is really easy to use and make good text games with. It handles all the text parsing for you, so you just have to program in all the locations, objects, scripts, new verbs and the like. I love it.

I thought the hitchiker's guide to the galaxy was a graphical game, or I might be thinking of starship titanic. I'll look for it. I did like the radio show though .
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 23rd Jan 2003 00:13
there was a Hitch Hikers "new" game in the works - but i don't remember it being released. think it just died..

the one i remember had NO graphics was literally a text adventure

and is what... 18years old now? must be about that

Anata aru kowagaru no watashi!
SpellSword
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: Cyberspace
Posted: 24th Jan 2003 03:04
*Takes a break from coding to scan the forums*

Thanks again for the help, I'm making more progress
with this text adventure (OR as it's known today, Inter-Active Fiction)

I'll post a link to it when I've got enough of it done so
you can tell me if ya think it's any good.

*Dashes back to coding.*

------------------------------------------
When I dream, I carry a sword in one hand,
and a gun in the other...

Login to post a reply

Server time is: 2024-05-05 02:50:31
Your offset time is: 2024-05-05 02:50:31