News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Recent posts

#71
I used the pak64 from sourceforge. Simutrans can built the (above the snow line with winter images, like classic road) bridge and displays is but crashes on loading the same game. The ASAN stops execution with heap overflow when acessing the image_list 5 and 6 which according the makeobj dump are there.

But I tried it on a different computer with a different version from MSVC and it works. So a certain version of ASAN seems buggy. Ah, compiler errors, I hate them so much.
#72
Technical Documentation / Re: Clarification needed on co...
Last post by poppo - April 08, 2026, 11:47:59 PM
A Vehicle's position is determined by its front position. So, the last car's end position can be "stick out" for the rear from reserved tiles.
When reversing, we put vehicles spacing out by the length of vehicles. However, as mentioned above, the length of the last car was not taken into account before reversing. So, vehicles cannot advance a distance equal to the last car's length.
But, the total length of convoy except the last one is a multiple of 16, convoys can advance the length of the last car without any problem. If all cars' length are 8, the total length except the last car is 16 or the last car length is equal to the remaining length of the tile. So, This isn't an issue for vehicles that length are 8.

In addition, convoy does not go the end of the tile(steps=255) when going north- or westwards. please see vehicle.cc or rail_vehicle.cc (but this "stopping at the middle of the tile" can cause some problems, imo).
#73
Technical Documentation / Re: Clarification needed on co...
Last post by Nazalassa - April 08, 2026, 06:22:58 PM
Why then does it only happen when the convoy is going north- or westwards, can't the convoy "stick out" of the tile when going in other directions as well? Also, I noticed that convoys which vehicles all have length 8 don't "jump", so why would slightly shorter/longer convoys have to?

Besides, I do not see how the convoy would "stick out" (assuming the new position computation is done correctly) on an unreserved tile, since all tiles with vehicles in them are reserved - in the following situation, both platform tiles are actually reserved when the train reverses:

teleport.gif

(of course, computing the new position needs to be done correctly... As I understand it, train_length should at the end be <total length of train> when facing south/east, and <total length of train> - <length of first vehicle> when facing north/west, for the convoy to reverse in place.)
#74
Cannot reproduce when compiling pak128, valgrind also does not show errors for me.
What source files and command line options are you using for makeobj?
#75
MSVC stops execution when accessing imageslist at child 5 and 6, which makeobj says are there and which have a valid child count and pointer.

If this is just an error of MSVC ASAN, I would be glad if the linux people could test this with the gnu/clang equivalent. I spent the evening debugging, but all looks ok.
#76
Technical Documentation / Re: Clarification needed on co...
Last post by poppo - April 08, 2026, 03:37:52 AM
When a convoy goes back direction, we must be careful not to go beyond its original position! If it sticks out, it will interfere with the switch on the adjacent tile and cause a traffic jam (so, we must move only limited tiles when train_length%16>0).

Furthermore, if you want to remove the "jumping" when reversing, there are two additional points to keep in mind.
First, the image of opposite direction is not same position. So, you must care about the offset of reversing (but there are no information about it)
Second, stopping position is not the end of the tile(especially for North and West direction). so, when we reposition convoys, convoy can be jumping.
#77
Bug Reports / Re: Wrong citylist when creati...
Last post by prissi - April 08, 2026, 12:25:09 AM
Well, I am working on exposing the name language too. It is just a tab on the langugage screen.

And comitted.
#78
Bug Reports / Re: Free road utopia created o...
Last post by Andarix - April 07, 2026, 07:17:53 PM
This problem has existed for quite some time in the server game.

Sorry, I can't find the thread about it anymore.

[EDIT]

https://forum.simutrans.com/index.php/topic,23477.0.html
#79
Bug Reports / Re: Wrong citylist when creati...
Last post by Roboron - April 07, 2026, 04:53:54 PM
Quote from: prissi on April 05, 2026, 02:03:22 AMApprantly, starting a new game does not reset the name language.

It does reset the language but not the citylist/streetlist language files. Fixed in r11922 by calling translator::init_custom_names on game creation as is done on network join.
#80
Technical Documentation / Clarification needed on convoy...
Last post by Nazalassa - April 07, 2026, 04:40:39 PM
I noticed that under certain circumstances, upon reversing convoys shift themselves by some amount, most noticeably when they contain vehicles of non-standard length (that is, not 8 car-units).

teleport.gif

Having looked at the code I found the following in vorfahren() (simconvoi.cc):

Code (C++) Select
                if(  steps_driven>0  ||  !can_go_alte_richtung()  ) {
                        // start route from the beginning at index 0, place everything on start
                        uint32 train_length = move_to(0);

                        // move one train length to the start position ...
                        // in north/west direction, we leave the vehicle away to start as much back as possible
                        ribi_t::ribi neue_richtung = fahr[0]->get_direction();
                        if(neue_richtung==ribi_t::south  ||  neue_richtung==ribi_t::east) {
                                // drive the convoi to the same position, but do not hop into next tile!
                                if(  train_length%16==0  ) {
                                        // any space we need => just add
                                        train_length += fahr[vehicle_count-1]->get_desc()->get_length();
                                }
                                else {
                                        // limit train to front of tile
                                        train_length += min( (train_length%CARUNITS_PER_TILE)-1, fahr[vehicle_count-1]->get_desc()->get_length() );
                                }
                        }
                        else {
                                train_length += 1;
                        }
                        train_length = max(1,train_length);
                        /* ... */
                }

I don't understand what the purpose of the "if (train_length%16 == 0)" condition is; I tried to force it to happen, and this stops the convoi from "jumping", so what is its purpose?