Elvas Tower: Progress with a GNU/OpenGL version of Openrails - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Progress with a GNU/OpenGL version of Openrails Rate Topic: -----

#11 User is offline   David Webb 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 36
  • Joined: 05-January 20
  • Gender:Male
  • Simulator:OpenRails, ZR
  • Country:

Posted 13 March 2023 - 04:44 AM

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.

#12 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,350
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

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 User is offline   David Webb 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 36
  • Joined: 05-January 20
  • Gender:Male
  • Simulator:OpenRails, ZR
  • Country:

Posted 15 March 2023 - 10:17 AM

View PostGenma 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.

Attached thumbnail(s)

  • Attached Image: Screenshot_20230315_175704.jpg


#14 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,350
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 15 March 2023 - 10:51 AM

The colors look good, the distance haze is good. A better sky dome can come later on. Not bad. Looks better than OR did at the start:
Attached Image: Clipboard0397.jpg
August, 2010.

#15 User is offline   scottypitcher 

  • Apprentice
  • Group: Status: New Hire
  • Posts: 1
  • Joined: 01-September 19
  • Gender:Male
  • Simulator:MSTS + Open Rails
  • Country:

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

#16 User is offline   David Webb 

  • Apprentice
  • Group: Status: Active Member
  • Posts: 36
  • Joined: 05-January 20
  • Gender:Male
  • Simulator:OpenRails, ZR
  • Country:

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.

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users