how do I calculate the size of the screen

0 favourites
  • 5 posts
From the Asset Store
220 Food Sprites in 16x16 pixel size. Perfect for items for a retro style game.
  • 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

  • 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.

  • You don't need to calculate the size of the screen. See Supporting multiple screen sizes for info about making HUDs.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I managed to do.

    Disregard the previous answer

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)