[SOLVED] All that matters is what being displayed regardless of room size?

K

krugen

Guest
Says my room size is 10k x 10k, but my actual view is 600 x 300, and that makes it ok? With the whole room filled with tiled map and instances.

Does this make sense?

Why I wanted such thing? Coz Im thinking what's gonna happen if I break the whole game into several parts and would there be lag whenever the player crosses those boundaries? Because once crossed, a whole basket of instances need to be created.
 

JackTurbo

Member
No not really ok. By default everything in the room is active. So you would likely have poor performance with a 10k pixel room

What your talking about in your second paragraph is a chunking system which is generally the approach of how to make bigger world's. If you look up chunking system I'm sure you could find some tutorials that cover it.
 

NightFrost

Member
Instances will degrade performance since they're still active outside view. GMS tile system, as far as I'm aware, only draws what is necessary so tiling a 10k room will not impact performance as only what's in the view gets rendered.
 

GMWolf

aka fel666
Size of the room doesn't matter. Thats just a number.
Tilemaps and asset layers can be pretty huge too, GM will cull things outside the view. Same for rendering instances (to an extent).

Where it gets expensive is with logic to do with instances. Not only does having more instances mean you need to run their step events, etc, but you also need to perform collision checks against them, etc.

For that reason it's generally recommended that you deactivate instances that are far outside the view, and reactivate them when they get close.
Of course that in itself can be expensive so you will have to come up with a scheme that deactivates instance effectively, but not too often.
 

Yal

šŸ§ *penguin noises*
GMC Elder
Usually it's enough to run deactivation stuff using a periodical alarm... I usually activate walls in a wider berth around the view than non-wall stuff, so that enemies outside the view won't get stuck into magically materializing walls all the time.
 
Top