Opened 4 years ago

Closed 3 years ago

#12066 closed defect (fixed)

PETKA: Broken pathfinding

Reported by: Tkachov Owned by: whiterandrek
Priority: normal Component: Engine: Petka
Version: Keywords: pathfinding, walk
Cc: Game: Petka 1

Description

In ScummVM heroes sometimes choose a weird route when you ask them to walk somewhere.

Video demonstration: https://youtu.be/6fwc0zaqSTE (first 54 seconds are in the original game, the rest is in ScummVM).

There are no "Walk bug: Point doesn’t belong to any convex" messages during that. They just happen to select a strange path instead of a more "natural" one, while in the original game they select the "natural" one.

Attachments:

attachment:petka1.s16 ScummVM save file on the shown screen
attachment:save14.dat Original game save file

ScummVM 2.3.0git11899-g3fb4d67b4e (Jan 16 2021 05:21:57)
Windows 10 version 20H2 64-bit
Petka 1.0.0.1 aka Red Comrades 1

To reproduce:

  • load the save file;
  • select 'Walk' cursor (right click, then left click on the purple silhouette icon);
  • click somewhere (it seems if you alternate between above and below the fountain you could achieve this weird behaviour);
  • <you would see the character go somewhat indirectly in ScummVM, but won't see that in the original game>.

Attachments (3)

petka1.s16 (50.6 KB ) - added by Tkachov 4 years ago.
save14.dat (87.6 KB ) - added by Tkachov 4 years ago.
BIG-ZAL.BG.png (1.2 MB ) - added by Tkachov 4 years ago.

Download all attachments as: .zip

Change History (6)

by Tkachov, 4 years ago

Attachment: petka1.s16 added

by Tkachov, 4 years ago

Attachment: save14.dat added

by Tkachov, 4 years ago

Attachment: BIG-ZAL.BG.png added

comment:1 by Tkachov, 4 years ago

Added the region render to this ticket:


Red line shows the outline and green ones show the inner polygons. I've heard characters can only walk from one polygon to the other through the their common edge, but I have no proof of that. Anyway, it's clear that character shouldn't go behind the fountain, but on the video you can see her doing it.

comment:2 by whiterandrek, 4 years ago

Owner: set to whiterandrek
Resolution: pending
Status: newpending

Thanks
The problem is in that somewhere in the code it doesn’t match to dissasemly and it is very hard to find this glitchy part

comment:3 by whiterandrek, 3 years ago

Resolution: pendingfixed
Status: pendingclosed
Note: See TracTickets for help on using tickets.