Performance Optimizations in 2D Games