This is an engine I made to incorporate into a much more complex project that I decided to share. Feel free to use this in any of your projects.