**2. Comparison of game engines**

Game engines have the graphics and physics engines to build better and more realistic simulation. In this section, three commonly used open-source game engines are compared. For example, the commonly used software for game development is namely: Unity3D, Unreal 4 Engine, and CryEngine.

There exists few open source game engine software that provides excellent features and developing tools. Some of the common characters of a game engine are rendering, physics (2D and 3D rigid body), scripting, audio and animation. Depending on the requirements, these game engine software use traditional programming method that requires basic coding to high-level sandbox engine that provides "drag and drops" interface. The main objective is to simulate an ROV operation using high-level sandbox game engine for the ease of usability. The options are more toward the sandbox engine and the more common software for game development such as Unity3D, Unreal Engine and CryEngine. Although the software provides developers with a "drag and drop" interface, the features of each software somehow differ from one another. A brief comparison of various game engines is given below.

Unity3D was first released in 2005. It uses mostly JavaScript or C# or managed code tool chain that makes it simpler to support and develop new workflows and tools. It has large supporting communities that include the asset store for downloading different game characters, particle and sound effects. Due to its popularity, there exists a good educational material and large active user. However, the free version of Unity does not have Profiler that allows the programmer to optimize the game and check the time spent on rendering, and animation during the game. Unity3D supports around 21 platforms (PC, Web, Console, Mobile, etc.) as compared to Unreal Engine 4 supporting only around six platforms. Additionally, the 3D models in Unity3D can merely import as game assets into the software thus improving the efficiency of development.

Unreal Engine was first released in 1998. It provides developers with powerful tools such as access to full source code, simulates and immerse view, persona animation, and cascade visual effects. It is used in a custom workstation with better and optimized performance that implies higher cost and complexity. Unreal has much more extensive download than Unity3D as it requires visual studio for its programming environment and accepts only C++ development language. Unreal engine can produce high-quality graphics with advanced dynamic lightings making it a plus point for the game engine. However, the script used in Unreal Engine 4 can only be written in C++, which can be a drawback for beginners. Similar to Unity3D, Unreal Engine 4 has an asset store to download different game assets. However, the user community is not as large as Unity3D.

CryEngine started in 2002. It is another modern game engine that provides superb features that will create great realistic gameplay. With its pixel accurate displacement mapping, it allows developers to craft and modify a game as precise as possible. Its excellent graphics capabilities exceed those in Unity3D and Unreal Engine. However, a drawback from this game engine is that it requires a slightly higher learning curve before one can use the game engine efficiently and it may be harder for those with no game development background.

It is notable that these three game engines provide great features for the most development process. It can be quite subjective in the selection decision. Depending on the development objectives and requirements, one may pick Unity3D for its capabilities in developing 2D and 3D games, Unreal Engine for its powerful tools or CryEngine for its extreme graphics capabilities. Fortunately, these game engines are freely available for education and research except for Unity3D which requires Pro version for advanced features. On the other hand, the Unreal Engine and CryEngine require a slightly higher learning curve and posing difficulty for most beginners. Based on the following guidelines below, the free version of Unity3D that contains most of the functions will be used (at least for the beginning phase of the project) in developing a simulator for ROV pipeline tracking as it is easy to use, free for research purpose and the presence of wide user community. It may not be the best choice for every programmer, but during the development of the virtual reality simulator, there are no major problems encountered, and hence the choice was good enough.


**Figure 1.** Steps to develop ROV pilot simulator.

The basic functions of the Unity3D Interface such as creating GameObjects, basics scripts and GameObjects for manipulation will be presented. The virtual environment and writing the scripts for the ROV's control system and manipulators will then follow. Assistance can be sought through the Unity3D manual found online or via Unity3D's online community and forums. As shown in **Figure 1**, the basic steps to develop the simulator can be seen. The simulator designed must be able to facilitate training of an ROV pilot. The environment of a typical pipeline inspection will be mimicked. After the leak is detected, the ROV will flash a bright red light indicating danger. The pilot will take control of the ROV and press the shutdown button of the BlowOut Preventer (BOP) to stop the leak and the flashing red light. After that, the pilot can continue the control of the ROV to carry out the autonomous inspection tasks. All controller inputs by the pilot are controlled via the joystick controller.
