2D game engine write in Java