I'd love to see a write up on how you handle the code layout for this type of game. Are the game in separate modules, or just different gameloops within one big file? Are you still using box2d for collisions and basic physics?
Usually I use A LOT of classes. ie, for the pinball I have one for the ball, for the flipper, for the bumper, for the sensor...
What I've done here is a main class, and I have in globals:
Dim lGdx As LibGDX
Dim GL As lgGL
...
Dim pinball As cPINBALL
Dim basket As cBASKET
Dim flappy As cFLAPPY
...
Dim IP As lgInputProcessor
Dim GD As lgGestureDetector
I have a cPINBALL class where I do everything related to the pinball (from input processing to rendering and physics, wich are box2D physics), another for the basket, and another for each game.
For the input processing I have something like this in main:
Sub IP_TouchDown(screenX As Int, screenY As Int, Pointer As Int) As Boolean
controlGUI.IP_TouchDown(screenX, screenY, Pointer)
If drawPinball Then
pinball.IP_TouchDown(screenX, screenY, Pointer)
Else if drawbasket Then
basket.IP_TouchDown(screenX, screenY, Pointer)
Else if drawFlappy Then
...
End Sub
The same for the rest of events. And inside pinball I have this event, wich handles all the logic for the pinball game:
Sub IP_TouchDown(screenX As Int, screenY As Int, Pointer As Int) As Boolean
...
End Sub
For the rendering, almost the same, from main I call
Sub LG_Render
'Clears the screen
GL.glClearColor(0.8, 0.8, 0.8, 1)
GL.glClear(GL.GL10_COLOR_BUFFER_BIT)
Dim deltatime As Float
...
deltatime = lGdx.Graphics.deltatime
If drawPinball Then
pinball.render(deltatime)
...
And inside the pinball render event I do all the drawings and updates
Almost the same for the physics
Inside my cPINBALL class I have a World object
Dim World As lgBox2DWorld
And inside the initialize event for the cPINBALL class I have
Dim vGravity As lgMathVector2
World.Initialize(vGravity.set(0, -2), True, "Box2D")
And the events are inside this class
Sub Box2D_BeginContact(Contact As lgBox2DContact)
Sub Box2D_PreSolve(Contact As lgBox2DContact, OldManifold As lgBox2DManifold)
Sub Box2D_PostSolve(Contact As lgBox2DContact, Impulse As lgBox2DContactImpulse)
And the events are raised automatically (I mean, I dont have these events in main)