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

Discussion and feedback on Construct 2

Post » Wed Jul 02, 2014 1:32 am

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.
B
11
S
1
G
2
Posts: 13
Reputation: 1,582

Post » Wed Jul 02, 2014 2:20 am

Sorry - forgot to say "Sorry for the nooby bother." and "Please, help!".
B
11
S
1
G
2
Posts: 13
Reputation: 1,582

Post » Wed Jul 02, 2014 11:44 am

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.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Thu Jul 03, 2014 5:02 pm

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.
B
11
S
1
G
2
Posts: 13
Reputation: 1,582

Post » Fri Jul 04, 2014 5:02 pm

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.
B
11
S
1
G
2
Posts: 13
Reputation: 1,582

Post » Fri Jul 04, 2014 5:21 pm

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.
B
11
S
1
G
2
Posts: 13
Reputation: 1,582


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests