Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9961 closed defect (fixed)

TITANIC: Incorrect movement locking 2nd and 3rd stars in starfield

Reported by: dreammaster Owned by: dafioram
Priority: normal Component: Engine: Titanic
Version: Keywords:
Cc: Game: Starship Titanic

Description

Despite movement happening when locking in the 2nd and 3rd star, it frequently jumps to an incorrect position rather than starting the movement from the current position. Plus, the end of the movement is occasionally to the wrong position, so that the markers don't fall on the highlighted stars.

Attachments (2)

titanic-win.045 (101.8 KB ) - added by dreammaster 7 years ago.
Bridge
Orig2Locked.png (118.2 KB ) - added by dafioram 7 years ago.
Original game. If you lock the 2nd star then unlock and relock it will throw the view to something like this

Download all attachments as: .zip

Change History (9)

by dreammaster, 7 years ago

Attachment: titanic-win.045 added

Bridge

comment:1 by dafioram, 7 years ago

I believe this bug will be difficult to narrow down since it very often works exactly as it should.

I seen that even before the third star it will often have trouble locking onto the 2nd star.

by dafioram, 7 years ago

Attachment: Orig2Locked.png added

Original game. If you lock the 2nd star then unlock and relock it will throw the view to something like this

comment:2 by dafioram, 7 years ago

In PR997 I have added some code to prevent this situation from happening for 2 stars locking. It still happens for 3 stars, but it doesn't look as bad for 3 stars, since it just misses by a little bit.

Just like in the original not all stars can be used to complete the puzzle and this is no different.

The issue was happening when the player was locking onto a second star and the distances the mover had to move to was > 1e8. This lead to the speeds being large. I suspect the distance from the older to the new position is the same reason for the 3 stars having issues.

comment:3 by dafioram, 7 years ago

The commit that added the restriction on locking 2 stars for large distances was 2a96a6fc7288a33a3726191338308af3581c9883 (Aug 20).

comment:4 by dafioram, 7 years ago

Owner: set to dafioram

comment:5 by dafioram, 7 years ago

Owner: changed from dafioram to dreammaster
Resolution: fixed
Status: newpending

Fixed in PR1003.

The game locks correctly for all distances. I've forced the mover (in CStarCamera::lockMarker2) to start where it is going to end up (_mover->transitionBetweenPosOrients(newPos, newPos, oldOr, newOr)) so that it doesn't have to encounter any issues when moving.

I've removed the condition that prevented the lock from being attempted since that was a workaround until this fix.

It does do a pan from the side sometimes, but it always locks.

comment:6 by dafioram, 7 years ago

Owner: changed from dreammaster to dafioram
Status: pendingclosed

comment:7 by dafioram, 7 years ago

The fix I applied was only when locking onto star2.

After more testing I've observed it for locking onto star3 so the same fix that was done for star2 locking has now been done to star3 in 4e586ba43d9eeff96555be38c89f60209e7ddb0a (Sep 2).

Note: See TracTickets for help on using tickets.