Base Code for 2D Java Games