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 / lots and lots of text: advice needed

Author
Message
Gowmars
21
Years of Service
User Offline
Joined: 26th Sep 2003
Location: United States
Posted: 25th Dec 2005 12:43
I’m making text based game where the story is driven more by the dialogue than the game play. Even where how you respond to someone’s question can effect what they say next. Would it be more efficient to just use the print/text commands and type out all the text in my source code? Or is there an alternate method like having a .txt file with my dialogue and having DB read from it. Or any other suggestions anyone may have. I have a crap load of dialogue to insert and I’m trying to find the easiest way to put it in the game.

Thanks,

Gowmars

Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 25th Dec 2005 13:40
It depends what you want:
- using text files, you can create for each answer a text file. But, the number of files will grow dramatically. Though it is much easier to edit a dialogue.
Unless you work with tags. For example, [Q1] is the first question. The options are indicated by the tags [O1] [O2] and are ended with the tag where it has to go. An example of a dialogue:



And you can use a function for searching throught the file for tags. This will dramatically decrease the number of files.

But, For this, you'll need some experience in DB already to use this technique.

- If you use just code for printing text to the screen, the editing will be more difficult, and you're source code will have alot of lines.

Both ways will have alot of data. But it is inevitable: 1 question has 2 answers. These 2 answers result in 2 questions, which gives 4 answers. Again, will give 8 options, again 16, again 32, again 64, etc...
Gowmars
21
Years of Service
User Offline
Joined: 26th Sep 2003
Location: United States
Posted: 26th Dec 2005 01:07
i guess each way has its ups and downs, but will both work just fine. Ill just see what works best for me.

thanks for the input!

Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 26th Dec 2005 15:03
Ok, I really wanted to help:



This is a serie of Tag functions I created. You can use it to create your very own syntax.
Mine was for example:
[Q#] [/Q#] is a question. Between these tags, the question is written + a closed tag with the number of answers available.
for example, the fifth question:
[Q5]Action? [5][/Q5]

The answers, have no special tags. But are ended with a closed tag too, to check which action should be used. [Terminate] for ending the dialoge, you can add your own commands by using cases. A default case means it has to search again in the file for the current tag.

[Q5]Action? [5][/Q5]
Attack [Att]
Defense [Def]
Magic [Mag]
Run [Run]
Suicide [Suc]



Dialogues aren't the only thing you can do with it. For example, loading maps. You have a [Matrix] section, an [Object] section, a [Portal] section, etc.
Multifunctional ...

Login to post a reply

Server time is: 2025-05-22 22:11:15
Your offset time is: 2025-05-22 22:11:15