When I first created the microgame interface (with win and lose signals as well as width and height) I purposefully wanted to avoid inheritance as to avoid confusion for newer programmers. Right now, though, I think the benefits of inheritance would outweigh this drawback. Here are a couple issues this implementation could solve
- When you run a microgame on its own, the resolution won't be adjusted to your width and height, and you won't be able to see the microgame timer or get any feedback for the win condition. We could implement it so that if the microgame is instanced outside of a MinigameDisplay (as when running a microgame scene on its own), it is then added onto one so these features are accessible
- If we ever want to modify some details of the microgame interface, we can do that on the base microgame class rather than having to modify every single microgame
Here are some potential difficulties that could arise from this implementation
- This base microgame would need a base class. We would most likely need to create 3 of them for Node2D, Node3D and Control, to allow for all 3 major types of scenes in Godot
- We would need to refactor every single microgame in GamutoWare to account for this new system
When I first created the microgame interface (with win and lose signals as well as width and height) I purposefully wanted to avoid inheritance as to avoid confusion for newer programmers. Right now, though, I think the benefits of inheritance would outweigh this drawback. Here are a couple issues this implementation could solve
Here are some potential difficulties that could arise from this implementation