Skip to main content

Building Game Scripting DSL’s with the Metacasanova Metacompiler

  • Conference paper
  • First Online:
Book cover Intelligent Technologies for Interactive Entertainment (INTETAIN 2016 2016)

Abstract

Many video games rely on a Domain Specific Language (DSL) to implement particular features such as artificial intelligence or time and synchronization primitives. Building a compiler for a DSL is a time-consuming task, and adding new features to a DSL is hard due to the low flexibility of the implementation choice. In this paper, we introduce an alternative to hand-made implementations of compilers for DSLs for game development: the Metacasanova metacompiler. We show the advantages of this metacomplier in terms of simplicity of designing and coding requirements, and in terms of performance of the resulting code, whose efficiency is comparable with hand-made implementations in commercial general purpose languages.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Abbadi, M., Giacomo, F., Cortesi, A., Spronck, P., Costantini, G., Maggiore, G.: Casanova: a simple, high-performance language for game development. In: Göbel, S., Ma, M., Baalsrud Hauge, J., Oliveira, M.F., Wiemeyer, J., Wendel, V. (eds.) JCSG 2015. LNCS, vol. 9090, pp. 123–134. Springer, Heidelberg (2015). doi:10.1007/978-3-319-19126-3_11

    Chapter  Google Scholar 

  2. Bioware. Nwscript api reference (2002). http://www.nwnlexicon.com/

  3. Blizzard Entertainment. Jass api reference (1999). http://jass.sourceforge.net/doc/

  4. Book, E., Shorre, D.V., Sherman, S.J.: The cwic/36o system, a compiler for writing and implementing compilers. SIGPLAN Not. 5(6), 11–29 (1970)

    Article  Google Scholar 

  5. Czarnecki, K., Eisenecker, U.W.: Generative Programming: Methods, Tools, and Applications. ACM Press/Addison-Wesley Publishing Co., New York (2000)

    Google Scholar 

  6. Games, F.: Civlization iv scripting api reference, October 2008. http://wiki.massgate.net/Our_Python_files_and_Event_Structure

  7. Di Giacomo, F.: Casanova 2.5 source code (2016). https://github.com/vs-team/metacompiler/tree/master/Sources/Content/Content/CNV3

  8. Kelly, J.P., Botea, A., Koenig, S.: Offline planning with hierarchical task networks in video games. In: AIIDE (2008)

    Google Scholar 

  9. Maggiore, G., Bugliesi, M., Orsini, R.: Monadic scripting in f# for computer games. In: TTSS 115th International Workshop on Harnessing Theories for Tool Support in Software, p. 35 (2011)

    Google Scholar 

  10. Maggiore, G., Spanò, A., Orsini, R., Bugliesi, M., Abbadi, M., Steffinlongo, E.: A formal specification for casanova, a language for computer games. In: Proceedings of the 4th ACM SIGCHI Symposium on Engineering Interactive Computing Systems, EICS 2012, pp. 287–292. ACM, New York (2012)

    Google Scholar 

  11. Massive Entertainment. World in conflict script reference, September 2007. http://civ4bug.sourceforge.net/PythonAPI/

  12. Microsoft Corporation. Msdn. https://msdn.microsoft.com/en-us/library/windows/desktop/ms686774(v=vs.85).aspx

  13. Sheard, T., Benaissa, Z., Pasalic, E.: Dsl implementation using staging and monads. In: Second Conference on Domain-Specific Languages DSL 1999, pp. 81–94. ACM (1999)

    Google Scholar 

  14. Sweeney, T., Hendriks, M.: Unrealscript Language Reference. Epic MegaGames Inc., Cary (1998)

    Google Scholar 

  15. Tulip, J., Bekkema, J., Nesbitt, K.: Multi-threaded game engine design. In: Proceedings of the 3rd Australasian conference on Interactive Entertainment, pp. 9–14. Murdoch University (2006)

    Google Scholar 

  16. van Deursen, A., Klint, P., Visser, J.: Domain-specific languages: an annotated bibliography. SIGPLAN Not. 35(6), 26–36 (2000)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Francesco Di Giacomo .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering

About this paper

Cite this paper

Di Giacomo, F., Abbadi, M., Cortesi, A., Spronck, P., Maggiore, G. (2017). Building Game Scripting DSL’s with the Metacasanova Metacompiler. In: Poppe, R., Meyer, JJ., Veltkamp, R., Dastani, M. (eds) Intelligent Technologies for Interactive Entertainment. INTETAIN 2016 2016. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 178. Springer, Cham. https://doi.org/10.1007/978-3-319-49616-0_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-49616-0_22

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-49615-3

  • Online ISBN: 978-3-319-49616-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics