Opened 4 months ago

Closed 3 months ago

#12666 closed defect (fixed)

SCUMM: Dodgy path finding in Indy 3

Reported by: eriktorbjorn Owned by: athrxx
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Indiana Jones 3


If you leave Indy's office through the window (which probably means you solved the students puzzle the easy way), Donovan's men will appear to pick you up. Indy is supposed to follow them to the car, but in ScummVM he walks up and down for a bit first.

This happens both with the 256-colour DOS version and the 16-colour Mac version. (I don't have the 16-colour DOS version, but I assume it happens there as well.)

It does not happen if you play the game in DOSBox or a Mac emulator.

Change History (11)

comment:1 by eriktorbjorn, 4 months ago

Perhaps related to this, while playing through the Mac version in preparation for I once came across a guard in the zeppelin maze that was walking on air, straight towards me. I don't know how to reproduce that, though.

comment:2 by athrxx, 4 months ago

I am pretty sure that this is my fault (commits c57243ae / 3a4e3879). When I comment out these 2 lines Indy won't do the up/down walk.

I'll check disasm some more whether this has to be limited to ZAK and/or FM-TOWNS or whether it needs some other type of repair...

comment:3 by athrxx, 4 months ago

That whole scene is quite interesting. If you compare the whole scene with DosBox side by side with ScummVM there are a lot of wrong facings and movements there which aren't caused by my changes. Maybe these can get fixed, too...

comment:4 by athrxx, 4 months ago

I have now fixed a couple of things.
Turns out that my commits c57243ae / 3a4e3879 aren't the cause (Indy did some walking upwards already), but they kind of magnified the symptoms...

Indy will now walk correctly towards the "meeting point" (correct path, correct facing). All the men will look in the right directions. No more up/down walk for Indy. And he will walk on the street instead of on the grass.

The scene is not yet perfect, Donovan's men seem to walk kind of in a half circle in the beginning. But I'll address that separately.

Now, it will be interesting to see whether we still have issues like or
(probably the same thing)...

Please do as much testing as you find the time :-)

comment:5 by athrxx, 4 months ago

After some rather tedious research I hope that I have now nailed the walking for SCUMM3.

This particular scene seems to be pixel-perfect now. I have compared at least the first part frame by frame with DOSBox debugger.

I haven't tested much else, though. Just a bit of the Venice catacombs, castle Brunwald and the Hitler scene in Berlin. Also the ZAK FM-TOWNS intro and a a few scenes in LOOM. So let's see how it holds up...

comment:6 by eriktorbjorn, 4 months ago

One promising sign is that it looks to me as if the workaround for bug #560 can be removed from ScummEngine_v5::getActorY(), i.e. this one:

	if (( == GID_INDY3) && !(_game.platform == Common::kPlatformMacintosh)) {
		a = getVarOrDirectByte(PARAM_1);

		// WORKAROUND bug #560 (can't get into Zeppelin)
		if (_roomResource == 36) {
			setResult(getObjY(a) - 1);
	} else
		a = getVarOrDirectWord(PARAM_1);

Can you check if it works without the special case on your end too?

comment:7 by athrxx, 4 months ago

Sure, I'll check that.

I've also notice something else I fixed :-) : When walking up the stairs at the Berlin airport Indy would do a weird 180° motion. Now he walks up normally.

comment:8 by athrxx, 4 months ago

I have just tested the Zeppelin entry scene with FM-Towns, since I do have a savegame at the airport for that version. Indeed, the workaround seems not to be needed any more.

comment:9 by athrxx, 4 months ago

I just managed to walk through the dreadful zeppelin maze. None of the guards was floating, walking through air or otherwise leaving the walkways (as described in or So, that also seems to be a good sign...

in reply to:  9 comment:10 by eriktorbjorn, 3 months ago

Replying to athrxx:

I just managed to walk through the dreadful zeppelin maze. None of the guards was floating, walking through air or otherwise leaving the walkways (as described in or So, that also seems to be a good sign...

You asked on IRC if I thought this issue could be closed. Since it works for me now, if you feel like there is nothing more that needs to be done then please go ahead and close it. As you said, we can open new ones later if needed.

comment:11 by athrxx, 3 months ago

Owner: set to athrxx
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.