The Daily Click ::. Forums ::. Klik Coding Help ::. MAking A text game! need help!
 

Post Reply  Post Oekaki 
 

Posted By Message

Jim Joe Johnson



Registered
  28/03/2004
Points
  45
9th May, 2004 at 15:57:44 -

HI. I want to make a text game. NOT one-o-them things were you have different buttons to press. I want the cool games where its like: YOU SEE A FLASK. and you type in PICK UP THE FLASK. But I have NO Idea how to make a game like that! any tips?


 
"Nasty, tricksy Hobbitts!"

Cybermaze



Registered
  03/04/2003
Points
  853
9th May, 2004 at 16:13:53 -

One way of doing it is to make a textfield to type in to (obviously!) and make an event for every valid command. Like "if textfield equals "TAKE BOTTLE"" -> some actions. "if textfield equals "GO TO LAKE"" -> some actions etc. That will make a lot of events if the game is long. However it works.

 
If you knew, I would have to kill you...

Kramy



Registered
  08/06/2002
Points
  1888
10th May, 2004 at 00:04:22 -

You'll want to restrict the edit to uppercase though.

You can also use the string parser to run commands.

User presses enter
--Give StringParser string
--Break it up using " " as a delimiter
--Get elements

If first element is "GOTO" activate group("Goto")

Group Goto
{
If second element is "CHAIR" walk to chair
If second element is "FLASK" walk to flask
etc etc.
}

Sorry if that's not very descriptive, but I usually code in Jamagic.

 
Kramy

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
10th May, 2004 at 01:36:14 -

I wouldn't bother making one in MMF, it's harder than using a tool made for it, like the www.inform-fiction.org one.

 
gone fishin'

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
10th May, 2004 at 01:47:50 -

It's next to impossible to do those type of games in MMF. Try using Adrift. It's a bit tough, but it's far better than using MMF.

Other than that, you can always make some interactive fiction. You know like those games where you get a choice of what to do like...
You see a flask. Do you:
1. Pick up the flask
2. Kick the flask
3. Break open the flask
4. Ignore the flask


I've never really like text-based adventure games anyway. So much to read and so little matters. Interactive fiction rules. (Note that there is a difference between the two genres)

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
10th May, 2004 at 02:04:49 -

No no you do never want to use Adrift (the games are too samey)

 
gone fishin'

vortex2



Registered
  27/05/2002
Points
  1406
10th May, 2004 at 08:49:04 -

I created a Text adventure base engine in Jamagic. It doesnt have inventory yet (although I have a system in the works) but it have multiple external rooms via an external file.

You could do the same probally.

Have an ini set up like this:

[main]
start=0
end=2
[R0]
text="Room One, a path leads to the north"
N=1
[R1]
text="Room Two, a path leads to the north or south"
N=2
S=0
[R2]
text="You win!"'

and you would have an engine to change what room you are in based on the ini file . The way I coded my Jamagic one, you could also have rooms that have no directions/werent the ending room soo thoose became rooms where you died . I did this by checking if all of the directions were undefined and if it wasnt the ending room.

Here is my Jamagic example incase you are intrested:

http://www.clickteam.com/CTforum/showflat.php3?Cat=&Board=FAJ&Number=235900&page=0&view=collapsed&sb=5&o=&part=

 
A bit of insanity with every bite!

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
10th May, 2004 at 11:06:40 -

A game like that is very possible in MMF. You'll just have to do quite a lot of parsing. However, since a lot of the code will be variables/strings based, something like Jamagic would be better suited as an actual scripting language can handle all the variables better usually. Or something like CFISI would be ideal for the job, if it worked

If the left 4 characters equal "GOTO", get the next part with String Parser 2 and do the code for going to that room. Not too difficult... just might end up with messy coding if you have a lot of locations, actions and inventory items.

 
- Tigerworks

MasterM



Registered
  02/01/2002
Points
  701

I am an April Fool
10th May, 2004 at 13:57:55 -

But you can’t get ye flaks and the computer is actually not telling you why
I am actually not telling you why

I made a game like the old sierra games once where you also have to type stuff. You know a game like King’s Quest, Larry etc etc


 
Image

MasterM



Registered
  02/01/2002
Points
  701

I am an April Fool
10th May, 2004 at 15:12:39 -

btw if you really want to create only a textadventure you could do it in QBasic-lol
i started making games in QBasic and for textadventures it's a really nice program and easy to use

 
Image

Jim Joe Johnson



Registered
  28/03/2004
Points
  45
10th May, 2004 at 16:30:15 -

I figured it out guys! Thx a ton!


Image Edited by the Author.

 
"Nasty, tricksy Hobbitts!"

Mr Icekirby



Registered
  18/12/2003
Points
  846
10th May, 2004 at 17:09:40 -

QBASIC? does anyone know of a good FREE basic compiler?

 
Mr Icekirby says so!
OBEY ME!

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
10th May, 2004 at 17:14:36 -

I thought Tigerworks made a Text Adventure Creator

 
n/a

Kramy



Registered
  08/06/2002
Points
  1888
10th May, 2004 at 17:25:29 -

"I thought Tigerworks made a Text Adventure Creator "

"NOT one-o-them things were you have different buttons to press."



 
Kramy

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
10th May, 2004 at 19:01:55 -

I remember using a text adventure maker for my Amstrad cpc

called graphics adventure creator.
I only discovered i had it in about 1997.
i tried to do a remake of final fantasy 7 in text adventure form.

but i gave up because there was only 40 kilobytes of space for games.



i guess you could use it to make your game but you would need an amstrad cpc emulator to make and play it.

 
.
   

Post Reply



 



Advertisement

Worth A Click