News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Shaky view when following a convoy

Started by Rollmaterial, February 22, 2017, 08:52:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rollmaterial

When following a convoy, the views for travelling Northeast or Southwest are misaligned and make it very shaky.

jamespetts

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.

jamespetts

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.

Phystam

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.

jamespetts

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.