Setting canvas size changes positioning

Discussion and feedback on Construct 2

Post » Wed Sep 04, 2013 10:53 am

If you use the action 'Set canvas size' to change the size of the canvas, the game won't be horizontally centered anymore in the browser window, but aligned to the left instead.



Just find it irritating and I guess it's unintended behavior. If you have fullscreen set to 'Off' in the project properties, you won't notice this in preview by the way. The exported game will always be aligned to the left though.

With some manipulation of the exported index.html file this can be countered, but I still thought I'd throw it out there.
B
23
S
6
G
11
Posts: 1,045
Reputation: 8,061

Post » Wed Sep 04, 2013 11:56 am

Plus one! I gave up trying to manage auto-rotate because of this (thought it was my ineptitude!).
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,249
Reputation: 46,472

Post » Wed Sep 04, 2013 3:50 pm

Assuming you're talking about exporting with Node-Webkit:
Construct 2 has just been updated with a bunch of features to move the window position around, so you can realign to the center now I guess :P
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Thu Sep 19, 2013 8:20 am

[QUOTE=Jase00] Assuming you're talking about exporting with Node-Webkit:
Construct 2 has just been updated with a bunch of features to move the window position around, so you can realign to the center now I guess :P[/QUOTE]

I'm afraid I was actually talking about regular HTML5 website export, the issue has nothing to do with Node-Webkit specifically.
B
23
S
6
G
11
Posts: 1,045
Reputation: 8,061

Post » Thu Sep 19, 2013 3:23 pm

+1!
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Post » Thu Sep 19, 2013 3:36 pm

This has been happening in C2 for quite a while. I've had a long-standing bug report that is still open. Depending on your reason for resizing the canvas, you may be able to get away with using a centered i-frame to display the canvas from another webpage.
B
64
S
19
G
8
Posts: 341
Reputation: 12,185

Post » Sat Sep 21, 2013 3:26 am

I am having the same problem. I want to make a menu with predefined resolutions that the user will be able to use if he or she have performance issues, but using the "set canvas size" in combination with letterbox scale aligns the canvas in relation to the top left and not the center of the screen.

I would have imagined that the set canvas size exists for that reason, yet it renders the whole thing useless since you have to manually scale the browser's window afterwards, in order for the letterbox scale to catch up and realign the project to the center.
I really want to avoid this for both aesthetic and presentation reasons.

The iFrame solution that @zatyka mentions does not work in my case.

Example here.

This behavior is consistent with node web-kit as well.

Dear @Ashley is there a plan to address this issue and, since it has being around for some time now, is there a workaround to this?eli0s2013-09-21 03:29:22
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Sat Sep 21, 2013 9:56 am

The biggest problem when we use fullscreen. It would work when we don't use fullscreen, sometimes it's not perfect. :S
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sun Sep 22, 2013 1:17 pm

[QUOTE=zatyka] This has been happening in C2 for quite a while. I've had a long-standing bug report that is still open. Depending on your reason for resizing the canvas, you may be able to get away with using a centered i-frame to display the canvas from another webpage.[/QUOTE] from April!
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Post » Thu Sep 26, 2013 5:23 pm

Oh, I didn't realize there was a long-standing bug report for this. I guess this means I will +1 the question of eli0s:

[QUOTE=eli0s]Dear @Ashley is there a plan to address this issue and, since it has being around for some time now, is there a workaround to this?[/QUOTE]
B
23
S
6
G
11
Posts: 1,045
Reputation: 8,061

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests