• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Making a camera show the contents of another room?

currently im making an interactable menu with simple objects and such, im not drawing a menu, im simply making another camera visible in another place and make it act as a "ingame menu".

So my question is how can i make the camera be in the room the player is in, but show the contents of a different room? is that possible? or should i just generally avoid this.

(apologies if im being unclear)
 

TheouAegis

Member
You can only have one room active at a time. This means you can take a screenshot of the current room (saved to a surface), then go to a new room and draw that screenshot in the new room, but all activity from the old room will cease. And if you are trying to display future rooms, then you would need to have a screenshot pre-made as an asset.
 
You can only have one room active at a time. This means you can take a screenshot of the current room (saved to a surface), then go to a new room and draw that screenshot in the new room, but all activity from the old room will cease. And if you are trying to display future rooms, then you would need to have a screenshot pre-made as an asset.
i see that's unfortunate, so the best way is to not make more rooms so i can use the assets created in the original room, if not i'll have to recreate the menu in every room.
 
Have the contents of both rooms running simultaneously in 1 room but have the other room's content run at a far away coordinate and have the second camera simply point over there. But it's possible there's an easier method to create the effect you're after that doesn't involve rooms like this
 

kburkhart84

Firehammer Games
So you have a room that is the menu, and another room that is the game, and you want to not leave the game room to show the menu room? There are a good amount of tutorials on ways to do this. The following two ways come to mind off the top of my head.

1. Take a snapshot of the game room, make it a surface, make the room persistent(so that nothing changes), and then go to the menu room. That menu room need to show the game room's surface that you saved in the background. You can use a variable to tell the game room whether to show the normal background if you hadn't started playing the game yet, or to show the surface screenshot sprite since you did start playing already.

2. A more complicated way would be to make a fully object based menu. You put an instance of this object somewhere, and it makes the whole menu. This way is more complicated since you aren't making the thing visually in a room editor, rather by code. However, if you did this successfully, you could easily deploy an instance of that object at any time, whenever you wanted. It does mean that you would need to configure a way to pause your game's objects while showing the menu.
 
Have the contents of both rooms running simultaneously in 1 room but have the other room's content run at a far away coordinate and have the second camera simply point over there. But it's possible there's an easier method to create the effect you're after that doesn't involve rooms like this
that's what i've done already. but i wanted to try to have it in a persistent room
 
So you have a room that is the menu, and another room that is the game, and you want to not leave the game room to show the menu room? There are a good amount of tutorials on ways to do this. The following two ways come to mind off the top of my head.

1. Take a snapshot of the game room, make it a surface, make the room persistent(so that nothing changes), and then go to the menu room. That menu room need to show the game room's surface that you saved in the background. You can use a variable to tell the game room whether to show the normal background if you hadn't started playing the game yet, or to show the surface screenshot sprite since you did start playing already.

2. A more complicated way would be to make a fully object based menu. You put an instance of this object somewhere, and it makes the whole menu. This way is more complicated since you aren't making the thing visually in a room editor, rather by code. However, if you did this successfully, you could easily deploy an instance of that object at any time, whenever you wanted. It does mean that you would need to configure a way to pause your game's objects while showing the menu.
the 2nd idea might actually be a good idea, i'll try that, thank you very much!
 
Top