How to show two viewports in separate rooms?

Pafbar

Member
Hello! I'm making a split-screen multiplayer game but can't figure out how to show two different rooms in the two separate viewports i am using. Any suggestions would be greatly appreciated!
 

NightFrost

Member
Only one room can be active at a time, so you'll have to treat one room as two separate play areas. After all, values you use to limit player and camera movement are just that, numbers. Instead of designating your play field from zero to room size, you designate two sets of numbers, one for each player, and use those to clamp stuff. Room size itself is in the end just an arbitrary number. It only serves to give a handy global builtin variable to refer to (and sets the region where background image is visible, if you're using any).
 

Pafbar

Member
Only one room can be active at a time, so you'll have to treat one room as two separate play areas. After all, values you use to limit player and camera movement are just that, numbers. Instead of designating your play field from zero to room size, you designate two sets of numbers, one for each player, and use those to clamp stuff. Room size itself is in the end just an arbitrary number. It only serves to give a handy global builtin variable to refer to (and sets the region where background image is visible, if you're using any).
Ah, ok. Thanks for your response!
 
Top