• 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!

How to show two viewports in separate rooms?

P

Pafbar

Guest
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).
 
P

Pafbar

Guest
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