Version 0.6.0
Um ... a bit of a delay but the ZR program now animates signals, reading and interpreting the signal script files using software described in the sister github repository ZR_Scripts. Turntables and transfers (i.e. water towers) are animated. Trains can be split (using the F9 key and a mouse click). Engines, wagons and carriages couple when 'colliding' at slow speed.
As a result most, if not all, of the basic set of train operations are now animated.
Progress with a GNU/OpenGL version of Openrails
#12
Posted 13 March 2023 - 08:38 AM
David, how about posting a couple of screenshots? Doesn't have to be anything special, just an opportunity to see what you've got so far with OpenGL as the graphics engine.
#13
Posted 15 March 2023 - 10:17 AM
Genma Saotome, on 13 March 2023 - 08:38 AM, said:
David, how about posting a couple of screenshots? Doesn't have to be anything special, just an opportunity to see what you've got so far with OpenGL as the graphics engine.
I attach a screen shot-from the Zig-Zag railway. The only real problem I have had - is with the tracks. Multi-sampling is required to prevent fringes developing (due to the regular pattern of the sleepers) and a polygon offset is needed to ensure that the tracks stay above the land surface. The only problem remaining can be seen at the junctions where one of the track textures is always dominant. D.
#14
Posted 15 March 2023 - 10:51 AM
#15
Posted 15 January 2024 - 10:45 PM
Hi David,
I build Zr from source on Ubuntu 20. I've got about 15 routes under MSTS/ROUTES and it lets me choose one, and then it processes SYSTEM files, tiles, and then does wagons but always ends with -
.....
Routine read_raw_wagon_file. Engine 4509. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4502. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4511. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4540Tuscan. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4508. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4528. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4522. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Wagon 4504. File /home/scotty/Shares/server1/Games/PC, Dos, Windows, Linux/Trains/MSTS/TRAINS/TRAINSET/AU_nsw45/4504.eng
ERROR. Token not recognised. Token = :Candy:
Routine skip_lbr. Left bracket not found
Token returned is comment
Program stopping ...
scotty@officepc:~/src/games/Zr$
The skip_lbr() function is called from a lot of places so I'm not sure where to start looking but I'll do some more digging.
Kind regards,
Scott
I build Zr from source on Ubuntu 20. I've got about 15 routes under MSTS/ROUTES and it lets me choose one, and then it processes SYSTEM files, tiles, and then does wagons but always ends with -
.....
Routine read_raw_wagon_file. Engine 4509. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4502. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4511. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4540Tuscan. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4508. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4528. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Engine 4522. Token not recognised. Token = Headout
Routine read_raw_wagon_file. Wagon 4504. File /home/scotty/Shares/server1/Games/PC, Dos, Windows, Linux/Trains/MSTS/TRAINS/TRAINSET/AU_nsw45/4504.eng
ERROR. Token not recognised. Token = :Candy:
Routine skip_lbr. Left bracket not found
Token returned is comment
Program stopping ...
scotty@officepc:~/src/games/Zr$
The skip_lbr() function is called from a lot of places so I'm not sure where to start looking but I'll do some more digging.
Kind regards,
Scott
#16
Posted 16 January 2024 - 02:28 AM
Hi Scott,
Good to hear of your interest in ZR. The problems you highlight are in file "src/input/load_wagon_file.c".
The first set of errors comes from the "DEFAULT" option around line 824. Just before this comes a large set of cases that "are yet to be coded for"! These corresponds to the many tokens found in the wagon files, but not yet handled by ZR. There is a similar construction near line 1258 which handles tokens only found in the engine section of the file (for cases when the 'wagon' is actually an engine).
Your "Headout" token errors come from the engine section. It is worth checking the the files involved i.e. 4504.eng, to make sure this is not an obvious error (i.e. it should be part of a comment). If it seems OK add CASE("Headout") on its own line in the group of similar 'CASES' just before line 1250.
The final error comes from the earlier wagon section. Again check that "Candy" is a valid token (it is an odd name - maybe OpenRails is going in for eye-candy). If you think it is valid, add the name "Candy" to the CASE list just above line 820.
If you still get the left bracket error, check that the "Candy" token has the right format. File 4504.eng should be an IBM stype ascii file in which each token has the format:
Token_Name (
data/more token structures
...
)
If after correction you still get the left bracket error, it is possible to track down the point of error by adding the line
ip = !strcmp(w->name,"4054.eng") ;
around line 83. This will then list all tokens read from file "4504.eng" and should make it easier to track down the section causing the error. Alternatively include a copy of the engine file in you reply.
Let me know how you get on.
Best regards, David.
Good to hear of your interest in ZR. The problems you highlight are in file "src/input/load_wagon_file.c".
The first set of errors comes from the "DEFAULT" option around line 824. Just before this comes a large set of cases that "are yet to be coded for"! These corresponds to the many tokens found in the wagon files, but not yet handled by ZR. There is a similar construction near line 1258 which handles tokens only found in the engine section of the file (for cases when the 'wagon' is actually an engine).
Your "Headout" token errors come from the engine section. It is worth checking the the files involved i.e. 4504.eng, to make sure this is not an obvious error (i.e. it should be part of a comment). If it seems OK add CASE("Headout") on its own line in the group of similar 'CASES' just before line 1250.
The final error comes from the earlier wagon section. Again check that "Candy" is a valid token (it is an odd name - maybe OpenRails is going in for eye-candy). If you think it is valid, add the name "Candy" to the CASE list just above line 820.
If you still get the left bracket error, check that the "Candy" token has the right format. File 4504.eng should be an IBM stype ascii file in which each token has the format:
Token_Name (
data/more token structures
...
)
If after correction you still get the left bracket error, it is possible to track down the point of error by adding the line
ip = !strcmp(w->name,"4054.eng") ;
around line 83. This will then list all tokens read from file "4504.eng" and should make it easier to track down the section causing the error. Alternatively include a copy of the engine file in you reply.
Let me know how you get on.
Best regards, David.