I just deployed a new update to the engine, focused on performance. Hereās whatās new:
In View
A new trigger behavior that activates any time an object enters or leaves the screen. This can be used to disable expensive behavior logic that doesnāt need to run when the object cannot be seen.
Collision merging
Objects that meet the following critera:
- static
- no behaviors (and no parents with behaviors)
- rectangle collision shape
- not targeted by behaviors (e.g. collision checks)
- and are the same type
All get merged together into larger rectangle collision shapes when playing. This means fewer in game objects (better performance) and it also means smoother floors so less snagging and catching on corners and edges.
Proximity Block
This is no longer a trigger, and has been moved to the Components section. It must now be activated manually, like Raycast. It has also gained a new input for changing the distance during gameplay.
This change is because Proximity checks can use a lot of CPU resources, and running them every frame is a major cause of lag in the games I have investigated.
New Tool: Display Performance Metrics
(This is available to upgraded accounts only)
Turn this on in the game settings, click the āAdvancedā button. It displays:
- Frame rate
- Number of Objects
- Number of āSmartā Objects (with behaviors)
- How long it takes per frame (average) to calculate the physics updates
- How long it takes to run all behaviors
It also breaks down the individual behavior times, and will indicate which ones are the biggest contributor to lag. (You can see in the screenshot that the Proximity is a major problem in this instance, as well as Raycasts)
Various Fixes
- Fixed occasional missing friction on bottom of capsule
- Fixed crash in Text Length
- Fixed crash in Expression block
- Fixed crash in Link rendering