I’ve put some of my common code here, but you might be better served by an engine like Bevy or Fyrox.