How to make 2 character stay in one screen?

I'm making a 2 player game but i can't keep them both in the screen. One of them control the screen will the other if he can keep up will get left behind and you can't see him anymore.
can anyone tell me how to keep them both in the same screen without anyone get outside of it

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Since you can only control the camera with one actor, you'll need to constrain the actor that falls behind to a minimum distance from the lead actor (that is controlling the camera).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ArmellineArmelline Member, PRO Posts: 5,368
    edited August 2015

    If you don't need to let the players move the camera backwards, i.e. to return to parts of the scene they've already moved beyond, I'd probably do something like this. There are two options - the player further ahead can be allowed to "drag" the player lagging behind, or the player further ahead can only be allowed to move forward when the player lagging behind does.

    Seems like this could be quite handy.

    I'm sure you could adapt it to allow them to move backwards too, but I'm too tired to even think about that now.

  • LovejoyLovejoy Member Posts: 2,078

    I would have the camera pan out so both players are visible at all times. Might take some work getting it set up but would look real nice in the end.

    Fortuna Infortuna Forti Una

  • SocksSocks London, UK.Member Posts: 12,822

    @Lovejoy said:
    I would have the camera pan out so both players are visible at all times. Might take some work getting it set up but would look real nice in the end.

    You'd just need to constrain the camera size to 2* the magnitude between A and B

  • LovejoyLovejoy Member Posts: 2,078

    @Socks said:
    You'd just need to constrain the camera size to 2* the magnitude between A and B

    That qualifies as "Might take some work getting it set up" ;)

    Fortuna Infortuna Forti Una

  • ArmellineArmelline Member, PRO Posts: 5,368

    @Lovejoy said:
    I would have the camera pan out so both players are visible at all times. Might take some work getting it set up but would look real nice in the end.

    I found that to be a less intuitive feeling solution - the players quickly got super-small. Really depends on the exact type of game.

Sign In or Register to comment.