How to fix different screen resolution ?

Get help using Construct 2

Post » Mon Aug 07, 2017 5:40 pm

Message: Krakcz can only post plain text URLS until they have 500 rep. 4 URLS modified. Why?
Hello
I tryed to fix this resolution scaling by myself but it get even worst :(
The main screen should look like this:
https://www.dropbox.com
/s/zltoco8ukjp5620/defaultscreen.PNG?dl=0

Project settings
https://www.dropbox.com
/s/2nc3h6vlxjhd2ru/nastaveni2.PNG?dl=0

Layout resolution
Layout size: 1136, 640
Margins: 500, 500

For export I use Cocoon.io Canvas+ and Crosswalk webview

On my S4 mini 960x540
https://www.dropbox.com
/s/7ggvvm2dxsm4fy3/onS4mini.png?dl=0

On tablet
https://www.dropbox.com
/s/gyzg4uc39ywg164/onTable.png?dl=0

Thanks for your ideas how to fix it :)
B
4
Posts: 19
Reputation: 236

Post » Wed Aug 09, 2017 5:41 pm

Start by getting rid of your 500,500 margins.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed Aug 09, 2017 9:16 pm

ok :) but It's only happens with Crosswalk export for older android
B
4
Posts: 19
Reputation: 236

Post » Thu Aug 10, 2017 6:00 pm

I've never found margins to be helpful in C2.
Sadly, I am not as good with Android or Crosswalk.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Thu Aug 10, 2017 8:28 pm

If you get a scaling issue on scale outer edit the c2runtime.js - guide here - https://shatter-box.com/knowledgebase/cocoonio-scaling-issue/

After exporting from construct 2

Open your c2runtime.js file and search for “this.canvas.height = Math.round(h * dpr);”. Then add into the if condition “|| this.isCocoonJs” (see code below).

if (this.canvas)
{
this.canvas.width = Math.round(w * dpr);
this.canvas.height = Math.round(h * dpr);
if (this.isEjecta || this.isCocoonJs) //maybe this is better (Ask Ashley): if (this.isDomFree)
{
this.canvas.style.left = Math.floor(offx) + "px";
this.canvas.style.top = Math.floor(offy) + "px";
this.canvas.style.width = Math.round(w) + "px";
this.canvas.style.height = Math.round(h) + "px";
}
else if (this.isRetina && !this.isDomFree)
{
this.canvas.style.width = Math.round(w) + "px";
this.canvas.style.height = Math.round(h) + "px";
}
}
Image
B
29
S
8
G
1
Posts: 120
Reputation: 2,837

Post » Sat Sep 23, 2017 7:04 pm

thanks for replyes :) I fix it :D
B
4
Posts: 19
Reputation: 236


Return to How do I....?

Who is online

Users browsing this forum: humanescape, R0J0hound, warmty and 6 guests