**6. Global collaborative virtual environment (LIRKIS G-CVE)**

Based on the above information, the global collaborative web system LIRKIS G-CVE [48] was implemented as the main working platform for these systems in the LIRKIS laboratory (**Figure 12**). The system was created as a result of the web XR system architectural model formalization. The purpose of the system is to provide a globally accessible virtual environment through web browsers. LIRKIS G-CVE uses a client–server architecture to provide access to the shared environment to multiple clients in real time.

The main part of the system is a remote web server. This manages communication among clients and mediates their interactions in a shared virtual environment [49]. The server uses three application software frameworks: Node.js, Express.js, and Networked-Aframe implemented in the JavaScript scripting language. These

*Collaborative XR Systems and Computer Games Development DOI: http://dx.doi.org/10.5772/intechopen.105555*

**Figure 12.** *LIRKIS G-CVE architecture.*

frameworks ensure the execution of services in the system application background. Node.js provides real-time parallel client connections and it manages asynchronous client–server data communication. Express.js provides server rest APIs to handle HTTP requests from clients during a connection. Networked-Aframe manages the sharing and synchronization of the virtual environment among clients, including all virtual 3D objects and interactions.

The second part presents the client's web interface, which is displayed through a web browser and performs asynchronous rendering of the shared virtual environment. *A-Frame* technology is used in the implementation of this interface with regard to the guaranteed support of several platforms and the development of interactive virtual environments. *A-Frame* is based on the Three.js visualization library, which provides an application interface for creating 3D computer graphics in a web browser. Using *A-Frame*, virtual environments are created at the HTML level and their functionality is implemented in JavaScript. Using asynchronous JavaScript (AJAX), it is possible to render all changes in the environment simultaneously without the need to reload the entire interface.

Communication between client and server is based on the *WebSocket* protocol. Each collaborative virtual environment is accessible to clients under a specific URL. After the client connects, the server requests his data and then provides it to other

#### **Figure 13.** *Example of BUS simulator virtual environments.*

active clients. The amount of data transferred among clients depends on the characteristics of the shared environment. These properties include interaction levels, the number of connected clients, and the amount of data shared. Client–server communication depends on the width and speed of the network connection. This is why in case of long-term inactivity, the inactive clients are automatically disconnected. This prevents the server from being overloaded by inactive network entities. If the client's connection is terminated, the server removes its virtual entity (including the avatar) from the environment and closes the connection.

Part of the implementations in the previous works and projects of the LIRKIS laboratory was the creation of virtual collaborative environments for the purpose of

**Figure 15.** *Example of a virtual drone game.*

**Figure 16.** *Example of virtual DCI OpenLAB environments.*

a global collaboration of users in gamified form as well. Each of the training games supports a cross-platform approach and user interaction. As an example, we present a bus simulator (**Figure 13**), a gamified training–testing application on safety in the construction industry (**Figure 14**), a collaborative environment for training work with drones in a playful way (for artificial intelligence training data) (**Figure 15**), and an environment for testing multiuser interaction (department virtual OpenLAB environment, DCI FEEI TU Košice) (**Figure 16**).
