NeoShade
Member
Hi guys,
I'm playing around with window sizing and positioning and views as the first steps in a project, and I thought that I had the whole thing figured out, until I noticed that there's a thin black line at the bottom of my window where the view isn't quite filling it up.
Here's my game process:
Game starts by loading up a room called Rm_Setup.
Rm_Setup is 240 wide and 160 tall.
The creation code of Rm_Setup runs the following script:
Next, the creation code in Rm_Setup sends the game to the next room.
The next room, Rm_Test, is 640 wide and 480 high (though changing these values should not, and does not seem to affect the problem I'm having).
The creation code of Rm_Test runs the following script (so far uncommented due to this problem I'm experiencing):
Now, I'd have thought that by setting the size of the view to the exact size of the window (before any scaling takes place) that everything would just fit together nicely, but that doesn't seem to be the case. Regardless of the value I enter for global.window_scale, I still see a thin black bar across the bottom of the window.
Any help on this one would be very much appreciated.
I'm playing around with window sizing and positioning and views as the first steps in a project, and I thought that I had the whole thing figured out, until I noticed that there's a thin black line at the bottom of my window where the view isn't quite filling it up.
Here's my game process:
Game starts by loading up a room called Rm_Setup.
Rm_Setup is 240 wide and 160 tall.
The creation code of Rm_Setup runs the following script:
Code:
/// initialise_window()
{{
// Define window aspect and scale
global.window_width = 240;
global.window_height = 160;
global.window_scale = 4;
// Calculate exact window dimensions
var win_w = global.window_width * global.window_scale;
var win_h = global.window_height * global.window_scale;
// Resize the window
window_set_size(win_w, win_h);
// Calculate screen dimensions
var dsp_x_centre = display_get_width()/2;
var dsp_y_centre = display_get_height()/2;
// Relocate the window
window_set_position(dsp_x_centre-win_w/2, dsp_y_centre-win_h/2)
}}
The next room, Rm_Test, is 640 wide and 480 high (though changing these values should not, and does not seem to affect the problem I'm having).
The creation code of Rm_Test runs the following script (so far uncommented due to this problem I'm experiencing):
Code:
/// initialise_view()
{{
view_xview[0] = 0;
view_yview[0] = 0;
view_wview[0] = global.window_width;
view_hview[0] = global.window_height;
view_visible[0] = true;
view_enabled = true;
}}
Now, I'd have thought that by setting the size of the view to the exact size of the window (before any scaling takes place) that everything would just fit together nicely, but that doesn't seem to be the case. Regardless of the value I enter for global.window_scale, I still see a thin black bar across the bottom of the window.
Any help on this one would be very much appreciated.