• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How does teleport clustering work?

Status
Not open for further replies.
Level 1
Joined
Nov 10, 2020
Messages
2
Hello everyone,

I saw many speedrunners abuse teleport clustering to teleport to inaccessible areas of the map.
They would organize units in a special way, tell the viewer it must be done so, but never explain why.

Can someone explain how teleport clustering works?

Thank you.
 
If teleport clustering is off then the units will appear close to their original position at the point of teleport.

For example if you had a footman and an archmage use Mass Teleport and the Footman was a bit of a distance to the south west of the archmage when they teleport the footman would still be at this position in respect to the archmage.

With clustering on when they teleport the footman will be placed next to the archmage.

So I'm not sure about specific examples but if you clustered your units around the archmage when he teleport with them if there is no space left around the archmage then the unit can end up on the other side of barriers to the nearest unblocked space. Does this make sense?
 
Level 1
Joined
Nov 10, 2020
Messages
2
If teleport clustering is off then the units will appear close to their original position at the point of teleport.

For example if you had a footman and an archmage use Mass Teleport and the Footman was a bit of a distance to the south west of the archmage when they teleport the footman would still be at this position in respect to the archmage.

With clustering on when they teleport the footman will be placed next to the archmage.

So I'm not sure about specific examples but if you clustered your units around the archmage when he teleport with them if there is no space left around the archmage then the unit can end up on the other side of barriers to the nearest unblocked space. Does this make sense?

Thank you for answering my question. I highly appreciate it.

I am interested in grouping "algorithm" because speedrunners grouped units in a very specific way, and in their tutorials they said it must be done in exactly that order.

However, they never provided explanation why units are grouped the way they are (for example, why footmen needs to stand west of the Archmage, sorceress southeast and so on...).

Since somebody had to invent this speedrun "trick", I assume that grouping "algorithm" was known to the original speedrun creator.
That is why I asked here for help, hoping that there is somebody else who knows how that "algorithm" works and can explain how it chooses where to put the unit after teleport ends.

You can use this YouTube video as a reference, just go to 23rd minute and watch from there.
I am trying to understand why wisps ended where they did, how did the "grouping algorithm" put them there, how did the speedrunner know that wisps will end in a "nuck" and not some other unit...

I hope my question is a bit clearer now, again, thank you so much for putting effort to try and help me.
 
Yeah actually I am also interested in the unit displacement logic, not like literally the clustering

Code:
let i = 0
let dx = float array [maxFriendlyUnitCount]
let friend = unit array [maxFriendlyUnitCount]
for each friendlyUnit near caster:
    let dx[i] = friendlyUnit.x - caster.x
    let dy[i] = friendlyUnit.y - caster.y
    let friend[i] = friendlyUnit
    i = i + 1
    if i >= maxFriendlyUnitCount:
        break

caster.x = targetPoint.x
caster.y = targetPoint.y

i = 0
while i < maxFriendlyUnitCount:
    let friendlyUnit = friend[i]
    friendlyUnit.x = caster.x + dx[i]
    friendlyUnit.y = caater.y + dy[i]
    i = i + 1

So above I just wrote this dummy high school algorithm in pseudocode that I think we can all agree describes the basic notion of what teleport clustering is doing... I am rewriting a similar game and I am also having this problem that I wasn't quite sure how the unit unstuck is written regarding how it weights where to put a unit. I think visually and conceptually it makes sense that we out them as close as possible to the location requested while using a pathable location, but how do we code that without a big lag? Is it still performant if we iterate outward in a big spiral?
 
Status
Not open for further replies.
Top