I have recently been studying and working on implementing my own game engine. I am interested in making my work open source so that others may use and modify it freely. However, I also want to make sure any modified or improved versions of my engine would also be free to use or modify. This led me to believe a copyleft license would be most appropriate. However, despite wanting all future versions and modifications to the engine source code to be open source, I want people to be able to sell or profit off the games made with the engine. In other words, while the source code of the engine for the sake of the engine itself should remain open source, anything made with the engine for the sake of being played should be allowed to be closed source. Is there an appropriate license for this?
The reason I include the architecture tag is to also ask: If no simple license exists, then is there a way to architect my engine such that what I want to accomplish with licensing is possible? For instance, if my engine uses a scripting language with some entity component system written in the engine's compiled code, then maybe the scripts (which a gameplay programmer using my engine would write to dictate game logic) would be allowed to be closed source? But then anyone playing the game would still require the compiled engine in order to run said scripts. I do not know if this particular example could work, but it is just to give an idea of what I am getting at.