Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Pushed clones incorrectly die on hot tiles
New Topic New Poll Post Reply
Poster Message
lopsidation
Level: Master Delver
Avatar
Rank Points: 176
Registered: 05-30-2008
IP: Logged
icon Pushed clones incorrectly die on hot tiles (0)  
(1) If you push a clone across hot tiles, the clone lives.
(2) If a mimic pushes a monster across hot tiles, the monster lives.
(3) If a mimic pushes a clone across hot tiles, the clone dies.
(4) If a clone pushes you across hot tiles, you die.

The last two are incorrect behavior.

An example for the last one:
BC
/\
(Beethro and a clone have crossed sticks, and Beethro is standing on a hot tile)
If you turn Q, you die, even though you get pushed off the hot tile.

(This is in build 5.0.0.5293, but I didn't see anything related in the 5.0.1 changelog.)

____________________________
"Happiness is like a cat. If you pay no attention to it and go about your business, you'll find it rubbing against your legs and jumping into your lap."

[Last edited by lopsidation at 07-22-2014 04:57 PM]
07-22-2014 at 04:44 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
bomber50
Level: Smitemaster
Rank Points: 872
Registered: 09-18-2006
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (0)  
This is not a bug, but rather a matter of movement order.

There are two things worthy of note here.

First, the check for whether an entity dies due to hot tiles happens when it is that entity's turn to move.

Second, Beethro moves before clones, and clones move before mimics, and mimics move before all the other monsters.

In the third and fourth examples you gave, the clone/Beethro moves first, and it is already dead before the mimic/clone even gets a chance to move.


07-22-2014 at 04:53 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
lopsidation
Level: Master Delver
Avatar
Rank Points: 176
Registered: 05-30-2008
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (0)  
I disagree. Point (1) is inconsistent with point (3). In either case, the clone gets pushed one space per turn. If only two monsters exist, then movement order shouldn't matter -- after all, they're just taking turns.

Even if you believe movement order should kill the clone in (3), here's a situation related to (4) which is definitely a bug.
1
BC
/\

Again, Beethro and a clone have crossed sticks. Beethro is standing on a hot tile, and there is also a hot tile at [1]. Beethro also has a speed potion.

Let's compare two situations: (A) Beethro turns Q and then waits, and (B) Beethro steps north and then waits.
          (A)                      (B)
Beethro turns Q                Beethro moves north
Clone pushes Beethro onto [1]
Beethro waits and dies         Beethro waits and lives
In situation (A), Beethro dies, even though less time has passed since he last moved than in situation (B).

EDIT: There is an even worse situation. Let's say Beethro is pushing a normal monster across hot tiles, with a speed potion. Suppose he alternates pushing and waiting. Then the monster lives if he pushes on half-turns, and dies if he pushes on whole-turns. However, if Beethro is pushing a clone, the clone lives no matter what.

____________________________
"Happiness is like a cat. If you pay no attention to it and go about your business, you'll find it rubbing against your legs and jumping into your lap."

[Last edited by lopsidation at 07-22-2014 05:27 PM : It get worse.]
07-22-2014 at 05:10 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
bomber50
Level: Smitemaster
Rank Points: 872
Registered: 09-18-2006
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (0)  
[A] does look like a bug, or some very unintuitive behaviour. It seems that Beethro pushing himself from one hot tile to another without actually moving results in the hot tile counter not being reset.
07-22-2014 at 05:42 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
lopsidation
Level: Master Delver
Avatar
Rank Points: 176
Registered: 05-30-2008
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (+3)  
OK, how the heck should we handle this?

Here's a plot of possible movement sequences when crossing hot tiles. The horizontal axis is time, and each vertical black line represents one turn. Whose turn, you ask? The turn of whichever monster we're currently considering.


Look at the first row of red dots. One red dot means "move now". Each red dot is on a black line, i.e., one turn. So this row represents any monster walking across hot tiles normally.

The second row represents a clone being pushed by Beethro. From the clone's perspective, it moves slightly before each of its turns.

The third row represents a clone getting pushed by a mimic.

The fourth row represents a clone getting pushed by a mimic, and after three turns, Beethro takes over. Or maybe it represents a clone getting pushed by mimic #1, and after three turns, mimic #2 takes over.

The fifth row represents situation (4) in the first post. On turn three, Beethro turns Q, and moves slightly later than he otherwise would have.

The sixth row represents Beethro walking across hot tiles. On turn three, the player switches to a clone, and pushes the inactive Beethro. Then the player switches back to Beethro and keeps walking. As a result, Beethro's "turn 3" happens later than it otherwise would have.

The seventh and final row doesn't represent any situation in particular. It's a movement sequence that I believe is never possible to survive.

I believe that rows 1, 2, 3, and 6 should definitely always be survivable. I can't think of a situation where you should survive row 7. I think row 5 can go either way. And I have no idea what to do about row 4.

Gah, this is complicated.

____________________________
"Happiness is like a cat. If you pay no attention to it and go about your business, you'll find it rubbing against your legs and jumping into your lap."

[Last edited by lopsidation at 07-22-2014 06:13 PM]
07-22-2014 at 06:13 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Trickster
Level: Smitemaster
Avatar
Rank Points: 644
Registered: 07-03-2007
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (+1)  
This reminds me of an interesting bit in Advanced Concepts where the architect illustrates how Beethro can walk through mimics stabbing him with swords and not be killed due to the movement order involved between mimics and sword tokens. I don't know if this particular case is avoidable, but some of it isn't avoidable (and the super-non-intuitive cases are generally considered foul play for architecture except in relevant contests or if the lynchpin is demonstrated in hold).

____________________________
Trickster

Official Hold Progress
Click here to view the secret text

Favorite Unofficial Holds (I need to play more!)
Click here to view the secret text

My Holds
Click here to view the secret text

07-22-2014 at 07:54 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 1119
Registered: 06-14-2005
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (0)  
With the crossed sticks, isn't Beethro pushing himself? That's what it feels like to me, anyway. Indeed it is - if it's a mimic it's stunned and thus doesn't receive a turn. So that definitely shouldn't cause Beethro to die.

I can't reproduce (4), although I have admittedly not updated yet either.
07-23-2014 at 01:23 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Trickster
Level: Smitemaster
Avatar
Rank Points: 644
Registered: 07-03-2007
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (+2)  
quote:
lopsidation wrote:
OK, how the heck should we handle this?

I don't know if that helped us any but Imma give you a +1 just for going to the DROD-related trouble of drawing that thing with the dots.

I shall call it "the music box of confusion"

____________________________
Trickster

Official Hold Progress
Click here to view the secret text

Favorite Unofficial Holds (I need to play more!)
Click here to view the secret text

My Holds
Click here to view the secret text

07-23-2014 at 02:23 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 3362
Registered: 02-20-2007
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (0)  
quote:
lopsidation wrote: EDIT: There is an even worse situation. Let's say Beethro is pushing a normal monster across hot tiles, with a speed potion. Suppose he alternates pushing and waiting. Then the monster lives if he pushes on half turns, and dies if he pushes on whole-turns. However, if Beethro is pushing a clone, the clone lives no matter what.

Bump.

bomber50's hold in beta Elemental Fun contains a room with this behaviour, so it's become more urgent to decide what to do about it. At the moment, if a speeded Beethro is pushing a roach, one tile per half-turn, and then waits once, the roach will die if he waits on a full turn, but live if he waits on a half-turn. This is clearly wrong.

I don't know how hot-tile deaths are handled internally, but I think being pushed should reset the inner timer, so that the entity can only die if it remains stationary the following turn. This is, in fact, supported by row 7 of lopsidation's chart, which can be tested using Imperative Non-stunnable, and the entity survives. Specifically, Beethro pushes an NPC with Imperative Non-stunnable onto a hot tile. The NPC is programmed to move to a certain square, but on that turn it is blocked. Later the same turn, another NPC steps on a pressure plate, unblocking it. Next turn, the NPC successfully moves off the hot tile without dying.

____________________________
50th Skywatcher
02-06-2015 at 10:58 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dragon Fogel
Level: Smitemaster
Rank Points: 1090
Registered: 06-21-2014
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (0)  
Having played around with hot tiles and pushing, I can tell you how hot tile deaths work in terms of timing: they happen at the moment of the entity's turn. Specifically, they happen if an entity is on a hot tile when its turn comes up and it hasn't moved; you can see this most clearly by making a character with its speed set so that it moves before a brain, then have the character place a hot tile under the brain. The brain dies immediately on that turn.

So this is what's causing 3 and 4 in the original post. In case 4, Beethro can't be saved by turning in such a way that he gets pushed, because the moment that he turns is the moment that the game checks if he's dying from a hot tile.

Similarly, clones get their "turns" before mimics, I think, even though the clone doesn't actually move when it's not the active one, and this is what causes Case 3. But Beethro gets his turn before the clone does, so he can successfully push it.

In other words, experimentation suggests that the hot tile check as it stands now is something like this:
-Entity's turn comes up
-Am I on a hot tile?
-Do I move to a new tile?
-If the answers are Yes and No, respectively, the entity dies.

Before 5.0, the only oddity with this was placing a hot tile under an entity before its turn. There seems to be an exception for "have I just been pushed", but not for having a hot tile created under you.

This also suggests that for the case of a mimic pushing another mimic on a hot tile, whether the push succeeds or fails is dependent on which mimic moves first. That said, since the pushed mimic would attempt to move anyways, this is only relevant in a few situations. (Turning; pushed mimic is stunned; there's water or a pit keeping it from moving, in which case the difference is which tile it dies on; something happens after the pushed mimic's turn that would allow the push to succeed, but it doesn't because the mimic dies on the hot tile first)

Whatever else is done, it seems to me that Case 3 can be fixed with no other noticeable changes in behavior just by having mimics move before clones "move". I can't think of anything that can happen on an inactive clone's turn other than dying on hot tiles anyways.
02-06-2015 at 03:12 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 3362
Registered: 02-20-2007
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (0)  
But, as Someone Else pointed out, in case 4 Beethro is causing himself to get pushed on his own turn. (This can be seen by deleting the hot tiles, replacing the clone with a guard, and having another guard nearby. When Beethro turns, on his own turn he pushes guard #2, causing himself to be pushed, and then before guard #2 even gets a turn, guard #1 reacts to his new location and kills him.) So it's an oversight in the game logic -- the hot tile check is firing too soon, before the game has checked whether Beethro's action will result in him moving.

____________________________
50th Skywatcher
02-06-2015 at 04:12 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Dragon Fogel
Level: Smitemaster
Rank Points: 1090
Registered: 06-21-2014
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (0)  
Oh right, somehow I was interpreting Case 4 as "Beethro turns and a mimic pushes him", which would make him die immediately upon turning before the mimic's push could save him.

So the logic seems to be: "did I get pushed before my turn", and if the answer is yes, you don't die. Being pushed after your turn clearly doesn't help; and Case 4 suggests that being pushed during your turn doesn't help either.

However, now that I take a closer look at the earlier posts, the speed potion oddity Lopsidation pointed out suggests that it's not a weird consequence of intended behavior, but rather something not being updated when you're pushed on your own turn.
02-06-2015 at 05:13 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
blorx1
Level: Smitemaster
Rank Points: 903
Registered: 07-18-2009
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (0)  
Can we get some clarification from a dev or something about what should be happening in these cases. It'd be nice to know.

____________________________
If you need to think outside of the box, then you didn't build a good enough box.
07-18-2015 at 03:07 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 2412
Registered: 12-28-2004
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (+2)  
To break down these cases we need to know how hot tiles and movement order work internally.

Just so you know, when I say entity I mean an NPC, a monster, the player, Halph or basically anything from the last tab in the editor, including inactive clones, decoys and temporal projections.

Hot tiles damage is calculated at the end of each entity's turn. If, since the last turn, the entity's position didn't change in any way the entity will be damaged. Let's say each entity has a flag saying "movedThisTurn", and the overall code looks like this:

Before anything moves:
 - Set every entity's movedThisTurn to false

Process movement of each entity:
 - Process my move
 - If I changed my position, set movedThisTurn to true
 - If I am on a hot tile AND my movedThisTurn is false, do the hot tile attack



Entities move in the following order (as always ties are broken by the order the entities were added to the room):
First is the Player
Then Temporal Projections
Then Player doubles (Mimic, decoy, inactive clones).
Then some other entities we won't use in our examples.
Then Regular Monsters.

It is important to realize that inactive clones are still entities which movement (permanent waiting) is processed each turn and they are killed by the hot tiles after they "move".

So let's break down the four cases and look for issues:

(1) If you push a clone across hot tiles, the clone lives.
Order of action:
1. Each entity's movedThisTurn is set to false.
2. Player moves, the move pushes clone, clone's movedThisTurn is set to true.
3. Clone is stunned so it doesn't move but its movedThisTurn is true (thanks to being pushed) so it is not damaged by the hot tiles. The clone survives.

(2) If a mimic pushes a monster across hot tiles, the monster lives. (we will assume the monster is a roach)
Order of action:
1. Each entity's movedThisTurn is set to false.
2. Player moves.
3. Mimic moves because player has moved. It pushes the roach setting its movedThisTurn to true.
4. Roach can't move because it's stunned but its movedThisTurn is true (thanks to being pushed) so it is not damaged by the hot tiles. The roach survives.

(3) If a mimic pushes a clone across hot tiles, the clone dies.
Order of action, assuming the mimic was placed before the clone:
1. Each entity's movedThisTurn is set to false.
2. Player moves.
3. Mimic moves because player has moved. It pushes the clone setting its movedThisTurn to true.
4. Clone can't move because it's stunned but its movedThisTurn is true (thanks to being pushed) so it is not damaged by the hot tiles. The clone survives.

Order of action, assuming the clone was placed before the mimic:
1. Each entity's movedThisTurn is set to false.
2. Player moves.
3. Clone waits and because its movedThisTurn is set to false it is attacked by the hot tiles. The clone dies, we lose the room.
4. Mimic moves because player has moved. It pushes the clone setting its movedThisTurn to true but it doesn't matter because it already died.
5. We lose the room.

(4) If a clone pushes you across hot tiles, you die.
This one is an actual bug. Before processing the reactions to player turning a flag is set bStayedOnHotFloor to true. Then, once the reactions to player move are calculated, even though the player's position changes the game doesn't make another check for that and just kills the player. And it doesn't matter what entity is being pushed by (and pushes) the player, it's always the same.

So out of these four cases only the last one is incorrect, even though the third one seems to be weird.

____________________________
My website | Facebook | Twitter
07-29-2015 at 10:37 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 2412
Registered: 12-28-2004
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (+1)  
Case #4 has been fixed in 5.0.2.1004.

____________________________
My website | Facebook | Twitter
07-29-2015 at 11:22 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
skell
Level: Legendary Smitemaster
Avatar
Rank Points: 2412
Registered: 12-28-2004
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (+1)  
Also, a change has been made for 5.0.2.1004: When player is speed up monsters pushed around on hot tiles will only be killed if they stay in place for a total of two half-turns

This fixes this case by lopsidation:

quote:
EDIT: There is an even worse situation. Let's say Beethro is pushing a normal monster across hot tiles, with a speed potion. Suppose he alternates pushing and waiting. Then the monster lives if he pushes on half-turns, and dies if he pushes on whole-turns. However, if Beethro is pushing a clone, the clone lives no matter what.


____________________________
My website | Facebook | Twitter
07-30-2015 at 12:22 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
bomber50
Level: Smitemaster
Rank Points: 872
Registered: 09-18-2006
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (+1)  
Confirmed that player will no longer be killed by hot tile in a situation where: the player is standing on one, rotates CW or CCW which pushes another entity which, by being pushed, pushes the player off the hot tile in 5.0.2.1004.

Also, monsters only seem to die if they stay on same square for two half-turns, minus the ones that hyperme found (plus wubbas).
08-10-2015 at 10:00 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 3362
Registered: 02-20-2007
IP: Logged
icon Re: Pushed clones incorrectly die on hot tiles (0)  
Bump.

There is still a bug here with timeclones. If Beethro pushes a timeclone onto a hot tile, it immediately burns. Expected behaviour is that it becomes stunned and will die the next turn unless pushed off.

____________________________
50th Skywatcher

[Last edited by Nuntar at 05-16-2016 11:17 AM]
05-16-2016 at 11:15 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Pushed clones incorrectly die on hot tiles
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.