@lanodan Stop using engines and just use frameworks, at least for 2D games. SDL, SFML, Allegro, Pygame, MonoGame, and Love2D (calls itself an engine but is really a framework) are all FOSS. You just need to implement your own physics, level formats, etc but it's really not that hard to do.
And then grab libraries.