S
Smooth Operator
Guest
First of all, this is my first post here, so I apologize if I've posted in the wrong board or in the wrong way.
I'm pretty new to GML, though I've got some experience in C++, and I'm finding it frustrating trying to find where I'm going wrong.
If I start with views enabled, and have all my settings for the room where I want them, the window stretches to the appropriate proportions, uses all the correct settings, and is somewhat manipulable when it comes to the view_xview or view_yview settings, but no matter what I try, if I attempt to use code to configure the settings instead, the view in the room is scaled from the proportions of the room's actual size, rather than the settings I put for the view. So in this case, I've got a room that's 1024 x 768, and ALL of my view settings, within the room editor or not, are multiples of 320, but the window still scales to 1024 x 768 proportions. I've scoured pretty much every setting I can find and can't figure it out. I have a single object governing my camera, named objCamera. At some point I just started trying to control everything in its Create (and even Step) Events, but nothing seems to work.
What's worse, I can see a brief moment just after the screen loads where the proportions are correctly 640 x 640, but then it snaps back to these proportions.
Any help would be much appreciated, thanks.
I'm pretty new to GML, though I've got some experience in C++, and I'm finding it frustrating trying to find where I'm going wrong.
If I start with views enabled, and have all my settings for the room where I want them, the window stretches to the appropriate proportions, uses all the correct settings, and is somewhat manipulable when it comes to the view_xview or view_yview settings, but no matter what I try, if I attempt to use code to configure the settings instead, the view in the room is scaled from the proportions of the room's actual size, rather than the settings I put for the view. So in this case, I've got a room that's 1024 x 768, and ALL of my view settings, within the room editor or not, are multiples of 320, but the window still scales to 1024 x 768 proportions. I've scoured pretty much every setting I can find and can't figure it out. I have a single object governing my camera, named objCamera. At some point I just started trying to control everything in its Create (and even Step) Events, but nothing seems to work.
Code:
if (instance_exists(objPlayer))
view_object[view_current]=objPlayer;
view_hborder[view_current]=320;
view_vborder[view_current]=320;
view_hspeed[view_current]=-1;
view_vspeed[view_current]=-1;
view_wview[view_current]=320;
view_hview[view_current]=320;
view_wport[view_current]=view_wview[view_current]*2;
view_hport[view_current]=view_hview[view_current]*2;
view_xport[view_current]=0;
view_yport[view_current]=0;
view_enabled=true;
view_visible[view_current]=true;
window_set_size(view_wport[view_current],view_hport[view_current]);
What's worse, I can see a brief moment just after the screen loads where the proportions are correctly 640 x 640, but then it snaps back to these proportions.
Any help would be much appreciated, thanks.