I’m working on a top down shooter for the android platform that is set up using a orthographic camera and its played in portrait. Most of the logic is handled by a game manager BP with the main camera, the start and setting of the camera view size is handled by the the level blue print. Everything has been going great and most of my logic is done for the prototype so I started working on how I will be able to support multiple screen sizes.
Really just need to have the player not be able to leave the camera view area while still being able to pan my background, so i set up 1 back ground with a perfect setting for my galaxy S4(1080x1920) and one for my Nexus 10 (1600x2560) just for testing purposes. On level start the screen size is determined and the appropriate Ortho Width is selected, then my game manager BP spawns the appropriate size back ground. All of it works great on my S4 but having some major issues with the nexus 10.
I have 2 x 27inch monitors, one in landscape and the other in portrait. So initially i went about it the same way I did for the S4, and tried setting up the background up while using customized settings in " Play in new window" but it turns out that it caps out around 2000 height if you move the window over from any setting other then “Always center window screen” which really is not useful for me being that I want to see at least top or bottom of my screen in the dimensions I need. Once I had the Ortho width set for 1600 x 2560 i ran into aspect ratio issues that i did not encounter with the S4.
No matter what I do i can not get the height to change via the blueprint that spawns the background to stick in the device package or stand alone. Anything I try to do I’ll first run it in editor windows then run in standalone, then launch to device and even package it and install manually and still end up with the same result. I got to the point that I shrunk my background to a speck and completely removed the PIN that spawns the 1600x2560 background and it still shows up with a 1600 width and something above 2560 in the apk. Mind you there are three things in my scene, the Game manager BP, a Process volume and a white editor plane so I can see the edges if my background isn’t big enough. So its not like there is a background unless its spawned by the manager. Is this a BUG or is there some kind of cache or reference I need to clear before I resize something?
When that wasn’t working out I figured I’d try the aspect ratio constraint , and some how that squeezed my 1580-1620 setting into what looks like a 800 width with black lines running down the middle. Mine you the height is perfect at that point I only get black lines on the sides, which led me to try to reverse my resolution height and width but as expected I got a squished screen. All the while the same exact package to my S4 does the same exact thing which is work perfectly.
At this point i don’t know what to try next and would really appreciate any help or feedback on what I can do to resolve this or find a way to block the player from leaving the camera area in a Z axis while on a tablet size.
+CVars=r.MobileContentScaleFactor=1.0 is set for mid and high.
EDIT: On my S4, after adding print screens to X and Y at the initial view port size I get a 720 for X and 1280 for Y, and my BP clamps it down at 1080 so I end up with a perfect background. But on the Nexus10 initial size for X is 800, so it ends up loading the 1080x1920. In hindsight I should’ve used different background materials from start and would’ve known instantly.
I thought a setting of MobileContentScaleFactor= 2.0 in the DefaultDeviceProfile.ini would tell the device to use its max resolution but Its not working for the Nexus 10.
EDIT2: After checking the logs I realized that its defaulting to device profile [Android] unlike the S4 that uses the Adreneo320 profile. I have tried adding a custom device profile for the Nexus 10 but cant seem to figure out the naming convention, looking through Engine/Config/BaseDeviceProfiles gave me a few ideas. But naming a few profiles based on the GPU name did not work. How would you name a profile if you got this:
08-31 22:01:25.950: D/UE4(3901): [2014.09.01-02.01.25:957][ 0]LogAndroid: Default profile:Android GPUFamily:Mali-T604
08-31 22:01:25.950: D/UE4(3901): [2014.09.01-02.01.25:958][ 0]LogAndroid: Default profile:Android GPUFamily:Mali-T604
08-31 22:01:25.950: D/UE4(3901): [2014.09.01-02.01.25:958][ 0]LogAndroid: Selected Device Profile: [Android]
08-31 22:01:25.950: D/UE4(3901): [2014.09.01-02.01.25:958][ 0]LogAndroid: Selected Device Profile: [Android]
08-31 22:01:25.950: D/UE4(3901): [2014.09.01-02.01.25:958][ 0]LogInit: Applying CVar settings loaded from the selected device profile: [Android]
08-31 22:01:25.950: D/UE4(3901): [2014.09.01-02.01.25:958][ 0]LogInit: Applying CVar settings loaded from the selected device profile: [Android]
08-31 22:01:25.950: D/UE4(3901): [2014.09.01-02.01.25:958][ 0]LogInit: Setting Device Profile CVar: [[r.MobileContentScaleFactor:1]]
08-31 22:01:25.950: D/UE4(3901): [2014.09.01-02.01.25:958][ 0]LogInit: Setting Device Profile CVar: [[r.MobileContentScaleFactor:1]]