In LibGDX, what is the connection between these concepts: stage, camera, viewport, batch (spritebatch), projection matrix, tiledmap?
Currently my game has
3 stages:
- UI stage
- entity stage
- tiledmap stage
2 cameras:
- hud camera (for UI)
- map camera (for map)
2 batches:
- spritebatch for rendering particles
- batch from the tiled map renderer (used in map and entity stage)
3 viewports:
- for entity stage
- for UI stage
- for tiled map stage
I am very confused at this point at how all these components connect. My whole game works, except when I resize my main menu screen, the particles in my next screen get drawn in the wrong position. Meaning that the resize information does not reach the particle drawer.
I feel like the reason I am having a lot of trouble debugging it, is because I don't understand well enough how they relate to each other.
Can anyone help me clarifying this structure?