X
xvicarious
Guest
Hey. I'm on Studio 1.4, and I'm building for Android.
In my room, when I set the parameters for:
View in Room
x = 0, y = 0, w = 320, h = 180
Port on Screen
x = 0, y = 0, w = 2560, h = 1440
It displays correctly in the correct aspect ratio, 16:9.
I used "show_debug_message", and got the following output:
However when I use the script I wrote to set the settings, it doesn't display correctly with black bars on the left and right.
The output of my "show_debug_message" is identical to that of the above.
In my room, when I set the parameters for:
View in Room
x = 0, y = 0, w = 320, h = 180
Port on Screen
x = 0, y = 0, w = 2560, h = 1440
It displays correctly in the correct aspect ratio, 16:9.
I used "show_debug_message", and got the following output:
Code:
03-09 12:14:42.191 14213 14231 I yoyo : view_{x,y}view[0]: 0,0
03-09 12:14:42.191 14213 14231 I yoyo : view_{w,h}view[0]: 320,180
03-09 12:14:42.191 14213 14231 I yoyo : view_{x,y}port[0]: 0,0
03-09 12:14:42.191 14213 14231 I yoyo : view_{w,h}port[0]: 2560,1440
Code:
var displayHeight = display_get_height();
var displayWidth = display_get_width();
var displayAspect = displayWidth / displayHeight;
var display_tiles_width = 10;
view_hport[0] = displayHeight; view_wport[0] = displayWidth;
view_wview[0] = display_tiles_width * 32; view_hview[0] = view_wview[0] / displayAspect;
view_object[0] = obj_player;
view_visible[0] = true;
view_enabled[0] = true;