Ebiten: What's the most effective way to do splitscreen?

Created on 5 Oct 2018  路  4Comments  路  Source: hajimehoshi/ebiten

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?)

question

All 4 comments

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! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hajimehoshi picture hajimehoshi  路  5Comments

nanoslayer picture nanoslayer  路  7Comments

mortenson picture mortenson  路  7Comments

joaowiciuk picture joaowiciuk  路  5Comments

hajimehoshi picture hajimehoshi  路  4Comments