Author Topic: Shaky view when following a convoy  (Read 789 times)

0 Members and 1 Guest are viewing this topic.

Offline Rollmaterial

Shaky view when following a convoy
« on: February 22, 2017, 08:52:44 PM »
When following a convoy, the views for travelling Northeast or Southwest are misaligned and make it very shaky.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15855
  • Total likes: 407
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Shaky view when following a convoy
« Reply #1 on: February 22, 2017, 09:01:53 PM »
I see what you mean - that is very odd, as I have not altered the graphics code from Standard. Does anyone know whether this can be reproduced in Standard?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15855
  • Total likes: 407
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Shaky view when following a convoy
« Reply #2 on: April 02, 2017, 11:26:31 PM »
I have recently applied the latest graphics changes from Standard, and this still appears to be an issue. This is very odd, since I have not explicitly changed any of the graphics code, and I have no idea how the graphics code works, so trying to work out the nature of the problem by debugging in the usual way would take a gargantuan amount of time.

May I ask the Standard developers - has this ever been an issue in Standard, or have there been any changes to the code in Standard in the last few months that might, if some other part of the code were not changed appropriately, cause this?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Phystam

Re: Shaky view when following a convoy
« Reply #3 on: July 01, 2017, 11:07:20 AM »
I found the answer for this issue, it was very easy typo.
In "simworld.cc", there are some code to follow convoy around L4580. (in karte_t::sync_step() function)
"new_xoff" looks okay but "new_yoff" has small change compared with standard one.

Standard code:
new_yoff -= tile_raster_scale_y(-v.get_yoff(), rw) + ...
Extended code:
new_yoff -= tile_raster_scale_y(-v.get_hoff(), rw) + ...

When I changed this part, the performance became okay.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15855
  • Total likes: 407
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Shaky view when following a convoy
« Reply #4 on: July 01, 2017, 01:22:30 PM »
Excellent, thank you very much! I have tested this and it indeed works. That is very helpful. I have now applied this fix to the master branch.

Thank you again.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.