1 decade ago by erfuller
Let's say our canvas is 1000x400, and the first and last 200 pixels are for UI. Leaving us with a 600x400 game area, and two 200x400 UI areas. This is if your using entities and not using HTML divs outside the canvas for buttons and whatnot.
What is the bets way to achieve this with impact?
I see that you can set the camera x,y, so that takes care of positioning the game within the game area.
Should I just draw a block box over the two sides after everything is drawn and call it a day?
What I really need is just a view port inside the canvas, or like a clip while drawing the game, or possibly a second canvas to draw the "image" of the game onto afterwards?
Not sure. I'm hoping someone has run into that already.
What is the bets way to achieve this with impact?
I see that you can set the camera x,y, so that takes care of positioning the game within the game area.
Should I just draw a block box over the two sides after everything is drawn and call it a day?
What I really need is just a view port inside the canvas, or like a clip while drawing the game, or possibly a second canvas to draw the "image" of the game onto afterwards?
Not sure. I'm hoping someone has run into that already.