SDK FAQ

From ActiveWiki
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Frequently Asked Questions about the Active World SDK

This page contains answers to some common questions handled by our support staff, along with some tips and tricks that we have found useful and presented here as questions.

  1. How do I use the SDK?
  2. Where can I find documentation on the API?
  3. How can I make a bot if I'm not a programmer?
  4. Do bots made with the SDK count against the user limit in a world?
  5. How can I access the SDK from my Java programs?
  6. How can I access the SDK from my Visual Basic programs?
  7. Why don't bots collide with objects?

How do I use the SDK?

The SDK is for use by C application developers. If you aren't a C programmer you cannot use the SDK directly. If you are a C programmer, first you need to download the SDK. Read the documentation and take a look at some of the sample programs. After you have gotten the sample programs to operate, write your own program and link it with either aw.lib or aw_static.lib.


Where can I find documentation on the API?

These help files contain a full function reference for the entire API under the section Methods. Each function also includes example code demonstrating how to use the function.


How can I make a bot if I'm not a programmer?

If you're not up to using the SDK yourself, you can always use an SDK application that someone else has developed (such as Hambot.)


Do bots made with the SDK count against the user limit in a world?

No. They also do not count against the user limit in the universe, and they are not reflected in the user counts shown in the world list.


How can I access the SDK from my Java programs?

A Java Native Interface is currently in development by a third party which should allow you to access the SDK functionality from a Java application. Please note that the JNI is not supported by Activeworlds Inc. Please direct any questions or comments about the JNI either to the SDK newsgroup or to the author.


How can I access the SDK from my Visual Basic programs?

A Visual Basic Wrapper for the SDK has been developed which should allow you to access the SDK functionality from a Visual Basic program. Please note that the Visual Basic Wrapper is not supported by Activeworlds Inc. Please direct any questions or comments about the Visual Basic Wrapper either to the SDK newsgroup or to Activeworlds.


Why don't bots collide with objects?

Bots don't automatically collide with other objects in a world because collision detection in Active Worlds is the responsibility of the client, not the server. When a user collides with an object and stops, it is because their browser (i.e. a client) detected that there was an object nearby and performed the necessary calculations to determine that, given the size and dimensions of that object in three dimensional space, the user's avatar has come into contact with it. For a bot to collide with objects, it too would have to perform the same analysis of its position compared to the other objects in the world, and stop if it decides that it has hit something.

While "perfect" collision detection requires a precise knowledge of the physical structure of all objects in a world and is thus fairly complicated to implement, there are some simpler approximations of collision detection that a bot developer can use if avoiding object collision is desireable. For example, the bot could use the property query mechanism to find out what objects are nearby, and then make some assumptions about their size and shape (e.g. just assume all objects are approximately 1 meter cubed in size) in order to avoid them. An obvious extension to this approach would be to include in the bot some knowledge of the size and shape of specific objects so it could be more sophisticated about avoiding them. For example, the bot could be programmed to know that all "walk" objects are flat and don't need to be avoided (unless of course they are up in the air).