Create "safe area" below the canvas

0 favourites
  • 2 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Ok, my question isn't just about "below the canvas", it's about all sides:

    How can I manage to shrink the canvas so that I have a black area where I could place ad banners without the risk of them covering game UI elements.

    Below the game you can do this for a 60px area like this: window.innerHeight = window.innerHeight - 60;

    Of course, this is only intended as an example and is not a good idea to override innerHeight.

    However, Construct's resize function uses window.innerHeight.

    The easiest way would be to wrap a container around the canvas. Reserve a space there and the canvas will only take up the space that is still available. Is something like this possible?

    Or is there another approach that makes more sense? In worst case, I would also be satisfied with the bottom and the right side only :)

    Thanks in advance!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello. Are you making any progress?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)