A Declarative Model for Entity-Component-System Game Descriptions

  • Breno Guimarães UFRJ
  • Geraldo Xexéo UFRJ

Resumo


Introduction: The Entity-Component-System (ECS) architectural pattern has gained wide adoption in game engines for its performance and modularity benefits, yet game-specific logic remains expressed in code even in ECS-based engines, hindering portability and formal analysis of game descriptions. Objective: We investigate whether a complete, executable game can be described as pure structured data by augmenting the ECS model with a declarative reactive rule mechanism, and characterize the resulting model’s computational and semantic properties. Methodology: We define the DECS (Declarative Entity-Component-System) model through a structured runtime state and small-step operational semantics, specifying a three-phase event-driven execution loop. We characterize the Behavior component as a distributed production system, conjectured via an informal correspondence argument to have expressive power equivalent to register machines, and define a conformance criterion that decouples execution semantics from engine capabilities. Results: A reference DECS-conformant engine successfully executes ten complete game descriptions spanning genres from physics puzzles to visual novels without additional game-specific imperative code beyond its declared capability set, providing evidence that the proposed specification is realizable. In addition, the conformance criterion makes executability against any given engine decidable at load time from its declared capability set.
Palavras-chave: Entity-Component-System, Declarative Programming, Data-Driven Game Development, Game Engines

Referências

Bayliss, J. D. (2022). Developing games with data-oriented design. In Proceedings of the 6th International ICSE Workshop on Games and Software Engineering (GAS ’22), pages 30–36. ACM.

Brownston, L., Farrell, R., Kant, E., e Martin, N. (1985). Programming Expert Systems in OPS5: An Introduction to Rule-Based Programming. Addison-Wesley.

da Silva, P., Campos, R., e Rocha, C. (2021). OSS scripting system for game development in Rust. IFIP Advances in Information and Communication Technology, 624:51–58.

Ebner, M., Levine, J., Lucas, S. M., Schaul, T., Thompson, T., e Togelius, J. (2013). Towards a video game description language. In Lucas, S. M., Mateas, M., Preuss, M., Spronck, P., e Togelius, J., editors, Artificial and Computational Intelligence in Games, volume 6 of Dagstuhl Follow-Ups, pages 85–100. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.

Fischbach, M., Wiebusch, D., e Latoschik, M. E. (2017). Semantic entity-component state management techniques to enhance software quality for multimodal VR-systems. IEEE Transactions on Visualization and Computer Graphics, 23(4):1342–1351.

Forgy, C. L. (1982). Rete: A fast algorithm for the many pattern/many object pattern match problem. Artificial Intelligence, 19(1):17–37.

Johansen, M., Pichlmair, M., e Risi, S. (2019). Video game description language environment for unity machine learning agents. In 2019 IEEE Conference on Games (CoG), pages 1–8. IEEE.

Julia, C. e van Rozen, R. (2023). Scriptbutler serves an empirical study of puzzlescript: Analyzing the expressive power of a game dsl through source code analysis. In Proceedings of the 18th International Conference on the Foundations of Digital Games. ACM.

Love, N., Hinrichs, T., Haley, D., Schkufza, E., e Genesereth, M. (2006). General game playing: Game Description Language specification. Technical Report LG-2006-01, Stanford Logic Group.

Marín-Lora, C., Chover, M., Sotoca, J. M., e García, L. A. (2020). A game engine to make games as multi-agent systems. Advances in Engineering Software, 140:102732.

Martens, C. (2015). Ceptre: A language for modeling generative interactive systems. Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment, 11(1):51–57.

Minsky, M. (1967). Computation: Finite and Infinite Machines. Prentice-Hall.

Piette, E., Soemers, D. J. N. J., Stephenson, M., Sironi, C. F., Winands, M. H. M., e Browne, C. (2020). Ludii: The ludemic general game system. In De Giacomo, G., Catala, A., Dilkina, B., Milano, M., Barro, S., Bugarín, A., e Lang, J., editors, ECAI 2020: 24th European Conference on Artificial Intelligence, Including 10th Conference on Prestigious Applications of Artificial Intelligence, PAIS 2020, Proceedings, volume 325 of Frontiers in Artificial Intelligence and Applications, pages 411–418. IOS Press.

Politowski, C., Petrillo, F., Montandon, J. E., Valente, M. T., e Guéhéneuc, Y.-G. (2021). Are game engines software frameworks? A three-perspective study. Journal of Systems and Software, 171:110846.

Pérez-Liébana, D., Liu, J., Khalifa, A., Gaina, R. D., Togelius, J., e Lucas, S. M. (2019). General video game ai: A multitrack framework for evaluating agents, games, and content generation algorithms. IEEE Transactions on Games, 11(3):195–214.

Raffaillac, T. e Huot, S. (2019). Polyphony: Programming interfaces and interactions with the entity-component-system model. Proceedings of the ACM on Human-Computer Interaction, 3(EICS):8:1–8:22.

Schaul, T. (2013). A video game description language for model-based or interactive learning. In 2013 IEEE Conference on Computational Intelligence in Games (CIG), pages 1–8. IEEE.

Thielscher, M. (2010). A general game description language for incomplete information games. In Fox, M. e Poole, D., editors, Proceedings of the Twenty-Fourth AAAI Conference on Artificial Intelligence, pages 994–999, Atlanta, Georgia, USA. AAAI Press.

Thielscher, M. (2017). Gdl-iii: A description language for epistemic general game playing. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, pages 1276–1282. International Joint Conferences on Artificial Intelligence Organization.

Voisard, L., De Freitas Serra, H., Politowski, C., Petrillo, F., e Guéhéneuc, Y.-G. (2025). A mapping study of the entity component system pattern. In Proceedings of the 2025 IEEE/ACM International Workshop on Games and Software Engineering (GAS ’25), co-located with ICSE 2025.

Wiebusch, D. e Latoschik, M. E. (2015). Decoupling the entity-component-system pattern using semantic traits for reusable realtime interactive systems. In 2015 IEEE 8th Workshop on Software Engineering and Architectures for Realtime Interactive Systems (SEARIS), pages 25–32.
Publicado
29/09/2026
GUIMARÃES, Breno; XEXÉO, Geraldo. A Declarative Model for Entity-Component-System Game Descriptions. In: SIMPÓSIO BRASILEIRO DE JOGOS E ENTRETENIMENTO DIGITAL (SBGAMES), 25. , 2026, Goiânia/GO. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2026 . p. 1004-1015. DOI: https://doi.org/10.5753/sbgames.2026.26347.