Text Adventure

For questions about using Classic.

Post » Thu Sep 03, 2009 12:28 pm

Ok so I've tried fiddling around with things and none of it seems to work. Basically I'm trying to create a little text adventure, with these features:

-Analyses input sentence for keywords, gets order of keywords, and then gets a function out of that. (e.g. "Go get the rope over by the basket". "Get", "rope" and "basket" are filtered, sees the order, so the character gets the rope)

-A scrolling output conversation box. The list object doesn't work because I want it to scroll without you being able to select an item.

-Images that change according to the output box. I should be able to do this.

So, as random tinkering has led me nowhere, can anyone help?
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Fri Sep 04, 2009 9:28 am

Hmm. Wild guessing here, so don't sue me if it goes horribly wrong. ;)

You'd need one large text field to display text and one text imput field. Store the text somewhere as lines (whole paragraphs, which would wrap automatically, anyway), then make a text scrolling engine that just adds and removes lines as requested, while keeping everything 'logged'. For that purpose, list object would be immensely useful (not the windows list thingy), but I guess you'll have to make an use of array or something else (hashtable), which means a lot of extra work.

For input, basically another text field. It would catch keys typed and type letters out - you'd have to do that manually with events, which is quite a bit of work again, but worth the experience - then submit the text to parser at a press of Enter key.

The parser would then use the text manipulator to search for strings, find key words, spit 'em out. Then you'd just compare them to the context, execute whichever actions are appropriate etc.; if it is not clear enough, spit an error message out or something along lines of "That is a silly thing to do!" or "Huh?".

So, yeah, you'd have to reinvent the wheel a few times. Such is Construct in its infancy - not many generic plugins that would simplify the work flow. For example, in this case you'd need a list object (to log text) and text input field for DX runtime (not app). That would save you hours of messing with events just to work a couple basic features out!

Oh, there is Timeline object, maybe you can make an use of it.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Sep 04, 2009 11:22 am

Thanks Mipey, some really good ideas there.
Hmm yes the text manipulator object. I do believe this is the key thing here, but as there's basically no documentation on it I'm basically feeling around in the dark, which probably won't lead to anything. Does anyone know how to do the keyword scanning with the text manipulator?
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Sun Sep 06, 2009 6:02 am

I've got something close to the scrolling text and I've actually been looking for a project to get me back into working with construct again, just haven't felt up to it in a while. I'll work on that a bit and get it up soon. You are still planning to use direct X right? You did mention changing graphics after all.
B
2
S
2
G
3
Posts: 114
Reputation: 1,553

Post » Mon Sep 07, 2009 11:28 am

Yes, I would be using DirectX. That would be really great Misfit, I'd appreciate it.
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Tue Sep 08, 2009 11:52 pm

for this I'd go with Teh Pythons.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Sep 10, 2009 11:22 pm

[quote="Madster":1u15ulpc]for this I'd go with Teh Pythons.[/quote:1u15ulpc]

Agreed, Python would be far more powerful when manipulating text. You probably would need that power for a text adventure game. Plus, I'm pretty sure all the Python text manipulation stuff works since it is part of the standard install.

The text manipulator object would suffice for a really simple game... but I'm still trying to figure out how it works!
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Fri Sep 11, 2009 10:29 am

Other than a couple tweaks and writing a short tutorial, its done so I'll have it up after getting a bit of sleep.

A quick question, are you using 99.4 or 98? The way its made will work in either version, but right now its saved in 99.
B
2
S
2
G
3
Posts: 114
Reputation: 1,553

Post » Sat Sep 12, 2009 5:02 am

B
2
S
2
G
3
Posts: 114
Reputation: 1,553

Post » Sun Sep 13, 2009 3:41 am

Hmm I can't get it working on 99.42 or 99.5.
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 10 guests