Jump to content
  • Advertisement
Sign in to follow this  
davethecross

split screen game with html5

This topic is 1926 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This seemed like the most relevant forum to post this:

 

I'm starting a game that will be two player split screen, and I want to know how to do it the most optimally.

 

My first thought was to use two canvas elements side by side, but it seems too sloppy; especially when dealing with things like a menu screen when there is no split screen showing.

 

I was wondering if there was maybe a built in way to deal with this, or if not what should the pseudo code roughly look like?

 

Thanks for reading

Share this post


Link to post
Share on other sites
Advertisement

2 Canvas instances should be fine, I doubt there would be much of a performance gain just by having 1 and it will keep the logic/maths simpler with 2.

 

You can always overlay the other elements on top of the canvases can't you? 

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!