This Is an engine that you can use. Instructions are in game. No credit needed if used.
Credit to @TheMcRau1