How can i create a split screen?

BlitzMax Forums/BlitzMax Beginners Area/How can i create a split screen?

Trangof(Posted 2012) [#1]
Hi everyone:

Im try make a little windows in the program. The windows is to follow a ball out the screen. Im look the setviewport but i don't know how work exactly. I was looking for information but all its confuse for me. Please if you know a tuto, link or code where i can find a full information about I will be very grateful. Thanks.


matibee(Posted 2012) [#2]
SetViewPort just limits the screen drawing to a particular region...



Hold down the LMB to see the whole screen.

But if you want your window scroll to follow the ball you might want to look at SetOrigin too.


xlsior(Posted 2012) [#3]
All the viewport does is clip drawings outside of the rectangular area -- you still need to draw all your graphics in the correct spaces.

For split screen, you can set a viewport, draw all the sprites for the 1st 'screen' inside of it.
Then set the second viewport area, and draw its information in the in the necessary positions.

viewport just cuts off any parts of the images that would otherwise partially stick out of the rectangular area.