# How can I do a Metroid like transition between two tilemaps with Monogame Extended?

I want to do a transition like those in the Metroid games. Here is an example of what i mean: https://www.youtube.com/watch?v=RKJ3MAi0ZI0.
You enter the door, the screen fades to black and the camera scrolls to the next room where the screen fades in again.

I'm using Monogame Extended and i have a TiledMap. I use them like described in the documentation. I have a camera with a view matrix and a projection matrix

   Camera2D camera;

...

public void DrawGame(GameTime gameTime, SpriteBatch spriteBatch)
{
var viewMatrix = camera.GetViewMatrix();
var projectionMatrix = Matrix.CreateOrthographicOffCenter(0, gDevice.Viewport.Width, gDevice.Viewport.Height, 0, 0f, -1f);

tiledMap.Draw(viewMatrix, projectionMatrix);
}


My idea is now to create a second tiledMap to placing them directly next to the first one where the transition occurs. Then i just have to move the camera from one map to the next one. My problem now is that i have no clue how to put them next to each other. From my understanding i somehow have to use the view and projection matrix to draw the tiledMap but i can't figure out how it should work with two tiledMaps.

• Can you show an example of the Metroid transition you want to imitate? – DMGregory May 13 at 20:41
• From the looks of your description, it looks more like the NES Metroid transition that you want to make rather than the door transition. It is however difficult to understand what you've tried if I don't know what you exactly want and what you currently got so far. – Steven May 14 at 6:22
• I edited my post – Ultralord May 15 at 20:30