Spring mining: Difference between revisions

5,612 bytes added ,  23 May 2021
m
Fix minor typos and such
m (added link for waterbirth)
m (Fix minor typos and such)
 
(2 intermediate revisions by the same user not shown)
Line 18: Line 18:


For [[Chip]] and [[Melinda]] (and only them), this only works if the moving entity in question started after them in [[reading order]]. Chips and Melindas introduced to the level via [[Despawning and Respawning Glitch|waterbirth]] will always be able to spring mine this way, regardless of their starting point. Chips and Melindas introduced via a [[clone machine]] will use the clone machine as their starting point.
For [[Chip]] and [[Melinda]] (and only them), this only works if the moving entity in question started after them in [[reading order]]. Chips and Melindas introduced to the level via [[Despawning and Respawning Glitch|waterbirth]] will always be able to spring mine this way, regardless of their starting point. Chips and Melindas introduced via a [[clone machine]] will use the clone machine as their starting point.
== Explanation ==
To make movement more simultaneous, CC2 has all [[Movable object|movable]]s pick a decision before anything moves. The two stages of a [[tick]] is '''decision phase''' (where everything picks a direction) and '''move phase''' (where everything moves).
Each decision phase, each movable gives a list of directions it will like to move, in order of descending preference. Each direction is checked until a non-blocked one is found. If all the directions are blocked, the last direction is chosen.
In move phase, the direction the movable chose is checked again, in case the level changed in a way that it is no longer possible to move in that direction. If the check succeeds, the movable moves in the chosen direction.
So, by default, a direction is checked a total of two times before moving, this will be important later.
Pushing normally happens (contrary to popular belief) at decision phase, since pushing is done while checking collision.
A thing to note before reading further, is that the layers collision is checked in is the following:
* [[Thin wall]]s, [[Canopy|Canopie]]s
* Item modificators ([[No sign]])
* Terrain ([[wall]]s, [[dirt]], [[recessed wall]]s, etc.)
* Movables, pushed if needed, if there is a movable on the tile, check doesn't go past this
* Items
This means that terrain is checked only once, and before movables.
=== A normal example ===
Let's take a look at this diagram to see what happens.
(The diagram shows a 3d-esque view, showing the movable and terrain levels)
{| cellpadding="0" cellspacing="0"
| [[File:ChipE_CC2.png]][[File:Block_(CC2).png]][[File:Floor_(CC2).png]]
|-
| [[File:Floor_(CC2).png]][[File:Recessed_wall_(CC2).png]][[File:Floor_(CC2).png]]
|}
At decision phase, Chip checks collision to the right, first checking the recessed walls (no collision), then the block, causing the block to start moving.
{| cellpadding="0" cellspacing="0"
| [[File:ChipE_CC2.png]][[File:Floor_(CC2).png]][[File:Block_(CC2).png]]
|-
| [[File:Floor_(CC2).png]][[File:Recessed_wall_(CC2).png]][[File:Floor_(CC2).png]]
|}
The block starts moving, and notifies the leaving tile that it is leaving, causing the recessed wall to become a wall.
{| cellpadding="0" cellspacing="0"
| [[File:ChipE_CC2.png]][[File:Floor_(CC2).png]][[File:Block_(CC2).png]]
|-
| [[File:Floor_(CC2).png]][[File:Wall_(CC2).png]][[File:Floor_(CC2).png]]
|}
Since there is nothing else to check (there are no items), the collision check is positive (though, it doesn't matter since players only use the result of collision checking for force floor overrides).
At move phase, another collision check is done, and since there is a wall, the check fails, and Chip doesn't move.
The two checks before movement mean that the fact that there is no second terrain check is covered by the second check, and is the reason why spring mining doesn't always happen.
The trick to spring mining lies in the reducing the amount of collision checks to one, so the second terrain check does not happen.
The only (known) way to doing that is by removing the decision phase check.
=== Sliding method explanation ===
{| cellpadding="0" cellspacing="0"
| <div style="position: absolute;">[[File:ChipE_CC2.png]]</div>[[File:Ice_(CC2).png]][[File:Block_(CC2).png]][[File:Floor_(CC2).png]]
|-
| [[File:Floor_(CC2).png]][[File:Recessed_wall_(CC2).png]][[File:Floor_(CC2).png]]
|}
The difference from the normal case here is that, in decision phase, since Chip is sliding, he doesn't do any collision checks, and just goes with the forced direction, meaning he only has one collision check in move phase.
At move phase, Chip checks collision to the right, first checking the recessed walls (no collision), then the block, causing the block to start moving.
Since he never checks terrain again, the check succeeds, and he moves right.
=== Retreating monster method explanation ===
{| cellpadding="0" cellspacing="0"
| [[File:ChipE_CC2.png]][[File:Block_(CC2).png]][[File:PurpleBall.gif]][[File:Floor_(CC2).png]]
|-
| [[File:Floor_(CC2).png]][[File:Recessed_wall_(CC2).png]][[File:Floor_(CC2).png]][[File:Floor_(CC2).png]]
|}
The monster must be before the player in monster order. (Reverse reading order position at level start)
At decision phase, the monster must pick a free direction, which will move it away from the setup (in this example, the ball will move right).
Chip checks collision to the right, but fails to push the block (thus, the collision check too) due to the monster, but still chooses to go there.
At move phase, the monster moves away from the setup.
{| cellpadding="0" cellspacing="0"
| [[File:ChipE_CC2.png]][[File:Block_(CC2).png]][[File:Floor_(CC2).png]][[File:PurpleBall.gif]]
|-
| [[File:Floor_(CC2).png]][[File:Recessed_wall_(CC2).png]][[File:Floor_(CC2).png]][[File:Floor_(CC2).png]]
|}
Chip checks collision to the right again, but this time doesn't fail, since the the monster has moved away at this point, and moves the block (and himself) succesfully.
(Note that if the the monster was after Chip in monster order, Chip would move first, failing at move phase, too)


== Special cases ==
== Special cases ==
Line 24: Line 123:
As all movable objects other than Chip and Melinda naturally override [[animation delay|splash and explosion animations]] rather than [[acting wall|treat them as walls]], all non-player entities that can push blocks will spring mine blocks on turtles by default, and do not need special setups.
As all movable objects other than Chip and Melinda naturally override [[animation delay|splash and explosion animations]] rather than [[acting wall|treat them as walls]], all non-player entities that can push blocks will spring mine blocks on turtles by default, and do not need special setups.


[[Player mimic]]s will always spring mine blocks instead of flicking them.
[[Player mimic]]s will always spring mine blocks instead of flicking them, because they never check collision at decision phase.
 
Yellow tanks cannot spring mine via the retreating monster method, because they do not attempt to move if they are blocked at decision phase.


[[Rover]]s and yellow tanks cannot spring mine via the retreating monster method.
[[Rover]]s can spring mine via both methods.


'''[[Despawning and Respawning Glitch]]''': Blocks of any type will instantly disappear if they spring mine another block off of a recessed wall, swivel door, or railroad track as described before while they are being pushed by another block-pushing entity.
'''[[Despawning and Respawning Glitch]]''': Blocks of any type will instantly disappear if they spring mine another block off of a recessed wall, swivel door, or railroad track as described before while they are being pushed by another block-pushing entity, because pushed blocks check collision in front of them two times, and report their outcome based on the first one, and only move if the second one is positive, resulting in the collision check succeeding even if only some blocks actually moved, causing Chip to unconditionally move towards the tile with the ice block, causing a despawn.


Attempting the retreating monster method on a railroad corner with any type of [[directional block]] other than 4-way will result in the block becoming stuck in place and immovable unless pushed off by an entity with a [[railroad sign]].
Attempting the retreating monster method on a railroad corner with any type of [[directional block]] other than 4-way will result in the block becoming stuck in place and immovable unless pushed off by an entity with a [[railroad sign]].


{{stub}}
[[Category:Glitches]]
[[Category:Glitches]]
[[Category:Mechanics]]
[[Category:Mechanics]]
trusted-editors
111

edits