With what we have learned so far, let's try to completely redo our game scene to use Box2D instead of our old code. First, check whether the Box2D library is retrieved with Gradle, as explained earlier in this chapter. We will retain all the old source as well as that will still be our real game. Create a new folder Box2D within the current package and create a new
ThrustCopterSceneBox2D class, extending
BaseScene within this new folder. So, all our Box2D-related classes will be placed in this new package,
com.csharks.thrustcopter.box2d. We will reuse some of the code from the original
ThrustCopterScene class, but we will change the code for movement, rendering, and creation of items.