1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

How to show two viewports in separate rooms?

Discussion in 'Programming' started by Pafbar, Aug 17, 2019.

  1. Pafbar

    Pafbar Member

    Joined:
    May 19, 2019
    Posts:
    14
    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!
     
  2. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    1,977
    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).
     
  3. Pafbar

    Pafbar Member

    Joined:
    May 19, 2019
    Posts:
    14
    Ah, ok. Thanks for your response!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice