10 years ago
by Silent
Hello.
Is there a way to only use, say, 70% of the canvas' width for displaying a level?
I want to use the other 30% for a menu.
If any draws occur in that area, they are never actually visible - because they are covered by a menu. It would be better if they never occurred in the first place.
- Michael
10 years ago
by Joncom
Let's pretend you want the left 30% to be menu, and the right 70% to be the rest of the game. You could just draw your game normally, but offset the camera to the right, so it's centered over the "70%" part. Then draw your menu on top.
If for whatever reason this easier approach is not suitable, you could start playing with rendering different things to different parts of the canvas. Maybe take a look at how the plugin mentioned
here does it.
10 years ago
by Silent
Wonderful, seems like the split screen plugin is just what I'm after!
Generally, you are right - I could just offset the camera and check if entities fall into the render zone. The problem is that I'm using a repeating background map that I cannot control so tiles are drawn under the menu anyway.
It's not a huge issue, but it's a bit of a performance hit that can get pretty significant in this case.
Hopefully the split screen plugin will solve it.
Thanks again!
Page 1 of 1
« first
« previous
next ›
last »