Inter room move sequence description


  • SUN

    Hi there,

    I didn't find any good description of exactly how inter room movements occurs. This would be a great addition to the documentation, as it is the source of a lot of WTF 🙂

    In general I think we need to know if the "portal" at the room edges and those in the wild acts as "Portal" or "Teleporter".

    Here is how I would describe the differences:

    Goal: crossing from room A to room B
    assuming rooms of size 10 and height 1.
    room A [0123456789][0123456789] room B

    Inter room coordinates: 89][01
    89 are right coordinates of room A
    01 are left coordinates of room B
    9 and 0 are inter room "portals"

    C is a creep
    x is a portal
    . is an empty cell

    T.0 means tick 0
    C->9 means Creep intend to move to pos 9

    Portal scenario

    Move between rooms is immediate.
    If you attempt to move on a portal and your intent is satisfied, you appear on the other side on the next tick

    T.0     T.1     T.2
    
    8901
    
    Cxx.    .xC.    .xxC 
    C->9    C->1    at 1
    
    T.0 (C)reep intend to move to pos 9
    T.1 (C)reep moved to pos 9 but appears immediately on pos 0 (and was never on pos 9). It intend to move to pos 1.
    T.2 (C)reep moved to pos 1
    

    Teleporter scenario

    Move between rooms takes a tick If you are on a portal at the end of tick then you will appear on the other side on the next tick

    T.0     T.1     T.2    T.3
    
    8901
    
    Cxx.    .Cx.    .xC.   .xxC  
    C->9    idle    C->1    at 1
    
    T.0 (C)reep intend to move to pos 9
    T.1 (C)reep moved to pos 9 and wait to be teleported to pos 0
    T.2 (C)reep was teleported to pos 0 and intend to move to pos 1
    T.3 (C)reep moved to pos 1
    

    So which is it ?

    And is the inter room behavior the same than for portals ? Have a great day.


  • SUN

    Seems to be the portal model. Creep never goes to position 9.

    ☝


  • I've never used a portal, but from what I've seen watching other creeps, it works the same as the room method.

    If you land on a room edge, you're transported the next tick to the other room edge at the same x/y coordinate you were when you left. If you were on the east room edge at (49,24), you would appear at (0,24) on the next tick. If you don't move off the map edge, you will go back to (49,24). You can also move along the edge. If you were at (0,24), you can move to (0,23), but it will transport you to (49,23) in the next room after you moved.



  • To expand on this:

    tick 1: at 48,24, move east to 49,24

    tick 2: at 0,24, move east to 1,24

    so you basically move 3 squares in 2 ticks... which makes me think that when I'm estimating distance to somewhere, instead of doing #rooms * 50, I should do #rooms * 49