Full Featured Virtual World Games Framework using RSIp, a Novel Command Protocol Todor Kolev

under the direction of Prof. Eric Klopfer MIT Teachers Education Program

Research Science Institute July 29, 2003

Abstract This paper introduces a new high level object oriented framework providing all the necessary capabilities for creating virtual world games. The existing tools for creating games in virtual world environments provide only the basic low level API functions for interacting with the virtual world. The advantages of this newly developed framework is that it offers the full features necessary for a virtual world game implementation, rather than just the tools for creating the basic 3D interaction. A novel Remote Procedure Calling protocol called RSIp (Rapid Secure Invoke Protocol) was created to enable the realization of the framework. RSIp is specially designed to optimize the speed of the web-to-process RPC communication. The protocol provides extended secirity and session support facilities which makes it especially efficient when the web system’s sole purpose is to provide interface to another application. Based on this framework, a virtual world game called Environmental Detectives was developed to be used for education research.

1

Introduction

Virtual Worlds are three-dimensional interactive environments representing simulated worlds. The most popular and well developed platform of this kind is ActiveWorlds [1]. ActiveWorlds platform provides a Software Development Kit (SDK) [2] which offer tools for connecting and interacting with the virtual world server (Figure 1). These tools are used for creating programs acting in the virtual world environment, which are usable for many purposes – from developing administrative tools to educational games. ActiveWorlds Server

Internet

ActiveWorlds browser

ActiveWorlds SDK

Player

Bot program

Figure 1: SDK in the Virtual World Connection Architecture

Unfortunately the SDK provides only very low level Application Programming Interface (API) functions for connecting and communicating with the server. For example to move a simulated participant’s character object by 100 units left and 100 units forward with the ActiveWorlds COM SDK, C# such as the following is needed [3]: sdk.aw_int_set (AW_ATTRIBUTE.AW_MY_X, sdk.aw_int(AW_ATTRIBUTE.AW_MY_X) + 100); sdk.aw_int_set (AW_ATTRIBUTE.AW_MY_Z, sdk.aw_int(AW_ATTRIBUTE.AW_MY_Z) + 100); sdk.aw_state_change(); This example shows that the existing API is useful for creating rather single programmable 1

participants (bot programs) then more complex applications such as games. It does not allow full use of the advantages of the new powerful object oriented languages. This is a serious shortcoming, since large and complex applications such as games profit significantly by using object oriented programming. For comparison, an example of an object oriented version of the above code could be mybot.Move(100, 100). In addition, object oriented programming is especially suitable for developing virtual world applications, where simulated real-world objects are manipulated. The virtual world interaction is not sufficient for making the game itself. The development of virtual world games also requires powerful high level tools for creating the game architecture and the communication between game parts. This paper introduces the design and the development of a high-level object oriented framework which provides all the necessary tools, thus facilitating the implementation of virtual world games. This means that the game developer can concentrate on implementing the game rules logic rather than on implementing low level operations. The realization of this framework induces also the creation of a novel Remote Procedure Calling (RPC) protocol called Rapid Secure Invoke Protocol (RSIp). It provides facilities for essential improvement of the RPC process in some important cases like web-to-process communication which have not been previously considered specifically.

2

Virtual world Games Framework

2.1

Virtual World games in ActiveWorlds platform

The framework being introduced uses the ActiveWorlds virtual world platform [1] which is one of the most commonly used ones. Games in this environment are containing two main elements – interactive bots and a web interface. Bots are computer programs which connect to virtual world server server and act within 2

World Player avatar

Invisible bot

Bot avatar

Visible bot

Figure 2: Different bot’s role in the interaction with the virtual world

the world (Figure 1). They can be both visible and invisible. Visible bots are bots which have an avatar1 object, representing them visually in the virtual world. They aparticipate as simulated walkers and even kickable balls [8]. Invisible bots are used to change the music played in the world, collect statistical information and do other administrative work without players seeing them as visible objects (avatars) [9, 5, 6, 7].

Figure 3: Schematic view of the ActiweWorlds virtual world browser

Players use virtual world browsers to control their avatar, to view virtual world and with other participants and to interact with them. Browsers provide three main methods of interaction – WEB pages, chat conversations and 3D space interaction (Figure 3). In most cases virtual world games are quest based. Their most natural application is for creating educational scenarios [4, 19, 20, 21]. This requires much information to be served to the player. Unfortunately the 3D virtual environment is not convenient for serving a large amount of information or providing dynamic powerful controls. The best solution for having 1

Avatar objects represent virtual worlds characters. In most cases they have humanoid shape

3

a powerful game control interface is to use web pages. This requires the creation of intensive web interaction in most virtual world games.

2.2

Framework’s architecture

This novel framework API is separated into two main parts, just as the game interaction is separated between the 3D space and web pages. Each part of the API provides tools for implementing the corresponding part of the game. These two game parts are called the game server and the web interface. The architecture of the framework is shown in Figure 4. ActiveWorlds SDK

ActiveWorlds Server

Game server Web interface Bot API RSIp Server API

RSIp Client API

Template parser

Figure 4: Architechture of the game framework

The main game logic is contained in the game server. It is process application which runs the game bots and keeps the game running. The web interface doesn’t contain game logic. It is used only for presenting information and giving commands to the game server, which means that the web interface is an extremely thin system. The presented web-interface-to-application architecture entails intensive interaction between the two game parts, because web pages need to serve information about the game. Specifics of this communication prompted the creation of the RSIp protocol. It is optimized to support interaction between running processes and thin web systems which use the process applications as servers (Figure 5). RSIp is specially designed to optimize the speed of the web-to-process RPC communication. It is significant because web systems are very time critical. At the same time 4

Web request RSIp

RSIp

Web request

RSIp

Web request

RSIp

Web request

Game process thread Time

Figure 5: Framework game architecture using RSIp

the protocol provides rich facilities for supporting the web-to-process communication. It is especially efficient when the web system’s sole purpose is to provide interface to another application.

2.3

Game server Bot API

The bot server runs permanently throughout the game execution. It keeps the game’s bots “alive,” because there must be a running application to own them. The bot API provides the high level tools for developing bots and game servers. The bot development API is contained in two classes. Each class provides the functionality of one of the two types of bots – visible and invisible (Figure 2). Bot instances can be created of each of the two classes. Each instance has the functionality of the class, but exists separately and runs on its own. For example one game can have three bots walking around the world. They are all created from the visible bot class, but they are all separate instances. The class is just the type of an object instance. The Game server API is written in C# and uses a COM (Component Object Model) version of the ActiveWorlds SDK [2, 3]. As the game server API is written under the Microsoft .NET platform, it allows development of applications in any of the .NET languages (C#, Visual Basic .NET, J#, Perl, etc.). The framework’s bot API is contained in .NET class library assemblies. The method of using the API is to include the assemblies in an

5

application and use provided API tools. All the common type definitions are defined in CommonDeclarations.dll. It must be included in every framework application. 2.3.1

Parent bot class

As the visible and invisible bot classes are both bot classes they have some common parts. These common parts are separated in the parent bot class CBot. The visible and the invisible bot classes are child classes of this parent class. They inherit its functionality (members) and define some extra members for doing their specific tasks. The CBot class is contained in the CBot.dll file. Its brief class definition is in Appendix B. Class members are separated in the following groups: • Initialization • Destruction • Sending chat console messages • Displaying web pages Here are some examples of the most important class methods: void Initialize(string HostIP, string World, int Citizen, string Password, string Name, bool Global); this method logs the invisible bot instance into the world named World hosted on the server with IP address HostIP. The bot is logged as a property of the world’s citizen with number Citizen and password Password. The bot uses the citizen’s rights in the world. It is named Name. The boolean variable Global is set to true if the bot is entering the world in global mode. If so it participates in the world but is not visualized as an avatar. void ShowWebPage(string Url, int Session); 6

Displays web page with URL Url in the web window of the virtual world browser of the player with session number Session. void WhisperTo(int intSession, string Message); This method sends a chat message with text Message to the player with session number Session. 2.3.2

Visible bot class

The visible bot class is used for creating simulated avatars in the world. They look like and can act just as the avatars controlled by humans through the browser do. The class provides the functionality to command an avatar and access its information. Data is cached just as in the invisible bot class. Every class instance represents a single bot avatar in the virtual world. This provides the opportunity to think about this instance as a single manipulatable object with its own properties and methods (functionality). Class members are separated in the following groups: • Inherited common members form the parent bot class: initialization, messaging, web invoking • System functions for manual refreshing the data caches • Accessing and modifying avatar properties such as position, rotation, type of the avatar object • Fast cache using functions for standard movements. The invisible bot class is defined in the CVisibleBot.dll assembly. A brief class definition is listed in Appendix C. Here are some examples of the most important class methods: void Move(int byX, int byZ); 7

This method moves the bot’s avatar by byX units in X ordinate and by byZ units in Z ordinate. int Avatar {get; set;} This is object property which contains the the bot’s avatar object number. It provides a fast access for reading (getting) value using cache. Setting the value of this property causes a query to server and changing the bot’s avatar. 2.3.3

Invisible bot class

The invisible bot class is used for global interaction with the virtual world. In this class is contained all the needed functionality to interact with the world on a global level, that is not related with a certain avatar. The class provides all the necessary information about world attributes, attributes of all avatars in the world and triggers event handlers for events related with the world and the avatars in it. All this information is cached so it is accessible all the time in the fastest possible way. The members are separated in following groups: • Inherited common members form the parent bot class: initialization, messaging, web invoking • System functions for manual refreshing the data caches • Functions for getting attributes of – World – Avatars – Citizens – World objects – World terrain 8

• Functions for setting attributes of: World, World objects, World terrain • Trigger event handlers for events of: World, Avatars, World objects • Providing collection objects with: Citizens, Avatars, World objects The invisible bot class is defined in the CInvisibleBot.dll assembly. A brief class definition is listed in Appendix D. Here are some examples of the most important class methods: SAvatarData GetAvatarData(int intSession); This method gets data for avatar with session number Session. The data is returned in SAvatarData structure. Definition of this structure can be found in Appendix E. Data retrieving is optimized for speed by caching it locally. The Server is contacted only when data change event occurs. void SetWorldData(SWorldData data); This method sets the world’s data. The data is gave in SWorldData structure. Definition of this structure can be found in Appendix E. event AwEventHandler OnAvatarAdd; The event OnAvatarAdd is fired when new avatar appears in the world. 2.3.4

Complex bots

The two provided bot classes are core of the API for creating bots within the framework. They provide all the necessary functionality for creating any bot, but they are still just tools, not a solutions. Not all of the bots are just listening for events or moving on a command. The framework provides architecture tools and samples for creating complex bots. These 9

complex bots are not just commandable objects, they are whole systems which have their own complex behavior. A complex bot takes a pointer to an instance of both the visible and invisible bot classes for its creation. It means that all the complex bots in a game can use a single invisible bot instance. An interesting phenomenon is when a single visible bot is commanded by several complex bots. The visible instance is used to represent the complex bot’s avatar and to control it, while the invisible instance is used to handle events and other data used for determining the bot’s behavior. Complex bots use these two tools and implement the bot’s behavior. In the framework they are called “bot brains”. The framework provides some example complex bot classes. The source code of one of them can be found in the Appendix F.

2.4

Web interface API

The web interface API is written in PHP 4 code. As the framework architecture requires it is as thin as possible. The core is only the command protocol client’s API. The goal is to make it possible to create another framework API for web interfaces in the simplest way. The API contains a single class rsip client which implements the RSIp client functionality. As an additional helping tool, the SDK provides a template parser [16]. It was developed separately as a part of another framework for developing Enterprise Resource Planing (ERP) systems. It is a tool for separating program logic (PHP scripts) from the presentation logic (HTML page templates) in web applications. The parser was added to this framework because it is a tool which helps game’s web interface development, as the goal of the SDK is.

10

2.5

Rapid Secure Invoke Protocol (RSIp)

RSIp is an XML (Extensible Markup Language) based Remote Procedure Calling (RPC) protocol. Unlike most PRC protocols, RSIp is designed to support communication between thin web systems and running server processes. In other words, it provides a tool for communication between running applications and thin web interfaces built to interact with them and has a minimal set of its own functionality. The running application is called the RSIp server and the web interface is called the RSIp client. The protocol’s goal is to make communication as rapid and simple as possible. At the same time, it provides advanced features to serve its purpose. The Rapid Secure Invoke Protocol (RSIp) provides both speed and security for the RPC process. The faster performance of the protocol is provided by the different means of returning the called method’s result. They are designed to optimize the calling and to await a result only when it is necessary. As their definition suggests, web interface systems are used as data visualization and command calling interfaces to other applications. All the data they request is provided by the main application. For this purpose the RSIp protocol is session based. Sessions provide security and data storing mechanism. RSIp communication is done over XML formatted messages. These messages can be of two types – invokes and their results. Sample RSIp messages are listed in Appendix J. 2.5.1

RSIp invokes

Invokes can be calls and callbacks. Calls are invokes from the client to the server. They are messages which call some server’s method with specific parameters. These messages are carried over standard TCP/IP sessions (sockets). Calls differ from each other by their return type, allowing speed optimization in some particular cases. Standard returning calls will invoke a method on the server and the client will wait 11

for server to return a result during the current socket connection. Immediate returning calls simply invoke the method without waiting for the result, and the socket connection will be terminated immediately. This is a very fast communication method used for invoking commands for which completion requires long time but their result is not important for the current invoke. Session returning calls are immediate-returning as well. They also prevent the long waits on client side by not returning the method’s result to client. The difference is that the result is still handled and saved in a session variable. This provides the capability to invoke time consuming methods for which result is not important now but can be used in the future by accessing a session variable. Callback returning calls are similar to immediate returning ones. The method’s result is not returned to the client within the current socket session, but with a callback. It is the server’s call to the client over an HTTP request which is performed when the server’s method completes and returns result. The HTTP protocol is used because the client does not run a process but must be requested to be run it. This mechanism can be used also to call back the web interface’s pages when some event occurs in the server application. It is used in the framework to trigger a game’s bot events to the web interface. 2.5.2

RSIp variables

Variables are used as data containers for called method arguments, returned result and session variables. There is no need for complicated variable types because most web scripting languages have typeless variables and because the server can determine types by its own method definitions. Therefore the protocol has only two variable type specifications – plain type and list type. The plain data type can hold integers, strings, floats and all the other data which can be stored in a single text field. The list type is used to store arrays, record sets and other n-dimensional data. Each list element has a unique text identifier (name) 12

and can contain plain or other list values. 2.5.3

RSIp sessions

Session declarations can be included in every message. As the architecture expects, the client can set session variables or read them while the server manages the session and can only serve data. Session declarations are of four types – session initialization, store session variable, read session variable and session termination. Session initialization message invoke the creation of a new session on server. It returns a session identifier (ID) if the authorization data is correct or an error if not. Authorization data can be any set of RSIp variables depending of what the server requires. A session can be initialized by the server even without the client’s request. In this case the server sends the session initialization message over HTTP using the callback mechanism. 2.5.4

RSIp errors

Error declarations are returned from the server instead of a result if a low level protocol error occurs. These errors can be: data conversion errors, method calling errors or failed authentication errors. 2.5.5

RSIp server API

The RSIp API is part of the framework’s SDK but it can be also self distributed. The server part is implemented in the .NET platform. It is contained in the CRsipServer.dll assembly which defines the CRsipServer class. This class provides API functionalities. The class members are separated in the following groups: • Server management - starting and stopping • Method binding and unbinding 13

• Setting up delegate function for handling and processing authentication request • Getting sessions data • Setting sessions data A brief class declaration is listed in Appendix G. The most important of the class methods is that which binds commands which can be called through the protocol. The method declaration is: void Bind(string Method, object objObject) The only information which the programmer must provide is the name of the exposed method Method and the object instance objObject which member is the method. The API gets the arguments’ names and types by accessing the .NET Framework’s runtime information. The bound methods can have an argument int intRsipSessionID which will contain the session identifier of the current method caller when a client calls the method. 2.5.6

RSIp client API

As the RSIp architecture requires, the client API is as thin as possible. It is implemented in PHP 4 and also can be distributed independently from the game framework. The API’s functions are defined in the class rsip client which is contained in the class rsip client.php file. The class members are separated in the following groups: • Client initialization • Calling server method • Using session - initialization, setting / loading variables • Low level functions for sending / receiving messages 14

A brief class declaration is listed in the Appendix H. The most important class method is the call method. Its declaration is: call($method, $args = array(), $return_type = false, $return_param = false) This function calls the server method named $method with arguments stored in the array $args. Every array’s cell is one argument. The cell’s key is argument name and the cell’s value is the argument’s value.

3

Discussion

3.1

Virtual world games framework opportunities

Up to this writing, the introduced framework is the only full featured solution to facilitate creating virtual world games on the ActiveWorlds platform. The ActiveWorlds platform is one of the most popular and well developed virtual world platforms. Other platforms include OpenWorlds [14], Blaxxun [13], Dive [12] and DigitalSpace [11]. The existing tools for creating games in the ActiveWorlds environment before this framework provide only the basic low level API functions for interacting with the virtual world server or SDKs for creating single bots [10]. This novel high level framework offers the full features necessary for virtual world game implementation, not just the tools for creating the basic 3D interaction. The framework’s SDK provides tools for creating and communicating with web pages which provide powerful game control interface. These pages have significant importance for the virtual world games, because the pure 3D virtual environment is not convenient for serving a lagre amount of information or providing dynamic powerful controls.

15

3.2

Applications of the RSI protocol

This novel protocol is applicable in many situations. There are several main applications of RSIp in which it is the best choice. 3.2.1

Web interfaces

As stated in its design goal, the RSIp protocol is mostly applicable to support web-interfaceto-application architecture. This architecture provides many advantages to the main (server) application. The main advantage of this architecture is the opportunity to increase the accessability of the application. Its functionality can be accessible through web environment from every point in the network without the need of local installation. This architecture also provides good security functions. Only explicitly provided functionality is accessible through the web, not the whole application. The access to the application is made through a low level socket connection, not through a web server as in the web service architecture. It prevents vulnerabilities caused by web server security holes. As web access to the application is provided, it is still a running process, not a web system. This means that its execution does not depend on the web request architecture. This is used in the game framework. This architecture also provides good flexibility and scalability because the web interface can be built in many different languages. 3.2.2

Other applications

Although the RSIp protocol is designed to support thin web interfaces, it has all the necessary functionality of an RPC protocol. This makes it usable for usual RPC purposes. Its opportunities for rapid and secure RPC are applicable for communication with normal web applications and even for application-to-application RPC communication.

16

The protocol is applicable for supporting web systems, which need to access information from running application and/or give commands (trigger events) to it. These applications could be different servers, services or daemon programs. The protocol can also be used if there is a need to provide an easy and open way for third parties to build web interfaces to applications. For example, this opportunity can be used to distribute separately the game server part from a framework’s game application. Third parties can connect several games together by creating a common web system which interacts with all the game servers. One very useful application of the protocol is for building session management servers. These servers are used to hold one session in a big complex system, parts of which are written in different languages and are remotely located. This scenario is often found in Enterprise Resource Planing (ERP) systems when the core of these systems needs to deal with some of it’s modules. The ERP system can have alternative access modules – Graphic User Interface (GUI) application and web interface applications. They can both communicate with the core through RSIp, because it is rapid, secure and unified.

3.3

Comparing the RSIp to other RPC protocol

In this section RSIp will be compared to the most frequently used other RPC protocols. Each of these protocols has advantages and disadvantages. Comparing will show that RSIp has very good balanced set of functionality which provides a rapid and sufficiently powerful method of RPC. It will show also that RSIp is the most effective for web-interface-toapplication architecture. 3.3.1

RSIp vs. application-to-application RPC protocols

The most frequently used and well developed application-to-application RPC protocols are CORBA and DCOM. Common Object Request Broker Architecture (CORBA) is a popular 17

protocol for writing distributed, object-oriented applications. It is typically used in multi-tier enterprise applications. CORBA is well-supported by many vendors and several free software projects. It also provides an excellent Interface Definition Language (IDL), which allows the definition of readable and object-oriented APIs. Unfortunately, CORBA is very complex. It has a steep learning curve, requires significant effort to implement, and requires fairly sophisticated clients. Distributed Component Object Model (DCOM) is Microsoft’s alternative to CORBA. It is very similar to it but is oriented to support remote calling of only COM (Component Object Model) applications. The aplication-to-aplication RPC platforms like CORBA and DCOM are designed to support very heavy and complex RPC calls between running applications. They are bettersuited to enterprise and desktop applications than they are to use with web applications. 3.3.2

RSIp vs. other XML based RPC protocols

XML (Extensible Markup Language) based RPC protocols work by marshaling procedure calls over HTTP as XML documents. They are similar to RSIp because it also an XML based RPC protocol. The most popular protocol of this kind is the Simple Object Access Protocol (SOAP). It is very powerful, but appears to be suffering from specification creep. It supports XML Schemas, enumerations, strange hybrids of structs and arrays, and custom types. At the same time, several aspects of SOAP are implementation defined. It is a very powerful and full featured protocol, but at the same time, it is very complicated and heavy to be used in thin web systems. Extensible Markup Language - Remote Procedure Calling (XML-RPC) was used as a basis for creating SOAP, but it has much simpler specifications. This protocol is the best 18

alternative for RSIp, but it still has some disadvantages, especially for the thin web to running process communication. It is designed to be a more global solution for RPC, so it does not have all the features which RSIp has, especially for this type of communication. The XML-RPC protocol does not support the different returning types which RSIp supports to optimize the speed of some particular calls. It also has many complicated variable type specifications which can be avoided.

4

Results

The introduced framework was used for the creation of the Environmental Detectives game [15]. This game will be used in a education research project by the MIT Teacher Education Program [15, 17, 18]. Once the framework was done, the implementation of this game took only two days. This shows the great opportunities of the framework tools to simplify the game development process. Environmental Detectives is a virtual world game based in the QuestAtlantis virtual universe. QuestAtlantis is educational virtual reality game project [4]. The main part of its gameplay are the quests. They are tasks which the player should complete. One of these tasks is a virtual world implementation of the game Educational Detectives, the previous version which is PDA based. Both versions will eventually be compared in terms of their educational opportunities. In Environmental Detectives, the player must investigate chemical pollution in two stages. First the player must find pollution’s location by digging soil samples. The samples are dug and carried to the virtual labs by digger bots. Samples can be analyzed in different laboratories, each with different speed and different accuracy. The result of the analysis is given as the volume of pollution at the dig location.

19

The other part of the investigation is a report for the characteristics of the chemical and its damage on people and nature. For this purpose the player can interview simulated people. They are bots, walking randomly around the world and serving information if they are asked. This is done via a mouse click on their avatars or by sending them message containing words “info”, “pollution” or “fact”. Both the interview bots and the digger bots use the complex bot class. The bots are fully controlled through a web interface. The information from interviews and diggings is also served through this interface. A separate RSIp session is created for each player. This session is used to identify uniquely each player and to store the player’s game data. The web interface does not use other data storage tools like databases. This makes it very portable and light weight. The template parser is used to divide the design of the web interface from its program logic, which provides an easy way to them both and to easily create common design elements for all pages.

5

Conclusion and Future Work

This paper introduces a new framework for creating virtual world games. It provides all the necessary functions for this task including a high level object oriented bot development SDK and a novel RPC protocol used for communicating with web interfaces, as well as other helpful tools. As an application of the framework a virtual world game called Environmental Detectives was developed. It will be used in future education research. The current implementation of the virtual world game framework uses the ActiveWorlds virtual world platform. This causes the restriction of using the ActiveWorlds SDK and only the low level functions which it provides. A future research project could be to create a new virtual world platform which would directly provide a high level SDK.

20

6

Acknowledgments

I would like to thank to my mentor Prof. Eric Klopfer for giving me the opportunity to work on this project and helping me with fruitful. Many thanks to my tutor Matt Paschke for his ongoing support, encouragement and assistance for writing this paper. I’m very thankful also to Sanghamitra Sen and Christopher Mihelich for their great technical assistance and numerous helpful e-mails. Special thanks to Dr. Jenny Sendova for her constructive critisism and useful advice. I thank to my Bulgarian friends Kaloyan Slavov (RSI’01) and Lyudmil Antonov (RSI’02) for their interest in my paper. I’m very thankful to Bob Carteaux (Indiana University) for supporting the realization of Environmental Detectives game with aranging a great 3D world environment. My deep gratituge to the “St. Cyril and Methodius” foundation for supporting my coming to RSI. Finally, I thank specially to Ms. Joann DiGennaro and all the Research Science Institute staff for making all this possible.

21

References [1] ActiveWorlds: www.activeworlds.com [2] ActiveWorlds Official Software Development Kit: www.activeworlds.com/sdk [3] ActiveWorlds COM Software Development Kit: www.grimmsoft.com/aw/sdk/ [4] Quest Atlantis: atlantis.crlt.indiana.edu/start/index.html [5] Restore1 bot: www.jefftech.net/restorebot.html [6] Tracker bot: www.jefftech.net/trackerbot.html [7] Vote bot: www.shoemakervillage.org/votebot.html [8] BallBot bot: www.imabot.com/ballbot.htm [9] Xelagot bot: www.imatowns.com/xelagot/xelagot x1.html [10] BotTool: sourceforge.net/projects/bottool/ [11] DigitalSpace: www.digitalspace.com [12] Dive: www.sics.se/dive [13] Blaxxun: www.blaxxun.com [14] OpenWorlds: www.openworlds.com [15] Environmental Detectives project: cms.mit.edu/games/education/Handheld/Intro.htm [16] Todor Kolev, Plamen Petkov: Creating Enterprice Resource Planing systems. The phpSiteEngine System. Studets Institute of Mathematics and Informatics, Bulgaria, March 2003. [17] Klopfer, E., K. Squire and H. Jenkins: Environmental Detectives PDAs as a Window into a Virtual Simulated World. International Workshop on Wireless and Mobile Technologies in Education, 2002. [18] Klopfer, E., K. Squire and H. Jenkins: Augmented Reality Simulations on PDAs AERA, Chicago 2003. [19] William Winn, Mark Windschitl: Towards an Explanatory Framework for Learning in Artificial Environments University of Washington, August 2001. [20] William Winn: What can students learn in artifitial environments that they cannot learn in class? University of Washington, May 2002. [21] Chris Dede, Diene Ketelhut, Kevin, Ruess: Designing for Motivation and Usability in a Museum-based Multy-User Virtual Environment. 22

A

Environmental Detectives Screenshots

Figure 6: Interview bot

23

Figure 7: Digger bot command panel

B

Parent bot class

Brief list of the public members of CBot class: class CBot{ public const int AW_BUILD = 32; public AWSDKLib2.AwSdk2 sdk; public CBot(); protected void Initialize(string strHost, int intPort, string strWorld, int intCitizen, string strPassword, string strName, bool bGlobal); public void DisplayPage(int intSession, string strUrl, 24

string strTarget); public void DisplayPage(int intSession, string strUrl); public void Console(int intSession, string strMessage); public void Console(string strMessage); public void Console(int intSession, string strMessage, int intRed, int intGreen, int intBlue, bool bBold, bool bItalics); public void Console(string strMessage, int intRed,int intGreen, int intBlue, bool bBold, bool bItalics); public void Say(string strMessage); public void WhisperTo(int intSession, string strMessage); public void Kill(); ~CBot(); }

C

Visible bot class

Brief list of the public members of CVisibleBot class: class CVisibleBot{ #region Class initialization public void Initialize(string strHost, int intPort, string strWorld, int intCitizen, string strPassword, string strName, int x, int z, int y, float flRotation, int intAvatar); #endregion #region Bot methods public void Move(int x, int z); public void Rotate(float intAngle); public void Goto(int x, int z); public void ChangeBy(int x, int z, float intAngle); public void ChangeTo(int x, int z, float intAngle); public void TeleportTo(int byX, int byZ); public void RefreshData();

25

public public public public public public public public public #endregion

SAvatarData AvatarData {get; set;} int Gesture {get; set;} int Pitch {get; set;} int State {get; set;} int Avatar {get; set;} int x {get; set;} int z {get; set;} float Rotation {get; set;} int y {get; set;}

}

D

Invisible bot class

Brief list of the public members of CInvisibleBot class: class CInvisibleBot : CBot { #region Class initialization public double Interval {get; set;} public void Initialize(string strHost, int intPort, string strWorld, int intCitizen, string strPassword, string strName); #endregion #region Bot methods public Hashtable hshAvatars; public Hashtable hshCitizens; public Hashtable hshObkects; public SAvatarData RefreshAvatarData(bool bUpdateOnly); public SWorldData RefreshWorldData(bool bUpdateOnly); public SAvatarData GetAvatarData(int intSession); public SCitizenData GetCitizenData(string strName); public SWorldData GetWorldData(); public SObjectData GetObjectData(int intNumber); public STerrainNodeData[][] GetTerrainData(int intPageX, int intPageZ, int intPageLeght, int intPageWidth); public void SetWorldData(SWorldData data); 26

public void SetObjectData(int intNumber, SObjectData data); public void SetTerrainNodeData(int intNodeX, int intNodeZ, STerrainNodeData data); public void SetTerrainPageData(int intPageX, int intPageZ, int intPageLeght, int intPageWidth, STerrainNodeData[][] data); #endregion #region Event handling public event AwAvatarEventHandler OnAvatarAdd; public event AwAvatarClickEventHandler OnAvatarClick; public event AwAvatarEventHandler OnAvatarChange; public event AwAvatarEventHandler OnAvatarDelete; public event AwMessageEventHandler OnConsoleMessage; public event AwMessageEventHandler OnChat; public event AwWorldEventHandler OnWorldDisconnect; public event AwWorldEventHandler OnWorldAttributes; public event AwObjectEventHandler OnObjectClick; public event AwObjectEventHandler OnObjectAdd; public event AwObjectEventHandler OnObjectDelete; public event AwObjectEventHandler OnObjectSelect; #endregion }

E

Data Structures

List of data structures used in the framework: struct SAvatarData{ int Address; int Citizen; int Gesture; string Name; int Pitch; int Privilege; int Session; int State; int Avatar; int Version; int x; int y; float Rotation; 27

int z; } struct SCitizenData{ bool Beta; int BotLimit; string Comment; string Email; bool Enabled; int ExpiratioTime; int ImmigrationTime; int LastLogin; string Name; int Number; string Password; string PrivilegePaggword; string TotalTime; string Url; } struct SWorldData{ string Title; string WelcomeMessage; string HomePage; int EntryPointX; int EntryPointZ; float Gravity; int int int int int int

FogBlue; FogGreen; FogRed; FogEnable; FogMinimum; FogMaximum;

int LightBlue; int LightGreen; int LightRed; int LightX; int LightY; int LightZ; bool LightDrawBright;

28

bool LightDrawFront; int LightDrawSize; string LightMask; string LightTexture; } struct SObjectData{ string Model; int Number; string Action; int BuildTimestamp; string Description; int Owner; int x; int y; int z; float Rotation; float Roll; float Tilt; } public struct STerrainNodeData{ int x; int z; int Height; string Texture; }

F

Example of Complex bot class

Here is the C# code of an example complex bot class. It is the digger bot class (CDigBot) used in the Environmental Detectives game. public class CDigBot{ public readonly CVisibleBot avatar; public readonly CInvisibleBot senses; public int OwnerSession; public int BotID; private string strStatus; private System.Timers.Timer myTimer; private Random rnd; 29

private private private private

int int int int

intMoveAvatar; intDigAvatar; intCounter; intTargetCount;

public event EventHandler OnDigCompleted; public CDigBot(CVisibleBot objVisibleBot, CInvisibleBot objInvisibleBot, int intOwnerSession, int intBotID, int intAvatarForMoveing, int intAvatarForDiging){ this.avatar = objVisibleBot; this.BotID = intBotID; this.senses = objInvisibleBot; this.OwnerSession = intOwnerSession; this.intMoveAvatar = intAvatarForMoveing; this.intDigAvatar = intAvatarForDiging; this.strStatus = "Ready"; this.rnd = new Random(); myTimer = new System.Timers.Timer(); myTimer.Interval = 1000; myTimer.Enabled = false; myTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimer); senses.OnAvatarClick += new AwAvatarClickEventHandler(OnClick); senses.OnChat += new AwMessageEventHandler(OnMessage); } private void OnClick(object sender, AwAvatarClickEventArgs e){ if(e.AvatarData.Session==avatar.AvatarData.Session){ avatar.WhisperTo(e.Clicker.Session, "Status: " + this.Status + "(Time left: " + this.TimeLeft + "sec)"); } } private void OnMessage(object sender, AwMessageEventArgs e){ if(e.Message.IndexOf("status")>0){ avatar.WhisperTo(e.Clicker.Session, "Status: " + this.Status + "(Time left: " + this.TimeLeft + "sec)"); } }

30

public string Status{ get{return strStatus;} } public int TimeLeft{ get{return intTargetCount-intCounter;} } public void Goto(int x, int z){ strStatus = "Ready"; avatar.Avatar = intMoveAvatar; avatar.Goto(x, z); } public void Dig(int intSecondsInterval){ avatar.Avatar = intDigAvatar; strStatus = "Digging"; intTargetCount = intSecondsInterval; intCounter = 0; myTimer.Enabled = true; } private void OnTimer(object sender, System.Timers.ElapsedEventArgs e){ if(intCounter == intTargetCount){ if(strStatus=="Digging"){ avatar.Avatar = intMoveAvatar; OnDigCompleted(this, null); strStatus = "SampleReady"; } myTimer.Enabled = false; }else{intCounter++;} } }

G

RSIp Server API class

Brief list of the public members of CRsipServer class:

31

class CRsipServer { public IRsipParser objParser; public IRsipTransport objTransport; public void SetAuthenticationMethod(RsipAuthMethod mdt); public void Start(int intPort); public void Stop(); public void Bind(string strMethod, object obj); public void UnBind(string strMethod); public object GetSessVar(string strSessID, string strVarName); public void SetSessVar(string strSessID, string strVarName, object objVarValue); }

H

RSIp Client API class

Here is a brief list of the public members of rsip client class. The class is written in PHP 4 code which does not support method access modifiers. All the members of the class are publicly accessible, but these are the high level members that developer should use: class rsip_client{ var $server; var $port; var $sessID; var $session = array(); var $callbacks = array(); function rsip_client($server, $port, $sessID); function function function function function function

start_session($args); stop_session(); session_load_all(); session_load($vars); session_save($vars); session_declare_global($var_name);

function call($method, $args = array(), $return_type = false, $return_param = false); 32

function send_message($message, $do_wait); function callback_message($message); }

I

RSIp call declarations

Calls the specified method MyServerMethod. Client will wait for server to return result during current socket connection. Client wont wait for result. Socket connection will be terminated immediately. This is one vary fast communication way used for invoking commands which completion needs long time and don’t return result. Client wont wait for result, but declares that it must be saved to a session variable named mySessVar. Callback returning call. The result will be send through HTTP POST to URL address “http://client.address/url”. The client.address is the IP address of the client retrieved when the call to server is made. Message is contained in a variable named RSIPmessage receiver chanel. 33

J

RSIp simple messages

Authentication message (client→server): admin 42 Session initialization message (server→client): Call message with session variable interaction (client→server): abc 1 2 3 42 34

Nelly
Method manual result (server→client): 3 42 Method callback result (server→client): Nelly Unknown method calling error message (server→client): Session message retrieving all session variables form server (client→server):

35

Full Featured Virtual World Games Framework using ...

Jul 29, 2003 - The presented web-interface-to-application architecture entails intensive interaction be- ... Figure 5: Framework game architecture using RSIp .... It is a tool for separating program logic (PHP scripts) from the presentation logic.

348KB Sizes 3 Downloads 190 Views

Recommend Documents

Featured in:
Consumers and Small Businesses will tap into the global workforce. 12/10/09. 30. Copyright 2007-‐2009, Pixily. Confiden3al, Do not distribute. Bookkeeping,.

VIRTUAL REHABILITATION WITH VIDEO GAMES : A NEW ...
VIRTUAL REHABILITATION WITH VIDEO GAMES : ... UPATIONAL THERAPY By : JONATHAN HALTON.pdf. VIRTUAL REHABILITATION WITH VIDEO GAMES ...

The Layered Games Framework
of protocol πOrders 'on top of' protocol πDE, denoted πDE||Orders ≡. [πOrders .... This may facilitate the use of verification tools; notice also that we use state ...

Describing Processes- Games - Using English
An administrative system (e.g. finding school places for first year primary students). Applying for something ... Driving or riding something. Entering a competition.

Featured article
This article proposes a methodological framework for conducting literature reviews on empirical data .... •How can ERP be used as a technology enabler for supply chain management (Boubekri,. 2001)? ... (7) Education and training: •How to ...

Featured article
Journal of Enterprise Information Management, Vol. 23, No.4, 2010, pp. ... empirical data, and attempts to identify and categorise areas of concern within the current ... system fit the business strategy (Wei et al., 2005; Wei and Wang, 2004)?.

Dynamically Allocating the Resources Using Virtual Machines
Abstract-Cloud computing become an emerging technology which will has a significant impact on IT ... with the help of parallel processing using different types of scheduling heuristic. In this paper we realize such ... business software and data are

A Virtual Honeypot Framework - Center for Information Technology ...
ulates virtual computer systems at the network level. ... The configured services determine the vectors .... Figure 1: Honeyd receives traffic for its virtual honey-.

An Energy Aware Framework for Virtual Machine Placement in Cloud ...
Authors: Corentin Dupont (Create-Net); Giovanni Giuliani (HP Italy);. Fabien Hermenier (INRIA); Thomas Schulze (Uni Mannheim); Andrey. Somov (Create-Net). An Energy Aware Framework for Virtual. Machine Placement in Cloud Federated. Data Centres. Core

Using the Framework - Leaders.pdf
Performance management and appraisals. Identify and clearly describe the competence of the organisation. Everyone in an organisation, team or partnership ...

A Generative-Discriminative Framework using Ensemble ... - Microsoft
e.g. in text dependent speaker verification scenarios, while design- ing such test .... ts,i:te,i |Λ) (3) where the weights λ = {ai, bi}, 1 ≤ i ≤ n are learnt to optimize ..... [2] C.-H. Lee, “A Tutorial on Speaker and Speech Verification”,

Using the Framework - Practitioners.pdf
analyse and understand power dynamics and decision-making processes. be inclusive and involve the wider community. participate in decision making ...

Using the Framework - Employers.pdf
Organise and manage. resources. Evaluate and inform practice. Page 3 of 4. Using the Framework - Employers.pdf. Using the Framework - Employers.pdf.

A Generative-Discriminative Framework using Ensemble ... - Microsoft
sis on the words occurring in the middle of the users' pass-phrase in comparison to the start and end. It is also interesting to note that some of the un-normalized ...

Estimating Supermodular Games using Rationalizable ...
†Department of Marketing, Yale School of Management, 52 Hillhouse Ave. Rm. 319, ... western University, 2001 Sheridan Road, Evanston, IL 60208. Email: y%.

Innovation timing games: a general framework with applications
Available online 15 June 2004. Abstract. We offer a ... best response of the second mover, which is the solution to a non-trivial maximization problem. ...... c1, are a composition of three polynomials of the third degree. It is somewhat tedious but 

Innovation timing games: a general framework with applications
research and development (R&D) to obtain a better technology. Let kًtق be .... follower's payoffs as functions of t alone: define Lًtق ¼ p1ًt, Rًtقق and Fًtق ¼ p2ًt, Rًtقق ...

Virtual Cloud Security by Using Hypervisor- Based Technology - IJRIT
Hypervisor security is the process of ensuring the hypervisor, the software that enables virtualization, is secure ... The research methodology adopted towards achieving this goal, is based on software ..... critical data must not only be protected a

Torque Sensor Calibration Using Virtual Load for a ...
computed by the structural analysis,. 6 ..... 3.3 Error analysis of sensor calibration using virtual load ..... Kim, B. H., “Modeling and Analysis of Robotic Dual Soft-.

pdf-0741\software-and-system-development-using-virtual-platforms ...
... the apps below to open or edit this item. pdf-0741\software-and-system-development-using-virtu ... -wind-river-simics-by-daniel-aarno-jakob-engblom.pdf.