Isotarge

Ultralag Science

Dec 2nd, 2017
612
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. Each actor has a pointer to a queue of unresolved collisions between itself and other actors. When an actor collides with another actor, a block of memory sized 0x20 is allocated and added to the end of the queue. Once the collision is dealt with, the block is removed from the queue and freed. When holding an actor there are collisions generated between the kong and the actor every frame. Under normal circumstances, these new collisions are immediately resolved and cleared from the collision queue. However, when holding an unloaded actor these collisions are still generated every frame, but are unable to be resolved until the actor is physically loaded. Ultralag is related to the build up of several thousand unresolvable collisions between the kong and the actor. Initially, it was thought that the strength of the generated lag grew as a function of collision queue length, but recent findings show that ambient lag during queue growth may increase the effect. The collisions in the queue are unresolvable because the held actor isn’t physically loaded when the loop that tries to resolve them runs. The massive lag spike when the boulder loads is caused by the game resolving all of the collisions that have built up at once. The ultralag effects are cancelled after this lag spike because there are no longer several thousand collisions between the kong and the actor left to resolve. I have added a readout for the number of unresolved collisions to ScriptHawk’s object analysis tools (where the “grabbed object” is listed), when this number is counting up, you’re (probably) generating ultralag. Have fun!
Advertisement
Add Comment
Please, Sign In to add comment