Page 1 of 1

Disabling all action outside of the view (For massive levels

PostPosted: Mon Dec 16, 2013 6:25 pm
by Hblade
Those who have made games eventually come across lag, and if you're like me and enjoy the use of Tile Editors, you'll quickly find that large rooms (500x500 for example), contain lots of lag or even something like 100x100. My solution at first was to remove all air tiles, which made a big performance increase. However, I'd like to know of a way to only load tiles / actors that are within the views range. Sort of like Activation Regions, but those sadly can not move with the view.

Request: It'd be nice to have an activation region move with the view, or enable something in the view actor to disable outside-drawing :)

Re: Disabling all action outside of the view (For massive le

PostPosted: Thu Apr 03, 2014 3:27 am
by Bee-Ant
My solution would be using clone instead of tiles. And set the "Receive events even if out of vision" to be "No".

Re: Disabling all action outside of the view (For massive le

PostPosted: Fri Apr 04, 2014 9:21 am
by Kalladdolf
I think you were referring to a custom map editor, as in, you're using separate actors already?

Do those tile actors have draw events or other stuff that gets called every frame? If yes, try to get rid of them entirely.
If not and it's still laggy, there is a more fiddly approach ... it relies on only creating the maximum amount of tile actors your screen will be able to contain simultaneously + a small buffer and then placing those actors where they are needed / putting them off screen when they aren't.
I have tried something similar in Java and it worked there, in GE it also should. In theory.

Re: Disabling all action outside of the view (For massive le

PostPosted: Sat Apr 05, 2014 1:15 am
by Bee-Ant
^ Who are you?
I'm sure I've met you somewhere before :P