T
TurtleBitAlex
Guest
Hello. Iv recently made a render engine to deactivate things that aren't in the visible area of the player. when first spawning in the game has good fps. but when going right through the map the fps starts to lower.
When I go back left away back to the spawn the fps starts to go back up. I'm just wondering if when going right it doesn't unload whats on the left but when I go back it unloads whats on the right that's just a theory though.
CREATE CODE
STEP CODE
ALARM 0 CODE
When I go back left away back to the spawn the fps starts to go back up. I'm just wondering if when going right it doesn't unload whats on the left but when I go back it unloads whats on the right that's just a theory though.
CREATE CODE
Code:
vx = camera_get_view_x(view_camera[0]); //camera x
vy = camera_get_view_y(view_camera[0]); //camera y
vw = camera_get_view_width(view_camera[0]); //camera width
vh = camera_get_view_height(view_camera[0]); //camera height
vh=vh+500
vw=vw+500
alarm[0]=1; //activate area
Code:
vx = camera_get_view_x(view_camera[0]); //camera x
vy = camera_get_view_y(view_camera[0]); //camera y
vw = camera_get_view_width(view_camera[0]); //camera width
vh = camera_get_view_height(view_camera[0]); //camera height
if (instance_exists(obj_entity_player))
{
x=obj_entity_player.x;
y=obj_entity_player.y;
}
Code:
instance_deactivate_region(vx,vy,vx+vw,vy+vh,false,false);
instance_activate_region(vx,vy,vx+vw,vy+vh,true);
alarm[0]=30;
vx = camera_get_view_x(view_camera[0]); //camera x
vy = camera_get_view_y(view_camera[0]); //camera y