Opened 13 years ago

Closed 13 years ago

Last modified 6 years ago

#2889 closed defect (invalid)

AMIGA: SCUMM: Characters walking backwards

Reported by: (none) Owned by: cyxx
Priority: low Component: Engine: SCUMM
Keywords: Cc:
Game:

Description

ScummVM 0.10.0svn (Oct 29 2006 17:06:54)
Features compiled in: Vorbis FLAC MP3 zLib MPEG2

Curse of Monkey Island:

Guybrush walks backwards!
Can easily be checked. In the very first room
(Wally and cannon) stand in front of the
restraint rope. Now point towards the cannon
opening and let Guybrush walk.

He will walk the whole way to the end of the
cannon AND the part beside the door backwars
until he turns around and face the opening.

Also some small parts on the first island he
walks backwards.

The Dig:

The characters (at least two at the same time)
on the strange planet are walking backward
when letting them move from engine to engine
of the wrecked spaceship.

Though i did not find equal occasions in other
SCUMM games (yet) it may be a glitch in handling
the character moving only in the newer SCUMM
games 8and maybe only in the OS4 build anyway).

Maybe someone of the devs can give me the
information which SCUMM version these two games
have, so i can cross check with other SCUMM
games i own that share the same version.

AmigaOS4 build
gcc version 4.0.2 (AmigaOS build 20051012)

This bug report was taken partly from the closed
bug # 1442282 though it's still there for me
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1442282&group_id=37116

Ticket imported from: #1587862. Ticket imported from: bugs/2889.

Attachments (1)

dig.s05 (27.5 KB ) - added by SF/*anonymous 13 years ago.
Just click on the right engine!

Download all attachments as: .zip

Change History (20)

by SF/*anonymous, 13 years ago

Attachment: dig.s05 added

Just click on the right engine!

comment:1 by (none), 13 years ago

Component: --Unset--

comment:2 by fingolfin, 13 years ago

Summary: SCUMM: AmigaOS4: Characters walking backwardsAMIGA: SCUMM: Characters walking backwards

comment:3 by Kirben, 13 years ago

COMI is the only SCUMM8 game.
The Dig and Full Throttle are SCUMM7 games, so worth checking Full Throttle too.

comment:4 by fingolfin, 13 years ago

As was stated in the bug report you quote -- this bug is almost certainly Amiga specific. Likely a bug in the compiler. Maybe try using a different
compiler or so. Other than that, there is likely nothing we can do about it.

comment:5 by fingolfin, 13 years ago

Priority: normallow

comment:6 by (none), 13 years ago

Is there something like a "pathfinder" part within the
SCUMM engine? Something that takes over when a character
needs to obey the walkboxes and takes care of it?
So, that no character would eventually walk "off" the
screen sometime?

I'm asking because i found something interesting, this
bug only occurs when i click on an object and the
character therefore has to move a little to stand
before it to reach or see it properly.

If i click on a spot "behind" (on it's back) a character
on the ground, he/she walks fine with turning around and
everything, no problems whatsoever, but as soon as i
click on an object, he/she starts to act strange and
"moonwalks". Maybe worth keeping in mind?

This happens on "The Dig" savegame provided.

Oh, btw: Absolutely no problems in the other
ScummV7 game "Full Throttle", no "moonwalking"
in the entire game.

It's worth in CMI on the ship, but gets better on
Thunder Island.

comment:7 by fingolfin, 13 years ago

Of course there is pathfinding code in SCUMM, how else would actors be able to "walk" freely in the scene? :-). And it works fine on all other platforms, too,
more or less unchanged in the past couple years... :-)

comment:8 by (none), 13 years ago

Grasp at straw here
not that it would be of any help :-)

Could it be an endian problem?

comment:9 by fingolfin, 13 years ago

Considering several of our developers (including me) use big endian systems all the time -- no, it can't be an endian issue.

comment:10 by (none), 13 years ago

ok, BUT https://sourceforge.net/tracker/?func=detail&atid=418820&aid=1506591&group_id=37116
is considered an endian problem, too...or at least
it's supposed to be...

...and as i understand it, big endian users (the devs)
don't have problems, but at least one user (besides me)
has...so, chances are that it *could be*?

errr...i don't like the flickering in your eyes
/me runs VERY fast :-)

comment:11 by fingolfin, 13 years ago

vampir_raziel, I know you just want to be helpful, but you aren't. Your guesses are all totally off. It's not an endian bug, period. If the cause for the issue was simple or obvious, trust me, we'd spot it.

As it is, a compiler bug still seems most likely to me.

comment:12 by cyxx, 13 years ago

TheDig and COMI are the only 2 SCUMM games using atan2() in the actor walking code (a "grep" with "GID_DIG" and "GID_CMI" shows it). Maybe there's a problem in the code generation for it with your compiler ?

Is the problem still present if you change the following line in scumm/actor.cpp :

_targetFacing = getAngleFromPos(deltaXFactor, deltaYFactor, (_vm->_game.id == GID_DIG || _vm->_game.id == GID_CMI));

to

_targetFacing = getAngleFromPos(deltaXFactor, deltaYFactor, false);

(This is of course not a proper solution, it's just for testing)

comment:13 by (none), 13 years ago

@cyx

I LOVE YOU CYX!!!

/me gives CYX A REALLLY BIIIIG ... (errr...better not)
:-D

THAT did it!!!

Thanks a lot

Both issues (COMI AND The Dig) are gone...
/me jumping with joy like an idiot :-)

comment:14 by fingolfin, 13 years ago

Err, not quite... to quote cyx: "This is of course not a proper solution, it's just for testing".

This change is *not* a proper fix, it just confirms that cyx's theory is correct (very good catch, by the way).

So a proper fix is still required. As it is, it appears atan2 doesn't work correctly on your system, which could indicate a bug in your library / an incompatible atan2 implementation.

comment:15 by (none), 13 years ago

@fingolfin

>Err, not quite... to quote cyx: "This is of course not
>a proper solution, >it's just for testing".

>This change is *not* a proper fix, it just confirms that
>cyx's theory is correct (very good catch, by the way).

I know, i was just happy, sorry

>So a proper fix is still required. As it is, it appears
>atan2 doesn't work correctly on your system, which could
>indicate a bug in your library / an incompatible atan2
>implementation.

What is atan2 / which library do you mean?
I dont think i heard of this before, maybe there isn't
such a library/implementation on AmigaOS4 at all?

comment:16 by cyxx, 13 years ago

atan2() is trigonometric function (along with cos(), sin() etc.), it's usually "included" in the math library ("-lm" option at link time).

I think you *have* an implementation of it on your system (otherwise you'd probably have linking errors when compiling ScummVM), but, as Max suggested, it's probably incompatible or buggy.

You may want to have a closer look at your compiler flags (GCC ?) to "fix" this.
Some ideas :
- look at the optimisation options (-Ox)
- depending on your processor, maybe use an option to enable/disable intrinsic functions

I am closing this item since it's not a problem with ScummVM, but rather with your compiler/compilation setup.

comment:17 by cyxx, 13 years ago

Status: newclosed

comment:18 by Kirben, 10 years ago

Owner: set to cyxx
Resolution: invalid

comment:19 by Strangerke, 6 years ago

Component: --Unset--Engine: SCUMM
Note: See TracTickets for help on using tickets.