edward sumerfield // User Search

edward sumerfield // User Search

1  2  3  4  5  6  ...  9  |  

Deer Bot

Feb 5, 1999, 3:05am
Well, since you ask, it is going fairly well. The basic deer simulation is up
and running and follows these rules:

1. Default action when alone, walk, graze, stay within X distance of
virtual center of herd.
2. When avatar approaches within 20 meters deer becomes alert, walks away
from approaching avatar, while trying to stay near the herd.
3. When avatar approaches within 10 meters deer becomes frightened, runs
away from the avatar at all costs.
4. When returning to the docile state the deer will make its way back to
the herd and return to the walking grazing thing.

The deer switches between these three states, docile, alert and frightened
depending on the avatars that surround it.

There is also a "herd intelligence" that maintains the average state of the
herd. When a high percentage of the herd become frightened then the whole herd
breaks into a run and stampedes away from any and all attackers.

So, with that code done I am working on the graphical model which has reached
the stage of lots of square jointed, untextured, limbs, body, head and tail.

Then comes the new seq files to drive the dropping of the head for a graze,
the sharp raising of the head for alert, and the walking and running
movements.

Lots to do and I am not sure how much to release in phase 1.

The phase 1 deer will look somewhat boxy and will be released, with the kind
permission of Ima Genius, into AWGames.

I am hoping to have something ready by the end of Feb but we all know how
these aggressive estimates work out. I will keep you all in the loop.

Edward Sumerfield.

[View Quote] > Hay, who was doing the deerbot, and, how is the project going ? This was
> one of the most exciting bot ideas i saw im the SDK besides the bot ball
> one .. jsut interested =)

Deer Bot

Feb 7, 1999, 9:12pm
An excellent idea though I was expecting that people might try herding them
first. Not that we really want to frighten the poor things but I was hoping that
their escape logic could be refined such that they behave like real deer. Even
to the point of not being able to see behind them.

Of coarse, if they are going to be herded then we need a corral and that will be
a problem given that there is no collision detection yet.

[View Quote] > Now one could make a sheperd dog bot, and then try to get the deer in a shed
> or something!
>
> Rolu
>
[View Quote]

Deer Bot

Feb 14, 1999, 8:28pm
Currently the deer react to any avatar or robot they see. No distinction is made
between lions, dogs or rabbits.

I believe the bot limit is three at the moment. I assume that a 2.1 world owner
has the ability to configure this. I guess 3 is what COF implemented in their
worlds.

Edward Sumerfield.

[View Quote] > Deer are quite easily frightened. But anyways, if you would program a flock
> of lions instead of deer, you can still make them scared of anything you
> want, rabbits for example. So if you make the deer frightened of the dog,
> they will run away.
>
[View Quote]

Bots get boring...

Feb 5, 1999, 11:43am
Mind if I enter a robot builder as a contestant?

[View Quote] > CoreWars
> ---------------
>
> Write a scorekeeper bot that counts the objects in a world that were created
> by a given citnum.
>
> Basic rules of the game:
>
> - Start with an empty world
> - All contestants' bots enter the world for a given period of time
> - At the end of the period the contestants' bots building right is revoked
> - The scorekeeper is let loose and counts all objects in the world belonging
> to each contestant
> - Winner: the contestant/team with the most objects in the world
>
> I'm sure there could be many variations to this, a couple could be:
> - Winner is the contestant with the most objects visible from a given
> altitude
> - Winner has the most connected objects
>
> Archon Manus
>
[View Quote]

if statement help.....

Sep 13, 1998, 2:58am
You say that "strstr" is reported as an unidentified identifier. That means
that is is not regarding it as a function. You should really be getting a
linker error here but if this was true then you wouldn't be able to run the
program so I must have missunder stood.

Its hard to say without seeing the code but you want to be looking at
something like this.

#define BAD_WORD "shit"
......
if (strstr(aw_string (AW_CHAT_MESSAGE), BAD_WORD)) {

found a bad word
}
else {

didn't find a bad word
}

The quotes around the word are important because it will result in being a
pointer to a string which is what the strstr function wants. The function
call to aw_string is already returning a string pointer so that is fine.

You can also write the if as follows

if (NULL != strstr( aw_string(AW_CHAT_MESSAGE), BAD_WORD)) {

Some people believe it is easier to read when you specify the actual return
value.

Edward Sumerfield, esumerfd at poboxes.com
http://members.xoom.com/esumerfd

[View Quote]

GNU compiler

Sep 27, 1998, 12:28am
Well I am getting closer. I have merged your program with the sample greeter
bot and am trying link it now.

Unresolved references for LoadLib and GetProcAddress. Would you happen to
know which libray they live in. I have a long list of .a files in the gnu
lib directory and running the nm.exe command on them hasn't helped.

Edward Sumerfield

[View Quote]

GNU compiler

Sep 28, 1998, 10:37pm
You the man. I am downloading the cygnus version now.

Edward Sumerfield.

[View Quote]

GNU compiler

Oct 3, 1998, 12:04pm
This is a multi-part message in MIME format.

------=_NextPart_000_009A_01BDEEB5.2DCCF520
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Well I was half way through implementing and changed my mind. DrChandra, =
you were right.

The big advantages of issolating the sdk in one C++ class are

1. It issolates Cof changes to the sdk making it simpler to keep up =
with new versions.
2. It localizes the complications of calling function points to =
loaded dlls.

Edward Sumerfield.
[View Quote] Aside fromt he API encapsulation, I (and anyone else who=20
has the same itch) can produce a JNI interface to the C++ real =
world=20
oriented objects, and the (almost) exact same object would then =
be available=20
to Java programmers.
This would be my prefered language so I look forward to working with =
your results.=20
What is my goal? An open source, multi-platform version of the =
aw client.=20
Obviously performance will be an issue once we get to the 3D =
rendering, but=20
before then, we may be able to produce something which will =
allow someone to=20
stand at ground zero and chat in text mode. It will run =
anywhere, too. Maybe=20
even from within a Web page.
I was thinking of a telnet server model were you write a bot that =
accepts telnet connections and passes any text IO as a check message to =
an assigned bot int he world.=20
What I'm=20
wrestling with right now is how to represent the Instance =
pointers so that=20
multiple Java Instance objects can all be making calls to their =
own C=20
Instance. That and the callback handlers. Any ideas from the =
group would=20
save time, and would be appreciated.
If by instance you mean bot instance then you just have to =
encapsulate the instance number inside a bot object and set the instance =
for every call to its methods. It all has to be sychronized to prevent =
multi-threading problems so that shouldn't be hard.=20
DrChandra/PK-37(281646)=20
--=20
Andrew C. Esh mailto:andrew_esh at cnt.com=20
http://www.mtn.org/~andrewes - ACE Home Page=20

[View Quote] applications could derive their own classes from it. Of course, =
I'm not the=20
worlds greatest OO programmer so I might not be looking at it =
the right=20
way...you're correct in pointing out that the big payoff is that =
the=20
management of the instance handle could be completely =
encapsulated within=20
the class and the developer would no longer have to worry about =
it.=20

I'm not sure I like the class names "Citizen" or =
"Robot"...Citizen would be=20
a misnomer since SDK applications are not citizens...maybe call =
it "Owner"=20
instead? And "Robot" is perhaps too restrictive a concept, since =
SDK apps=20
can be things other than bots roaming around in a world talking =
to=20
people...anyway, just a thought. You're of course welcome to =
create any=20
classes you like. :)=20

-Roland=20

[View Quote] distributions of the SDK so anyone who runs into this problem in =
the future=20
will have an easy solution available. My goal will be to create =
the file so=20
that the same code will compile without modification whether you =
use the=20
aw.lib mechanism or the LoadLibrary() mechanism.=20
-Roland=20
[View Quote]

------=_NextPart_000_009A_01BDEEB5.2DCCF520
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>Well I was half way through =
implementing and=20
changed my mind. DrChandra, you were right.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>The big advantages of issolating the sdk in one C++ =
class=20
are</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>1.&nbsp;&nbsp;&nbsp; It issolates Cof changes to the =
sdk=20
making it simpler to keep up with new versions.</FONT></DIV>
<DIV><FONT size=3D2>2.&nbsp;&nbsp;&nbsp; It localizes the complications =
of calling=20
function points to loaded dlls.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Edward Sumerfield.</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] <BLOCKQUOTE TYPE =3D CITE>What is my goal? An open source, =
multi-platform=20
version of the aw client. <BR>Obviously performance will be an =
issue=20
once we get to the 3D rendering, but <BR>before then, we may be =
able to=20
produce something which will allow someone to <BR>stand at =
ground zero=20
and chat in text mode. It will run anywhere, too. Maybe <BR>even =
from=20
within a Web page.</BLOCKQUOTE>I was thinking of a telnet server =
model were=20
you write a bot that accepts telnet connections and passes any text =
IO as a=20
check message to an assigned bot int he world.=20
<BLOCKQUOTE TYPE =3D CITE>What I'm <BR>wrestling with right now is =
how to=20
represent the Instance pointers so that <BR>multiple Java =
Instance=20
objects can all be making calls to their own C <BR>Instance. =
That and=20
the callback handlers. Any ideas from the group would <BR>save =
time, and=20
would be appreciated.</BLOCKQUOTE>If by instance you mean bot =
instance then=20
you just have to encapsulate the instance number inside a bot object =
and set=20
the instance for every call to its methods. It all has to be =
sychronized to=20
prevent multi-threading problems so that shouldn't be hard.=20
<BLOCKQUOTE TYPE =3D CITE>DrChandra/PK-37(281646)=20
<P>-- <BR>Andrew C. Esh&nbsp;&nbsp; <A=20
href=3D"mailto:andrew_esh at cnt.com">mailto:andrew_esh at cnt.com</A> =
<BR><A=20
=
href=3D"http://www.mtn.org/~andrewes">http://www.mtn.org/~andrewes</A> - =

ACE Home Page=20
[View Quote] <BR>way...you're correct in pointing out that the big payoff is =
that the=20
<BR>management of the instance handle could be completely =
encapsulated=20
within <BR>the class and the developer would no longer have to =
worry=20
about it.=20
<P>I'm not sure I like the class names &quot;Citizen&quot; or=20
&quot;Robot&quot;...Citizen would be <BR>a misnomer since SDK=20
applications are not citizens...maybe call it &quot;Owner&quot;=20
<BR>instead? And &quot;Robot&quot; is perhaps too restrictive a =
concept,=20
since SDK apps <BR>can be things other than bots roaming around =
in a=20
world talking to <BR>people...anyway, just a thought.&nbsp; =
You're of=20
course welcome to create any <BR>classes you like. :)=20
<P>-Roland=20
[View Quote] <BR>moment, I'll create a generic file that will provide access =
to the=20
AW API <BR>transparently using this mechanism, and include it in =

subsequent <BR>distributions of the SDK so anyone who runs into =
this=20
problem in the future <BR>will have an easy solution =
available.&nbsp; My=20
goal will be to create the file so <BR>that the same code will =
compile=20
without modification whether you use the <BR>aw.lib mechanism or =
the=20
LoadLibrary() mechanism. <BR>-Roland <BR>Edward Sumerfield wrote =
in=20
message &lt;36119c83.0 at homer&gt;... <BR>&gt;Here is the complete =
version=20
of sample Greeter program using the dll <BR>instead <BR>&gt;of =
the lib=20
all compiled and linked with the Cygnus GNU C++ compiler. =
<BR>&gt;=20
<BR>&gt;I added a readme.txt that describes how I got it all =
working=20
with input <BR>from <BR>&gt;Netropolis and puptank. Thank you. =
<BR>&gt;=20
<BR>&gt;I hope it is useful to someone. <BR>&gt; <BR>&gt;Edward=20
[View Quote] ------=_NextPart_000_009A_01BDEEB5.2DCCF520--

GNU compiler

Oct 10, 1998, 5:10pm
Interesting. I do not know what an import file is. Unix background, sorry.

The name mangling algorithm in GNU is different from VC++ so you can't
combine MS and GNU DLLs. I don't know if an "inport file" would solve this.

Anyway we are dealing with a C sdk. Would an import file get us around
having to code wrappers around the DLL load?

Edward Sumerfield,

[View Quote]

GNU compiler

Oct 11, 1998, 7:19pm
I must be thinking of libs instead of dlls. So no GNU compiled function can
call a MS compiled C++ library. Does that sound more likley?

So the implib program is dynamically creating something like a dll wrapper
then? I will take a look through GNUdome and see what I can see. Writing
wrappers is tiersome and mainenance intensive, it would be nice to find an
alternative.

Edward Sumerfield

[View Quote]

A little help with a program

Oct 10, 1998, 5:13pm
This is a multi-part message in MIME format.

------=_NextPart_000_0104_01BDF460.92880F30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Interesting. Walkter, I hope you keep contributing to this newsgroup. =
You keep teaching me things.=20

So does windows sockets not being file descriptors give us a problem =
with this new aw_add_event design? If can we just pass these non FD to =
the same function?

If the windows select only listens for sockets how would you architect a =
program that listens for windows messages and sockets?

Edward Sumerfield
[View Quote] I would like to think that the comments we are making will =
contribute to the next version of the API and so I would like to =
continue these conversations if you have the time.=20

Let me explain a little more about aw_add_event().=20

Currently your code calls the socket() and connect() functions =
to create connections to the universe and world servers. The socket call =
returns file descriptors that you are adding to an array of file =
descriptors for passing to the select() call. Each time data becomes =
available on one of these file descriptors the select statement drops =
out and your code checks the file descriptor returned to see if the =
event came from the universe connection or the world connection.=20

OK, now we have a requirement to allow user applications to =
create their own files, sockets or timers and they have to have a way to =
use your select statement to do it.=20

You can create the following function=20

aw_add_event (file descriptor, function pointer) {=20

append file descriptor to end of array.=20
store function pointer into another array indexed by the =
file descriptor.=20
}=20

Now change your select function as follows:=20

array =3D { universe, world }=20

while (1) {=20

event =3D select (array)=20
if (event =3D universe) {=20

Read data from universe file descriptor=20
}=20
else if (event =3D=3D world) {=20

Read data from the world file descriptor=20
}=20
else {=20

look up function pointer using file descriptor=20
call users function;=20
}=20
}=20

Now you have a way for the application to add its own file =
descriptors to your sdks select loop. Applications can now implement =
their own timer based bot functions, dynamically receive weather =
information from a weather server and have their bots tell people, read =
random quotes from a file. All without impacting the performance of the =
application. Also, when bots get more sophisticated they will not be =
needlessly chewing up CPU time while polling the event queue, instead, =
your thousands of deer grazing in a distant meadow will only use CPU =
time when they need to be moving.=20

I have writing a number of there types of applications before =
and would be happy to add my experience to future developments. Please =
don't hesitate to ask.=20

Edward Sumerfield,=20
Pesky user.=20

[View Quote] Okay look, I'll be the first to admit that the SDK =
architecture is not perfect for all possible applications. At this =
point I don't want to get into an argument about which features are more =
important than others. The SDK is what I could come up with in the time =
available. Future considerations like Java support, GNU support, =
multi-threading support, etc. are all great ideas and no doubt would =
make the SDK even better. But that's what they are: future =
considerations. Once again, the goal was to get something, anything, =
out there for people to be able to use. As with all aspects of the =
Active Worlds architecture, the SDK is going to be a continually =
evolving work in progress. As time goes by, it will be improved and =
extended along with all other aspects of the platform. The current goal =
is to simply stabilize and test the current SDK more or less as is in =
order to release it for general use. Then we can start thinking about =
the next version. That said, I'm not sure I even understand the =
aw_add_event() suggestion...I don't know how you would add in external =
application-defined events into the SDK, because the SDK would need to =
know how to check for them. How would the programmer tell the SDK to =
check for his/her custom event, keeping in mind that the only event loop =
that the SDK has is a call to select()? I don't have any hard numbers on =
the hardware mix of our customers. Obviously since AW is a =
Windows-based platform just about everyone has a Windows machine. But =
on the server side lately we've been seeing a lot of interest in Linux, =
for example. I'm not even sure yet what platforms most people will be =
running their bots on.I'm assuming that, in the long term, SDK apps are =
going to more or less parallel world servers in terms of platform of =
choice, since most SDK apps will presumably be applications left running =
[View Quote] You mentioned in the thread about the GNU compiler that =
your preference is to port to Sun/Unix machines before GNU because of =
your belief that high performance bots will run on that type of machine. =
If performance is important to you then why is it that you are not =
addressing this inefficient polling architecture?=20

I would even go as far as saying that a threaded API is =
much high priority than having to worry about porting high powered =
servers.=20

What is the reletive hardware mix of your customers at =
the moment? Windows/Unix/Linix? What percentage of each would you say?=20

Edward Sumerfield=20

[View Quote] A multi-threaded solution isn't absolutely necessary =
here...if you are=20
developing a Windows console app then you can use =
the call _kbhit() to=20
determine if a key has been pressed in the console =
window to avoid blocking=20
in a call to getch(). Something like this:=20
/* main event loop */=20
for (;;) {=20
/* check for AW events */=20
if (aw_wait(100))=20
/* fatal error */=20
break;=20
if (_kbhit()) {=20
/* process keystroke here... */=20
}=20
}=20

Check out the Windows SDK docs for more info on =
_kbhit()...you may want to=20
adjust the timeout parameter to aw_wait() but 100 =
milliseconds means you are=20
checking for keyboard input 10 times per second =
which should be adequate=20
response time.=20

-Roland=20

>You don't need windows unless you want to make the =
interface pretty. A=20
command=20
>line interface, like the dos prompt, is possible =
with a console app and is=20
much=20
>easier to implement if you haven't done much =
programming.=20
>=20
>Your problem is the architectural design of the =
sdk. It is event driven so=20
while=20
>your program is in aw_wait it is waiting for a =
message from the server. It=20
is not=20
>able to wait for a keystroke at the same time.=20
>=20
>An extension needs to be made to the sdk for adding =
user events (Roland?),=20
such as=20
>keyboard events. For example, aw_add_event(int, =
function); This would cause=20
the aw=20
>sdk to wait on your event as well as its own and =
call your function when it=20
is=20
>fired.=20
>=20
>In the mean time you can use polling but it is not =
ideal. For example call=20
>aw_wait(10) so it will wait for 10 milliseconds for =
an sdk event to occur=20
then=20
>drop back into your program. Then in your console =
app you can use the=20
standard C=20
>function gets() which would allow you to enter a =
string and press enter.=20
You can=20
>then do what you like based on the command entered. =

>=20
>The problem is that this is a blocking call. Once =
you have called gets it=20
will not=20
>return to your program until you press enter. While =
it is waiting for you,=20
your=20
>avatar will not be able to react to events.=20
>=20
>If you want to get into some more serious =
programing them you can design a=20
>multi-threaded solution which would be a little =
more realistic. Bare in=20
mind that=20
>the aw sdk is not thread safe so do not allow two =
different threads to call=20
the=20
>same api.=20
>=20
>The design would involve one thread being dedicated =
to calling the aw=20
functions=20
>and a second thread being dedicated to accepting =
input from the keyboard.=20
There=20
>would be one common command buffer that both =
threads read and a lock to=20
protect=20
>that buffer.=20
>=20
>So your program would start up and kick off a =
seperate thread to do all the=20
aw=20
>init, start, enter and wait(10) stuff while the =
first thread blocked on the=20
gets()=20
>function. Now the aw thread would be able to =
continue running even though=20
the=20
>gets() was blocked because it is running in a =
seperate thread.=20
>=20
>In the aw thread, each time the aw_wait drops out =
it would check the=20
command lock,=20
>if it is unlocked then it would lock it, check the =
command buffer and act=20
on what=20
>ever it found before unlocking the lock.=20
>=20
>In the gets thread, each time the enter key is =
pressed the lock is checked,=20
if=20
>unlocked then it must be locked and the new command =
copied into the shared=20
command=20
>buffer, before the lock is unlocked again.=20
>=20
>This is a polling solution so is not as cpu =
efficient as the sdk change but=20
would=20
>work.=20
>=20
>Good luck everyone.=20
>=20
>Edward Sumerfield, esumerfd at poboxes.com=20
>=20
[View Quote] argv[2]);=20
Sample Application #1");=20
Zasz");=20
rc);=20
%d)\n", rc);=20
towards GZ */=20
%d)\n", rc);=20
Beta.", aw_string=20
(AW_AVATAR_NAME));=20
aw_string=20
(AW_OBJECT_MODEL));=20
building\n", aw_string=20
(AW_AVATAR_NAME));=20
>=20



------=_NextPart_000_0104_01BDF460.92880F30
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 W3 =
HTML//EN"><!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>Interesting. Walkter, I hope you =
keep=20
contributing to this newsgroup. You keep teaching me things. =
</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>So does windows sockets not being =
file=20
descriptors give us a problem with this new aw_add_event design? If can =
we just=20
pass these non FD to the same function?</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>If the windows select only listens for sockets how =
would you=20
architect a program that listens for windows messages and =
sockets?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Edward Sumerfield</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] descriptors for passing to the select() call. Each time data =
becomes=20
available on one of these file descriptors the select statement =
drops=20
out and your code checks the file descriptor returned to see if =
the=20
event came from the universe connection or the world connection. =

<P>OK, now we have a requirement to allow user applications to =
create=20
their own files, sockets or timers and they have to have a way =
to use=20
your select statement to do it.=20
<P>You can create the following function=20
<P>&nbsp;&nbsp;&nbsp; aw_add_event (file descriptor, function =
pointer) {=20
=20
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append file =
descriptor to=20
end of array. <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
store=20
function pointer into another array indexed by the file =
descriptor.=20
<BR>&nbsp;&nbsp;&nbsp; }=20
<P>Now change your select function as follows:=20
<P>&nbsp;&nbsp;&nbsp; array =3D { universe, world }=20
<P>&nbsp;&nbsp;&nbsp; while (1) {=20
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; event =3D select =
(array)=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (event =3D =
universe) {=20
=
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Read data from universe file descriptor=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if (event =
=3D=3D world)=20
{=20
=
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Read data from the world file descriptor=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else {=20
=
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
look up function pointer using file descriptor=20
=
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
call users function; =
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }=20
<BR>&nbsp;&nbsp;&nbsp; }=20
<P>Now you have a way for the application to add its own file=20
descriptors to your sdks select loop. Applications can now =
implement=20
their own timer based bot functions, dynamically receive weather =

information from a weather server and have their bots tell =
people, read=20
random quotes from a file. All without impacting the performance =
of the=20
application. Also, when bots get more sophisticated they will =
not be=20
needlessly chewing up CPU time while polling the event queue, =
instead,=20
your thousands of deer grazing in a distant meadow will only use =
CPU=20
time when they need to be moving.=20
<P>I have writing a number of there types of applications before =
and=20
would be happy to add my experience to future developments. =
Please don't=20
hesitate to ask.=20
<P>Edward Sumerfield, <BR>Pesky user.=20
[View Quote] stabilize and test the current SDK more or less as is in =
order to=20
release it for general use.&nbsp; Then we can start thinking =
about=20
the next version.</FONT></FONT>&nbsp;<FONT size=3D-1>That =
said, I'm=20
not sure I even understand the aw_add_event() suggestion...I =
don't=20
know how you would add in external application-defined =
events into=20
the SDK, because the SDK would need to know how to check for =

them.&nbsp; How would the programmer tell the SDK to check =
for=20
his/her custom event, keeping in mind that the only event =
loop that=20
the SDK has is a call to select()?</FONT>&nbsp;<FONT=20
color=3D#000000><FONT size=3D-1>I don't have any hard =
numbers on the=20
hardware mix of our customers.&nbsp; Obviously since AW is a =

Windows-based platform just about everyone has a Windows=20
machine.&nbsp; But on the server side lately we've been =
seeing a lot=20
of interest in Linux, for example.&nbsp; I'm not even sure =
yet what=20
platforms most people will be running their bots=20
on.</FONT></FONT><FONT size=3D-1>I'm assuming that, in the =
long term,=20
SDK apps are going to more or less parallel world servers in =
terms=20
of platform of choice, since most SDK apps will presumably =
be=20
applications left running 24 hours/day.</FONT>&nbsp;<FONT=20
size=3D-1>-Roland</FONT>&nbsp;esumerfd<ESUMERFD at POBOXES.COM> =
wrote in=20
message &lt;<A=20
=
href=3D"mailto:3606D037.57F62323 at poboxes.com">3606D037.57F62323 at poboxes.c=
om</A>&gt;...=20
=20
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; =
PADDING-LEFT: 5px">That=20
is true enough Roland. Still a polling architecture but =
simpler=20
than writing threaded apps.=20
<P>So, you haven't commented on the idea of adding a=20
aw_add_event(int , function) funtion to the sdk yet?=20
<P>You mentioned in the thread about the GNU compiler =
that your=20
preference is to port to Sun/Unix machines before GNU =
because of=20
your belief that high performance bots will run on that =
type of=20
machine. If performance is important to you then why is =
it that=20
you are not addressing this inefficient polling =
architecture?=20
<P>I would even go as far as saying that a threaded API =
is much=20
high priority than having to worry about porting high =
powered=20
servers.=20
<P>What is the reletive hardware mix of your customers =
at the=20
moment? Windows/Unix/Linix? What percentage of each =
would you=20
say?=20
<P>Edward Sumerfield=20
[View Quote] continue running even though <BR>the <BR>&gt;gets() =
was=20
blocked because it is running in a seperate thread. =
<BR>&gt;=20
<BR>&gt;In the aw thread, each time the aw_wait =
drops out it=20
would check the <BR>command lock, <BR>&gt;if it is =
unlocked=20
then it would lock it, check the command buffer and =
act=20
<BR>on what <BR>&gt;ever it found before unlocking =
the lock.=20
<BR>&gt; <BR>&gt;In the gets thread, each time the =
enter key=20
is pressed the lock is checked, <BR>if =
<BR>&gt;unlocked then=20
it must be locked and the new command copied into =
the shared=20
<BR>command <BR>&gt;buffer, before the lock is =
unlocked=20
again. <BR>&gt; <BR>&gt;This is a polling solution =
so is not=20
as cpu efficient as the sdk change but <BR>would=20
<BR>&gt;work. <BR>&gt; <BR>&gt;Good luck everyone. =
<BR>&gt;=20
<BR>&gt;Edward Sumerfield, esumerfd at poboxes.com =
<BR>&gt;=20
[View Quote] &quot;while (!aw_wait <BR>(-1)) <BR>&gt;&gt; =
!newline!&nbsp;=20
;&quot;, but i cant get it to work <BR>&gt;&gt; =
<BR>&gt;&gt;=20
[View Quote] <BR>&gt;&gt; &gt; &gt;to get it to accept commands =
at the=20
console so i can make the bot move <BR>&gt;&gt; &gt; =
&gt;and=20
talk at my command. how would i do that? =
<BR>&gt;&gt; &gt;=20
&gt; <BR>&gt;&gt; &gt; &gt;the program: <BR>&gt;&gt; =
&gt;=20
&gt;#include &lt;aw.h&gt;&nbsp; //i added the =
library and=20
header to my program <BR>&gt;&gt; &gt; =
&gt;directories.=20
unless you have done <BR>&gt;&gt; &gt;=20
=
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
//that, use &quot;aw.h&quot; <BR>&gt;&gt; &gt; =
&gt;#include=20
&lt;stdio.h&gt; <BR>&gt;&gt; &gt; &gt;#include=20
&lt;stdlib.h&gt; <BR>&gt;&gt; &gt; &gt;#include=20
&lt;conio.h&gt; <BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; =
&gt;=20
&gt;void handle_avatar_add (void); <BR>&gt;&gt; &gt; =

&gt;void object_add (void); <BR>&gt;&gt; &gt; =
&gt;void=20
avatar_delete (void); <BR>&gt;&gt; &gt; &gt;void =
input(char=20
command[100]); <BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; =
&gt;=20
&gt;main (int argc, char *argv[]) <BR>&gt;&gt; &gt; =
&gt;{=20
<BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; &gt; &gt;&nbsp; =
int rc;=20
<BR>&gt;&gt; &gt; &gt;&nbsp; char junk[1]; =
<BR>&gt;&gt; &gt;=20
&gt; <BR>&gt;&gt; &gt; &gt;&nbsp; /* check command =
line */=20
<BR>&gt;&gt; &gt; &gt;&nbsp; if (argc &lt; 3) { =
<BR>&gt;&gt;=20
&gt; &gt;&nbsp;&nbsp;&nbsp; printf (&quot;Usage: %s =
number=20
password\n&quot;, argv[0]); <BR>&gt;&gt; &gt;=20
&gt;&nbsp;&nbsp;&nbsp; printf (&quot;Press any key =
to=20
continue&quot;); <BR>&gt;&gt; &gt; &gt; gets (junk); =

<BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; exit (1);=20
<BR>&gt;&gt; &gt; &gt;&nbsp; } <BR>&gt;&gt; &gt; =
&gt;=20
<BR>&gt;&gt; &gt; &gt;&nbsp; /* initialize Active =
Worlds API=20
*/ <BR>&gt;&gt; &gt; &gt;&nbsp; if (rc =3D aw_init =
(AW_BUILD))=20
{ <BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; printf=20
(&quot;Unable to initialize API (reason %d)\n&quot;, =
rc);=20
<BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; printf =
(&quot;Press=20
any key to continue&quot;); <BR>&gt;&gt; &gt; &gt; =
gets=20
(junk); <BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; =
exit (1);=20
<BR>&gt;&gt; &gt; &gt;&nbsp; } <BR>&gt;&gt; &gt; =
&gt;=20
<BR>&gt;&gt; &gt; &gt;&nbsp; /* install handler for=20
avatar_add and object_add event */ <BR>&gt;&gt; &gt; =

&gt;&nbsp; aw_event_set (AW_EVENT_AVATAR_ADD,=20
handle_avatar_add); <BR>&gt;&gt; &gt; &gt;&nbsp;=20
aw_event_set (AW_EVENT_OBJECT_ADD, object_add); =
<BR>&gt;&gt;=20
&gt; &gt;&nbsp; aw_event_set =
(AW_EVENT_AVATAR_DELETE,=20
avatar_delete); <BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; =
&gt;=20
&gt;&nbsp; /* create bot instance */ <BR>&gt;&gt; =
&gt;=20
&gt;&nbsp; if (rc =3D aw_create (0, 0, 0)) { =
<BR>&gt;&gt; &gt;=20
&gt;&nbsp;&nbsp;&nbsp; printf (&quot;Unable to =
create bot=20
instance (reason %d)\n&quot;, rc); <BR>&gt;&gt; &gt; =

&gt;&nbsp;&nbsp;&nbsp; printf (&quot;Press any key =
to=20
continue&quot;); <BR>&gt;&gt; &gt; &gt; gets (junk); =

<BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; exit (1);=20
<BR>&gt;&gt; &gt; &gt;&nbsp; } <BR>&gt;&gt; &gt; =
&gt;=20
<BR>&gt;&gt; &gt; &gt;&nbsp; /* log bot into the =
universe */=20
<BR>&gt;&gt; &gt; &gt;&nbsp; aw_int_set =
(AW_LOGIN_OWNER,=20
atoi (argv[1])); <BR>&gt;&gt; &gt; &gt;&nbsp; =
aw_string_set=20
(AW_LOGIN_PRIVILEGE_PASSWORD, argv[2]); <BR>&gt;&gt; =
&gt;=20
&gt;&nbsp; aw_string_set (AW_LOGIN_APPLICATION, =
&quot;SDK=20
Sample Application #1&quot;); <BR>&gt;&gt; &gt; =
&gt;&nbsp;=20
aw_string_set (AW_LOGIN_NAME, &quot;Bot of =
Zasz&quot;);=20
<BR>&gt;&gt; &gt; &gt;&nbsp; if (rc =3D aw_login ()) =
{=20
<BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; printf=20
(&quot;Unable to login (reason %d)\n&quot;, rc);=20
<BR>&gt;&gt; &gt; &gt; printf (&quot;Press any key =
to=20
continue&quot;); <BR>&gt;&gt; &gt; &gt; gets (junk); =

<BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; exit (1);=20
<BR>&gt;&gt; &gt; &gt;&nbsp; } <BR>&gt;&gt; &gt; =
&gt;=20
<BR>&gt;&gt; &gt; &gt;&nbsp; /* log bot into the =
world=20
called &quot;beta&quot; */ <BR>&gt;&gt; &gt; =
&gt;&nbsp; if=20
(rc =3D aw_enter (&quot;Beta&quot;, 0)) { =
<BR>&gt;&gt; &gt;=20
&gt;&nbsp;&nbsp;&nbsp; printf (&quot;Unable to enter =
world=20
(reason %d)\n&quot;, rc); <BR>&gt;&gt; &gt;=20
&gt;&nbsp;&nbsp;&nbsp; printf (&quot;Press any key =
to=20
continue&quot;); <BR>&gt;&gt; &gt; &gt; gets (junk); =

<BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; exit (1);=20
<BR>&gt;&gt; &gt; &gt;&nbsp; } <BR>&gt;&gt; &gt; =
&gt;=20
<BR>&gt;&gt; &gt; &gt;&nbsp; /* announce our =
position in the=20
world */ <BR>&gt;&gt; &gt; &gt;&nbsp; aw_int_set =
(AW_MY_X,=20
1000); /* 1W */ <BR>&gt;&gt; &gt; &gt;&nbsp; =
aw_int_set=20
(AW_MY_Z, 1000); /* 1N */ <BR>&gt;&gt; &gt; =
&gt;&nbsp;=20
aw_int_set (AW_MY_YAW, 2250); /* face towards GZ */=20
<BR>&gt;&gt; &gt; &gt;&nbsp; if (rc =3D =
aw_state_change ()) {=20
<BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; printf=20
(&quot;Unable to change state (reason %d)\n&quot;, =
rc);=20
<BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; printf =
(&quot;Press=20
any key to continue&quot;); <BR>&gt;&gt; &gt; &gt; =
gets=20
(junk); <BR>&gt;&gt; &gt; &gt;&nbsp;&nbsp;&nbsp; =
exit (1);=20
<BR>&gt;&gt; &gt; &gt;&nbsp; } <BR>&gt;&gt; &gt; =
&gt;=20
<BR>&gt;&gt; &gt; &gt;&nbsp; /* main event loop */=20
<BR>&gt;&gt; &gt; &gt;&nbsp; char req, command[81];=20
<BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; &gt; &gt;&nbsp; =
while=20
(!aw_wait (-1)) <BR>&gt;&gt; &gt; &gt; ; =
<BR>&gt;&gt; &gt;=20
&gt; <BR>&gt;&gt; &gt; &gt;&nbsp; /* close =
everything down=20
*/ <BR>&gt;&gt; &gt; &gt;&nbsp; aw_destroy (); =
<BR>&gt;&gt;=20
&gt; &gt;&nbsp; aw_term (); <BR>&gt;&gt; &gt; =
&gt;&nbsp;=20
return 0; <BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; &gt; =
&gt;}=20
<BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; &gt; &gt;void=20
handle_avatar_add (void) <BR>&gt;&gt; &gt; &gt;{=20
<BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; &gt; &gt;&nbsp; =
char=20
message[100]; <BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; =
&gt;=20
&gt;&nbsp; sprintf (message, &quot;Hello %s. Welcome =
to=20
Beta.&quot;, aw_string <BR>&gt;&gt; &gt;=20
&gt;(AW_AVATAR_NAME)); <BR>&gt;&gt; &gt; &gt;&nbsp; =
aw_say=20
(message); <BR>&gt;&gt; &gt; &gt;&nbsp; /* log the =
event to=20
the console */ <BR>&gt;&gt; &gt; &gt;&nbsp; printf=20
(&quot;avatar_add: %s\n&quot;, aw_string =
(AW_AVATAR_NAME));=20
<BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; &gt; &gt;} =
<BR>&gt;&gt;=20
&gt; &gt; <BR>&gt;&gt; &gt; &gt;void object_add =
(void)=20
<BR>&gt;&gt; &gt; &gt;{ <BR>&gt;&gt; &gt; &gt; =
<BR>&gt;&gt;=20
&gt; &gt;&nbsp; printf (&quot;Someone has added a %s =

nearby&quot;, aw_string <BR>(AW_OBJECT_MODEL)); =
<BR>&gt;&gt;=20
&gt; &gt; <BR>&gt;&gt; &gt; &gt;} <BR>&gt;&gt; &gt; =
&gt;=20
<BR>&gt;&gt; &gt; &gt;void avatar_delete (void) =
<BR>&gt;&gt;=20
&gt; &gt;{ <BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; &gt;=20
&gt;&nbsp; char message[100]; <BR>&gt;&gt; &gt; &gt; =

<BR>&gt;&gt; &gt; &gt;&nbsp; sprintf (message, =
&quot;%s has=20
left the building\n&quot;, aw_string <BR>&gt;&gt; =
&gt;=20
&gt;(AW_AVATAR_NAME)); <BR>&gt;&gt; &gt; &gt;&nbsp; =
aw_say=20
(message); <BR>&gt;&gt; &gt; &gt;&nbsp; printf=20
(&quot;avatar_delete: %s\n&quot;, aw_string=20
(AW_AVATAR_NAME)); <BR>&gt;&gt; &gt; &gt; =
<BR>&gt;&gt; &gt;=20
&gt;} <BR>&gt;&gt; &gt; &gt; <BR>&gt;&gt; <BR>&gt;=20
=
<BR></P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>=
</BODY></HTML>

------=_NextPart_000_0104_01BDF460.92880F30--

Weather algorithm.

Feb 8, 1999, 5:02pm
I just thought of a cool programming problem to do with weather.

Lets say that you want a cloudy day, not too many clouds but a few doted
around. It may be too much of an overhead to add clouds to every zone in
the world, especially a large world like Aw. You could come up with an
algorithm that worked out the optimum spread of cloud objects based on
the locations of the known avatars in the world. So you would only have
to add cloud objects to certain parts of the world. In most cases this
would be just around GZ but there would be an occasional smattering for
those adventurous souls that ventured into the green beyond.

I am not sure what the maximum visibility of an bot is but the cloud
bot, sorry Eep, must call it a bot, would have to station bots at a
number of locations around the world to ensure that everyone is seen.
Each cloud bot would maintain the same list of avatars in the world and
track each of their movements.

Wherever you go, the clouds will follow. Sounds like a sad ending to a
weather phenomenon.

Edward Sumerfield.

Weather algorithm.

Feb 9, 1999, 2:43am
Yes, it seems that my idea will not be feasible. So we are limited to
generating clouds over our own land only, not so much because of the access
restrictions but because of the problem of finding all the avatars to have
clouds over.

[View Quote] > If the clouds are specially designed bots, then they can go anywhere in a
> world like AW that a citizen or tourist avatar can go. So the problem
> becomes how to detect where the citizen or tourist avatars are hanging out.
> A cloud-avatar bot can't detect other avatars more than a short distance
> away. So you'd need a lot of bots out looking for crowds of tourist and
> citizen avatars to rain on.
>
> If the clouds are objects added to AW's objects list, then the
> cloud-building/destroying bot can only create them above land that is owned
> by the bot's owner, as Dean points out. A builder bot can build anywhere in
> the world it has been admitted to, so it could make clouds appear anywhere
> its owner has land to rain on, without actually being present there. But
> detecting whether anybody is on that land is still a problem.
>
> Could another way of detecting crowds on your property be devised (other
> than sending a bot there to count AvatarAdded events)? This wouldn't be a
> bot programming problem, it would be an object-designing problem or an
> object+action+webpage building problem.
>
[View Quote]

Weather algorithm.

Feb 9, 1999, 10:46am
[View Quote] > This doesn't help with the avatar detection issue,

If you are only adding weather effects over your own land then you do not need
any avatar detection. Just a local effect. Of coarse you could get adjoining
pieces of land with different weather effects which may look funny.

> but remember that you can
> create an object that is not centered on its 0,0,0 point. The limitation
> then becomes that the anchor point has to be visible. In general, this means
> that you could have clouds within 60 meters of land that you control, and
> they would usually be visible.

I don't get this "not centered on its 0,0,0" issue. Why can't I just have a
little cloud rwx file and place it 40 meters off the ground (or 60 in your case,
my vis is only 40). It can be moved and changed for other little cloud objects
as the weather pattern transforms through time.

> Archon Manus
> Vizier D'Magienne
>
[View Quote]

Weather algorithm.

Feb 9, 1999, 10:48am
When an avatar bumps a bump object is the SDK program monitoring that zone notified
or do you have to put some kind of action the change the object for it to be
notified.

[View Quote] > Don't give up yet. What I had in mind was a Bump action on certain key objects
> onsomeone's land, so that a webpage and associated database was updated, in a way

> that allowed that person's central bot to take a peek at it, and see how big the
> current local population of Bumping citizens and tourists might be. There's a
> number of reasonable complaints under this newsgroup about having to program
> bots, but many of those non-programmers might be ready to install a readymade
> web-action on some of their objects, assuming that the bot and database parts
> will be taken care of by programmers for them. Then someone's central bot could
> put clouds over that person's land whenever its Bump quota was fulfilled, and
> rain on the Bumping citizens and tourists there.
>
[View Quote]

Weather algorithm.

Feb 11, 1999, 5:28pm
This is a multi-part message in MIME format.

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

That's an interesting approach but doesn't that mean that they would not =
changed? I would envisage clouds that change and move around.
[View Quote] -Wullis

------=_NextPart_000_0075_01BE55CA.D445EDE0
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 W3 =
HTML//EN"><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<META content=3D'"MSHTML 5.00.0910.1309"' name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2><FONT face=3DArial size=3D2>That's an =
interesting=20
approach but doesn't that mean that they would not changed? I would =
envisage=20
clouds that change and move around.</FONT></FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV>Wullis &lt;<A=20
href=3D"mailto:wullis at trivini.8m.com">wullis at trivini.8m.com</A>&gt; =
wrote in=20
message <A =
href=3D"news:36c32bb1.0 at homer">news:36c32bb1.0 at homer</A>...</DIV>
<DIV><FONT color=3D#000000 size=3D2>Uhm...</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>If there is going to be clouds in =
a whole=20
world, why not just add the clouds to the ground object..? Then they =
will be=20
repeated every 60 meter...</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>It works fine with snow...(:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#000000 =
size=3D2>-Wullis</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0075_01BE55CA.D445EDE0--

Roland: SDK docs for viewing off-line?

Oct 3, 1998, 11:45am
You might try going to www.winfiles.com at the internet utilities section.
There is a freeware program there called "webdown". Just point it at a web
site and it will download a set of pages and images to your local drive. It
makes all the appropriate link fixes so that you can work offline.

Edward Sumerfield.

[View Quote]

Can someone explain AW_event_set ?

Oct 7, 1998, 12:26am
Certainly jeanphi,

The function aw_event_set allows you to tell the SDK the name of one of your
functions for it to call when something happens.

The parameters are the attribute which describes the "when somthing
happends" and the function pointer, the void(*func)(void) thing, that is
your function.

So, the code aw_event_set(AW_EVENT_AVATAR_ADD, myfunc);

where myfunc is

void myfunc(void) {
printf("Hey I was just called by the SDK.\n");
}

As you can see, the attribute is when an avatar appears near your bot and
when this happens your function is called. It allows your bot to react to
events in the world.

Hope this helps.

Edward Sumerfield.

[View Quote]

callbacks

Oct 7, 1998, 12:23am
There is practically no difference between callbacks and aw_event_set
functions. Its just a way for the SDK to call your code.

I don't understand why the SDK implements them using different mechanisms.

Netropolis said it all.

Edward Sumerfield.

[View Quote]

callbacks

Oct 8, 1998, 2:07am
Time to take a programming coarse.

Synchronous operation is one thing after another.
Asynchronous operation is many things at once.

Well, kind of. Lets use a little bit of psuedo code.

Sync operation:

while do forever

do this thing and wait
done

Async operation:

while do forever

do this thing and while it is doing it return.

/* so the thing is still goint but this code is continuing anyway.
*/

do another thing.
done

How about an example.

You want to read a message from a communications line. You can call a read
function and wait for data to arrive at your machine, sync operation. Or you
can call a read function to indicate that you wand date but then return. Now
while you are waiting for data to arrive you can be doing something else.
When the data arrives the other part of your program calls you.

I think I may be making things more complicated than they need to be. Sorry.

The aw sdk.

aw_callback_set(function);
aw_query
while ()

do something.
}

function() {

this will be called when the query operation is complete.
}

You know, if you don't need to get into higher efficiency bots I would just
ignore the issue.

Edward Sumerfield.

[View Quote]

Still...

Feb 9, 1999, 10:50am
Are you saying that you finished the Monopoly bot or that you want one.

[View Quote] > want an AWMonopoly bot!!! :-)

GNU functions...

Oct 7, 1998, 12:37am
You must include some code in these kind of questions but let me give it a
shot.

Your using standard C, the fact that you are using the GNU compiler is
irrelevant.

The strcmp function is a standard C function that compares two strings. The
usual problem people make with this function is that it returs zero meaning
that the strings are equal. So the code

if (!strcmp("A", "A")) {

printf("They are equal.\n");
}

works just fine.

If you are getting a compile error make sure that you are including the
<stdlib.h> include file.

When you say, get it to use the message array, what do you mean.

A message array in C would comprise a two dimensional array of characters.
For example,

char message[32][10];

represents 10 strings of 31 bytes long. 31 because there must always be
space for a NULL (byte 0) terminator at the end of the string.

So you can trap the AW_EVENT_CHAT event and store each AW_CHAT_MESSAGE
string in the array until you fill it up.

Edward Sumerfield

[View Quote]

GNU functions...

Oct 7, 1998, 2:44am
Add parenthisis around the arguments to strcmp.

if (!strcmp(aw_string(AW_CHAT_MESSAGE), bot_name)) {

All function calling in C is in the form funcname(Arg1, arg2, ...)

Edward Sumerfield.

[View Quote] >

unresolved external symbols

Oct 7, 1998, 12:43am
This error means that the code in roadbuilder.cpp and therefore the
functions from roadbuilder.obj do not exist in the objects that are being
included in the link command.

I notice you are using the cpp suffix. This is a C++ suffix and is therefore
compiled a little differently to C code. Look up function name mangling if
you want to learn more.

I am not sure what compiler you are using but you might want to try renaming
you code to a .c (lower case "c") file and try again.

Make sure that the link step includes the aw.lib file which is there all
these finctions exist.

Hey , I guess you are building a road builder, sounds cool. I hope you are
going to add the guestures for pooring tar and driving big rollers and such.
That will be fun to watch.

Edward Sumerfield.

[View Quote]

unresolved external symbols

Oct 8, 1998, 2:32am
OK. I copied you code and made the attached h.c file. The following errors
existed prior to fixing:

gcc -g -I. -I//f/edward/products/awsdk -c h.c -o h.o
h.c: In function `console_command':
h.c:19: parse error before `int'
h.c:20: `count' undeclared (first use this function)
h.c:20: (Each undeclared identifier is reported only once
h.c:20: for each function it appears in.)
h.c:22: `AW_OBJECT_X' undeclared (first use this function)
h.c:23: `AW_OBJECT_Y' undeclared (first use this function)
h.c:24: `AW_OBJECT_Z' undeclared (first use this function)
h.c:25: `AW_OBJECT_MODEL' undeclared (first use this function)
h.c:36: parse error before `int'
make: *** [h.o] Error 1

I dare say you have included the aw.h file, just didn't include it in the
NG. So I added that afterwards.

You were missing a } at the end of the function. Again, maybe a cut and
paste error.

You can not declare a variable after a line of code in a block. A block
starts with an open curly, {. I moved the int count; up to the top of the if
statement.

As you can see I didn't get the same errors as you did. I added a makefile
for you if you don't have one already.

I can not complete the link step because I am using the GNU compiler and the
aw.lib object format is different but it should work for you.

Good luck.

Edward Sumerfield.

[View Quote]
begin 666 h.c
M(VEN8VQU9&4 at /'-T9&EO+F at ^#0HC:6YC;'5D92 \<W1D;&EB+F at ^#0HC:6YC
M;'5D92 \87<N:#X-" at T*=F]I9"!C;VYS;VQE7V-O;6UA;F0H8VAA<B!I;G!U
M=%LX,5TI#0I[#0H at (&EF("AS=')S='(H:6YP=70L(")B=6EL9"(I*2![#0H-
M"B at ("!I;G0 at ;F]R=& at L('=E<W0L(&QE;F=T:"P at <F,[#0H at (" at :6YT(&-O
M=6YT.PT*#0H at (" at <')I;G1F*")<;DYO<G1H/R(I.PT*(" at ('-C86YF*"(E
M9"(L(&YO<G1H*3L-"B at (" -"B at ("!P<FEN=&8H(EQN5V5S=#\B*3L-"B at
M("!S8V%N9B at B)60B+"!W97-T*3L-" at T*(" at ('!R:6YT9B at B7&Y(;W< at ;&]N
M9S\B*3L-"B at ("!S8V%N9B at B)60B+"!L96YG=& at I.PT*#0H at (" at 9F]R*&-O
M=6YT(#T at ,#L at 8V]U;G0 at /"!L96YG=& at [(&-O=6YT*RLI('L-" at T*(" at (" at
M87=?:6YT7W-E=" H05=?3T)*14-47U at L('=E<W0 at *B Q,# P*3L-"B at (" at
M(&%W7VEN=%]S970 at *$%77T]"2D5#5%]9+" P*3L-"B at (" at (&%W7VEN=%]S
M970 at *$%77T]"2D5#5%]:+"!N;W)T:" J(#$P,# I.PT*(" at (" at 87=?<W1R
M:6YG7W-E=" H05=?3T)*14-47TU/1$5,+" B<W1R965T,2YR=W at B*3L-"B at
M(" at (&EF("AR8R ](&%W7V]B:F5C=%]A9&0 at *"DI#0H)<')I;G1F(" at B56YA
M8FQE('1O(&%D9"!O8FIE8W0 at *')E87-O;B E9"E<;B(L(')C*3L-"B at (" at
M(&5L<V4-" at EP=71S(" at B3V)J96-T(&%D9&5D(BD[#0H-"B at (" at ('=E<W0 at
M/2!W97-T("L at -3 P.PT*(" at (" at ;F]R=& at at /2!N;W)T:" K(#4P,#L-"B at
M("!]#0H at ('T-"GT-" at T*;6%I;B at I('L-" at T*("!C;VYS;VQE7V-O;6UA;F0H
..(F)U:6QD(BD[#0I]#0H`
`
end

begin 666 Makefile.dat
M3$E"7U!!5$ at ]/S\_/S\_#0I)3D-?4$%42#T_/S\_/S\-" at T*0T9,04=3/2UG
M("U)+B M221[24Y#7U!!5$A]#0H-"F at N97AE.B!H+F\-" at EG*RL at :"YO("1[
83$E"7U!!5$A]+V%W+FQI8B M;R D0 T*
`
end

unresolved external symbols

Oct 11, 1998, 7:13pm
Post the code dude.

Edward Sumerfield.

[View Quote]

unresolved external symbols

Oct 11, 1998, 7:53pm
I saw that you had solved your problem further down but just as an FYI, you
will notice that there is no reference to aw.lib in this makefile.

A makefile defines what programs are compiled and linked. It is a very
generic process format that can be used to do anything but is usually used
in this context.

MS VC++ dynamically generates its Makefile based on what you add to the
various properties fields.

Edward Sumerfield.

[View Quote]

Non-Bot Ideas?

Oct 7, 1998, 12:53am
This is a multi-part message in MIME format.

------=_NextPart_000_009C_01BDF17C.18C256B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Don't limit the meaning of bot to automated people or animals.

Vegas could install some real slot machines with money pooring out for =
winning combinations. You could see real wheels turning around inside =
for real random results.

Put up a text object with live stock ticker rolling by.

Ask a bot what the weather is in a certain city and it could tell you. =
Just a short hop over to the local weather web sight and its there.

A flock of birds flying by, one could actually experience bird dropings.

The automated doors we see today requiring an object to bump into, and a =
couple to appear and disappear could be replaced by a robotic door whose =
object really moves as you approach. It would of coarse add the chat =
"Welcome to sector 4, sub division 1, enjoy your stay." to anoy those =
who frequent.

Just a couple of ideas. You know one of the frustrating things I am =
dealing with is trying to envision all the 3d work that I will be =
getting into to make these bots really work. Much of the work is on the =
visual side. Building the appropriate gestures, adding new avatars to =
take on new rolls. Adding objects that can be moved by bots. I back =
ground is programming so writting the intellegence is no problem. My =
learning curve is creating objects. Oh well time will tell.

Edward Sumerfield
[View Quote] ------=_NextPart_000_009C_01BDF17C.18C256B0
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>Don't limit the meaning of bot to automated people =
or=20
animals.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Vegas could install some real slot machines with =
money pooring=20
out for winning combinations. You could see real wheels turning around =
inside=20
for real random results.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Put up a text object with live stock ticker rolling=20
by.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Ask a bot what the weather is in a certain city and =
it could=20
tell you. Just a short hop over to the local weather web sight and its=20
there.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>A flock of birds flying by, one could actually =
experience bird=20
dropings.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>The automated doors we see today requiring an object =
to bump=20
into, and a couple to appear and disappear could be replaced by a =
robotic door=20
whose object really moves as you approach. It would of coarse add the =
chat=20
&quot;Welcome to sector 4, sub division 1, enjoy your stay.&quot; to =
anoy those=20
who frequent.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Just a couple of ideas. You know one of the =
frustrating things=20
I am dealing with is trying to envision all the 3d work that I will be =
getting=20
into to make these bots really work. Much of the work is on the visual =
side.=20
Building the appropriate gestures, adding new avatars to take on new =
rolls.=20
Adding objects that can be moved by bots. I back ground is programming =
so=20
writting the intellegence is no problem. My learning curve is creating =
objects.=20
Oh well time will tell.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Edward Sumerfield</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] ------=_NextPart_000_009C_01BDF17C.18C256B0--

Java Native Interface for AW SDK

Oct 14, 1998, 2:38am
Good work Doc. The URL is just fine.

Edward Sumerfield.

[View Quote]

Java Native Interface for AW SDK

Oct 24, 1998, 2:24am
The SDk is also encapsulated into C++ library compiled with GNU if that is
what you want. Though Dr Chandra and I didn't work closely enough to ensure
that my C++ encapsulation and his java encapsulation would work together.

If this night goes wll then I will release the second version of the C++
wrapper.

Edward Sumerfield.

[View Quote]

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