intfiction.org

The Interactive Fiction Community Forum
It is currently Sat Jan 19, 2019 7:04 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 82 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9  Next
Author Message
 Post subject: Re: Dialog
PostPosted: Fri Dec 14, 2018 8:31 am 
Offline
User avatar

Joined: Sun Nov 22, 2009 12:58 pm
Posts: 810
Location: Malmö, Sweden
That was very quick!

I've been playing around a bit. It's quite a pleasant system, but actions still confuse me. Not how they work per se, but actions as performed by NPCs.

For instance, when you tell Igor to go fetch something, how does that work with the action model in the generic sense? Is there some equivalent to the I7 "Instead of an actor going north: ..." construct?

_________________
~Björn Paulsen


Last edited by Eleas on Sat Dec 15, 2018 4:36 am, edited 1 time in total.

Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Dialog
PostPosted: Fri Dec 14, 2018 6:44 pm 
Offline

Joined: Mon May 10, 2010 7:32 am
Posts: 66
How does list manipulation via "append" work?
I found nothing in the manual about it ...

Edit: sry, found it now :-)


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Dialog
PostPosted: Sat Dec 15, 2018 11:32 am 
Offline
User avatar

Joined: Thu Aug 22, 2013 2:48 pm
Posts: 123
Eleas wrote:
I've been playing around a bit. It's quite a pleasant system, but actions still confuse me. Not how they work per se, but actions as performed by NPCs.

For instance, when you tell Igor to go fetch something, how does that work with the action model in the generic sense? Is there some equivalent to the I7 "Instead of an actor going north: ..." construct?


NPC support is currently very limited in Dialog. That's an area where I think the standard library needs to grow.

PCs and NPCs are such different entities that there's no obvious benefit from forcing them into the same abstraction. Action-handling routines would just split up into two cases again, all over the code. So I think it makes more sense to add new predicates for actions taken by NPCs, e.g. '(prevent $ as $)'.

But in many situations, it would be overkill to represent NPC actions with data structures at all. Just add predicates for e.g. wandering through an obvious exit at random, narrating it if the current room (of the PC) is involved. Then query those predicates from tick handlers.

In the case of Igor, I would use a global variable to track his current fetch goal. On every tick, if he is not holding the object, he would move one step closer to it, and possibly pick it up. Otherwise he would move one step closer to the PC and possibly hand it over. Pathfinding routines already exist, but NPC movement routines would have to be implemented.

_________________
Dialog. Tethered.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Dialog
PostPosted: Mon Dec 17, 2018 3:52 am 
Offline
User avatar

Joined: Sun Nov 22, 2009 12:58 pm
Posts: 810
Location: Malmö, Sweden
lft wrote:
PCs and NPCs are such different entities that there's no obvious benefit from forcing them into the same abstraction. Action-handling routines would just split up into two cases again, all over the code.


That's a perspective I hadn't considered. It might be the reason why my I7 projects tend to falter when the time comes for handling actions.

One thing makes me curious though. I'd have expected at least z5 to be a natural fit for the use case laid out in the manual, but it seems Dialog exclusively targets z8 and zBlorb. Obviously z8 is more immediately useful, but it did make me wonder about your future plans for the compiler.

_________________
~Björn Paulsen


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Dialog
PostPosted: Tue Dec 18, 2018 7:19 am 
Offline
User avatar

Joined: Thu Aug 22, 2013 2:48 pm
Posts: 123
Eleas wrote:
I'd have expected at least z5 to be a natural fit for the use case laid out in the manual, but it seems Dialog exclusively targets z8 and zBlorb.


Good point! I'll add z5 support.

_________________
Dialog. Tethered.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Dialog
PostPosted: Thu Dec 20, 2018 9:40 am 
Offline

Joined: Sat Oct 17, 2015 5:48 am
Posts: 97
I'm fooling around with it, and I have noticed a curious problem, probably I missed something, but anyway:

the examples in the documentation don't show the first (or only) room's description at the start. banner &c. is shown fine, but not the first room's description, whose shown up regularly with look.

The CoD example shows fine the first room (the foyer) but I can't figure why CoD works but not the documentation examples.

Best regards from Italy,
dott. Piergiorgio.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Dialog
PostPosted: Thu Dec 20, 2018 11:21 am 
Offline
User avatar

Joined: Thu Aug 22, 2013 2:48 pm
Posts: 123
Ah, yes. The default '(intro)' doesn't invoke the '[look]' action at the end. You can easily add '(try [look])' to the end of your own intro. But perhaps this is a confusing default. I'll consider changing it.

In the Cloak of Darkness, the intro predicate ends by moving the player into the foyer, using '(enter #foyer)'. This predicate in turn invokes '[look]' at the end (just like when you're entering a room during gameplay).

_________________
Dialog. Tethered.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Dialog
PostPosted: Thu Dec 20, 2018 3:20 pm 
Offline

Joined: Sat Oct 17, 2015 5:48 am
Posts: 97
Now work as expected. Thanks !
[admitting that many decades are passed since last use of turbo prolog...]

Best regards from Italy,
dott. Piergiorgio.


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Dialog
PostPosted: Tue Dec 25, 2018 8:32 pm 
Offline

Joined: Thu Oct 07, 2010 3:10 pm
Posts: 52
lft wrote:
Three
words are printed on its front cover in austere, sans-serif letters: “The Dialog Manual”.

> READ IT


Just today I was wishing for a language that would do the work of both Inform 6 and Inform 7, and then I stumbled upon Dialog. Lovely!

I believe I have found a problem in the standard library:
Spoiler: show
> x in
You see nothing unexpected in that direction.

> x out
You see nothing unexpected in that direction.


This seems especially undesirable in a one-room game.

On an unrelated note, do you have plans to add symbolic constants, bitwise AND, or bitwise OR?


Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Dialog
PostPosted: Wed Dec 26, 2018 4:02 am 
Offline
User avatar

Joined: Thu Aug 22, 2013 2:48 pm
Posts: 123
Karona wrote:
x in, x out


Yep, I'll have to come up with better default responses for those. Thanks!

Karona wrote:
On an unrelated note, do you have plans to add symbolic constants, bitwise AND, or bitwise OR?


Hmm, I feel that there must be some different approach that's more in the spirit of the language. There are already named constants, in the form of dictionary words. Sets of flags could be represented by lists of words. The downside is that currently, with the exception of single-character words, all such constants would end up in the game dictionary too, but perhaps that can be avoided with some cleverness in the compiler.

Per-object boolean properties should be modelled by predicates (traits) of course.

Do you have a particular use case in mind?

_________________
Dialog. Tethered.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 82 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group