Thread

aw_wait (Sdk)

aw_wait // Sdk

1  |  

morrie wilson

Feb 9, 1999, 4:47pm
I'm trying - and am having a great deal of success - developing a higher
level
interface to the aw.dll code. The idea is to create a higher level language
whereby people can still create the own bots but can do so with cheaper
programming tools and more limited skill.

However I am getting hung up on the aw_wait() function. Some questions:

1) When does aw_wait return a non-zero return code

2) What does aw_wait(-1) do. Process forever?

3) What does aw_wait(0) do?

4) If aw_wait is not being executed what happens to events that occur.
Ignored and discarded? Stacked up awaiting a call to aw_wait?

5) Is there a way to have aw_wait process an event then exit?

And on a related note: Has anyone done an "Eliza"-type psychotherapy
chatterbot?

roland vilett

Feb 9, 1999, 5:38pm
>I'm trying - and am having a great deal of success - developing a
higher>level
>interface to the aw.dll code. The idea is to create a higher level
language
>whereby people can still create the own bots but can do so with cheaper
>programming tools and more limited skill.


Great idea! I will agree that the SDK in its current form is difficult to
use. I do have plans for future versions that have some of its complexity
abstracted away as best as possible so that people can get up and running
quicker, but these changes may be a while coming so I'm sure it would be
useful to people if you attempted something like that now.

>However I am getting hung up on the aw_wait() function. Some questions:
>
>1) When does aw_wait return a non-zero return code


Basically, never. There are currently only two cases right now where
aw_wait will fail: 1) if you call it without calling aw_init() first, and 2)
if you call it when there are no bot instances to wait on (i.e. if you
haven't called aw_create() yet, or if you have destroyed all the bot
instances that you created.)

>2) What does aw_wait(-1) do. Process forever?


Yes.

>3) What does aw_wait(0) do?


It checks for any pending events or callbacks and then returns immediately.
This is useful if your application wants to spend as much time as possible
doing something else - say, for example, rendering a 3D scene :), and not
waiting around for messages on the network.

>4) If aw_wait is not being executed what happens to events that occur.
>Ignored and discarded? Stacked up awaiting a call to aw_wait?


It depends. If your application is making other synchronous calls to the
API, they will call aw_wait() implicitly so your application will not need
to call it. However, if you are not making any synchronous calls, your
application must call aw_wait() regularly or events and callbacks will not
be dispatched, and eventually your bot will be disconnected from the server
for not sending heartbeats (the "heartbeat" process which lets the server
know that your bot is still alive is handled implicitly by aw_wait).

>5) Is there a way to have aw_wait process an event then exit?


I'm not quite sure what you mean by this - can you explain in more detail?

>And on a related note: Has anyone done an "Eliza"-type psychotherapy
>chatterbot?


Not to my knowledge but this is something that I would *love* to see!

-Roland

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn