Choose Your Own Adventure.
Hi Guys. :)
I need a little help as I'm not sure the best way to go about this. I'm creating a 'Choose Your Own' adventure type game, the one's like Fighting Fantasy, you know the ones:
-------------------------------------------------------------------
"You stand at a fork in the road and to the left in an interesting type rock. Will you..."
Examine the rock? Turn to page 23.
Take the left fork? Turn to page 148.
or take the right hand fork? Turn to page 99.
-------------------------------------------------------------------
At the moment I'm using a text file like this:
-------------------------------------------------------------------
You sit in a solid, carved chair and look around. The reception hall is certainly not what you would have expected from the outside. It is elegantly decorated with rich tapestries and fine oak panels. A number of portraits line the walls. A sturdy sixteenth-century table is set against one wall.
@@
Will you wait for your host to arrive?
277
Study the paintings?
304
or hunt for a telephone?
238
-------------------------------------------------------------------
The first part of the text (the text before the '@@') will be placed in a Formatted Text box and I want the next three lines:
Will you wait for your host to arrive?
Study the paintings?
or hunt for a telephone?
To be placed in a list box and the player will choose one of these options. The numbers after each line indicates what section (text file to load in) to go to, so if the player clicks on "Study the painting?" then text file 304 will be loaded.
But I'm not sure if this is the best way, also, I'm not sure how to do all the splitting and how to know which file should be loaded; how do I get the program to know that clicking on line 2 in the list box loads text file 304?
Any help or advice would be real helpful. :)
And if anyone's interested, here's the sort of thing I mean M.A.C.K (press right button to bring up quit menu or press Alt+F4 to quit.)
Re: Choose Your Own Adventure.
I have a lot of the Fighting Fantasy books at home (or at least the first fifty or so - I've no idea what number they're up to now, so that may or may not be 'a lot') - nice to see someone else who read them!
The String Parser object might help you here, but I think I would go for the approach of just reading in your descriptions and values from an INI or Named Variable Object rather than creating a format like this. The information you gave above could be represented as:
[Location86]
Description=You sit in a solid, carved chair and look around. The reception hall is certainly not what you would have expected from the outside. It is elegantly decorated with rich tapestries and fine oak panels. A number of portraits line the walls. A sturdy sixteenth-century table is set against one wall.
Option1=Will you wait for your host to arrive?
Target1=277
Option2=Study the paintings?
Target2=304
Option3=Hunt for a telephone?
Target3=238
("House of Hell", isn't it? I never got anywhere near completing that one.)
The way I've got it stored there, you could set the INI's current group to "Location" + [Current location number], then loop to put any items starting with "Option" into your list box. When an option is selected, you would look up "Target" + Str$(Currently selected line of the list box), get the location number from that, and set the INI's current group to "Location" + [Current location number] all over again.
You've got me all nostalgic now...
Re: Choose Your Own Adventure.
Though its not helping you with the problem....
I read lots of those books as a kid (house of hell is scary ;)
Now i have got my son reading the re-issues... its great!
Re: Choose Your Own Adventure.
Thanks guys! Fighting Fantasy was way cool! I'm getting all the re-issues as most of my old ones fell apart! House of Hell was my favourite and I've been trying to make a computerised version for 10 years!
Here's the closest I've come: M.u.C.e.S , I'm trying to make a CYOA creation system and this was one of the efforts. Just unzip and run MuCeSRunner.exe.
Re: Choose Your Own Adventure.
DavidN: Although I've had MMF2 for a while, I've never really used it so INI files are all new to me! I'll definitely read up on that and hope you'd be able to help in the future? Also, you can have the honor of being beta tester. :grin:
Re: Choose Your Own Adventure.
I thought about doing a game like this once, but couldn't decide the best way.
I decided I didn't want to make it like the books, and so one idea I came up with was to have a "living world".
Say a platformer, your character automatically walks through the scenarios, but your giving the option to do different decisions as he gets to certain points.. the same way turning the pages in the books would do.
For example your character walks across a room, has a choice of going through a door, go up in a lift, or down in a lift. Choose the choice and the character responds.
Its a lot more work animation wise / graphically, but I think it would make a nice game that way.
Sorry just my 2 cents, thought id share my idea :)
Re: Choose Your Own Adventure.
Sounds like a great idea Spike, unfortunately, my drawing / animation skills are zero (I can't draw a box without it having 5 sides!) This is why the text version is my only option.
Re: Choose Your Own Adventure.
*Check out the M.u.C.e.S site I made a while ago - M.u.C.e.S*
Re: Choose Your Own Adventure.
Yes, It's an interesting idea. Been playing with it myself (in my head) :)
Re: Choose Your Own Adventure.
Nickydude, I made an ini tutorial. You'll find it on the Tutorials page.
I didn't read those books, but I read some with the same consept. Can't remember the name, but you had a timemachine.. :)
Is these the predecessor to the early computer text adventure games? :D