Prolog Game Engine
Goal and motivation
The project aims to build a framework for computer games in Prolog. This language is not a typical one for implementing games. Although, as language of logic programming it can describe rules very well. And rules are the building blocks of games. In addition, the following things comming out of the Prolog world are very helpful building games:
- Some algorithms of classical AI like decision trees, knowledge modelling
- Probabilitic programming
- Qualitative Simulation
- Logical description of structures
- Modelling of causality using logical statements
So it seems valuable to try out this things for gaming. If a working prototype can be done then this technology may be the base for bigger projects. But in the first step, trying out things by building a small adventure game.
Despite beeing a experiment it shall be a playful game. It should not be seen as a competitor to good Indie games or commercial games, of course.
The ECLogicPlay is intended for building adventure games or role playing games. This reason is that telling stories is an important and ground theme of games I deal with. Graphics is not the first part as this project want to build a prototype. The resulting game shall have this properties:
- Multiplayer, but not in the first version
- Adventure game in the SF domain
- There shall be roles with different level of action: games and telling gamer (authors)
- Persitence is implemented using RDF and Prolog
- In the first version the game may be a text adventure
The meaning of the actors or roles can be seen in diagram “Use Cases”
The architecture (see diagram “Elements”) will contain a block controling the roles acting in the game. There is a simulation computing the development of the world. Thats done by applying rules to the current state of the world, which results in the next state. The Block Script includes the computation of the overall story line, which is influenced by the autors. To save game state, character data and other things is task of the Persistence.
The approach has some special properties:
- The autors prescribe the story of the game world. They do this by defining behaviour rules of important roles and events for a interval of time in the future of the game. This is called the script. Important roles can be leaders, commanders or other persons with big effect.
- The autors are games as all others, they play the game and can log in or log off like all others.
With the mapping
- all other elements = Prolog
the following deployment diagram can be drawn. SWI Prolog has a built-in predicates for creating a web server. In this way Prolog can implement HTTP directly.
- Step: Only one player, which plays a given story, no persistence, no user management, only text
- Step: < 10 Players playing in a common game universe, so user management included
- Step: Grafiks and persistence