T
TheTrophieStars
Guest
I have been having an issue with the game I have been creating. On my new laptop, the game randomly has poor performance. Nothing in my game is stored in memory, so I don't think it's a memory leak. I am using cameras, I heard they cause memory leaks, but all I do is create the camera with the player create event, which runs once per level. The game runs perfectly fine on any other device.
Another Idea I had was that it was v-sync that was affecting it. I do have a 2.7k monitor. The camera size is 1920 x 1080 but the view size is 1024 x 768. I just can't pinpoint what is causing the game to stutter so much.
This all of the code that has to do with cameras and views.
Another Idea I had was that it was v-sync that was affecting it. I do have a 2.7k monitor. The camera size is 1920 x 1080 but the view size is 1024 x 768. I just can't pinpoint what is causing the game to stutter so much.
Code:
wport = 1024;
hport = 768;
camSpeed = 12;
camWidth = 1920;
camHeight = 1080;
if !view_enabled
{
view_set_visible(0, true);
view_enabled = true;
}
view_set_wport(0, 1024);
view_set_hport(0, 768);
global.currentCam = camera_create_view(x ,y, camWidth, camHeight, 0, obj_player, -1, -1, camWidth / 2, camHeight / 2);
display_set_gui_size(1920, 1080);
view_set_camera(0, global.currentCam);
camera_apply(global.currentCam);
This all of the code that has to do with cameras and views.