I have a question for experienced programmers.
Iam using any like this for deactivate instances outside view.
When I have some instances maybe <10 000.
2 000 active in view and 8 000 deactive outside view.
I can move with 60FPS without problem.
but when I have maybe 250 000 instances.
2 000 active in view and 242 000 deactive outside view.
Then I have lags and I have 30 FPS when moving.
I tried to create a smaller deactivation area when I moving down and deactivate the instance just above the outside view.
// deactive instance inside small area
But result is same.
My question is. What happens to instances when transitioning from active to inactive state?
Does GM have anything like a DS_list with active and inactive instances? And writing 60 instances to the inactive list depends on the number of instances in that list?
Any ideas to speed up this process?
Iam using any like this for deactivate instances outside view.
GML:
var _x = camera_get_view_x(view_camera[0])
var _y = camera_get_view_y(view_camera[0])
instance_deactivate_region(_x, _y, view_wport[0], view_hport[0], false, true) // deactive instance outside view
instance_activate_region(_x, _y, view_wport[0], view_hport[0], true)
2 000 active in view and 8 000 deactive outside view.
I can move with 60FPS without problem.
but when I have maybe 250 000 instances.
2 000 active in view and 242 000 deactive outside view.
Then I have lags and I have 30 FPS when moving.
I tried to create a smaller deactivation area when I moving down and deactivate the instance just above the outside view.
GML:
instance_deactivate_region(_x, _y-64, view_wport[0], 64, true, true)
But result is same.
My question is. What happens to instances when transitioning from active to inactive state?
Does GM have anything like a DS_list with active and inactive instances? And writing 60 instances to the inactive list depends on the number of instances in that list?
Any ideas to speed up this process?