# Web Browser Network Based on a BA Model for a Web-Based Virtual World
## 3 System Overview
### Network Construction  
Our system has a web server and many web browsers. The server manages the network topology, and the browsers are client-side software that stores information regarding characters and displays a game screen. Figure 5 shows the construction of a browser network. The server selects two browsers that the new browser should connect to. Therefore, browser A in this figure sends a request to the server. Then, the server chooses two other browsers based on the BA model. The server chooses browsers B and C and relays this information to browser A. Afterwards, browser A sends a connection request to browsers B and C.  
Our system limits the number of connections to two when the new user logs into the virtual world. We understand that the system can reach 100% data coverage if all clients connect to all other clients. In this situation, the number of connections for a client is the same as the number of users. However, the web browser has a limited number of network connections because the number of TCP sockets on the operating system is limited. Therefore, if the number of users exceeds the number of connections, the browser cannot connect to all the other users. On the other hand, the parallelism for the communication depends on the number of cores on the client computer. The number of communication processes is the same as the number of the other users. However, the number of processes that the client can run simultaneously is the same as the number of cores. The communication  
Figure 4: Display range. Figure 5: Network construction. process can be separated from the user interface process on the web browser. Therefore, the connection process does not affect the operability of the user interface. However, the data translation gets delayed because a communication process waits for the other communication processes. Consequently, the client does not receive information on all of the other users. Therefore, the client does not display the complete game world. In our previous study, our system chose two existing clients when the new user logs into the virtual world. One client exists in the same chunk as the new user. The second client is selected from the chunks adjacent to the chunk where the new user exists. In this manner, we could create a network and share the information. However, the network size tends to be small. The experimental result shows that the data coverage is about 50%, which is inadequate. The result indicates that the web browser cannot display the complete virtual world with the avatars of other users. Therefore, in this paper, we use an algorithm to create a scale-free network. The server chooses the target clients based on the BA model. In our system, to calculate the probability, we use the number of connections and location information. The location information is the position of the avatar in the virtual world. The web browser requires the information of the chunks that are included in the view range. Therefore, the browser should connect to the nearby browsers. Expression (2) indicates probability calculation. The value \(d_{ij}\) indicates the distance between avatar \(i\) and avatar \(j\). The value \(ws\) indicates the world size. In our system, the world size is the number of blocks at the longest-side edge. If the world comprises \(1500\times 1000\) blocks, the world size is 1500:  
\[p_{i}=(1-\frac{d_{ij}}{ws})+\frac{k_{i}}{\sum_{j=0}^{n}k_{j}}. \tag{2}\]  
Figure 6 shows an example of network construction using our method. In this figure, there are six white nodes and one gray node. The gray node indicates the new node, whereas the white nodes indicate existing nodes. Each white node has the probability that is the summation of the value based on the distance and the value based on the number of connections. The left-side value is the probability of the distance, and the right-side value is that of the number of connections. Using the traditional BA model, the new gray node connects to the nodes that have a higher number of connections.