#4145 closed defect (fixed)
COMI: Jerky camera movement
Reported by: | eriktorbjorn | Owned by: | Kirben |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: | Monkey Island 3 |
Description
Latest ScummVM SVN snapshot English version of the game
I tried The Curse of Monkey Island in Wine briefly, and noticed that the camera movement in the original is a bit smoother than in ScummVM when it follows Guybrush around. In ScummVM, the speed of the movement changes noticeably, while in the original the speed looks more constant.
There is a change I can make to ScummVM that makes it look more like the original to me, and the change makes at least some sense. In ScummEngine_v7::setCameraFollows() there is this:
if (VAR(VAR_CAMERA_SPEED_X) < 8) VAR(VAR_CAMERA_SPEED_X) = 8;
if (VAR(VAR_CAMERA_SPEED_Y) < 8) VAR(VAR_CAMERA_SPEED_Y) = 8;
This makes the camera speed at *least* 8 (pixels?). If I change the "<" to ">", making the camera speed at *most* 8, it looks better to me. But is it correct?
Ticket imported from: #2580705. Ticket imported from: bugs/4145.
Attachments (3)
Change History (15)
by , 16 years ago
comment:1 by , 16 years ago
Incidentally, that particular camera logic has been there for at least seven years. It appears to have been added in revision 3532, "better full throttle support, a couple of MI2 fixes."
comment:2 by , 16 years ago
I agree that this looks fishy, but maybe somebody (cyx?) can verify what the original did there... ?
comment:3 by , 16 years ago
Owner: | set to |
---|---|
Summary: | CMI: Jerky camera movement → COMI: Jerky camera movement |
by , 16 years ago
Attachment: | moveCamera_v8.txt added |
---|
comment:5 by , 16 years ago
Owner: | removed |
---|
comment:6 by , 16 years ago
I don't speak assembly but if "jle" means what I think it does, I guess my change is correct. Is it the same in V7 games? (As I wrote earlier, the code was originally added for "better full throttle support".)
comment:7 by , 16 years ago
Yes, your code changes are correct, judging by disassembled code of moveCamera function in FT, DIG and COMI.
I added your code changes to both branches of ScummVM SVN.
comment:8 by , 16 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:9 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | closed → new |
comment:10 by , 16 years ago
I just noticed that this leads to a problem with my old (late 2007/early 2008) CMI savegames, though. For whatever reason, at some point early in the game, the camera acceleration and threshold variables were all set to 0. I have no idea when this happened. I have a savegame before talking to the Voodoo Lady where they're ok, and a savegame afterwards where they're not, but I haven't been able to reproduce it.
When it does happen, though, the camera following the actor still works. But it seems manual camera movements do not. For instance, when going to Skull Island the camera just sits there, not moving, so you never arrive.
I'm not sure what we should do about this. I did notice there are at least two camera-related opcodes that we don't implement (see o8_cameraOps()), but that may be completely unrelated. File Added: comi.s65
comment:11 by , 16 years ago
I added code to correct x/y values for VAR_CAMERA_THRESHOLD and VAR_CAMERA_ACCEL variables, in older saved games.
I wonder how those variables actually ended up zeroed, since they are never altered by scripts or by engine code (after their initial settings).
Those variables should have been set correctly in COMI after revision 20906 (25th February 2006), and that saved game is marked as version 73 (well after that date).
comment:12 by , 16 years ago
Status: | new → closed |
---|
Savegame at the beginning of Part II of the game.