Disabling all action outside of the view (For massive levels

Non-platform specific questions.

Disabling all action outside of the view (For massive levels

Postby Hblade » Mon Dec 16, 2013 6:25 pm

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 :)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

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

Postby Bee-Ant » Thu Apr 03, 2014 3:27 am

My solution would be using clone instead of tiles. And set the "Receive events even if out of vision" to be "No".
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

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

Postby Kalladdolf » Fri Apr 04, 2014 9:21 am

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.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

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

Postby Bee-Ant » Sat Apr 05, 2014 1:15 am

^ Who are you?
I'm sure I've met you somewhere before :P
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron