Can anyone give me a detailed information of "Viewport"?

Discussion and feedback on Construct 2

Post » Wed Mar 23, 2016 2:04 pm

Can anyone give me a detailed information of "Viewport"? I really don't understand what it is? Thanks...
Also, can you explain it like you are talking to a kid that has no idea about this?
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
65
S
21
G
90
Posts: 1,124
Reputation: 59,857

Post » Wed Mar 23, 2016 4:54 pm

Hi Chadorireborn,

I've a fairly strong web developer background where a viewport is basically the visible area of a webpage for a user. So for example, a page displayed on an iphone in landscape would provide a completely different area to play with than a 28" mac pro in safari.

I haven't used them in my construct 2 projects yet but I would imagine it is the same.

Basically it is a way of making sure people iwth different size screens all see the same thing, or atleast what you want them to :)

Hope this helps
B
7
Posts: 20
Reputation: 317

Post » Wed Mar 23, 2016 4:57 pm

It's basically just the view you have of your layout. If your layout was drawn out on the ground, and you looked at it through a camera. The camera would be the viewport.
B
92
S
32
G
110
Posts: 5,295
Reputation: 71,501

Post » Wed Mar 23, 2016 5:33 pm

I see, but I do not understand how to apply it. Can you please give me an example situation or .capx that viewport can be used? If it isn't too demanding :D .
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
65
S
21
G
90
Posts: 1,124
Reputation: 59,857

Post » Wed Mar 23, 2016 6:14 pm

There's nothing to it. Any capx would work. What you see is the viewport.
B
92
S
32
G
110
Posts: 5,295
Reputation: 71,501

Post » Wed Mar 23, 2016 10:52 pm

Are you familiar with the window size? It determines how much of your layout you see at a time. The window can move around with the scrollto action. The viewport expressions gives you the positions of each side of your window within the layout.

What you do with this position information is up to you.
Mistakes were made.
B
52
S
26
G
111
Posts: 1,628
Reputation: 62,677


Return to Construct 2 General

Who is online

Users browsing this forum: JesusJ, troublesum, Yahoo [Bot] and 10 guests