Simple Text Adventure coding method?
Simple Text Adventure coding method?
I want to make a very, very simplistic choose your own adventure game - just text based (I really meant simple!). I'm still fairly new to unity.
I'm wondering if I should just use one scene and have the various locations stored to memory in a script? What's a neat way of doing that?
I've found some old code where I have a working button and can get text to the screen. I'm just wondering about what sort of method of storing text descriptions I aught to use?
I'm wondering if I should just use one scene and have the various locations stored to memory in a script? What's a neat way of doing that?
I've found some old code where I have a working button and can get text to the screen. I'm just wondering about what sort of method of storing text descriptions I aught to use?
- a_bertrand
- Posts: 1536
- Joined: Mon Feb 25, 2013 1:46 pm
Re: Simple Text Adventure coding method?
Why use unity for text game? Sorry but doing it in PHP or JS would be for me easier... and would be playable without any plugin requirements.
Creator of Dot World Maker
Mad programmer and annoying composer
Mad programmer and annoying composer
Re: Simple Text Adventure coding method?
I can't host right now and will be using a games host. Also I'm not familair with JS.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Simple Text Adventure coding method?
Hey! This may actually be a use for HOOT, previously know as JsTinyTale, which I linked on the big PBBG engine list since I thought it seemed cool even though it wasn't a PBBG lol. It allows you to make Zork-like text-based adventure games. If you haven't played one before, Zork is much more simple than a MUD or a true RPG. You read text, make decisions and can move around, but about the only RPG-like thing is that you did have an inventory (mostly to hold puzzle key type items).
HOOT seems to be a bit bigger and more powerful than it was when it was JsTinyTale. It is now a very simple programming language, whereas it was simply a text parser before. On the front page it has a couple of pages worth of text, after reading which it says you are armed with enough knowledge to create a text-adventure game, so it must be quite simple (and it looks like it from what I saw, too). The site claims it will only take a few minutes to learn enough to make adventure games with it. Also, I believe that JsTinyTale would only work on the author's website, but now you can upload adventure games created in it anywhere. The site lets you type your adventure right into the page and try it out, although instructions are included for saving it and putting it up on your own site. This could work quite well for what you are wanting to do
HOOT seems to be a bit bigger and more powerful than it was when it was JsTinyTale. It is now a very simple programming language, whereas it was simply a text parser before. On the front page it has a couple of pages worth of text, after reading which it says you are armed with enough knowledge to create a text-adventure game, so it must be quite simple (and it looks like it from what I saw, too). The site claims it will only take a few minutes to learn enough to make adventure games with it. Also, I believe that JsTinyTale would only work on the author's website, but now you can upload adventure games created in it anywhere. The site lets you type your adventure right into the page and try it out, although instructions are included for saving it and putting it up on your own site. This could work quite well for what you are wanting to do
The indelible lord of tl;dr
- a_bertrand
- Posts: 1536
- Joined: Mon Feb 25, 2013 1:46 pm
Re: Simple Text Adventure coding method?
Well not being familiar with JS is a good reason to pick it, as you will need it for most web related projects. Hosting can start with a free hosting btw... or even on your on PC until you go to public.
Creator of Dot World Maker
Mad programmer and annoying composer
Mad programmer and annoying composer
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Simple Text Adventure coding method?
I will host it. Do you have a domain? If not I can get you a folder in one of my domains I am not really using at the moment, asciiwars.com, viraldawn.com, forsakensanctum.com, hallsofvallhalla.com, armageddonearth.com, thegamesguildstudios.com,hmm the rest are not really game related, or i might even can add a folder at indie-resource.com
Re: Simple Text Adventure coding method?
That would be cool, Halls! I was hoping to start this thing (or atleast do it myself) of people writing very, very small games in say an hour or two (or even just writing in new data/new levels to a previous game they've made), as an exercise in just working on games together and because of the very short release cycle, we can encourage and affect each others designs (instead of us working on large projects and because they are large, kinda going into suclusion to develop them).hallsofvallhalla wrote:I will host it. Do you have a domain? If not I can get you a folder in one of my domains I am not really using at the moment, asciiwars.com, viraldawn.com, forsakensanctum.com, hallsofvallhalla.com, armageddonearth.com, thegamesguildstudios.com,hmm the rest are not really game related, or i might even can add a folder at indie-resource.com
I'll try and work up a unity thing to get an idea of what is needed to be hosted (and as I say, it'll be a very simple game - as I said in the previous thread, I'm hoping to have games that have a sort of level structure to them, starting at level 1). Though I'm wondering if I'll cave in and code in game maker (which I know better). But I hope to bang off something soon, hopefully with the source code available for others to use for level 1 games.
I don't have a domain name. I'm pretty clueless in regard to hosting!
Re: Simple Text Adventure coding method?
Yep I can understand collecting domains for future projects, I have a couple myself. Gotta move myself to actually use them for soemthing.hallsofvallhalla wrote:I will host it. Do you have a domain? If not I can get you a folder in one of my domains I am not really using at the moment, asciiwars.com, viraldawn.com, forsakensanctum.com, hallsofvallhalla.com, armageddonearth.com, thegamesguildstudios.com,hmm the rest are not really game related, or i might even can add a folder at indie-resource.com
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Simple Text Adventure coding method?
haha no doubt, i have a ton but I can't bring myself to let them go.
Re: Simple Text Adventure coding method?
I found some code and adapted it to this
It's well laid out in the unity inspector.
Now I'd like to use something like action[0], action[1], etc. But I've tried a few ways and it doesn't like it. I'm not really familiar with the class method that was used in the original code snippet I adapted.
Any ideas?
Dunno how this post got to 2Dengines.
Code: Select all
var arrayOfSituations : Situation [];
class Situation
{
var description : String;
var action_a : String;
var action_b : String;
var action_c : String;
var result_a : String;
var result_b : String;
var result_c : String;
var goto_a : int=0;
var goto_b : int=0;
var goto_c : int=0;
}
Now I'd like to use something like action[0], action[1], etc. But I've tried a few ways and it doesn't like it. I'm not really familiar with the class method that was used in the original code snippet I adapted.
Any ideas?
Dunno how this post got to 2Dengines.