In hobby development my tip would be that you should definitely use a premade engine - if you want to make a game. If you want to learn, then rolling your own is a good idea
I’ve heard good things about the construct engine (though it’s directx so windows only)
Today I mocked up a small system that lets me rotate sprites that have a pre-set facing direction. Then I can move the sprites along that facing. For example imagine a speed boat that can rotate any direction in a 360degree circle. When you press forward it accelerates along the direction it’s facing.
The math is pretty simple. The sprite should have a facing vector. So if the original boat sprite has it’s prow at the top of the image, a vector of {0,1} is probably good. Then when you do rotations on the boat sprite, apply same rotations to the facing vector.
When the boat needs to move, multiply the vector by the amount to move, add the result to each vertex of the original boat sprite.
Though I’m not making a speed boat game
I’m making a face bit of gui.
My rather bare bones engine has very poor support for translation and rotations. I made my quads render as fast as possible and then didn’t worry about any other uses that might have been required. At some point I’ll come back and clean the interface making it more consistent.



