Window vs. Viewport vs. Canvas vs. Project Properties Window

0 favourites
  • 6 posts
From the Asset Store
Get Ready for the New Wave of "Bottom Screen" Games!
  • System Expressions Concepts of Window vs. Viewport vs. Canvas

    The above 3 vs. Project Property Window

    Looking at the System Expressions manual section, I can not figure out the exact relationship between the above four concepts. I tried searching the forum and the manual several times each with different strings and did not find answers.

    I am fairly certain I know what a layout is and how its dimensions relate to the project properties window dimensions.

    Regarding the rest, I am not even certain that the two windows concepts (the project property and the system expression) match up. My inability to understand all this recently got compounded when I could not even get adequate or even understandable results with some basic tests after reading the basic Supporting Multiple Screen Sizes tutorial.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry - forgot to say "Sorry for the nooby bother." and "Please, help!".

  • The viewport is the currently visible area of the game, with a fullscreen in browser setting other than off, letterbox scale, integer letterbox scale, the aspect ratio of the game will match the aspect ratio of the browser window.

    The windowwidth and windowheight expression I never actually understood, so I cannot be of help, but te viewport expressions should be enough to get you started into supporting multiple screen size.

    The project proprieties window size is the unscaled size of your gamescreen in pixels, due to how C2 works with most of his screen scaling settings, the aspect ratio of it is more important, so I suggest never go over 800 px in size since some websites would have problem with it otherwize, keep in mind that a lower window size won t affect the graphic quality of your game normally, as long as the project propriety quality setting is set to high quality (which is by default).

    Hope that helps.

  • Aphrodite

    Thanks a lot for the prompt help.

    The windowwidth and windowheight are recommended in the tutorial that I mentioned earlier. The reason I wanted to test large resolutions is because of the largest ipad (2048/1536) which is also mentioned in the same tutorial and because the prospect of downscaled graphics seems far more appealing than upscaled, especially because my first project was going to be very static in function and appearance. I was trying to not rely on the letterbox option, because of the unappealing black bars (again as suggested by the tutorial). Additionally, my intended project thrives on maximizing use of screen space.

    Regarding what you say about the viewport expressions, I am perplexed, because of the System Expressions manual entry which states that they "return the viewport boundaries in layout co-ordinates of a given layer". This seems to mean visibility of only unscaled coordinates such as those of the Project Properties Window. I will try it anyway.

    I am sorry that there is much that I do not understand.

    Thanks again.

  • I discovered two initial very nooby reasons for my inability to test properly. The first is that I forgot that the pixel objects' default origins are at their center. The second is that I was very stupidly using solid colored squares, the position and exact shape of which is impossible to determine, if they abut the border of the window or overlap it. I fixed this problem by using a shape with a very visible center, but the windows expressions still do not work, at least not as simply as is implied in the tutorial.

    The viewport expressions, however, seem to be working and seemingly because they more directly manipulate the sprites in the original pixel scale of the layers or the project.

    Thanks again Aphrodite for the help that you were able to provide including all your advice.

  • I seem to have been using the windows expressions with wrong expectations of what they are capable of achieving. I will try to be far more careful in the future before I complain or ask questions. I am sorry for the inconvenience I have caused.

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