FlashDevelop debugger window showing incorrect resolution - actionscript-3

I have an AIR Projector game that's set to 640x640 resolution in the Project -> Properties -> Dimensions field. But for some reason when I debug the game the window sizes itself to 800x800.
Here's the properties window.
And here's what happens when I launch the game.
You can see the image is 800x800. It should be 640x640, I don't know why it's being scaled up by 25%. This stretches the image and makes the quality worse.
I already found a hack-y solution but I was hoping there was a more elegant reason or solution as to why this is happening.
I have to go into the AIR Application Properties and set the Initial Window Size field to 526x549, as shown here.
When I set those fields to those values (keeping in mind the Project Properties Dimensions field is still set to 640x640), the game then launches in the correct dimension with perfect image quality.
I found this other user having the exact same problem. Their solution was to scale the main Sprite to fit the stage dimensions, but I'm trying to avoid scaling to preserve the image quality.

I'm coming back to this because the realization just hit me while going through my computer settings. The reason the game was being rendered 25% larger is because my 1440p monitor is set to 125% scale in my Windows 10 display settings.

Related

How are twips on a video projector calculated? Is there a possibility to configure?

My Ms Access(2010) database uses forms to display and manipulate data. Recently, when presenting these, I found out that the use of these forms on a video projector leads to a severe problem, the forms appear to be 'zoomed' in.
Therefore I have 2 questions, thanks for the answer!
1) How are twips on a video projector calculated? Theoretically this should depend on the distance between projector and screen, which woulnd't make too much sense. (I'd need this information to be able to explain the problem, thank you very very much)
2) How can this be configurated? Is it possible to use VBA or Win32 API to achieve this?
I don’t think this problem has anything to do with TWIPS or with the video projector. Any monitor (analogue, digital, projector, etc.) shows the same picture if it has the same resolution. If you set the output of your computer to i.e. 1024 * 768 pixels and the output device (analogue or digital monitor, projector, etc.) uses the same native resolution then the picture will look the same on each device.
Access works in pixels. If you have a form optimized for a specific amount of pixels then this is what Access uses. If you have a higher resolution then form will not fill the screen and if you have a smaller resolution the form will not be completely shown on the screen.
I guess what happens is that you use on your PC an output of i.e. 1600 * 1200 pixels but your projector can’t show this correctly. So the projector tries to convert i.e. 1600*1200 to 1024*768 and this will never look good.
I think you have two options: Check the resolution which your projector expects and set your PC to the same resolution. Or change your application – or the projector.
In line with what Edgar has suggested, regardless of the display type (projector, monitor etc...) the issue will remain the same. In this scenario, the problem is the form is designed for a given screen size, say 1600x900 (16:9) or 1920x1200 (16:10) or whatever you have chosen to design the form as.
The projector is likely not the same resolution as this. Many smaller projectors are either 1024x768 or 1280x720, both of which are likely smaller than your computer monitor in regards to resolution. While it is true that you could design the forms to the proper pixel dimension of the projector an easier way, that wouldn't require editing any content, would be to send the projector the same resolution that you have designed the forms to be.
For example, if your forms fit nicely on a 1920x1080 pixel space but your projector is 1024x768 then you could open display preferences on your computer and set the output to the projector to be 1920x1080. The projector will then scale the image to fit onto its 1024x768 panel.
There are many variables in here and you may run into equipment limitation with this approach, such as the projector not being capable of ingesting and scaling a given resolution which you are forcing into it. In that instance you could utilize a hardware video scaler inline between the computer and projector to perform the scaling operation for you. An example of a device capable of this would be a Barco ImagePro, though there are many other more cost-effective solutions on the market as well.

How to stop rotating an image which is taken by iPad?

I take several photos using iPad. I take them in different orientations (rotate iPad every time on 90 degrees).
Then I download them to my Windows laptop and what I see? I don't see them as I saw them on the screen of iPad. Actually, there is only one valid image. Others are rotated.
I found this problem in browser (FF & Chrome). When you display image using img html tag it is rotated. But if you display it by entering image's full URL - it's totally OK.
I checked pictures via Safari on iPad - they look fine (in img tag), but don't in Windows.
Is there some metadata which shows that image should be rotated or smth like this?
As you know, the iPad has a hardware device in it that tells it the device orientation, which is how it determines how to display the screen to the user. While the hardware instantly knows how it's positioned at any given time, they seem to have engineered a lag into the software registering this change to improve the user experience (so the screen doesn't flip back and forth several times in a single second). However, this lag might lead to some unexpected results when taking a photo.
I have found that the orientation is most often unexpected with the iPhone / iPad when I am taking photos with my screen facing downward (i.e. taking a picture of something on a tabletop, for example). I assume landscape but get portrait, and vice versa. In that scenario (downward / flat), it is more difficult for the device to know what my intended orientation is.
I find the best way to resolve this is to hold the device in the clear orientation that I want for a second before I take the photo, then point the camera downward and snap.
The orientation data is included in an image's metadata (AKA exif data). You can take a look here for more information:
http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/
It is relatively easy to retrieve (and modify) the exif data in software. If you are doing lots of batch processing in some type of custom way, libraries are available to help with this for a variety of frameworks. But for small jobs, the absolute most simple way is to click the little "rotate" icon in the image viewer software within Windows which will make the update for you.

Is it necessary to fill in the appxmanifest with all tile resolution images?

The appxmanifest has entries for developers to fill in four different tile resolution images for each kind of tile (small, medium, wide, large), the different resolutions are: scale-180, scale-140, scale-100, scale-80.
From what I can tell if the developer fills in the largest resolution image (scale-180) the system will automatically scale it down when needed on lower resolution displays, thus it works everywhere. So do most developers really even need to bother filling in all the different tile resolution images? Seems like it will just bloat the size of the application for nothing.
My question about filling in the different resolution images not about whether I need to have the small, medium, wide and large images.
It's certainly not necessary, but it is recommended. Scaling images down (or up) can cause visual artifacts that may not be present in the original image. It may be the case that a particular image looks fine in all scaling plateaus, but others may not (this is especially true for bitmap images). Again, it is up to your discretion, but worth visual inspection at each scaling level.
MSDN has a scaling guidelines document that could be helpful.
See the reasons for filling wide tile and small tiles are for different reason.
1 - wide tile
if your app has a live tile notification feature then u need to implement it. But not mandatory. Just a criteria of metro app.
2 - small tile. This is the by default tile of the application so you should go ahead and add it. If theres no live tile concept then you can fill only small tile. The square one.
3 - then there is a place to put in the image that will be used as a tile icon when user searches for it.
and then there is store logo.
all these are by default set to one cross marked logo. Which u generally see. None of them are mandatory but finally while uploading to the store they will become requirement specific and mandatory. Otherwise you will get a long list of improvements to be done on your app from microsoft. :) . Have faced that .

Supporting multiple resolutions in flash game

I'm working on a little flash game that has a couple of GUI components. I'm having a bit of trouble coming up with a good design that can support a min spec of 768x1024 and a max spec of 1200 x 1920.
An example of my design:
I have a List component that hugs the top right corner. When the browser is resized I slide the component over, keeping it always 5 pixels from the edge of the browser. Once the stage has hit a minimum size (1024 for width) I stop sliding the GUI over otherwise it will start overlapping with other GUI's that are on the left side. This seems to be a similar fashion to how Farmville and other popular flash games handle their GUI's (they keep them the same scale for all resolutions and only translate them to keep them centered and what not)
If I knew the min spec would always have 768x1024 then I could deal with that, but the problem is that is rarely the case. It seems like the url bar, and other browser menus cut into your height space. Also when I'm running Ubuntu (my version has that menu bar on the side) I lose some width to my stage. I'm guessing the windows menu bar on the bottom also cuts into a browsers height space. This ends up cutting parts of my GUI out and can make the game unplayable.
I believe I can only truly expect 768x1024 when in full size mode.
My question is:
What is a safe min spec of resolution, including what windows/ubuntu menu bars and browser menu bars will take up?
The safe area varies a lot depending on the browser/OS:
http://designerstoolbox.com/designresources/safearea/
Back in the day (when full flash sites were popular) the usual way to deal with this was, as bokan says, to make your SWF to always fill up the browser's viewport, unless the viewport was smaller than a certain limit, then show scrollbars. swffit was a quite popular script to help with this. The typical minimum safe area used to be around 990x600 (to support 1024x768).
Being a game though, I'd recommend defining the minimum area where the game is playable, and if you detect a smaller viewport, require the user to go fullscreen (I wouldn't rely on scrollbars for any game, unless it's a super-cool-parallax-html5 game, of course :P).
There is no safe minimum size. Some users have 6 bars (favorites, yahoo, google, stumble, +2 spyware).
What You can do is resize your flash animation to 100% of a div and set a min-with min-height for this div. This way, users will see that they need to make the windows bigger.
The resolution depends on your target audiance. Do you want user to play on netbooks ? Just check your game with a typical netbook resolution.
You should take a look at http://www.greensock.com/liquidstage/ it's what you need. Greensock api are awsome.
I think 1000x600 is a good choice.
We use width x height, so your 768x1024 would be tall.

Flash builder Mobile AS3 project: Screen DPI, Application DPI, image DPI, center image

I wrote a Flash Builder project in AS3. It uses some images to tell the user that it is busy with something.
In the first place I wanted to use the SVG file format for these images to keep it crisp as possible. But it doesn't work, errors in shapes or not on the right position.
So I decide to use the PNG format. It is working nicely except for one thing: DPI translations done by the compiler. I cannot center the image because the DPI size is recalculated to the size of the screen's DPI and can be different on devices. This is very complicated to me because I only want to center the image.
The images has 96DPI, The Capabilities object returns a screenDPI of 165. Because width and height doesn't change when DPI changes (object returns same width and height), I cannot see what the REAL size is of the image in pixels (the size the user see).
In this example, the visual size of the bitmap increases and doesn't fit on screen.
This makes it very complicated to use images in the project.
The documention on the Adobe site notice about bitmap DPI. And also that the screenDPI could be reported wrong by the OS. The only solution to this, is to include images that matches the screen dpi for every device with a different DPI. Wow, that is very complicated stuf, you can read it here:
http://help.adobe.com/en_US/flex/mobileapps/WS19f279b149e7481c682e5a9412cf5976c17-8000.html
Within flex you can set the target DPI (Applications DPI) but how can i do this in an AS3 project? You cannot change it at run-time so how can i do this? In the XML file, i didn't find an option about the application it's initial DPI.
The images are 96 DPI, so when I set the application's DPI to 96 either, iI assume it will be displayed OK? But how do I do this?
Other solutions also very welcome.
Thank you for your time, if you got a question let me know.