roland vilett // User Search

roland vilett // User Search

1  ...  2  3  4  5  6  7  |  

Gesture problems

Dec 15, 1998, 1:17am
This is a multi-part message in MIME format.

------=_NextPart_000_0009_01BE2796.6F0AA9A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Whether or not their would be increased lag due to an increased number =
of users would depend on the outgoing bandwidth of the server. Servers =
with a high user load and low bandwidth would experience poor response =
time for all transactions, position updates included, as you would =
expect. If the server has adequate bandwidth available, though, I don't =
think you would ever notice a difference in propagation delay whether =
there was 1 user or 100 users in the world.

I chose 5 seconds because that's what the AW browser does...5 seconds =
after signaling a gesture, it returns to 0. I'm actually not sure =
whether a shorter timeout would cause the gesture to terminate =
prematurely or not...my suspicion is not, since gestures can overlap =
(e.g. you can start a wave before completing the angry sequence, and the =
animation code will attempt to do both at the same time.) To know for =
sure I'd have to dive deep into the avatar animation code, which is not =
something I particularly relish (it isn't my code.) A simple experiment =
with a bot though would say for sure...

-Roland

[View Quote] A performance question for you. You say that the server updates the =
browsers every second. Is there any kind of propagation delay noticed as =
the number of browsers increases or does the max logins per world keep =
this to a minimum.=20

You recommend resetting the gesture after 5 seconds. A gesture =
sequence takes a certain amount of time to run in a browser. If I set to =
gesture to 5 and reset to 0 in two seconds will it stop the currently =
running sequence?=20

Is there some timing advantage to noting long gesture sequence =
compared to short sequences and varying the reset time interval =
appropriately?=20

[View Quote] No, this won't work. In order for the gesture to be reset, the =
other browsers have to see the change. Remember that multiple calls to =
aw_state_change() are not propagated out to other clients more than once =
per second. Your code will simply change your state in the server, and =
then immediately change it back to the way it was before. To everyone =
else in the area, you will appear to have maintained gesture #5 all =
along. The correct way to do this is to add code to your bot to always =
change the gesture back to 0 again a few seconds after it was changed to =
5. The easiest way to do this is to note the current time when you set =
the gesture to 5 (the Windows system call GetTickCount() returns a handy =
time value in milliseconds), and then in your main event loop =
periodically check this saved value against the current time. You will =
need to modify your current call to aw_wait() since your program now =
needs to take action in addition to simply responding to events. The =
relevant code changes could look something like this: #define =
FIVE_SECONDS 5000 unsigned long reset_gesture; void avatar_chat() {=20
int rc;=20
printf("chatting\n");=20
aw_int_set (AW_MY_GESTURE, 5);=20
if (rc =3D aw_state_change ()) {=20
printf ("Unable to change state (reason %d)\n", rc);=20
exit (1);=20
} reset_gesture =3D GetTickCount() + FIVE_SECONDS;} /* =
replace aw_wait(-1) with this: */ while (!aw_wait (1000)) if =
(reset_gesture && reset_gesture < GetTickCount ()) { /* time to set =
our gesture back to 0 again */ aw_int_set (AW_MY_GESTURE, 0); =
aw_state_change (); reset_gesture =3D 0; } Edward Sumerfield wrote =
in message <36756086.CBC209DB at poboxes.com>...=20
Cool. So If I do=20
aw_int_set(AW_MY_GESTURE, 0);=20
aw_state_change();=20
aw_int_set(AW_MY_GESTURE, 5);=20
aw_state_change();=20

It will work every time?=20

[View Quote] You have to reset the gesture to 0 and then back to 5 to =
have the others=20
pick it up again. The resetting to 0 is done =
automatically by the awbrowser=20
after you clicked on a gesture begin=20
Walter=20

Edward Sumerfield schrieb in Nachricht =
<36748FD4.84162BA5 at poboxes.com>...=20
>The following source is supposed to initiate a gesture =
every time it hears=20
>some chat message. However, it only does it once after =
the program starts=20
and=20
>never again. What am I doing wrong?=20

>void avatar_chat() {=20
> int rc;=20
> printf("chatting\n");=20
> aw_int_set (AW_MY_GESTURE, 5);=20
> if (rc =3D aw_state_change ()) {=20
> printf ("Unable to change state (reason %d)\n", =
rc);=20
> exit (1);=20
> }=20
>}=20
>


------=_NextPart_000_0009_01BE2796.6F0AA9A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!doctype html public "-//w3c//dtd html 4.0 =
transitional//en">
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Whether or not their would be =
increased lag due=20
to an increased number of users would depend on the outgoing bandwidth =
of the=20
server.&nbsp; Servers with a high user load and low bandwidth would =
experience=20
poor response time for all transactions, position updates included, as =
you would=20
expect.&nbsp; If the server has adequate bandwidth available, though, I =
don't=20
think you would ever notice a difference in propagation delay whether =
there was=20
1 user or 100 users in the world.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>I chose 5 seconds because that's =
what the AW=20
browser does...5 seconds after signaling a gesture, it returns to 0. I'm =

actually not sure whether a shorter timeout would cause the gesture to =
terminate=20
prematurely or not...my suspicion is not, since gestures can overlap =
(e.g. you=20
can start a wave before completing the angry sequence, and the animation =
code=20
will attempt to do both at the same time.) To know for sure I'd have to =
dive=20
deep into the avatar animation code, which is not something I =
particularly=20
relish (it isn't my code.)&nbsp; A simple experiment with a bot though =
would say=20
for sure...</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>-Roland</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] =
href=3D"mailto:367576AC.18445D02 at poboxes.com">367576AC.18445D02 at poboxes.c=
om</A>&gt;...</DIV>I=20
see. Its a perspective change from me. I keep making the mistake of =
see=20
actions as changes in the server but really they are changes in =
other=20
browsers propagated by a 1 second polling server.=20
<P>You know this means I am going to have to rethink my class =
library=20
infrastructure again. Doh.=20
<P>A performance question for you. You say that the server updates =
the=20
browsers every second. Is there any kind of propagation delay =
noticed as the=20
number of browsers increases or does the max logins per world keep =
this to a=20
minimum.=20
<P>You recommend resetting the gesture after 5 seconds. A gesture =
sequence=20
takes a certain amount of time to run in a browser. If I set to =
gesture to 5=20
and reset to 0 in two seconds will it stop the currently running =
sequence?=20
<P>Is there some timing advantage to noting long gesture sequence =
compared=20
to short sequences and varying the reset time interval =
appropriately?=20
[View Quote] milliseconds), and then in your main event loop periodically =
check this=20
saved value against the current time.&nbsp; You will need to =
modify your=20
current call to aw_wait() since your program now needs to take =
action in=20
addition to simply responding to events.</FONT>&nbsp;<FONT=20
color=3D#000000><FONT size=3D-1>The relevant code changes could =
look=20
something like this:</FONT></FONT>&nbsp;<FONT =
color=3D#000000><FONT=20
size=3D-1>#define FIVE_SECONDS&nbsp;&nbsp;&nbsp;=20
5000</FONT></FONT>&nbsp;<FONT size=3D-1>unsigned long=20
reset_gesture;</FONT>&nbsp;void avatar_chat() { <BR>&nbsp; int =
rc;=20
<BR>&nbsp; printf(&quot;chatting\n&quot;); <BR>&nbsp; aw_int_set =

(AW_MY_GESTURE, 5); <BR>&nbsp; if (rc =3D aw_state_change ()) {=20
<BR>&nbsp;&nbsp;&nbsp; printf (&quot;Unable to change state =
(reason=20
%d)\n&quot;, rc); <BR>&nbsp;&nbsp;&nbsp; exit (1); <BR>&nbsp; =
}&nbsp;=20
reset_gesture =3D GetTickCount() + FIVE_SECONDS;}&nbsp;<FONT=20
color=3D#000000><FONT size=3D-1>/* replace aw_wait(-1) with =
this:=20
*/</FONT></FONT>&nbsp;<FONT size=3D-1>while (!aw_wait =
(1000))</FONT><FONT=20
size=3D-1>&nbsp; if (reset_gesture &amp;&amp; reset_gesture &lt; =

GetTickCount ()) {</FONT><FONT size=3D-1>&nbsp;&nbsp; /* time to =
set our=20
gesture back to 0 again */</FONT><FONT size=3D-1>&nbsp;&nbsp; =
aw_int_set=20
(AW_MY_GESTURE, 0);</FONT><FONT size=3D-1>&nbsp;&nbsp; =
aw_state_change=20
();</FONT><FONT size=3D-1>&nbsp;&nbsp; reset_gesture =3D =
0;</FONT><FONT=20
size=3D-1>&nbsp; }</FONT>&nbsp;&nbsp;Edward=20
[View Quote] aw_state_change ()) { <BR>&gt;&nbsp;&nbsp;&nbsp; printf=20
(&quot;Unable to change state (reason %d)\n&quot;, rc);=20
<BR>&gt;&nbsp;&nbsp;&nbsp; exit (1); <BR>&gt;&nbsp; } =
<BR>&gt;}=20
=
<BR>&gt;</P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></=
HTML>

------=_NextPart_000_0009_01BE2796.6F0AA9A0--

Gesture problems

Dec 15, 1998, 9:21pm
This is a multi-part message in MIME format.

------=_NextPart_000_004A_01BE283E.A7FB4BE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Yes, but with the caveat that changing to a different gesture before the =
previous one completes will not replace the previous gesture but rather =
overlap the two.

-Roland

[View Quote] [View Quote] I tested this case - to change to a different than zero gesture =
will initiate properly the new gesture, while resetting to zero will not =
cause change in the avatar movement. It is needed only for the SAME =
gesture than the last one..=20
=20
[View Quote] Just one more question for you Roland.=20
The browser is deciding on the gesture to initiate if the =
number from the world server is different from the gesture it just =
performed?=20

We have said that we need to reset the gesture to zero 5 =
seconds after the initial gesture is sent. Could that rule be rephrased =
as "to initiate a sequence of gestures, each successive gesture must be =
DIFFERENT from the last."=20

The difference between these statements is of coarse that =
instead of zero we could set gesture 4, then 5 seconds later, set =
gesture 3, then 5 seconds later back to gesture 4 again. Would this =
sequence cause the browser to correctly initiate each sequence?=20

[View Quote] Whether or not their would be increased lag due to an =
increased number of users would depend on the outgoing bandwidth of the =
server. Servers with a high user load and low bandwidth would =
experience poor response time for all transactions, position updates =
included, as you would expect. If the server has adequate bandwidth =
available, though, I don't think you would ever notice a difference in =
propagation delay whether there was 1 user or 100 users in the world. I =
chose 5 seconds because that's what the AW browser does...5 seconds =
after signaling a gesture, it returns to 0. I'm actually not sure =
whether a shorter timeout would cause the gesture to terminate =
prematurely or not...my suspicion is not, since gestures can overlap =
(e.g. you can start a wave before completing the angry sequence, and the =
animation code will attempt to do both at the same time.) To know for =
sure I'd have to dive deep into the avatar animation code, which is not =
something I particularly relish (it isn't my code.) A simple experiment =
with a bot though would say for sure...-Roland=20
[View Quote] A performance question for you. You say that the =
server updates the browsers every second. Is there any kind of =
propagation delay noticed as the number of browsers increases or does =
the max logins per world keep this to a minimum.=20

You recommend resetting the gesture after 5 seconds. =
A gesture sequence takes a certain amount of time to run in a browser. =
If I set to gesture to 5 and reset to 0 in two seconds will it stop the =
currently running sequence?=20

Is there some timing advantage to noting long =
gesture sequence compared to short sequences and varying the reset time =
interval appropriately?=20

[View Quote] No, this won't work. In order for the gesture =
to be reset, the other browsers have to see the change. Remember that =
multiple calls to aw_state_change() are not propagated out to other =
clients more than once per second. Your code will simply change your =
state in the server, and then immediately change it back to the way it =
was before. To everyone else in the area, you will appear to have =
maintained gesture #5 all along.The correct way to do this is to add =
code to your bot to always change the gesture back to 0 again a few =
seconds after it was changed to 5. The easiest way to do this is to =
note the current time when you set the gesture to 5 (the Windows system =
call GetTickCount() returns a handy time value in milliseconds), and =
then in your main event loop periodically check this saved value against =
the current time. You will need to modify your current call to =
aw_wait() since your program now needs to take action in addition to =
simply responding to events. The relevant code changes could look =
something like this: #define FIVE_SECONDS 5000 unsigned long =
reset_gesture; void avatar_chat() {=20
int rc;=20
printf("chatting\n");=20
aw_int_set (AW_MY_GESTURE, 5);=20
if (rc =3D aw_state_change ()) {=20
printf ("Unable to change state (reason =
%d)\n", rc);=20
exit (1);=20
} reset_gesture =3D GetTickCount() + =
FIVE_SECONDS;} /* replace aw_wait(-1) with this: */ while (!aw_wait =
(1000)) if (reset_gesture ?? reset_gesture ? GetTickCount ()) { /* =
time to set our gesture back to 0 again */ aw_int_set (AW_MY_GESTURE, =
0); aw_state_change (); reset_gesture =3D 0; } Edward Sumerfield =
[View Quote] It will work every time?=20

[View Quote] You have to reset the gesture to 0 and =
then back to 5 to have the others=20
pick it up again. The resetting to 0 is =
done automatically by the awbrowser=20
after you clicked on a gesture begin=20
Walter=20

Edward Sumerfield schrieb in Nachricht =
?36748FD4.84162BA5 at poboxes.com>...=20
>The following source is supposed to =
initiate a gesture every time it hears=20
>some chat message. However, it only =
does it once after the program starts=20
and=20
>never again. What am I doing wrong?=20

>void avatar_chat() {=20
> int rc;=20
> printf("chatting\n");=20
> aw_int_set (AW_MY_GESTURE, 5);=20
> if (rc =3D aw_state_change ()) {=20
> printf ("Unable to change state =
(reason %d)\n", rc);=20
> exit (1);=20
> }=20
>}=20
>


------=_NextPart_000_004A_01BE283E.A7FB4BE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!doctype html public "-//w3c//dtd html 4.0 =
transitional//en">
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Yes, but with the caveat that =
changing to a=20
different gesture before the previous one completes will not replace the =

previous gesture but rather overlap the two.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>-Roland</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] =
href=3D"mailto:3676DF62.65421F6D at poboxes.com">3676DF62.65421F6D at poboxes.c=
om</A>&gt;...</DIV>You=20
De Man Andras.=20
<P>So this is a documentation point to Roland then to clarify that =
that it=20
is not the change to zero but the CHANGE of the gesture that is =
important.=20
[View Quote] <P>The browser is deciding on the gesture to initiate if the =
number=20
from the world server is different from the gesture it just=20
performed?=20
<P>We have said that we need to reset the gesture to zero 5 =
seconds=20
after the initial gesture is sent. Could that rule be =
rephrased as=20
&quot;to initiate a sequence of gestures, each successive =
gesture=20
must be DIFFERENT from the last.&quot;=20
<P>The difference between these statements is of coarse that =
instead=20
of zero we could set gesture 4, then 5 seconds later, set =
gesture 3,=20
then 5 seconds later back to gesture 4 again. Would this =
sequence=20
cause the browser to correctly initiate each sequence?=20
[View Quote] <P>Is there some timing advantage to noting long =
gesture=20
sequence compared to short sequences and varying the =
reset=20
time interval appropriately?=20
[View Quote] immediately change it back to the way it was=20
before.&nbsp; To everyone else in the area, you =
will=20
appear to have maintained gesture #5 all=20
along.</FONT>The correct way to do this is to =
add code=20
to your bot to always change the gesture back to =
0 again=20
a few seconds after it was changed to 5.&nbsp; =
The=20
easiest way to do this is to note the current =
time when=20
you set the gesture to 5 (the Windows system =
call=20
GetTickCount() returns a handy time value in=20
milliseconds), and then in your main event loop=20
periodically check this saved value against the =
current=20
time.&nbsp; You will need to modify your current =
call to=20
aw_wait() since your program now needs to take =
action in=20
addition to simply responding to events.</FONT> =
<FONT=20
color=3D#000000><FONT size=3D-1>The relevant =
code changes=20
could look something like this:</FONT></FONT> =
<FONT=20
color=3D#000000><FONT size=3D-1>#define=20
FIVE_SECONDS&nbsp;&nbsp;&nbsp; =
5000</FONT></FONT> <FONT=20
size=3D-1>unsigned long reset_gesture;</FONT> =
void=20
avatar_chat() { <BR>&nbsp; int rc; <BR>&nbsp;=20
printf(&quot;chatting\n&quot;); <BR>&nbsp; =
aw_int_set=20
(AW_MY_GESTURE, 5); <BR>&nbsp; if (rc =3D =
aw_state_change=20
()) { <BR>&nbsp;&nbsp;&nbsp; printf =
(&quot;Unable to=20
change state (reason %d)\n&quot;, rc);=20
<BR>&nbsp;&nbsp;&nbsp; exit (1); <BR>&nbsp; =
}&nbsp;=20
reset_gesture =3D GetTickCount() + =
FIVE_SECONDS;} <FONT=20
color=3D#000000><FONT size=3D-1>/* replace =
aw_wait(-1) with=20
this: */</FONT></FONT> <FONT size=3D-1>while =
(!aw_wait=20
(1000))&nbsp; if (reset_gesture ?? reset_gesture =
?=20
GetTickCount ()) {&nbsp;&nbsp; /* time to set =
our=20
gesture back to 0 again */&nbsp;&nbsp; =
aw_int_set=20
(AW_MY_GESTURE, 0);&nbsp;&nbsp; aw_state_change=20
();&nbsp;&nbsp; reset_gesture =3D 0;&nbsp; =
}</FONT>&nbsp;=20
Edward Sumerfield<ESUMERFD at POBOXES.COM> wrote in =
message=20
?<A=20
=
href=3D"mailto:36756086.CBC209DB at poboxes.com">36756086.CBC209DB at poboxes.c=
om</A>&gt;...=20
=20
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; =
MARGIN-LEFT: 5px; PADDING-LEFT: 5px">Cool.=20
So If I do=20
<P>&nbsp;&nbsp;&nbsp; =
aw_int_set(AW_MY_GESTURE, 0);=20
<BR>&nbsp;&nbsp;&nbsp; aw_state_change();=20
<BR>&nbsp;&nbsp;&nbsp; =
aw_int_set(AW_MY_GESTURE, 5);=20
<BR>&nbsp;&nbsp;&nbsp; aw_state_change();=20
<P>It will work every time?=20
[View Quote] <BR>&gt;never again. What am I doing =
wrong?=20
<P>&gt;void avatar_chat() { =
<BR>&gt;&nbsp; int=20
rc; <BR>&gt;&nbsp;=20
printf(&quot;chatting\n&quot;); =
<BR>&gt;&nbsp;=20
aw_int_set (AW_MY_GESTURE, 5); =
<BR>&gt;&nbsp; if=20
(rc =3D aw_state_change ()) {=20
<BR>&gt;&nbsp;&nbsp;&nbsp; printf =
(&quot;Unable=20
to change state (reason %d)\n&quot;, =
rc);=20
<BR>&gt;&nbsp;&nbsp;&nbsp; exit (1);=20
<BR>&gt;&nbsp; } <BR>&gt;}=20
=
<BR>&gt;</P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQU=
OTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_004A_01BE283E.A7FB4BE0--

Gesture problems

Dec 15, 1998, 9:27pm
This isn't quite correct. Every time you call aw_state_change(), as with
all API methods that use attributes, the values of all attributes are sent
to the server regardless of whether your code sets them or not. If you have
never set an attribute, its value will be zero for integers, false for
booleans, and empty for strings (note this doesn't apply to attributes that
are set automatically by the SDK in response to events and requests.) If
you have set it before, it will continue to retain that value until you set
it again.

This is why it is okay to only set AW_MY_GESTURE and call aw_state_change(),
without setting all other AW_MY_ attributes as well, assuming you have
already called aw_state_change() before to locate your avatar in the world
somewhere. The SDK will simply send again all the same values for AW_MY_X,
AW_MY_Y, etc. as before. Note that this is different from the concept of
the server assigning default values for unspecified attributes.

-Roland

[View Quote]

Gesture problems

Dec 15, 1998, 9:31pm
This is a multi-part message in MIME format.

------=_NextPart_000_005E_01BE283F.F3C865C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Again, yes, this is correct. But the beginning of this thread I believe =
was about the case of someone wanting an avatar to repeat the same =
gesture over and over again in response to chat events. In this case =
changing AW_MY_GESTURE specifically to zero is required in order to =
"reset" the gesture. Of course you could set it to some other gesture =
instead of zero, but then you would have more than one gesture going on.

-Roland
[View Quote] [View Quote] I tested this case - to change to a different than zero gesture =
will initiate properly the new gesture, while resetting to zero will not =
cause change in the avatar movement. It is needed only for the SAME =
gesture than the last one..=20
=20
[View Quote] Just one more question for you Roland.=20
The browser is deciding on the gesture to initiate if the =
number from the world server is different from the gesture it just =
performed?=20

We have said that we need to reset the gesture to zero 5 =
seconds after the initial gesture is sent. Could that rule be rephrased =
as "to initiate a sequence of gestures, each successive gesture must be =
DIFFERENT from the last."=20

The difference between these statements is of coarse that =
instead of zero we could set gesture 4, then 5 seconds later, set =
gesture 3, then 5 seconds later back to gesture 4 again. Would this =
sequence cause the browser to correctly initiate each sequence?=20

[View Quote] Whether or not their would be increased lag due to an =
increased number of users would depend on the outgoing bandwidth of the =
server. Servers with a high user load and low bandwidth would =
experience poor response time for all transactions, position updates =
included, as you would expect. If the server has adequate bandwidth =
available, though, I don't think you would ever notice a difference in =
propagation delay whether there was 1 user or 100 users in the world. I =
chose 5 seconds because that's what the AW browser does...5 seconds =
after signaling a gesture, it returns to 0. I'm actually not sure =
whether a shorter timeout would cause the gesture to terminate =
prematurely or not...my suspicion is not, since gestures can overlap =
(e.g. you can start a wave before completing the angry sequence, and the =
animation code will attempt to do both at the same time.) To know for =
sure I'd have to dive deep into the avatar animation code, which is not =
something I particularly relish (it isn't my code.) A simple experiment =
with a bot though would say for sure...-Roland=20
[View Quote] A performance question for you. You say that the =
server updates the browsers every second. Is there any kind of =
propagation delay noticed as the number of browsers increases or does =
the max logins per world keep this to a minimum.=20

You recommend resetting the gesture after 5 seconds. =
A gesture sequence takes a certain amount of time to run in a browser. =
If I set to gesture to 5 and reset to 0 in two seconds will it stop the =
currently running sequence?=20

Is there some timing advantage to noting long =
gesture sequence compared to short sequences and varying the reset time =
interval appropriately?=20

[View Quote] No, this won't work. In order for the gesture =
to be reset, the other browsers have to see the change. Remember that =
multiple calls to aw_state_change() are not propagated out to other =
clients more than once per second. Your code will simply change your =
state in the server, and then immediately change it back to the way it =
was before. To everyone else in the area, you will appear to have =
maintained gesture #5 all along.The correct way to do this is to add =
code to your bot to always change the gesture back to 0 again a few =
seconds after it was changed to 5. The easiest way to do this is to =
note the current time when you set the gesture to 5 (the Windows system =
call GetTickCount() returns a handy time value in milliseconds), and =
then in your main event loop periodically check this saved value against =
the current time. You will need to modify your current call to =
aw_wait() since your program now needs to take action in addition to =
simply responding to events. The relevant code changes could look =
something like this: #define FIVE_SECONDS 5000 unsigned long =
reset_gesture; void avatar_chat() {=20
int rc;=20
printf("chatting\n");=20
aw_int_set (AW_MY_GESTURE, 5);=20
if (rc =3D aw_state_change ()) {=20
printf ("Unable to change state (reason =
%d)\n", rc);=20
exit (1);=20
} reset_gesture =3D GetTickCount() + =
FIVE_SECONDS;} /* replace aw_wait(-1) with this: */ while (!aw_wait =
(1000)) if (reset_gesture ?? reset_gesture ? GetTickCount ()) { /* =
time to set our gesture back to 0 again */ aw_int_set (AW_MY_GESTURE, =
0); aw_state_change (); reset_gesture =3D 0; } Edward Sumerfield =
[View Quote] It will work every time?=20

[View Quote] You have to reset the gesture to 0 and =
then back to 5 to have the others=20
pick it up again. The resetting to 0 is =
done automatically by the awbrowser=20
after you clicked on a gesture begin=20
Walter=20

Edward Sumerfield schrieb in Nachricht =
?36748FD4.84162BA5 at poboxes.com>...=20
>The following source is supposed to =
initiate a gesture every time it hears=20
>some chat message. However, it only =
does it once after the program starts=20
and=20
>never again. What am I doing wrong?=20

>void avatar_chat() {=20
> int rc;=20
> printf("chatting\n");=20
> aw_int_set (AW_MY_GESTURE, 5);=20
> if (rc =3D aw_state_change ()) {=20
> printf ("Unable to change state =
(reason %d)\n", rc);=20
> exit (1);=20
> }=20
>}=20
>


------=_NextPart_000_005E_01BE283F.F3C865C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!doctype html public "-//w3c//dtd html 4.0 =
transitional//en">
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Again, yes, this is correct.&nbsp; But the beginning =
of this=20
thread I believe was about the case of someone wanting an avatar to =
repeat the=20
same gesture over and over again in response to chat events.&nbsp; In =
this case=20
changing AW_MY_GESTURE specifically to zero is required in order to=20
&quot;reset&quot; the gesture.&nbsp; Of course you could set it to some =
other=20
gesture instead of zero, but then you would have more than one gesture =
going=20
on.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>-Roland</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] =
href=3D"mailto:3676DF62.65421F6D at poboxes.com">3676DF62.65421F6D at poboxes.c=
om</A>&gt;...</DIV>You=20
De Man Andras.=20
<P>So this is a documentation point to Roland then to clarify that =
that it=20
is not the change to zero but the CHANGE of the gesture that is =
important.=20
[View Quote] <P>The browser is deciding on the gesture to initiate if the =
number=20
from the world server is different from the gesture it just=20
performed?=20
<P>We have said that we need to reset the gesture to zero 5 =
seconds=20
after the initial gesture is sent. Could that rule be =
rephrased as=20
&quot;to initiate a sequence of gestures, each successive =
gesture=20
must be DIFFERENT from the last.&quot;=20
<P>The difference between these statements is of coarse that =
instead=20
of zero we could set gesture 4, then 5 seconds later, set =
gesture 3,=20
then 5 seconds later back to gesture 4 again. Would this =
sequence=20
cause the browser to correctly initiate each sequence?=20
[View Quote] <P>Is there some timing advantage to noting long =
gesture=20
sequence compared to short sequences and varying the =
reset=20
time interval appropriately?=20
[View Quote] immediately change it back to the way it was=20
before.&nbsp; To everyone else in the area, you =
will=20
appear to have maintained gesture #5 all=20
along.</FONT>The correct way to do this is to =
add code=20
to your bot to always change the gesture back to =
0 again=20
a few seconds after it was changed to 5.&nbsp; =
The=20
easiest way to do this is to note the current =
time when=20
you set the gesture to 5 (the Windows system =
call=20
GetTickCount() returns a handy time value in=20
milliseconds), and then in your main event loop=20
periodically check this saved value against the =
current=20
time.&nbsp; You will need to modify your current =
call to=20
aw_wait() since your program now needs to take =
action in=20
addition to simply responding to events.</FONT> =
<FONT=20
color=3D#000000><FONT size=3D-1>The relevant =
code changes=20
could look something like this:</FONT></FONT> =
<FONT=20
color=3D#000000><FONT size=3D-1>#define=20
FIVE_SECONDS&nbsp;&nbsp;&nbsp; =
5000</FONT></FONT> <FONT=20
size=3D-1>unsigned long reset_gesture;</FONT> =
void=20
avatar_chat() { <BR>&nbsp; int rc; <BR>&nbsp;=20
printf(&quot;chatting\n&quot;); <BR>&nbsp; =
aw_int_set=20
(AW_MY_GESTURE, 5); <BR>&nbsp; if (rc =3D =
aw_state_change=20
()) { <BR>&nbsp;&nbsp;&nbsp; printf =
(&quot;Unable to=20
change state (reason %d)\n&quot;, rc);=20
<BR>&nbsp;&nbsp;&nbsp; exit (1); <BR>&nbsp; =
}&nbsp;=20
reset_gesture =3D GetTickCount() + =
FIVE_SECONDS;} <FONT=20
color=3D#000000><FONT size=3D-1>/* replace =
aw_wait(-1) with=20
this: */</FONT></FONT> <FONT size=3D-1>while =
(!aw_wait=20
(1000))&nbsp; if (reset_gesture ?? reset_gesture =
?=20
GetTickCount ()) {&nbsp;&nbsp; /* time to set =
our=20
gesture back to 0 again */&nbsp;&nbsp; =
aw_int_set=20
(AW_MY_GESTURE, 0);&nbsp;&nbsp; aw_state_change=20
();&nbsp;&nbsp; reset_gesture =3D 0;&nbsp; =
}</FONT>&nbsp;=20
Edward Sumerfield<ESUMERFD at POBOXES.COM> wrote in =
message=20
?<A=20
=
href=3D"mailto:36756086.CBC209DB at poboxes.com">36756086.CBC209DB at poboxes.c=
om</A>&gt;...=20
=20
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; =
MARGIN-LEFT: 5px; PADDING-LEFT: 5px">Cool.=20
So If I do=20
<P>&nbsp;&nbsp;&nbsp; =
aw_int_set(AW_MY_GESTURE, 0);=20
<BR>&nbsp;&nbsp;&nbsp; aw_state_change();=20
<BR>&nbsp;&nbsp;&nbsp; =
aw_int_set(AW_MY_GESTURE, 5);=20
<BR>&nbsp;&nbsp;&nbsp; aw_state_change();=20
<P>It will work every time?=20
[View Quote] <BR>&gt;never again. What am I doing =
wrong?=20
<P>&gt;void avatar_chat() { =
<BR>&gt;&nbsp; int=20
rc; <BR>&gt;&nbsp;=20
printf(&quot;chatting\n&quot;); =
<BR>&gt;&nbsp;=20
aw_int_set (AW_MY_GESTURE, 5); =
<BR>&gt;&nbsp; if=20
(rc =3D aw_state_change ()) {=20
<BR>&gt;&nbsp;&nbsp;&nbsp; printf =
(&quot;Unable=20
to change state (reason %d)\n&quot;, =
rc);=20
<BR>&gt;&nbsp;&nbsp;&nbsp; exit (1);=20
<BR>&gt;&nbsp; } <BR>&gt;}=20
=
<BR>&gt;</P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQU=
OTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_005E_01BE283F.F3C865C0--

Gesture problems

Dec 16, 1998, 5:07pm
So, ummm, what exactly is your point, Canopus? That the documentation is
incomplete? Thanks, but I already knew that. Like the SDK itself, and Active
Worlds in general, the documentation is a work in progress, and it will
improve with time

-Roland

[View Quote]

Gesture problems

Dec 17, 1998, 6:11am
Sorry. It's just that I thought he was giving *me* a hard time about the
docs...I'm a bit over-extended here trying to keep everything going at once
and sometimes I can get defensive.

-Roland

[View Quote]

Gesture problems

Dec 18, 1998, 7:31pm
This is a multi-part message in MIME format.

------=_NextPart_000_0023_01BE2A8A.B0AF8960
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks :)

-Roland
[View Quote] Sorry. It's just that I thought he was giving *me* a hard time =
about the=20
docs...I'm a bit over-extended here trying to keep everything =
going at once=20
and sometimes I can get defensive.=20
-Roland=20

[View Quote] remarks from this=20
aw_state_change(), as=20
with=20
attributes are=20
not. If=20
you=20
integers, false for=20
to attributes=20
and requests.)=20
value until=20
you=20
assuming you have=20
avatar in the=20
values for=20
the concept=20
of=20
attributes.=20
<3676B2E8.4E3A30AC at ix.netcom.com>...=20
that if you=20
default. If you=20
leave=20
will be a=20
Tourist=20
1-5 seconds=20
connection=20
with=20
up again in=20
given would=20
be=20
undocumented)=20
gestures. New=20
messages looking=20
for=20
>


------=_NextPart_000_0023_01BE2A8A.B0AF8960
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!doctype html public "-//w3c//dtd html 4.0 =
transitional//en">
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Thanks :)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>-Roland</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] =
href=3D"mailto:36790FFB.C385FCD at poboxes.com">36790FFB.C385FCD at poboxes.com=
</A>&gt;...</DIV>You=20
are doing a great job Roland. Keep it up.=20
[View Quote] general, the documentation is a work in progress, and it will=20
<BR>&gt;&gt; improve with time <BR>&gt;&gt; <BR>&gt;&gt; -Roland =

[View Quote] <BR>&gt;&gt; thread <BR>&gt;&gt; &gt;will soon make their way =
into the=20
documentation! <BR>&gt;&gt; &gt; <BR>&gt;&gt; &gt;Roland Vilett =
[View Quote] <BR>&gt;&gt; &gt;&gt; are set automatically by the SDK&nbsp; in =
response=20
to events and requests.) <BR>&gt;&gt; If <BR>&gt;&gt; &gt;&gt; =
you have=20
set it before, it will continue to retain that value until =
<BR>you=20
<BR>&gt;&gt; set <BR>&gt;&gt; &gt;&gt; it again. <BR>&gt;&gt; =
&gt;&gt;=20
<BR>&gt;&gt; &gt;&gt; This is why it is okay to only set =
AW_MY_GESTURE=20
and call <BR>&gt;&gt; aw_state_change(), <BR>&gt;&gt; &gt;&gt; =
without=20
setting all other AW_MY_ attributes as well, assuming you have=20
<BR>&gt;&gt; &gt;&gt; already called aw_state_change() before to =
locate=20
your avatar in the <BR>&gt;&gt; world <BR>&gt;&gt; &gt;&gt;=20
somewhere.&nbsp; The SDK will simply send again all the same =
values for=20
<BR>&gt;&gt; AW_MY_X, <BR>&gt;&gt; &gt;&gt; AW_MY_Y, etc. as=20
before.&nbsp; Note that this is different from the concept =
<BR>of=20
<BR>&gt;&gt; &gt;&gt; the server assigning default values for=20
unspecified attributes. <BR>&gt;&gt; &gt;&gt; <BR>&gt;&gt; =
&gt;&gt;=20
-Roland <BR>&gt;&gt; &gt;&gt; <BR>&gt;&gt; &gt;&gt; Canopus =
wrote in=20
message &lt;3676B2E8.4E3A30AC at ix.netcom.com&gt;... <BR>&gt;&gt; =
&gt;&gt;=20
&gt;Also the documentation for aw_state_change might mention =
that if you=20
<BR>&gt;&gt; leave <BR>&gt;&gt; &gt;&gt; &gt;out an attribute =
for AW_MY,=20
the server gives you a default. If you <BR>leave <BR>&gt;&gt; =
&gt;&gt;=20
&gt;them all out on your first aw_state_change,&nbsp; your bot =
will be a=20
<BR>Tourist <BR>&gt;&gt; &gt;&gt; &gt;located at GZ doing =
nothing=20
special (all zeroes). <BR>&gt;&gt; &gt;&gt; &gt; <BR>&gt;&gt; =
&gt;&gt;=20
[View Quote] ------=_NextPart_000_0023_01BE2A8A.B0AF8960--

SDK Build 11 now available

Dec 15, 1998, 8:46pm
Hi,

I've just posted Build 11 of the SDK. This build should have the bug fixed
where the AW_AVATAR_NAME attribute was sometimes incorrect during
AW_EVENT_AVATAR_DELETE for multi-instance applications.

Some changes have been made to the attributes defined in aw.h:

* AW_WORLD_SCALE_VRML has been removed.

* The new attribute AW_WORLD_AVATARS_IN_SCENE has been added. This
attribute will have meaning once 2.1 is released.

* The new attributes AW_WORLD_SPEAK_CAPABILITY and AW_WORLD_SPEAK_RIGHT were
added a few weeks ago. I'm not sure exactly which build of the SDK they
first showed up in, but I wanted to mention it in case I added them after
build 10 (sorry, sometimes I have a hard time keeping track of all this!)
These attributes will also have meaning once 2.1 is released.

-Roland

a note about bots and special avatars

Dec 15, 1998, 10:23pm
Hi,

some of you have probably noticed that it has been possible for bots to use
special avatars in a world even if their owners weren't PS. I just wanted
to mention that this has been changed in the 2.1 server to enforce the
requirement that a user or bot must be on the world's PS list in order to
use the special avatars. All COF worlds are now running world servers with
this change in effect.

-Roland

a note about bots and special avatars

Dec 19, 1998, 2:09am
This information is contained in only one place, the avatars.dat file. The
SDK has no direct access to this file, and neither do the servers, so it
can't be provided via the SDK. You would have to provide the avatars.dat
file directly to your SDK application.

Or, you could have your program download and unzip the avatars.dat file
itself (using the object path information from the world attributes.) This
will be left as an exercise for the reader. :)

-Roland

[View Quote]

aw_int_set(AW_MY_Y, 0)?

Dec 23, 1998, 4:42pm
It's always possible that there might be a problem here, but I'm not aware
of any...I will try to look into this when I get a chance. If the problem
is in the browser's avatar rendering code, then you would think it could be
duplicated simply by having someone stand in one place and move up and down
using +/-, after using the '5' key to completely stop all horizontal motion.
If the bug is as Xela describes it, then after some point presumably an
observer would no longer see the other's change in altitude....

-Roland

[View Quote]

aw_int_set(AW_MY_Y, 0)?

Dec 24, 1998, 5:47pm
Okay, thanks for all of your hard work on this. From the description of
what you did and what you saw, I'll tentatively conclude that this problem
exists somewhere in the browser's avatar rendering code (a nightmarish brew
of C++ templates, sigh...) I don't think it is in the server; I looked
over all the avatar position handling code in the server and could not find
anything that could possibly care whether the Y coordinate is zero or not.

-Roland

[View Quote]

AW_WORLD_RESTRICTED_RADIUS

Dec 21, 1998, 7:43pm
AW_WORLD_RESTRICTED_RADIUS refers to the distance you must be from Ground
Zero in order to build; it is enforced by the world server and doesn't have
anything to do with bots per se. It is in units of meters and isn't a
"true" radius as you say but rather one half the diameter of a square
centered around GZ.

I'm not sure what the "no bots" radius is, that rule was imposed by the
Peacekeepers, not me. You would have to check with them..

-Roland

[View Quote]

CPU Usage (23+ Kbytes)

Dec 21, 1998, 7:53pm
This is a multi-part message in MIME format.

------=_NextPart_000_005F_01BE2CE9.58F361E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I don't think it is aw_wait() itself that is causing the high CPU usage. =
I have several SDK applications running right now on an NT box (the DJ =
bots in the Gate and Atlantis, the blimp in AW) with a single 400mhz PII =
and none of them use more than 1-2% of the CPU. They all use a similar =
loop centered around aw_wait(1000).

Is your bot running somewhere where there are a lot of avatars? I've =
noticed that the bot program we have that is running all of the bots in =
The13th (somewhere around 20 bots or so) is using about 10% of the CPU =
of the NT machine, mostly due to the fact that many of the bots are =
moving around and others are chatting, and all those chat messages and =
state changes are being reflected back to all the other bots in the same =
program. This, by the way, is an obvious area of optimization for a =
future version of the SDK... :)

-Roland
[View Quote] Well, for a test, i would increase the 1000 to 2000 and see it =
the cpu usage gets cut into half. Walter =20
Andras Sarkozy schrieb in Nachricht =
<367D0F81.10792F9E at mail.storage.co.hu>...Strangely enough - when I have =
only one bot running it uses %25 of the total power. The program has a =
loop:=20
for (int i=3D0;i<36000;i++)=20
{=20
(AWWait)(1000); // 1 sec only=20
if (reset_gesture && reset_gesture < GetTickCount =
())=20
{=20
/* time to set our gesture back to 0 again */=20
(AWIntSet) (AW_MY_GESTURE, 0);=20
(AWStateChange) ();=20
reset_gesture =3D 0;=20
}=20
}=20
but it has the 1 second AWWait in it which doesn't explains =
the CPU load.=20
Any more clue??=20
=20

[View Quote] Looks almost as if the greeterbot example does busy =
polling with no cpu release. almost. just a quarter of your horsepower =
is not beeing used. could be easily exlpla=EDned on the 4 cpu machine, =
with each greater.exe exhausting one cpu, leaving the system with the =
remaining one, but if you have only two, and3 bots use each 25% and the =
Idle Process 25% some bots must have been releasing the cpu and some =
point so my guess wouldn't stand. my 2 cents.=20
Andras Sarkozy schrieb in Nachricht =
<367CBE9D.E39BECDC at mail.storage.co.hu>...Anyone can explain the high CPU =
usage of Ed's simple greeting bot??=20
This is a 300MHz DUAL Pentium II machine with =
512MBytes of memory:=20
[Nice Pic removed: Important things:]=20

Name CPU=20

System Idle 25%=20
Greeter.exe 25%=20
Greeter.exe 25%=20
Greeter.exe 25%=20



------=_NextPart_000_005F_01BE2CE9.58F361E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!doctype html public "-//w3c//dtd html 4.0 =
transitional//en">
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#b8b8b8>
<DIV><FONT color=3D#000000 size=3D2>I don't think it is aw_wait() itself =
that is=20
causing the high CPU usage.&nbsp; I have several SDK applications =
running right=20
now on an NT box (the DJ bots in the Gate and Atlantis, the blimp in AW) =
with a=20
single 400mhz PII and none of them use more than 1-2% of the CPU.&nbsp; =
They all=20
use a similar loop centered around aw_wait(1000).</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Is your bot running somewhere where there are a lot =
of=20
avatars?&nbsp; I've noticed that the bot program we have that is running =
all of=20
the bots in The13th (somewhere around 20 bots or so) is using about 10% =
of the=20
CPU of the NT machine, mostly due to the fact that many of the bots are =
moving=20
around and others are chatting, and all those chat messages and state =
changes=20
are being reflected back to all the other bots in the same =
program.&nbsp; This,=20
by the way, is an obvious area of optimization for a future version of =
the=20
SDK... :)</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>-Roland</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] ------=_NextPart_000_005F_01BE2CE9.58F361E0--

synchronizing problem

Dec 23, 1998, 4:33pm
aw_citizen_by_name() does have a callback: AW_CALLBACK_CITIZEN_ATTRIBUTES.
Every single method that could potentially block in aw_wait() has a
callback.

The corresponding callbacks for the various methods are not clearly
documented and I apologize for that. Yet another thing for my growing list
of doc improvements...

-Roland


[View Quote]

chat string processing curiosa

Dec 23, 1998, 4:47pm
This was a quick fix for a problem that was rapidly getting out of
hand...for the time being, all characters with ASCII value less than 32 are
converted to spaces by 2.1 world servers. The problem with the hi-ASCII
characters was a bug which should now be fixed.

A more sophisticated solution to this problem may well be in order but I
don't have time to deal with it right now...releasing a beta of the 2.1
browser is currently my top priority.

-Roland

[View Quote]

Bot avatars...

Dec 24, 1998, 5:54pm
For the time being you will have to use the special avatars for this purpose
(make sure your bot's owner is on the PS list first!).

I have plans to significantly revamp the entire avatar handling mechanism
(including adding such things as custom avatars.) Hopefully this is
something I will be able to get to in the next version after 2.1.
Presumably, the custom avatar feature alone, if done properly, would allow
you to create custom avatars for your bots that no one else could use.

-Roland

[View Quote]

citizen lookup confusion

Dec 28, 1998, 7:21pm
It is possible that there is a bug in aw_citizen_attributes_by_name() in the
multi-instance case. I've tested it extensively under the single-instance
case but not multi-instance. I'll take a closer look at that.

As for what you said about aw_instance(), yes, in a multi-instance
application once you've called a synchronous API method (i.e. one without a
callback installed) the current instance can change at random, depending on
what events are triggered for the other instances while the SDK is waiting
for a response to your current call. That is one of the reasons why the
aw_instance() and aw_instance_set() calls are provided, so at any time you
can determine which instance is current, and change it to the one you want.

-Roland

[View Quote]

citizen lookup confusion

Dec 29, 1998, 5:42pm
Wait, you are saying that aw_instance() is not correct during callbacks?
That doesn't make any sense. We are running bots right now that depend on
this functionality and they are working fine.

Or are you saying that it doesn't work during just this one callback? I
looked specifically at the code for the AW_CALLBACK_CITIZEN_ATTRIBUTES case,
it is correctly setting the current instance before triggering the callback,
just as with all other callbacks. I can't see how or why this callback
would behave any differently than the others...

If someone could provide some C code that demonstrates this problem, that
would help me a lot...thanks!

-Roland

[View Quote]

Build 12 available

Dec 29, 1998, 9:13pm
Hi,

Build 12 of the SDK is now available. Please upgrade at your earliest
convenience. You may download it from the usual place:

http://objects.activeworlds.com/downloads/sdk.zip

Build 12 introduces 3 new universe attributes in aw.h:
AW_UNIVERSE_BUILD_NUMBER, AW_UNIVERSE_REGISTRATION_CHARGE, and
AW_UNIVERSE_RENEWAL_CHARGE. These attributes are for use by the 2.1 browser
(they aren't of much use for an SDK application.)

A problem has been fixed that occurred when the calls
aw_citizen_attributes_by_name() and aw_citizen_attributes_by_number() failed
if the citizen name or number didn't exist: the queried name or number was
not being sent back to the SDK in the failure case so it wasn't possible to
correlate the query with the response in the AW_CALLBACK_CITIZEN_ATTRIBUTES
if there were multiple calls outstanding. Now the name or number is being
correctly sent back even if they don't exist.

-Roland

Build 12 available

Dec 30, 1998, 7:12pm
>Am I correct in my observation for build 12?
>
>if you send an invalid citizen name, you get back the same invalid
>name (new situation, allows identification) and a citizen number = 0
>(new situation, COF won't like it :-).


Yes, this is correct. Not sure why you would say that COF won't like it, I
deliberately implemented it this way :)

>if you send an invalid citizen number, you get the same invalid
>citizen number (new situation, allows identification) but the name
>remains unchanged from the previous call (old situation).


Yes, also correct.

>If the name were set to say, "", I could then identify it as an error
>message, bypassing the rc problem.


Well...technically, the value of AW_CITIZEN_NAME is undefined in the
lookup_by_number failure case. In practice, yes, it is simply unmodified
from its previous call, but I would hesitate to suggest writing code that
depends on this behavior. Instead I would try to focus on why the rc
problem exists - I assume this is a problem with callbacks in your
particular implementation of an interface to the SDK, not with the SDK
itself, correct?

-Roland

Build 12 available

Dec 31, 1998, 4:08pm
The values 4364880 and 4364876 look very suspiciously like typical Windows
memory address pointers. I think this problem must be a simple one of
simply passing an address back at one point instead of a value.

Just for kicks, have you tried dereferencing the value that comes back in rc
as an int pointer?
In other words, what is the value of *(int *)rc? The luckiest possible
situation is that you are simply receiving the address of the rc parameter
instead of the value.

-Roland

[View Quote]

avatar_delete problem

Jan 2, 1999, 12:31am
Are you on the latest build of the SDK? There was a bug with AW_AVATAR_NAME
in multi-instance applications but it was fixed several builds ago.

-Roland

[View Quote]

avatar_delete problem

Jan 5, 1999, 5:07am
No. I could not reproduce it. I'm probably not going to look at this for a
while because I'm working on getting 2.1 ready for beta now.

-Roland

[View Quote]

wsf and avatar_delete/add, another problem

Jan 2, 1999, 8:44pm
Yes that is correct, to deal with this problem you should install an event
handler for AW_EVENT_WORLD_DISCONNECT and clear your entire avatar list
whenever you receive it. This is what the AW browser itself does as well.

-Roland

[View Quote]

Bot has hearing impairments =(

Jan 2, 1999, 8:53pm
Any error in the 100xx range is coming directly from WinSock and indicates
some form of low-level socket communication problem. It is often extremely
difficult to diagnose the source of Winsock errors. Some of the winsock
errors are documented in the Windows help files, but first you have to look
up your error number in winsock.h to find out what error it is.

One thing to keep in mind that even if you "stop doing things with the bot
for a while" you must continue to call aw_wait() periodically or else the
SDK <-> server communication link will time out. Again, this may not be
entirely clear in the SDK docs, but aw_wait() really is the central
heartbeat of the whole SDK and must be called regularly in your program's
main loop. Note that API methods in synchronous mode (i.e. no callbacks
installed) call aw_wait() implicitly, so if you are making regular
synchronous calls to the API then you don't need to call aw_wait() yourself.

-Roland

[View Quote]

Bot has hearing impairments =(

Jan 3, 1999, 12:38am
It's also perfectly valid to call aw_wait(0); that causes the SDK to simply
process any outstanding inbound messages for all instances, send any
necessary heartbeats, and return. Passing in 10 makes it also do an
additional select for 10 milliseconds, which isn't really necessary since
you are already calling it from a WM_TIMER loop.

-Roland

[View Quote]

Bot has hearing impairments =(

Jan 5, 1999, 5:08am
It depends on what you are trying to do. A one second time interval means
it may take your bot up to one second to respond to events. This may be
find for a chat bot, but for something like a soccer ball it would be bad.

-Roland

[View Quote]

Object Delete Event

Jan 5, 1999, 5:03am
If I understand your question correctly...the answer is yes.

-Roland

[View Quote]

Object Delete Event

Jan 5, 1999, 6:23pm
Yes that's correct. Object numbers are guaranteed to be unique within a
cell only. In practice, objects are assigned random 32-bit numbers when
they are placed, so it is somewhat unlikely that two objects anywhere within
a single world would have the same number. Depending on your application,
you may be able to rely on the "unlikeliness" of that event.

Anybody out there well skilled in the field of probability? Care to work
out what the chances are that in AlphaWorld, which currently has
approximately 32 million objects total, there are two objects anywhere that
have the same number, given that they are each assigned a random number
somewhere in the range of 1 to 4.3 billion?

-Roland

[View Quote]

1  ...  2  3  4  5  6  7  |  
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