how do I calculate the size of the screen

Get help using Construct 2

Post » Thu Nov 15, 2012 1:34 pm

I want to calculate the screen size of each cell every time the game is launched.
So I can do my HUD layout always stay in the same place. not imported into the screen that is being executed.

I do not know if I explained right
B
5
Posts: 10
Reputation: 645

Post » Thu Nov 15, 2012 3:54 pm

hmm. there might be a problem with your explanation there might not be. But I'll try to give some experience and some advice anyways.

If your trying to get true metric/imperial sizes for screen size. Don't even try. I tried this myself. Supposedly browser/screen makers should be giving out accurate dpi for programs to offer a way to get "true" sizes. They don't. You can create a program or anything that has say 5 centimeters in measurement. You will never get that 5 centimeters. I went around 4 different size monitors, 4 different sized mobile devices(10", 9", 7", 3.5") and my 1 inch comparison never really matched up to the ruler. Larger monitors were far closer though. This is not a issue with C2 as it is with browser makers or possible screen manufacturers.


http://www.scirra.com/tutorials/37/beginners-guide-to-construct-2/page-7
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Thu Nov 15, 2012 5:31 pm

You don't need to calculate the size of the screen. See Supporting multiple screen sizes for info about making HUDs.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Fri Nov 16, 2012 2:32 am

does not work. whenever I try on a different screen than what was created. The game is showing some white. It never works.

Already picked all the alternatives: Crop, Scale, Letterbox scale and Letterbox integer scale and compiled cocoonjs.

The game was made in 854x480. The screen size of Motorola Defy. The game and always open horizontally.
And when the game runs on a different screen this. A part of the screen turns white or the game does not fill the entire screen.
B
5
Posts: 10
Reputation: 645

Post » Fri Nov 16, 2012 3:22 am

I managed to do.
Disregard the previous answer
B
5
Posts: 10
Reputation: 645


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 23 guests