edward sumerfield // User Search

edward sumerfield // User Search

1  2  3  4  5  6  ...  9  |  

Java Native Interface for AW SDK

Oct 26, 1998, 12:25pm

>I indeed plan in the long term to explore java threads (--> active
objects), and
>to use the Web as the interface for Bots applications. (and if I have the
>I would like to explore mobile agents in java using the voyager framework


Voyager looks good. I agree. I have development an agent framework of my
own. Its very easy in java, just implement serializable and writeObject. It
rocks. I dare say this is a simplification of the routing and recovery logic

>Besides, I believe that a java solution can be easier to use, in particular
>creating prototypes.
>(java is closer to an interpreted language than C++).

I agree that Java is a cleaner OO language. I am only learning C++ because
that is where the jobs are these days.

However, I must disagree about the development advantages of java being
closer to an interpreted language. You still have to go through a compile
step so whether that results in executable code or byte code you still have
your development interation time wasted.

Infact, I would go as far as saying that Java is worse in this respect
because the Sun compiler is far slower than Gcc for example. I know the MS
Java compiler rips but standards is where its at in my opinion.

>Note: A C++ version also makes sens, in particular for performance
reasons. But
>I am currently more intersting
>in designing prototypes.

Did you know that Cygnus has a Java to .exe compiler available. Still beta I
believe but that should solve your performance problem. IBM has a nice java
to exe compiler aswell.

>I have only noticed now some of your messages to Dr Chandra in the bulletin
>Very good idea to coordinate the two initiatives.
>I believe that Object Orientation is a very important thing here, and is
more or
>less independant
>of the OO language chosen (C++ or Java).
>The identification of a good set of classes encapsulating the SDK is really
>matters here.
>So what you do with Dr Chandra is very useful, and will contribute very
>positively to making
>the design of Bots applications easier, and have more people write such

I agree. OO rocks but I really do need some more input into an eventual
model. My ideas keep changing.

For my next release I am removing the Robot class and replacing it with an
Instance and Avatar class. The concept being that both your bot and other
bots that you see will be represented as Avatar objects. You can end up with
code like this.

Avatar me ( new Instance(number, priv) );
Avatar them1 (NULL);
Avatar them2 (NULL);


There are any number of methods that relate to Avatar interaction.


Edward Sumerfield

Java Native Interface for AW SDK

Oct 28, 1998, 12:48am
We should definately work together. It saves a lot of typing.

You said that you/Doug have completed the C++ encapsulation of all the SDK.
I have only been doing that as I need the functions so you are far ahead of
me there.

We should discuss where we can share work.

I am implementing C++ because that is what I want to learn. I been doing
java for a few years so an less interested in that implementation. Also, the
me, C++ is where the job market is.

I think the big thing we can share is some discussions on the OO model that
represents AW. I still consider myself a novice at modelling and an always
interested in other peoples approaches.

What are your goals for your implementation?

[View Quote]

Java Native Interface for AW SDK

Nov 1, 1998, 2:14pm
I agree, it is an excellent product. I have used 4.0 extensively and I have
heard that 6.0 is fabulous. I am choosing to use GNU at the moment because I
don't have $80. Though I agree also that that is an excellent price for the
software you are getting.

I am not totally clear on the differences between standard ($80), professional
($800) and enterprise (>$1000) editions. I have always been blessed by working
for companies that give me the enterprise version.

Edward Sumerfield.

[View Quote] > I just wanted to mention, I'm sure everyone's definition of "big bucks" is
> different, but I have recently seen the standard edition of Visual C++ 6.0
> for sale at online software sites for as little as $80 to $90. Just skip
> past the ~$800 "professional" version (which they usually list first) and
> look further down the list, you'll probably find it there.
> If you find yourself spending inordinate amounts of time struggling with a
> freeware compiler, you might want to consider Visual C++...I don't want to
> sound like I'm actually pushing Microsoft software or anything (gasp), but
> the Visual line of development tools really are useful products to have
> around, especially if you are going to be doing a fair amount of programming
> under Windows. Among other things, the help files come with a complete
> Windows API reference, which is something you absolutely must have on hand
> if you are going to be doing any GUI programming. It also comes with MFC,
> which a lot of people find useful, although I don't use it much myself.
> -Roland
[View Quote]

Cloud bot answered

Feb 15, 1999, 1:11pm
I think objects would be a better solution than avatars because you can have a
bigger variety and more of them in the world at one time. I was told that the
bot limit is specified in the Universe as opposed to the world server so it will
be hard to get it increased.

With objects you can implement all kinds of texture animation to give the
effects of cloud changes as the objects move.

From my perspective the biggest problem is how to implement "world weather". Its
not hard to create a local weather pattern with a few objects but to implement
this on a world scale means hundreds of objects over other peoples land.

I am not sure if an object created by the all powerful world owner is counted
against a citizens cell limit. That may be an issue. You could not have weather
over a very built up area because the cell limit would be exceeded. This is
where your avatar idea would be better.

Anyway, it is a very difficult problem that may not be able to be solved on a
world scale with the world and SDK systems at their current level of
development. Maybe AWLD will look into some enhancements that will allow world
features from the SDK that do not follow the traditional rules of building.

[View Quote] > Here are exact steps for creating a cloudbot system to create clouds over
> worlds.
> 1) Modify a blimp bot source to spawn about 50 bots in a general vacinty of
> the head creator of the bots.
> 2) Create a cloud avatar or set of cloud avatars to provide more detailed
> weather system.
> 3) Set the modified blimp bot source to command all the bots to do one of
> the weather actions that the the cloud av. has. after x amount of minutes or
> hours which ever.
> 4) After these steps are complete develop an algorithm for creating the
> spawned bots in certain areas of a world.
> E.g.: For each bot add x meters to spread distance of the bots from the head
> bot, If bots are spread to thin in area of world subtract x amount of meters
> from head bot. If spread is to heavy on world remove x amount of bots from
> total (do not remove head bot). If not enough bots available to cover area
> specified add x amount of bots needed to fill area. Also establish a
> standard form for spreading bots like for each bot based on number of bots
> is spreading so far away from head bot. If user count reaches x high with x
> amount of bots force bots to go to less populated area or spread more by x
> amount of meters.
> 5) Fire up the bots in a world such as AW ask AWLD about this first if they
> can add the av. and try out the formula to see if it works properly make
> adjustments as nessacary.
> Sorry I not have source code but I am not an avid programmer.
> Your Welcome,
> Horizons
> #288611
> BuildW

Cloud bot answered

Feb 15, 1999, 6:38pm
Yes, performance, that makes very good sense. So, based on the current features
of the world server and the SDK there is no good way to solve this "all world
weather" problem.

That doesn't stop anyone who wants to implement Tammy Jo's idea which would
work, just in a limited way. Either with avatars, currently just 3, or with
objects but limited to the owners property.

Hey, someone could build a botanical gardens or something where local weather
effects are required. Imagine walking into the Jungle room and getting rained
on. Cool.

[View Quote] > Yes, it is. the cell data limit is a set limit in bytes and has a technical
> reason and therefore applies to everyone :)
> Walter aka faber
> Edward Sumerfield schrieb in Nachricht <36C8390B.1685B663 at poboxes.com>...
> counted
> weather

Cloud bot answered

Feb 21, 1999, 2:30pm
Your cache would only grow if there were a large number of different types of clouds. If it were designed like the modular grounds there would be a small number of objects that would product a large number of effects based
on their placement.

[View Quote] > That, and that AW is really only set up for avatars to be constantly moving. If the objects themselves were constantly being changed, then cache overhead would grow immensly (you'd have to update every cell constantly)
> and AW would have to rebuild the scene every frame, therefore getting the same speed penalty as rendering avatars in-scene.
> grover
[View Quote]


Oct 14, 1998, 2:22am
Suggest you mention that size of the download in the subject line. 227K
takes my machine down for a while.

Having said that I would have downloaded it anyway. Nice work.

I notice it is accepting commands from the robot runners keyboard. Might I
suggest adding an avatar_add event and a chat event and allowing anyone to
use the robot that is running on your machine. You could have a "road
builder storage closet". When someone wants to build a road they go to your
closet, checkout a road builder and tell it what to build.

I would think that could be run by world owners as a utility to use in their
world. This would remove the problem of everyone having to learn how to
install and run robobuilder. They just use an in-world robot.

Good work.

Edward Sumerfield.

[View Quote]

AWCPP - C++ release v0.1

Oct 14, 1998, 4:30am
This is a C++ wrapper and object model around the aw.dll developed with the
GNU G++ compiler. It supports

o All sdk functions required for the basic greeter bot.
o It issolates the user from all robot instance selection.
o It correctly routes callbacks from the static C functions to the
appropriate object (currently limited to one object).
o It proposes a sample object model.

This first release implements sample #1 the greeter bot. The Readme.txt and
awcpp.doc should tell you most of what you want to know.


Roland, I know you didn't like the class names Robot or Citizen but I
couldn't think of anything else. We can change them later on if something
better is thought of.

Edward Sumerfield,

MFC bot

Oct 14, 1998, 10:51pm
Add the aw.lib to the Project linker settings. It will link your code with
the aw.lib code and spit out a single program.

C++ programming concepts:

Start with a source file and some include files.

.c includes .h files

the next step is compiling the source and h files into objects.

.obj files.

these files contain intermediate code. Not runnable.
The aw.lib file contains .obj files. Its like a zip with with no
compression. Just a convenient way to collect .obj files together.
the next stage is linking the obj and lib files into a single runnable


thats it.

Edward Sumerfield.

[View Quote]

Time sequencing...

Oct 14, 1998, 10:43pm
When you say "recognize the VRT in the ... browser" what you mean is that
you need to get the current machine time and then adjust it to the VRT

Look at the C functions localtime to get the current time. Remember you
don't have to know VRT, just compare the current time with your local times
equivelent to VRT. So if your world server is in NY you would compare 6:00pm
VRT with 3:00pm EST and switch the background textures appropriately.

Edward Sumerfield.

[View Quote]

Time sequencing...

Oct 14, 1998, 11:53pm
Its time to get a C book. However let me give it a shot.

time() us a function that returns a tm structure.

struct tm
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;

So you will include the time.h include file to get this struncture and then
call the time() function to get a pointer to it.

#include <stdio.h>
#include <time.h>
main() {
struct tm *now = NULL;
now = time(NULL);
printf("The time now is %02d:%02d:%02d.\n",
now->tm_hours, now->tm_min, now->tm_sec);

Simple as that.

Check out this URL for a definition of all the time related functions:


Actually this site is an excellent reference for standard C functions.

Edward Sumerfield.

[View Quote]

Backdrop change sample #1

Oct 15, 1998, 10:35am
Its a cool thing you are going after. I wish you the best of luck.

A thought about design simplicity. You could make a generic GUI app that
runs bots. It doesn't have to have any AWSDK in it, just a place to
configure the start bot command and a button to start it. You could have a
list box with a list of bot programs then just select a bot and click start.

I think my point is that if you keep the AWSDK out of your windows program
you are not going to hit any of the architecture problems that are are
looking at now. For example, all bots linked into your GUI are going to have
to be asynchronous bots, all callbacks installed. Any bot that blocks on the
aw_wait is going to prevent all your GUI from working. Right down to the
standard window resize, move, close functions. They will not work if the one
thread in the program is blocked in a bot.

Another consideration is the portability of your resulting code. I know
there are world servers running on windows but there are also a number of
unix servers. If you write your program in windows they will not work on
unix. There are a number of cross platform GUI libraries available that
would solve this problem but you will not be able to use the nice VC++

Check out the V libraries http://www.objectcentral.com/

Edward Sumerfield

[View Quote]

dialog based bot.... questions & errors

Oct 15, 1998, 1:33am
May I offer some high level advice. Leave windows alone.

It may be pretty,
it may be cool,
but drat that darn thing,
it'll make you feel like a fool.

I've been programming for 13 years and I still have problems when I get into
that area. Of coarse most of my experience has been in a Unix C environment
but I feel confident in saying that you are entering a very complicated

The problem is that the app wizard you ran is nice and gives you a quick,
basic framework that looks good but now you really have to understand what
it is doing to be able to make it do what you want.

Maybe Walter can give you some advice, he seems to be the Windows guru
around here.

Use argc, argv to start with. Check out the scanf function for user input.
So you might write a program like this.

main() {
int number;
char name[32], priv[32];

printf("Enter user #, Robot name, priv passwd : ");
scanf("%d %s %s", &number, name, priv);


Learn the standard C functions. If you are just starting out learning to
program then you should begin with an object oriented language like Java or
C++. I recommend Java because everything you need is free and it clearly
demonstrates OO design principles.

Edward Sumerfield

[View Quote]

dialog based bot.... questions & errors

Oct 15, 1998, 11:56pm
Well we all have our preferences and most of that is due to what we know. It
is really cool to see so many versions of this thing developing. Delphi, C,
Java and C++ makes it a good spread of popular languages in todays business

I look forward to having to time to study Windows programming one day. Maybe
I try and adapt someones bot.

[View Quote]

SDK apps tied to other programs ?

Oct 15, 1998, 10:43am
I believe the answer is yes. You can trap all "audible" chat text and enter
your own. I was thinking of writing a little program that acted as a telnet
server. You could run telnet connect to this program and see all the chat
messages that are occuring near your bot in AW.

It would be possible to add a voice to text library on the front of that
though I am not sure that the technology is advanced enough to allow a
productive chat. You can record voice patterns and tie them to specific
commands but I am not sure how much further you can go. Some of the new
WinCE machines have voice recognition as an input medium but I have not
tried it.

Edward Sumerfield.

[View Quote]

New to bots - Q

Feb 21, 1999, 2:34pm
Bots are like the AWBrowser in that they run on your machine and talk to a
world running on a different machine. So in order to keep your bot running you
have to keep your machine on. As you said, if you want to switch your machine
off then you will have to find someone to run your bot for you. I would suggest
talking to the owner of the world you want to run the bot in and see if they
can do it.

[View Quote] > I am newish to AW and would like bot at the entrance of my store welcoming
> people and taking peoples names and other info i can get. I believe Hambot
> will do this however am i right in thinking that unless i own the world its
> going into then it will not stay there when i switch my machine off ?
> If so who would i email to request it stored on their machines and would
> they do it ?
> Thanks in advance

Help with the LCC compiler

Oct 20, 1998, 9:48pm
Can you dump the complete set of error messages you get when you compile. I
do not know the LCC compiler but if it can handle ANSI C you should be able
to make it work.

Edward Sumerfield.

[View Quote]

Help with the LCC compiler

Oct 21, 1998, 9:32pm
Unrecognized declaration sounds like a compile error as apposed to a linker
error. I don't know how much you know about the compile and link stages of
development. I explained it in a previous post. To summaries

.c+.h compiler to .obj or .o then linker to .exe

Next you must post your code.

Edward Sumerfield.

[View Quote]

Help with the LCC compiler

Oct 22, 1998, 12:29am
This is basically right. I would modify it by moving your .lib

==[compiler]==> .o[bj] ======================[linker]==> .exe
..h =====[archive]=>.lib =====>

[linker]==> .dll

The "ar" command takes a group of objects and puts them into a lib file.
This lib file is then used by the linker to resolve function calls to entry
points within those objects.

The only other addition is the dll (dynamic link library). An exe file will
contain the functions that are linked from a .lib file but a linker will not
include functions from a dll file into the exe file. Instead they are
"linked" at run time. Usually when they are first called but in windows case
there is specific code to load the dll and resolve the points to the
functions within it.

Edward Sumerfield.

[View Quote]

Bot logging...

Oct 20, 1998, 9:44pm
These days you have to specify the language you are programming in. This is
such a diverse SDK that its hard to tell.

Let me assume C.

#include <stdio.h>
main() {

FILE *log_file;
char *text="the meaning of life the world and everythin is";

log_file = fopen("log_file.txt", "w+");
if (!log_file) {
} else {
fprintf(log_file, "This is writting to the log file: %s %d.\n",
text, 42);

Edward Sumerfield.

[View Quote]

Bot logging...

Oct 22, 1998, 12:41am
All you have to do is make sure that that each part of the small program
goes in the right place in the greeter bot.

I will use pseudo code to make it quick but it is the same as the sample

main {
set position

set chat callback.

while aw_wait {


chat callback {

get chat message
fprintf(log, "Saw chat '%s'.\n", chat message);

Edward Sumerfield.

[View Quote]

Bot logging...

Oct 23, 1998, 1:00am
So we all agree then? Cool.

Veleno, I hope you got all that.

Edward Sumerfield.

[View Quote]

Marketing research(sort of)

Nov 7, 1998, 12:36pm
[Too many cross posts, snip worldbuilders and awcommunity]

As soon as you get financial you are going to have to get AW involved because they will
have to build in-world interfaces that support secure interactions. Just chatting "heres
10 bucks" will not do it.

1. You are going to have citizen owned objects that represent money and no one, not
even all powerful, world owners can delete them.

2. There must be a means to purchase these objects, it would have to be something
built into the browser that allows you to enter your credit card number then connects to
the world server to register the purchase.

3. You will have to be able to have these objects available but not sitting in a pile
in-world. It would be a shame to have to have a pile of little gold bars sitting in the
corner of your house that represented all your money. The browser, world interaction
would have to be able to dynamically create a gold bar when needed.

4. Once a gold bar is generated you need a secure means of transferring ownership to
another citizen. Again the browser must have something built into it to support money
ownership changes that is very secure.

5. And, of coarse, you need a way of cashing in your money. Maybe putting it back on
your credit card.

None of this is easy.

Edward Sumerfield.

[View Quote] > i might try that with bots and stuff.
[View Quote]

Virtual parallels Real.

Mar 5, 1999, 6:38pm
Here's a bot idea for someone with nothing to do. The following URL
shows you a physical robot that you can steer around a building using
the web and see what he sees.


So, write a bot program that mimics the real robot with a virtual robot
walking around. You could even add a command interface to tell the robot
were to move to and then pipe the new camera image back to a pic in the

Just another geek project.

Edward Sumerfield.

Marketing research(sort of)

Nov 9, 1998, 4:06pm
Wow. Canopus, you rock.

Edward Sumerfield.

[View Quote] > There is a kind of in-world stuff that AW citizens might want to pay for--bots. Virtual money
> could be used to rent or buy bots from bot agencies or bot makers. You'll ask, why rent a bot
> when you can write or d/l a bot program? The problem is that AW worlds are rapidly being closed
> to all SDK bots except those belonging to the world-proprietors and the few names that the
> world-proprietors put on their AW_WORLD_BOTS_RIGHT lists. If you're an ordinary citizen without
> the RW money and leisure to buy and maintain a VR world, you may be able to write or get bot
> programs, but you won't be able to use them anywhere (except maybe Beta).
> The world-proprietors have a reason to exclude all but a few bots from their worlds. The SDK
> is an extremely powerful tool, and can be used to program wonderful, friendly bots or obnoxious,
> hateful bots. The obnoxious bots fall into two classes, as far as I can see: obnoxious avatars
> and obnoxious builders. You can program deer avatars that wander about your forested land and
> flee approaching hikers; or you can program demon avatars that station themselves on some
> victim's land and do or say rude things to anyone who happens to pass by. You can program mover
> bots that help people extricate themselves from a site that turns out to be too small by moving
> an entire building and landscape from there to a larger site, or you can program a paver bot
> that covers vast tracts of open land with raw concrete. Obnoxious avatars can be obnoxious
> anywhere; obnoxious builders need land open to building.
> The only solution that I can think of is to have world-owners license bot-owners. A bot owner
> that operates obnoxious bots loses the bot-license. If you want deer on your VR estate, you get
> a license or you rent them from a bot agency, that has built up a reputation for clever and
> non-obnoxious bots and so has a bot-license. If you want to build a under a dome on Mars, you
> get a license for a builder bot from the owner of Mars, or you go to a contractor that has a
> builder-bot license for Mars construction, and select a dome from the domes on the contractor's
> Module Yard (you give the contractor a privilege password so that you end up owning the dome).
> The contractor wants the VR money because
> it can be used to rent deer bots from a bot agency. A VR economy, backed up by a VR legal
> system.
[View Quote]

Marketing research(sort of)

Nov 10, 1998, 4:16pm
Sorry to confuse you but I have no opinion on the pros or cons of this issue, if it is, in fact,
an issue in the first place.

As I understand it both virtual and real money would be marvelous additions to the AW sphere of
options. Virtual money will open up some in-world commerce options as Canopus detailed in his
robot market analysis. Real money would take worlds into the real world market and people will
start selling products that can take advantage of the 3D visual environment.

Virtual money is simpler to implement so I expect that will be done first but I hope that this
exciting technology will get into the real money realm because that is were real financial
investment will start enhancing the pace of change at AW.

Edward Sumerfield.

[View Quote] > Are you saying that you agree with virtual money or real money?
[View Quote]

Marketing research(sort of)

Nov 11, 1998, 3:20pm
[snip wishlist]

It has got a little of track Roland but, in our defense, we did get into sdk
implementations of money a little bit. I snipped a couple of the NGs but I
thought we might come back to SDK relevant later on.

It is an interesting idea to have a robot that keeps track of virtual money
owned by citizens. It wouldn't be too hard to write but I would like to see
Canopus get more definition into his virtual market before I do anything.

Edward Sumerfield.

[View Quote] > And I am totally opposed to this thread continuing any longer in the SDK
> newsgroup :)
> -Roland
[View Quote]

AWCPP - C++ release v0.2

Oct 24, 1998, 5:13am
This is version 0.2 of the C++ wrapper for the Active Worlds SDK.

The coolest change is the movement classes. I have removed the need to use
x,y and z coordinates and in their place you can rotate left, rigth, up and
down and then move forward.

With the up and down it is even supporting pitch so you can set the robot
position as 0 x coord, 0 z coord, 0 altitude, 0 yaw and 45 pitch. Now if you
call the forward method the avatar will ascend into the sky at a 45 degree
angle for the distance specified.

It makes it very easy to do things like move the robot round in circles:

for (int a = 0; a < 24;a++) {

rotate_left(15); // 15 degrees
forward(1); // 1 meter

I standardized all the units to degrees and meters so there are no ugle
translations anywhere.

Here is the web page where you can download it from:


I have split the source and binaries up since the total download was getting
a little large.

The next steps are:

1. Add guesture support to the movement class.
2. Add more functionality to the avatar_add callback so you get more
informtation about the avatar added.
3. Look at building a Movement derivitive that works in conjunction with
avatar_add and allows a robot to see someone and run away.

Every day, in every way, I get closer to my field of deer. Though I guess I
am going to be limited to 3 to begin with. Doh. Maybe thats a herdette of

Edward Sumerfield.

AWCPP - C++ release v0.2

Oct 26, 1998, 2:02am
I agree that the SDK should be enhanced with this kind of stuff, but I would
like to see it migrated to an OO solution if possible. It is so much easier
to program in that environment.

Early days yet though, Roland is just stabalizing the current SDK at the
moment. It may be a while before these kind of extensions are released.

If we can come up with a list of algorithms that can be implemented maybe we
should dedicate a web page to it.

Edward Sumerfield.

[View Quote]

AWCPP - C++ release v0.2

Oct 29, 1998, 3:52am
I am not sure if this is a problem.

It does take 360 degrees into account. Any angle from 0 to 360 is allowed. The various
angles of the circle returning numbers from -1 to 1 as you pointed out. This times the
distance gives an appropriate delta.

However, I did all my testing at 100n 100w quadrant of the world so I don't know if it
would work in the SE for example where the x, z coords are -10000, -10000. It would
seem like it would work just be cause the axis are going in the same direction. That
is, there is no reversal of direction around zero it just goes negative. I store
everything as int but interface with float to achieve the approprate units and each of
these can handle the -32767 that is required in a AW world.

I guess I will have to test it. Thanks for the hint.

Edward Sumerfield

[View Quote] > Or maybe that is what Movement.C is doing already, and I've misinterpreted your
> diagram, which seems to show the avatar moving NE at an angle of 5 degrees.
[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 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn