Hey there!
I'm wondering how I could best implementation splitscreen (up to 4 players) with Ebiten. My assumption would be that I'd have to ensure each draw of each sprite clips it if it's outside the screen boundary, but I thought I'd raise an issue and see if there was a simpler or more effective way first (such as writing to a surface? or maybe a GL option exists to clip draw calls in a region of the screen?)
Hi,
Clipping is not supported in Ebiten yet. The simplest way is to create 4 offscreen image objects, render something on the offscreens, and render the offscreens to the screen.
Alright, thank you :)
Feel free to close this if you wish!
Sure, if you find any problems, feel free to reopen this :-)
@hajimehoshi FYI, on Windows, there was no noticeable change in frame usage (stayed around 6%) and on WASM/Chrome/Windows, usage went from about 18% to 28-36% when rendering multiple screens.
So this method is perfectly reasonable I think! :)