PurpleKingdomGames / indigo

An FP game engine for Scala.
https://indigoengine.io/
MIT License
648 stars 60 forks source link

Engine Plugins #764

Open davesmith00000 opened 2 months ago

davesmith00000 commented 2 months ago

A good suggestion came in today from @sherpal.

What if you'd like to extend the behaviour of Indigo, need access to some of its internal machinery, and would like to do so without polluting your game logic with impure code / processes?

The main use case seems to be being able to enqueue events directly from an external source without going around the game loop, but I can also imagine that it would be fun to be able to build extensions, such as:

This also may provide some interesting possibilities for the future of how Indigo itself is organised. Perhaps the core can be slimmed down and replaced with plugins? What if this is how the Tyrian bridge or Tyrian integration is done in the future?

Feels like an idea worth exploring.