G
Guest User
Guest
so i tried setting up a camera today and pretty much borked my project. these are the errors i'm getting... the solutions listed in the thread don't seem to work or are not applicable. (my computer is up to date, drivers are up to date, i have restarted my computer, and i'm not creating a surface using the camera size so i don't see how i'd be creating a surface the size 0,0?)
this all started because i wanted to make a camera that's displays everything a 2x zoom for the entire game--no matter the room--and follows my object 'sys_controller' around. i tried doing it like this:
sys_controller - Create
sys_controller - Room Start
sys_controller. - Game End
WIDTH and HEIGHT are macros set to 680 and 360 respectively. this did not work and the width/height of the camera were being considered -1/-1 even after i just created it.
i read in the manual that cameras need to be made global to work from room to room, so i did that and restarted my computer since i'd guess that i had a memory leak the entire time just leaving it an instance variable. it still did nothing, though, so i tried replacing the default camera since that seemed to be what i wanted:
and then the errors linked above started popping up. they pop up even if i delete all the camera code like nothing ever happened so now i can't start my game at this point anyway.
i really don't know what i'm doing wrong at this point and no camera tutorial seems to really make it clear to me how these things work. so i'd appreciate some explanation for what is going on. thanks.
this all started because i wanted to make a camera that's displays everything a 2x zoom for the entire game--no matter the room--and follows my object 'sys_controller' around. i tried doing it like this:
sys_controller - Create
Code:
CAMERA = camera_create_view(0, 0, WIDTH div 2, HEIGHT div 2, 0, sys_controller, 1, 1, -1, -1);
view_set_camera(0, CAMERA);
Code:
view_enabled = true;
view_set_visible(0, true);
Code:
camera_destroy(CAMERA);
i read in the manual that cameras need to be made global to work from room to room, so i did that and restarted my computer since i'd guess that i had a memory leak the entire time just leaving it an instance variable. it still did nothing, though, so i tried replacing the default camera since that seemed to be what i wanted:
Code:
global.CAMERA = camera_create_view(0, 0, WIDTH div 2, HEIGHT div 2, 0, sys_controller, 1, 1, -1, -1);
camera_set_default(global.CAMERA);
i really don't know what i'm doing wrong at this point and no camera tutorial seems to really make it clear to me how these things work. so i'd appreciate some explanation for what is going on. thanks.