Shared screen, divided in two help

I want to have a game mode with shared screen half the Y axis for each player so I used collection factory for spawning the two game “engine” instances and passed parameters for changing scale and position. Turns out the GUI component is completly unnafected, which may be a desired choice in the api but as it is hapenning I don’t know how to proceed to place the two game collections fitting the screen considering that its the same collection for the single player which takes the whole screen, any solutions? (I don’t have the game as I’m still doing the poc of this feature)

1 Like

I don’t know much about split-screen techniques, but I don’t think this is the right way to do it.
In theory, you could have two separate cameras, modify the viewport rectangle to split it in half for each, and find a way to render it. Alternatively, you can render the result to single render target like a mesh. This way, two camera has the different GUI space.

2 Likes

game will be 2d only, sorry for not mentioning it earlier. Your suggestions still apply? Thanks for the quick response in advance

Sure, you should use camera anyway.

This example might be old but it is a good starting point:
https://britzl.github.io/publicexamples/camera/index.html

2 Likes

Beside split-screen could be made by displaying views from two cameras on one “canva” or “render target” (about joining few textures on render target, you can try following my tutorial: https://www.youtube.com/watch?v=sLFHDihszfc) - it will not solve your GUI issue. As GUI is rendered at the end, fullscreen, unless you modify the render script. So you can for example make one GUI with “duplicated GUIs” and have some mechanics to display both players data there - or you can make GUI using sprites (so in world, e.g. around your character), so that this way, they will be rendered in your views :wink: There are many, many ways to accomplish what you want :slight_smile:

1 Like

hey I like your videos! thank you for the response

1 Like

Ah, found it - I knew there was a split screen example :smiley:

1 Like