Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date: 4/31/05 Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 1 2 3 4 5 6 7 Introduction ................................................................................................................. 3 1.1 Goals and objectives ........................................................................................... 3 1.2 Statement of scope .............................................................................................. 3 1.3 Software context ................................................................................................. 3 1.4 Major constraints ................................................................................................ 4 Data design.................................................................................................................. 4 2.1 Internal software data structure ........................................................................... 5 2.2 Global data structure ........................................................................................... 5 2.3 Temporary data structure .................................................................................... 5 2.4 Database description ........................................................................................... 5 Architectural and component-level design ................................................................. 5 3.1 Program Structure ............................................................................................... 6 3.1.1 Architecture diagram .................................................................................. 6 3.1.2 Alternatives ................................................................................................. 6 3.2 Description for VRML Web Client .................................................................... 7 3.2.1 Processing narrative (PSPEC) for VRML Web Client ............................... 7 3.2.2 VRML Web Client interface description. ................................................... 8 3.2.3 VRML Web Client processing detail .......................................................... 8 3.3 Software Interface Description ......................................................................... 11 3.3.1 External machine interfaces ...................................................................... 11 3.3.2 External system interfaces ........................................................................ 12 3.3.3 Human interface ........................................................................................ 12 User interface design................................................................................................. 12 4.1 Description of the user interface ....................................................................... 12 4.1.1 Screen images ........................................................................................... 13 4.1.2 Objects and actions ................................................................................... 13 4.2 Interface design rules ........................................................................................ 14 4.3 Components available ....................................................................................... 14 4.4 UIDS description .............................................................................................. 14 Restrictions, limitations, and constraints .................................................................. 14 Testing Issues ............................................................................................................ 15 6.1 Classes of tests .................................................................................................. 15 6.2 Expected software response .............................................................................. 15 6.3 Performance bounds.......................................................................................... 16 6.4 Identification of critical components ................................................................ 16 Appendices ................................................................................................................ 16 7.1 Requirements traceability matrix ...................................................................... 17 7.2 Packaging and installation issues ...................................................................... 17 7.3 Design metrics to be used ................................................................................. 18 7.4 Supplementary information (as required) ......................................................... 18 Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 SOFTWARE DESIGN SPECIFICATION 1 Introduction A Web Client implementation of the Watson Game would allow users the ability to play the game with out downloading or installing cumbersome game files but by simply going to a URL (Universal Resource Locator) inside their web browser. Going to the specified URL would bring up the game inside the browser and the user would then be able to navigate through the 3d space as in the actual implementation of the Watson Game. 1.1 Goals and objectives The goal of this project was to ascertain if it was possible for the Watson Game to be realized in the form of a Web Client. This Web Client was to be written in the VRML (Virtual Reality Modeling Language) language. Hence the main goal is to gain a grasp of the basics of VRML and as a result, be able to determine if it is within VRML’s capabilities to render the game in a web browser. As a sub goal of this main goal, it is also my objective to produce a working example illustrating VRML’s capabilities as they apply to the Watson Game. 1.2 Statement of scope In order to reach the aforementioned goals and objectives, first the Watson Game’s 3d environment had to be converted from the 3ds modeling files into VRML format (*.wrl). After this was accomplished, then the game’s 3d environment could be viewed within a browser that had a VRML plug-in installed (e.g. Cortona or Blaxxun). After this, it was simply a matter of converting the texture files from bitmap to jpg and modifying the VRML model to reflect the change in texture names. Then some VRML code must be added to support collision detection so that the user would not fly through walls, objects, etc. Lastly, scripting events must be added to the VRML file so that the user can trigger events as in the real game. Due to the complexity of adding these events to the Watson.wrl file, it is beyond the scope of this project to due so. However it will be noted that the myWatsonFinal2.wrl file properly displays the game and given the correct browser plug-in (Blaxxun), the user can navigate through the world correctly. The only thing that remains is adding the scripted events to the wrl file. 1.3 Software context Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 The Web Client’s main goal is to facilitate the distribution of the Watson game in such a manner that it is accessible to the most number of people. Given the current size of the game and the difficulty in deploying it to the desired individuals, a Web Client would allow the proliferation of the game on a massive scale. The only thing necessary for the distribution of the game would be to provide the end user with a URL link to the proper plug-in required to run the VRML file (the Blaxxun plug-in) then a link to the game itself (to the .wrl file on the server). This would allow the user to play the game in an easier manner than through the normal game downloading and installing procedures and hence would allow the game to reach more users. 1.4 Major constraints A main constraint in the deployment of a web based client is the need for the user to download and properly install the necessary VRML plug-in to their browser. However, this can be accomplished by simply providing the browser plug-in setup .exe. Once this hurdle has been overcome, the user need only go the specified URL containing the VRML file (.wrl file) then the user would be able to play the game. Technically speaking there is one other major hurdle. That is the constraint of the java sandbox. Since the Watson game requires contact with the Watson server, the browser would have to let the .wrl file initiate a java socket with it. Luckily, if the Watson Game server is located at the same IP as where the VRML file was served from, the sandbox should not prevent the VRML game from communicating with the server. 2 Data design Necessary data structures within the VRML file include all the “VRML object children” and the VRML scripting nodes. These data structures are all contained within the Watson VRML file and allow it to properly display and react to the user’s interactions within the Watson building itself. The VRML object children are simply data structures that tell the browser how to render the 3d scene. They include object’s positions, colors, textures, etc. They are the backbone of the game in that they fully describe the VRML scene and how it is to be rendered. Secondly, VRML scripting nodes contain data as to how the program should react to user interaction (e.g. if the user bumps into a wall or a trigger). The script nodes can generate different events when triggered but the three main events that they are capable of triggering are java scripts, applets and classes. The latter is the most important to us as it allows us to open up a socket to the Watson Server and communicate with it given a generated event. Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 2.1 Internal software data structure Within the VRML file, there is no exchange of data structures from one VRML component to another. If the environment senses that user initiated one of the scripting nodes given a defined trigger, the scripting node is called parameter-less. Each script acts independently and is called for any triggered event that it is attached to. 2.2 Global data structure The global data structures have already been mentioned in the introduction to the Data Design Section (Section 2.0). The global data structures include the VRML object children as well as the VRML scripting nodes as described previously. 2.3 Temporary data structure At this point in the design, there are no temporary data structures created or used. The previously mentioned global data structures are all static and the scripting nodes are static as well. However, since the scripting nodes can call java classes upon their triggering, those java classes can make extensive use of data structures. However, since the java class scripts for given user triggers have not been written yet, their data structures cannot be documented. 2.4 Database description The VRML Web client includes no user of databases at this point. However, as mentioned in section 2.3, as the design expands to include all the necessary scripted events, the web client will make extensive use of the Watson server database just as the regular implementation of the game does. 3 Architectural and component-level design The overall design of the VRML Web Client is as follows. The main VRML file (myWatsonFinal2.wrl) contains all the information necessary for the web browser to display the Watson building (VRML object children) as well as information on how to handle collision detection and starting user position. It also contains references to texture data that is supplied in the same folder. Lastly, it contains scripting data as to how the program should react to Class: CS-495 Spring 2005 Author: Brent Rood Project: The Watson Game Date:4/29/05 Function: Web Client Subsystem: VRML Client specific user triggers. These triggers will generate script events that will call the specified java class file. The folder needs to contain all the .jpg textures that the VRML object children will use as well as the java class files that will be called upon the generation of triggered events. 3.1 Program Structure The program structure is best seen in the following figure (Figure 1). The VRML file makes use of the objects contained within it to render the 3d virtual scene for the user as well as making use of the included textures (.jpg) to apply the proper textures to the proper objects. Next, the VRML file contains the scripts necessary to handle user triggered events. These events will trigger the script which in turn will trigger an included java class. The java class can then do whatever is necessary according to whatever event is suppose to be triggered (including contacting the server, etc). Lastly, all these elements are brought together by the installed browser plug in which displays the VRML file, allows the user to navigate through the environment and reacts to the user’s events by triggering the proper java class scripts. 3.1.1 Architecture diagram Figure 1 illustrates the overall VRML architecture. Figure 1 3.1.2 Alternatives Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 As far as other possible architecture designs, the aforementioned design is simply how VRML works. As a result, an alternative design is not possible unless another language is chosen (e.g. X3D). 3.2 Description for VRML Web Client The object component of the VRML file contains all the information necessary for the VRML plug-in to render the 3d environment. This includes: 1. All object’s positions (xyz coordinates) 2. Objects exact dimensions (including exact shapes and arrangements) 3. Wall placement 4. References to textures to be applied to previously mentioned objects/walls 5. Collision detection information (where the user can and cannot go) 6. Non-textured objects colors The scripting component contains: 1. Scripts attached to specific objects and/or locations 2. A VRML ROUTE statement to attach said script to a scripting node 3. A script node for each VRML ROUTE that allows it to call a java class file in response to the event 4. A java class file containing code to be executed upon the triggering of an event The browser plug-in takes care of: 1. Rendering of the 3d world including displaying objects, attaching textures, etc. 2. User navigation including walking and looking around 3. User collision detection 4. Lightning 5. Calling necessary java scripts upon triggering of an event 3.2.1 Processing narrative (PSPEC) for VRML Web Client Processing Narrative (PSPEC) 1. Browser plug-in takes in VRML file 2. VRML object children are processed and rendered 3. Color is added to the wire mesh of objects 4. Textures are overlain on top of the wire mesh 5. Lighting is applied 6. Plug-in waits in loop for user input 7. Given a user input, the plug-in then activates the proper script to deal with the action 8. Loop restarts waiting for user input again 9. Exit command is given and program exits Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 3.2.2 VRML Web Client interface description. The basic user interface is as follows: Since the user interaction with the Watson environment is mainly dependant on the particular browser plug-in being used, we will assume that the Cortona plug-in is being used. Based on this the user can: 1. Select the mode of interaction from a menu on the side of the browser. 2. The first mode of interaction is walking. The user clicks on a point inside the browser and drags the mouse in a direction. The user’s position within the 3d world will then change according to that direction. This is essentially “walking”. 3. The second mode of interaction is viewing. Once the user has selected the view mode, a click and drag will cause the viewpoint to shift in that direction. This is essentially “looking around”. 4. Lastly, if the user selects the mode of interaction called interact, the user can then select objects in the scene that are selectable and interact with them. This allows the user to activate hot spots, etc. 3.2.3 VRML Web Client processing detail Web Client processing follows the sequence of events illustrated in section 3.2.1. The PSPEC shows the processing detail of the program step by step. As I did not implement the VRML processing done by the browser plug-in, it is beyond the scope of this project to go into further processing detail. 3.2.3.1 Interface description The user interface follows the previously dictated format specified in section 3.2.2. The user interacts with the program through a series of mouse click and drags in specific directions to navigate through the world as he/she dictates. Objects in the world are also activated through this system as well. See section 3.2.2 for further details. Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 3.2.3.2 Algorithmic model (e.g., PDL) Figure 2 illustrates the overall algorithmic model. Figure 2 3.2.3.3 Restrictions/limitations The main limitations and restrictions of the program are as follows. Since the browser plug-in has a set defined way for the user to interact (through the given menus and with the mouse click and drags), unless another browser plug-in is written, the VRML web client will be at the mercy of the plug-in being used. It will have all of the limitations inherent with a mouse click and drag navigation system as well as any other issues/restrictions that the plug-in has with in its own code. Fixing such problems is beyond the ability of a senior seminar student. Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 3.2.3.4 Local data structures Local data structures are the same data structures as specified at the beginning of section 2 (Data Design). They are as follows. Necessary local data structures within the VRML file include all the “VRML object children” and the VRML scripting nodes. These data structures are all contained within the Watson VRML file and allow it to properly display and react to the user’s interactions within the Watson building itself. The VRML object children are simply data structures that tell the browser how to render the 3d scene. They include object’s positions, colors, textures, etc. They are the backbone of the game in that they fully describe the VRML scene and how it is to be rendered. Secondly, VRML scripting nodes contain data as to how the program should react to user interaction (e.g. if the user bumps into a wall or a trigger). The script nodes can generate different events when triggered but the three main events that they are capable of triggering are java scripts, applets and classes. The latter is the most important to us as it allows us to open up a socket to the Watson Server and communicate with it given a generated event. 3.2.3.5 Performance issues Performance issues are absolutely central to the overall idea of a web client. Since the browser plug-in renders the VRML scene and is responsible for the lighting, texture mapping and all other aspects of the rendering, most of the visual performance is based on its performance. Since use of a browser plug-in necessarily entails a large performance hit, frame rates within the browser plug-in are approximately half of the frame rates that I saw in the actual game (given the same machine specifications). This performance hit is most likely due to inefficiencies within the VRML architecture. Since open GL is much more efficient than rendering within the VRML environment, as a result, the web client will always be inferior to the actual game as far as frame rates. This only becomes an issue on older machines however. On my four year old Pentium 4 1.4 GHz, I had extremely acceptable frame rates within the web client. However, I believe that if you lowered the machine specifications much more, a huge hit in frame rates would be perceived. I suspect that the game would become unplayable once we reached the 800 MHz or below processor speed. This means that the game’s distribution would have to be limited to users with capable systems, thereby limiting its effectiveness and its ease of distribution. Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 3.2.3.6 Design constraints The design constraints inherent within the VRML system include all the limitations inherent within the VRML system. Since the VRML language is relatively only (circa 1997), most of the more advanced graphical features that have been recently applied to 3d world have not yet been applied to VRML this limits the visual quality that VRML can produce. However, as far the Watson game is concerned, VRML is very capable of rendering everything necessary. 3.3 Software Interface Description The software’s interface with the user was described in section 3.2.2. The user interacts and navigates through the 3d world through the use of the browser plug-in. The plug-in provides a menu on the edges of the browser allowing the user to select the mode of interaction. The basic user interface is as follows: Since the user interaction with the Watson environment is mainly dependant on the particular browser plugin being used, we will assume that the Cortona plug-in is being used. Based on this the user can: 1. Select the mode of interaction from a menu on the side of the browser. 2. The first mode of interaction is walking. The user clicks on a point inside the browser and drags the mouse in a direction. The user’s position within the 3d world will then change according to that direction. This is essentially “walking”. 3. The second mode of interaction is viewing. Once the user has selected the view mode, a click and drag will cause the viewpoint to shift in that direction. This is essentially “looking around”. 4. Lastly, if the user selects the mode of interaction called interact, the user can then select objects in the scene that are selectable and interact with them. This allows the user to activate hot spots, etc. 3.3.1 External machine interfaces This project has not yet had a chance to implement the external machine interfaces however they can be discussed. Since the scripted events will initiate java classes that can then open a socket and communicate with the server, the sockets will be the external interface. The open socket can then send the data in whatever format the programmer specifies, hence, the program can follow the same external machine interfaces as the actual Watson game does if it is implemented properly. Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 3.3.2 External system interfaces The web client will not have any interaction with other products or systems other than the interaction with the server. This interaction is detailed in the previous section (section 3.3.1). 3.3.3 Human interface The user interacts with the web client through the user of the browser plug-in. The plug-ins menu allows the user to navigate and initiate hot spot events. See Section 4.0 for additional detail. 4 User interface design The basic user interaction is accomplished through the use of mouse clicks and drags that are preceded by a mouse click on the menu to select the mode of interaction. A detailed description of the interfaces follows in section 4.1. 4.1 Description of the user interface The software’s interface with the user was described in section 3.2.2 and section 3.3. The user interacts and navigates through the 3d world through the use of the browser plug-in. The plug-in provides a menu on the edges of the browser allowing the user to select the mode of interaction. The basic user interface is as follows: Since the user interaction with the Watson environment is mainly dependant on the particular browser plug-in being used, we will assume that the Cortona plug-in is being used. Based on this the user can: 1. Select the mode of interaction from a menu on the side of the browser. 2. The first mode of interaction is walking. The user clicks on a point inside the browser and drags the mouse in a direction. The user’s position within the 3d world will then change according to that direction. This is essentially “walking”. 3. The second mode of interaction is viewing. Once the user has selected the view mode, a click and drag will cause the viewpoint to shift in that direction. This is essentially “looking around”. 4. Lastly, if the user selects the mode of interaction called interact, the user can then select objects in the scene that are selectable and interact with them. This allows the user to activate hot spots, etc. Class: CS-495 Spring 2005 Author: Brent Rood Project: The Watson Game Date:4/29/05 Function: Web Client Subsystem: VRML Client 4.1.1 Screen images The screenshot illustrated in Figure 3 shows us the user navigating through the 3d Watson world from within the Internet Explorer browser. Figure 3 4.1.2 Objects and actions Since the scope of this project is not to actually implement any of the actual triggered events, but to simply determine if VRML is feasible for a web client, none of the triggered event actions have been implemented. However, it is possible for them to be implemented in the future using the java class interface and the java VRML API. Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 The objects that appear within the 3d world are self explanatory. They include all the objects that are within the regular Watson game and the same textures used as well. 4.2 Interface design rules The conventions and standards for the interface are setup by the particular browser plug-in being used. For a detailed explanation of the Cortona interface design rules, please see the following link: http://www.parallelgraphics.com/products/cortona/notes/ 4.3 Components available The GUI components that dictate the user interaction are determined by the particular browser plug-in being used. In this case, they are determined by the cortona plug-ins menu bar and mouse click and drag system. The menu bar is relatively self explanatory but a detailed description of its components can be found here: http://www.parallelgraphics.com/products/cortona 4.4 UIDS description The user interface development system is beyond the scope of this project. It is detailed by the browser plug-in and hence proper documentation on it can be found at Cortona’s website: http://www.parallelgraphics.com/products/cortona 5 Restrictions, limitations, and constraints The design constraints inherent within the web client include all the constraints and limitations of the VRML system itself as well as the limitations of the browser plug-in being used. Since the VRML language is relatively only (circa 1997), most of the more advanced graphical features that have been recently applied to 3d world have not yet been applied to VRML this limits the visual quality that VRML can produce. However, as far the Watson game is concerned, VRML is very capable of rendering everything necessary. Also, since the Cortona Web Client is relatively new, it has very little constraints and supports most of the modern 3d accelerators. For Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 a detailed description of the limitations of Cortona, I will refer you to the cortona website once again specified in section 4.4. 6 Testing Issues The only two tests that can be done on this preliminary implementation of the VRML web client are: 1. Opening the produced .wrl file and navigating through it and visually making sure that the Watson environment is true to its original version. 2. Attempting to use the java classes and VRML interface to demonstrate that communication with the server is possible. 6.1 Classes of tests Given the previous two tests, their implementation is as follows: 1. The Cortona Web Client is installed for the Internet Explorer Web Browser. Next, the computer is rebooted. Next, the produced VRML file of the Watson game is loaded with internet explorer. The task is then to navigate through the 3d environment, visually inspecting and ensuring that everything is as it should be. This is a subjective test is not very scientific. It only serves to make the sure the produced environment is accurate to the game on a purely visual level. 2. VRML’s capability as far as socket communications can best be tested with the included TicTacToeExample. This example illustrates a VRML example in which given a triggered event, VRML then calls a java class and uses the class to determine the action. Since within the class, the programmer can put whatever code he wants given an action (such as socket code) it can be assumed that since the Tic Tac Toe example works, that a socket example communicating with the server would also work by extension. 6.2 Expected software response The expected software response was that the VRML 3d environment would be rendered true to the original game in the Web browser and also that the Tic Tac Toe Example would properly call the java classes and initiate the scripted events. Both tests were successful and the desired software responses were achieved. Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 6.3 Performance bounds As previously specified the performance bounds are mainly contingent on the machine’s hardware and its connection to the internet. Internet connectivity is obviously mandatory for communication with the server. Also, relatively new graphics hardware is necessary for acceptable frame rates within the VRML web client environment (>800 MHz processor as well a graphics card preferably 4 years old or newer). 6.4 Identification of critical components The graphical display components are particularly critical when it comes to the performance testing of the VRML client. Since they underlie the actual implementation of VRML as well as the implementation of the browser plug-in being used, they are beyond the scope of this project. 7 Appendices The previously stated design specification can only be supplemented with the documentation of the VRML specification and the documentation of the browser plug-in being utilized. The VRML documentation can be found here: http://www.graphcomp.com/info/specs/sgi/vrml/spec/ and the cortona plug-in documentation can be found here: http://www.parallelgraphics.com/products/cortona Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 7.1 Uniq ue Num ber Requirements traceability matrix Requir ement Source of Requir ement Software Reqs. Spec/ Functional Req. Doc. Des ign Spe c. Prog ram Mod ule Test Spec. Te st Ca se( s) Suc cess ful Test Veri ficat ion Modifi cation of Requir ement Rem arks Objective 1: Web Client based on VRML 1 VRML web client Need for ease of distr. 800 MHz proc. < 4 yr old video card Wat son. wrl file VR ML chil dren Frame rate 1ap pro x 30f ps yes No medica tions necessa ry Test succ essf ul 2 VRML client commu nicatio ns Need to commun icate with Watson server Internet connectivit y Java clas s files Java class es Ability to commu nicate with server Co nn ect ed? Has yet to be dete rmi ned No medica tions necessa ry Test unsu re 7.2 Packaging and installation issues The inherent idea of the web client is that it requires no packaging. Only a pamphlet need be given out detailing the machine requirements, a link to download the browser plug-in and finally a link to the actual VRML file containing the game. Installation issues only involve the issues involved in the installation of the cortona web plug-in since once the plug-in is properly installed, there is no reason why the VRML file with the Watson game shouldn’t work (given that the users machine meets the minimum requirements). A detailed description of the cortona plugins installation issues can be found here: http://www.parallelgraphics.com/products/cortona/notes/ Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05 7.3 Design metrics to be used The only perceivable design metric is the frame rate that the VRML client produces. Since no other components have yet been developed the only metric that can be used to compare is the frame rate within the client when the client is displaying the produced Watson game VRML file. Since the frame rate is acceptable for a relatively old machine, it can be said that the design metric is well within the grasp of the majority of users. 7.4 Supplementary information (as required) Supplementary information can be found here at both the VRML specification web site: http://www.graphcomp.com/info/specs/sgi/vrml/spec/ as well as the cortona web browser plug in web site: http://www.parallelgraphics.com/products/cortona Class: CS-495 Spring 2005 Project: The Watson Game Function: Web Client Subsystem: VRML Client Author: Brent Rood Date:4/29/05
© Copyright 2026 Paperzz