Juutis wrote:Great work.
I'm not sure I understand how this works, though...
Could this entity be used in a closed environment?
I'm thinking mainly for pawn scripts. Like... could it disable a script for a pawn that is, say, two rooms away from the player? With big levels and lots of enemies, the amount of scripts can bring the framerate down pretty much. So I'm just thinking that could the entity disable those scripts that aren't needed, even if the player was just on the other side of a wall?
Of course. That is the idea. But i think you would have to use a few tricks, because right now all areas have the same size (it does not look for walls only for the Players position), so you will have to try until it fits. When i was designing the Y divisions for example, i thought of a skyscraper that has many different levels. So that the Entities that are a(or a few) level up and down aren't taken into account.
That is then done automatically - Or you could disable them via a script (i am planning to write script commands later but that bug i mentioned has a higher priority). But this only works if you have an EAS in the level. Hm. I could also make it that you can do it without an EAS. I think that's what i will do then.
@federico
I meant you can still modify the Pawns from other scripts, i first had an approach that culled the entities competely (out of the engine) but then i thought that then it would be a pain to modify them with all this Enabling/disabling and stuff. Then i made it all simpler. Now they are still 'there' but they don't 'run' (their execution is stopped. For a pawn that means its script is stopped, a foliage entity does not even need to check its distance to be culled Flame entities are not drawn and so on)
That's actually the case for the pawn test - alot of scripts are stopped and because of that it is faster.
Global Entities aren't affected in any way by the EAS. That's why the scripted player still works.
About the script starting from the beginning, i have to see if it is like this or not.
-------------------
In case you did not see it, i copied the list of auto-culled entities from my above post here:
Attribute
Pawn
StaticMesh
StaticEntityProxy
ParticleSystemProxy
Flame
Spout
DynamicLight
FlipTree
Foliage
FlipBook
ActorSpout
FirePoint
FixedCamera
Rain
DSpotLight
The fixed cameras can still be activated by the ForceTrigger. All of these entities can be global entities.
Everyone can see the difficult, but only the wise can see the simple.
-----