I'm developing a computer game. It is a single person hobby project. I will implement it in common-lisp. As proof of concept I'm trying to procedurally generate a scene by randomly selecting entries from several tables. The scene should dynamically react to the player.
I intend to use a custom kind of entity component system architecture entities/components and their mutual connections are stored as linked data in RDF. Behavior trees, also stored in the ECS, will allow the game to react to the player.
I was encoding the potential objects for the scene in triples in a custom probabilistic format and creating function in lisp to read this data and to randomly generate the scene.
Now I'm wondering why am I developing a custom data format with limited expressivity if I could encode the data/code in lisp directly (possibly extending lisp in the direction of this particular application along the way)? Has creating a reduced data format any advantages in the context of a project implemented in lisp? Is it something one should only do in non-lisp languages (i.e. the Greenspun's well known quote "any sufficiently complicated C or Fortran program contains an ad-hoc, informally specified, bug ridden, slow implementation of half of common lisp")?
I can think of some reasons, but i can counter them all for this project:
- the project team has members that cannot write lisp
- counter: it is a single person hobby project and probably won't be big with non-lisp team members
- counter: using lisp tools that emit, read, and process lisp code can be created when needed
- the data format should be used in other non lisp languages
- counter: for this project interoperability with non-lisp is not required.
- performance issues
- counter: at this point I don't know if it will perform terribly; we should use measurements to find if there are issues; and premature optimization is not wise
- counter: high performance code can be written using lisp
- counter: if needed we can simplify later
- the game might be a nice test case for a custom built triples store and for the custom entity component system kind of architecture
- granted, however, both are also future hobby projects; the ECS architecture can evolve along side the game and the triples store has other uses.