Opened 21 months ago

Closed 20 months ago

Last modified 20 months 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
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 21 months ago.
Bridge
Orig2Locked.png (118.2 KB) - added by dafioram 20 months 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)

Changed 21 months ago by dreammaster

Attachment: titanic-win.045 added

Bridge

comment:1 Changed 20 months ago by dafioram

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.

Changed 20 months ago by dafioram

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 Changed 20 months ago by dafioram

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 Changed 20 months ago by dafioram

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

comment:4 Changed 20 months ago by dafioram

Owner: set to dafioram

comment:5 Changed 20 months ago by dafioram

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 Changed 20 months ago by dafioram

Owner: changed from dreammaster to dafioram
Status: pendingclosed

comment:7 Changed 20 months ago by dafioram

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.