Decoupling XR Business Logic from Game Engines: An Event-Driven Architecture for VR Safety Training
DOI:
https://doi.org/10.5753/jbcs.2026.8239Keywords:
Virtual Reality, Event-Driven Architecture, Occupational Safety Training, Software Architecture, Construction Safety, NR-18, NR-35, Unity, Engine IndependenceAbstract
Virtual Reality (VR) safety training is usually evaluated as a learning intervention; the software architecture that delivers it is seldom the object of study. This paper takes that architecture as its design artefact: an event-driven organisation in which typed events and shared data contracts provide the primary coordination channel between layers, so that training rules, scoring, logging, and scenario data execute independently of the game engine. The design combines a typed EventBus, engine-independent C# domain cores, a JSON scenario model, and host-specific adapters, and was instantiated in Unity with the Meta XR SDK for a construction-safety case study covering the Brazilian norms NR-18 and NR-35. Evaluation relies on shared source compiled for three hosts that load one canonical scenario document: the Unity prototype, a Command Line Interface (CLI) harness, and a desktop authoring tool. The shared library, SafetyProto.Shared, passes 46 headless tests with 70.3% line coverage, and adding scenarios required no C# edits. Engine and SDK concerns can be separated from domain behaviour without giving up an executable immersive prototype.
Downloads
References
Abotaleb, I., Hosny, O., Nassar, M., Bader, S., Elrifaee, A., Ibrahim, M., El Hakim, M., and Sherif, M. (2022). An interactive virtual reality model for enhancing safety training in construction education. Computer Applications in Engineering Education, 31(2):324-345. DOI: 10.1002/cae.22585.
Ackermann, P. (2023). AR patterns: Event-driven design patterns in creating augmented reality experiences. In Virtual Reality and Mixed Reality: 20th EuroXR International Conference (EuroXR 2023), volume 14410 of Lecture Notes in Computer Science, pages 93-114, Cham. Springer. DOI: 10.1007/978-3-031-48495-7_6.
Akindele, N., Taiwo, R., Sarvari, H., Oluleye, B. I., Awodele, I. A., and Olaniran, T. O. (2024). A state-of-the-art analysis of virtual reality applications in construction health and safety. Results in Engineering, 23:102382. DOI: 10.1016/j.rineng.2024.102382.
Alzarrad, A. A., Miller, M., Durham, L., and Chowdhury, S. (2024). Revolutionizing construction safety: introducing a virtual reality interactive system for training US construction workers to mitigate fall hazards. Frontiers in Built Environment, 3:1320175. DOI: 10.3389/fbuil.2024.1320175.
Associação Brasileira de Normas Técnicas (2024). ABNT NBR 16325-1: Proteção contra quedas de altura -- dispositivos de ancoragem -- parte 1: Requisitos e métodos de ensaio [protection against falls from heights -- anchorage devices -- part 1: Requirements and test methods]. Technical report, ABNT. Available at: [link].
Brooke, J. (1996). SUS: A `quick and dirty' usability scale. In Jordan, P. W., Thomas, B., Weerdmeester, B. A., and McClelland, A. L., editors, Usability Evaluation in Industry, pages 189-194. Taylor and Francis, London. DOI: 10.1201/9781498710411-35.
Castet, E., Termoz-Masson, J., Vizcay, S., Delachambre, J., Myrodia, V., Aguilar, C., Matonti, F., and Kornprobst, P. (2024). PTVR - a software in Python to make virtual reality experiments easier to build and more reproducible. Journal of Vision, 24(4):19. DOI: 10.1167/jov.24.4.19.
Eugster, P. T., Felber, P. A., Guerraoui, R., and Kermarrec, A.-M. (2003). The many faces of publish/subscribe. ACM Computing Surveys, 35(2):114-131. DOI: 10.1145/857076.857078.
Gazis, A. and Katsiri, E. (2024). E-polis: An innovative and fun way to gamify sociological research with an educational serious game - game development middleware approach. International Journal of Education and Information Technologies, 18:20-32. DOI: 10.46300/9109.2024.18.3.
Guo, X., Liu, Y., Tan, Y., Xia, Z., and Fu, H. (2024). Hazard identification performance comparison between virtual reality and traditional construction safety training modes for different learning style individuals. Safety Science, 180:106644. DOI: 10.1016/j.ssci.2024.106644.
Hevner, A. R., March, S. T., Park, J., and Ram, S. (2004). Design science in information systems research. MIS Quarterly, 28(1):75-105. DOI: 10.2307/25148625.
Hohpe, G. and Woolf, B. (2003). Enterprise Integration Patterns: Designing, Building, Deploying Messaging Solutions. Addison-Wesley Professional. Book.
Isingizwe, F., Eiris, M., and Jalil Al-Bayati, A. (2024). Enhancing safety training engagement through immersive storytelling: A case study of construction safety in virtual reality. Safety Science, 179:106631. DOI: 10.1016/j.ssci.2024.106631.
Joshi, S., Hamilton, M., Warren, R., Faucett, D., Tian, W., Wang, Y., and Ma, J. (2021). Implementing virtual reality technology for safety training in the precast/prestressed concrete industry. Applied Ergonomics, 90:103286. DOI: 10.1016/j.apergo.2020.103286.
Kennedy, R. S., Lane, N. E., Berbaum, K. S., and Lilienthal, M. G. (1993). Simulator sickness questionnaire: An enhanced method for quantifying simulator sickness. The International Journal of Aviation Psychology, 3(3):203-220. DOI: 10.1207/s15327108ijap0303_3.
López, M., Terrón-Ibáñez, S., Lombardo, J., and Gonzalez Crespo, R. (2021). Towards a solution to create, test and publish mixed reality experiences for occupational safety and health learning: Training-MR. International Journal of Interactive Multimedia and Artificial Intelligence, 7:212-223. DOI: 10.9781/ijimai.2021.07.003.
Man, S. S., Wen, H., and So, B. C. L. (2024). Are virtual reality applications effective for construction safety training and education? A systematic review and meta-analysis. Journal of Safety Research, 88:230-243. DOI: 10.1016/j.jsr.2023.11.011.
Martusciello, F., Muccini, H., and Forgione, A. (2025). Gamified AR and supervised AI for cultural heritage: The amiternum site experience. In Proceedings of the TC26 MetroArcheo Conference 2025 on Metrology for Cultural Heritage, pages 521-526, Bergamo, Italy. IMEKO. DOI: 10.21014/tc26-2025.097.
Ministério do Trabalho e Emprego (2021). Norma regulamentadora 35 -- trabalho em altura, portaria mte 735, de 6 de outubro de 2021 [regulatory standard no. 35 -- work at heights]. Technical report, Ministério do Trabalho e Emprego, Governo Federal do Brasil. Available at: [link].
Ministério do Trabalho e Emprego (2022). Norma regulamentador 18 -- segurança e saúde no trabalho na indústria da construção portaria sit 163, de 27 de junho de 2022 [regulatory standard no. 18 -- occupational safety and health in the construction industry]. Technical report, Ministério do Trabalho e Emprego, Governo Federal do Brasil. Available at: [link].
Ministério Público do Trabalho and Organização Internacional do Trabalho (2024). Observatório de segurança e saúde no trabalho - SmartLab [observatory of occupational safety and health -- smartlab]. [link]. Accessed: 2026-04-16.
Moreira, F. G. P., de Oliveira, C. P., and Farias, C. A. (2024). Workplace accidents and the probabilities of injuries occurring in the civil construction industry in Brazilian Amazon: A descriptive and inferential analysis. Safety Science, 174:106478. DOI: 10.1016/j.ssci.2024.106478.
NISO (2024). CRediT - contributor roles taxonomy. [link]. ANSI/NISO Z39.104-2022. Accessed: 2026-05-02.
Nykänen, M., Teperi, A.-M., et al. (2020). Implementing and evaluating novel safety training methods for construction sector workers: Results of a randomized controlled trial. Journal of Safety Research, 75:205-221. DOI: 10.1016/j.jsr.2020.09.015.
Obeid, M. F., Ewais, A., and Asia, M. R. (2025). NursingXR: Advancing nursing education through virtual reality-based training. Applied Sciences, 15(6):2949. DOI: 10.3390/app15062949.
Obukhov, A. D., Volkov, A. A., and Nazarova, A. O. (2022). Microservice architecture of virtual training complexes. Informatics and Automation, 21(6):1265-1289. DOI: 10.15622/ia.21.6.7.
Peffers, K., Tuunanen, T., Rothenberger, M. A., and Chatterjee, S. (2007). A design science research methodology for information systems research. Journal of Management Information Systems, 24(3):45-77. DOI: 10.2753/MIS0742-1222240302.
Quamara, M., Capra, L., Villani, V., Carlevaro, C., Celiktutan, O., Peretti, A., Piazzola, M., Ruo, A., Sabattini, L., Schmuck, V., and Vigan`o, L. (2024). Towards a modular architecture for eXtended reality systems. In 8th International Conference on Artificial Intelligence and Virtual Reality. Springer. DOI: 10.1007/978-981-96-1154-6_17.
Scorgie, D., Feng, Z., Paes, D., Parisi, F., Yiu, T. W., and Lovreglio, R. (2024). Virtual reality for safety training: A systematic literature review and meta-analysis. Safety Science, 171:106372. DOI: 10.1016/j.ssci.2023.106372.
Simões, B., De Amicis, R., Barandiaran, I., and Posada, J. (2018). X-Reality system architecture for industry 4.0 processes. Multimodal Technologies and Interaction, 2(4):72. DOI: 10.3390/mti2040072.
Witmer, B. G. and Singer, M. J. (1998). Measuring presence in virtual environments: A presence questionnaire. Presence: Teleoperators and Virtual Environments, 7(3):225-240. DOI: 10.1162/105474698565686.
Xu, Z. and Zheng, N. (2021). Incorporating virtual reality technology in safety training solution for construction site of urban cities. Sustainability, 13(1):243. DOI: 10.3390/su13010243.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Abner Augusto Ramos Macedo Antunes de Souza, José de Paula Barros Neto, Creto Augusto Vidal, Joaquim Bento Cavalcante Neto

This work is licensed under a Creative Commons Attribution 4.0 International License.

