Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Slayer/Stalwart Pathmapping with Snapshots
New Topic New Poll Post Reply
Poster Message
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged

File: Extreme Pathmapping.hold (1.8 KB)
Downloaded 50 times.
License: Public Domain
icon Slayer/Stalwart Pathmapping with Snapshots (+2)  
Was experimenting with different behaviors, when I came across this problem. I've attached a hold that should hopefully demonstrates it: I've managed to duplicate the bug multiple times, so I'm hoping it'll be somewhat helpful.

Essentially, this room has a single Slayer killing a mass of Stalwarts all on Oremites. Obviously, it gets rather slow very quickly. The problem is that after about Turn 32, a divergence occurs: if you hit Undo, you find that the Slayer decided to go in a different direction and thus ends up in a very different place once the commands have been recycled through.

I apologise for the amount of objects on screen at once: since this is a snapshot-related issue (MaxDelayForUndo changes whether you see it or not), I couldn't think of any easy ways to simplify it while still keep an easily duplicatable error. At MaxDelay of 100 and 500, I saw the bug after undoing around Turn 32: the new Turn 31 has the Slayer surrounded by Stalwarts on all sides, rather than the N and S spaces being empty. Multiple other Stalwarts are also in different places. And of course, this is immediately after a snapshot has been saved: undoing past that reverts back to normal behavior.

If you need more information, I'll be happy to try and provide it.
10-27-2007 at 03:39 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5476
Registered: 02-04-2003
IP: Logged
icon Re: Slayer/Stalwart Pathmapping with Snapshots (0)  
Thanks for the hold and report. I'll look into it when I can. My plan of attack is to first look at the CSlayer and CStalwart classes and see whether they access either member or static vars that wouldn't be correctly maintained on snapshot or by the Clone method (i.e. default copy constructor).
10-29-2007 at 06:16 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
schep
Level: Smitemaster
Avatar
Rank Points: 865
Registered: 03-01-2005
IP: Logged
icon Re: Slayer/Stalwart Pathmapping with Snapshots (+3)  
When a monster is killed, its wProcessSequence member may be reused to indicate the direction of gut-splattering. (Man, explaining bits of DROD code is so much more fun than describing code from my real job.) But when something kills by stepping rather than by weapon, CMonster::Move() sets wProcessSequence on the killer, not the victim. So the Slayer here has an incorrect wProcessSequence, which only visibly screws things up after a snapshot is taken and then used. I will probably fix and test this tomorrow.

Edit: Yup, a simple change both fixed the snapshot issue and caused the Stalwart blood to spatter in the direction of the Slayer's movement.


[Last edited by schep at 12-04-2007 02:26 AM]
12-03-2007 at 06:01 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Slayer/Stalwart Pathmapping with Snapshots
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.9
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.