Write-Once, Transpile-Everywhere: Re-using Motion Controllers of Virtual Humans Across Multiple Game Engines
Transpilation allows to write code once and re-use it across multiple runtime environments. In this paper, we propose a software development practice to implement once the motion controllers of virtual humans and re-use the implementation in multiple game engines. In a case study, three common human behaviors – blinking, text-to-speech, and eye-gaze – were developed in the Haxe programming language and deployed in the free, open-source Blender Game Engine and the commercial Unity engine. Performance tests show that transpiled code executes within 67% faster to 127% slower with respect to an implementation manually written in the game engine target languages.
KeywordsVirtual humans Motion controller Software architecture Transpilation Haxe
The authors wish to thank our student Timo Gühring for his precious help in the development and translation of the TTS and the eye-gaze modules. We also thank Kiarash Tamaddon for the Unity project setup.
- 1.Bouraqadi, N., Mason, D.: Mocks, Proxies, and Transpilation as development strategies for web development. In: Proceedings of the 11th Edition of the International Workshop on Smalltalk Technologies, IWST 2016, pp. 10:1–10:6. ACM, New York (2016)Google Scholar
- 2.Bysiek, M., Drozd, A., Matsuoka, S.: Migrating legacy Fortran to Python while retaining Fortran-level performance through transpilation and type hints. In: 2016 6th Workshop on Python for High-Performance and Scientific Computing (PyHPC), pp. 9–18. IEEE, November 2016Google Scholar
- 3.Cannasse, N.: Using HaXe. In: The Essential Guide to Open Source Flash Development, pp. 227–244. Apress, Berkeley (2008)Google Scholar
- 5.Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1994)Google Scholar
- 6.Hirzel, M., Klaeren, H.: Code coverage for any kind of test in any kind of transcompiled cross-platform applications. In: Proceedings of the 2nd International Workshop on User Interface Test Automation, INTUITEST 2016, pp. 1–10. ACM, New York (2016)Google Scholar
- 9.Ponticelli, F., McColl-Sylveste, L.: Professional HaXe and Neko. Wiley, Hoboken (2008)Google Scholar