Elvas Tower: Station clocks - Elvas Tower

Jump to content

  • 6 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Station clocks Creating clocks to synchronize with simulation Rate Topic: -----

#31 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 11 January 2020 - 01:46 PM

View Postmbm_OR, on 11 January 2020 - 01:14 PM, said:

... Works fine here. ...
I'm glad to hear it.

View Postmbm_OR, on 11 January 2020 - 01:14 PM, said:

... It requires selecting the ORCloks activity ...
In the Route ORClocks should be only one path starting point, the one of the only activity is included. So it should not play any role if you start with the activity or not. But it happened to me as well that I started in explore mode with a long train and then I was wondering where the clocks are ... at the end of the train I found them :-)

View Postmbm_OR, on 11 January 2020 - 01:14 PM, said:

... and uncheck the LAA from Options/General. ...

Yes, I forgot to mention, it is made for "normal" RunActivity.exe, not for RunActivityLAA.exe.

#32 User is offline   Hannes44 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 162
  • Joined: 10-October 17
  • Gender:Male
  • Location:Select State/Province
  • Simulator:Open Rails
  • Country:

Posted 11 January 2020 - 11:01 PM

View Postjonas, on 11 January 2020 - 01:46 PM, said:

I'm glad to hear it.

In the Route ORClocks should be only one path starting point, the one of the only activity is included. So it should not play any role if you start with the activity or not. But it happened to me as well that I started in explore mode with a long train and then I was wondering where the clocks are ... at the end of the train I found them :-)


Yes, I forgot to mention, it is made for "normal" RunActivity.exe, not for RunActivityLAA.exe.

After this exchange the question is, is the clock only working with activities? That would be a pity because I only run timetables. (btw I have added my clock to the clock.dat file just as you describe.)

#33 User is offline   Icik 

  • Conductor
  • Group: Posts: Active Member
  • Posts: 308
  • Joined: 19-April 15
  • Simulator:Open Rails
  • Country:

Posted 12 January 2020 - 03:36 AM

Hi, the clock acts like a normal object for example like a building. In the route editor it will be placed on the required place like any other object. He will always be there in activity, free ride and timetable.

#34 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 12 January 2020 - 06:32 AM

Yes, the clocks here should be understood like any other non-animated object.

The whole principle of operation is very similar to that of the turntables: A special-shape contains specially named subobjects and an animation. And it is expected that the shape is listed in an extra OR-file.
With turntables the animation is counterclockwise, with the clocks it is clockwise (sounds logical :-).
With the turntables there is 1 subobject maybe called TRACKPIECE, with the clocks there may be more than one subobjects as clock-hands, e.g. ORTS_HHand_Clock.
Even turntables are placed as non-animated in the route although they contain an animation (turntables are tracks and therefore one wouldn't be able to place a turntable as animated anyway).

As far as the clocks should become a permanent feature of Open Rails, they should always be placed as non-animated objects in a route, so that they do not show wildly rotating hands in MSTS.

#35 User is offline   NF1-800 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 103
  • Joined: 11-October 12
  • Gender:Male
  • Simulator:MSTS and ORTS
  • Country:

Posted 12 January 2020 - 08:13 AM

Thank you very much for taking your free time to achieve this detail.
Looking forward to study your work.
Minor question: Any chances for digital display type?

#36 User is offline   jan111 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 122
  • Joined: 11-November 13
  • Gender:Male
  • Location:Copenhagen
  • Simulator:OpenRails & MSTS
  • Country:

Posted 13 January 2020 - 05:39 AM

I have tried to include Station clocks in my existing routes but I didn´t succeed. Is it possible to get a detailed step by step instruction on how to do it.

#37 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 13 January 2020 - 08:26 AM

I asume that greater efforts were made when I read this:

View Postjan111, on 13 January 2020 - 05:39 AM, said:


... I have tried to include Station clocks in my existing routes ...
Especially the "s" of clocks and routes alarms me here. I'm certainly pleased about that, the more efforts and constructive discussions about OR clocks are done here, but please don't forget that it is only a suggestion so far. It is not at all clear if and how the patch will be adopted in Open Rails at all, either in this way or in parts.
So please don't change your routes now, for example by placing OR-clocks everywhere at the stations, before it is clear if the patch will be part of Open Rails.
I uploaded the patch to continue the discussion about OR clocks here and to discuss how the patch works.
I therefore recommend to test your own clocks only in the included route OR-Clocks for the time being.


View Postjan111, on 13 January 2020 - 05:39 AM, said:

... Is it possible to get a detailed step by step instruction on how to do it.
Here an attempt of a step-by-step instruction:
•Create a clock-shape with clock-hands as sub-objects witch are named as either ORTS_HHand_Clock, ORTS_MHand_Clock, ORTS_SHand_Clock or ORTS_CHand_Clock
•Each hand in the clock-shape has a 5-part clockwise animation, for example with "slerp_rot":
						tcb_rot ( 5
							slerp_rot ( 0  0        0 0 -1 )
							slerp_rot ( 1 -0.707107 0 0 -0.707107 )
							slerp_rot ( 2 -1        0 0  0 )
							slerp_rot ( 3 -0.707107 0 0  0.707107 )
							slerp_rot ( 4  0        0 0  1  )
						)
•Copying Clock-shape and corresponding texture(s) into the SHAPE and TEXTURES directories of the route
•Enter clock-shape in Clocks.dat and increase index in the second line of Clocks.dat by 1
•Enter clock-shape in the .ref file of the route
•Place the Clock-shape with a route editor in a route, just like a house or tree. Do not(!) set it as animated

I hope that helps a bit.

#38 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 13 January 2020 - 09:38 AM

View PostNF1-800, on 12 January 2020 - 08:13 AM, said:

Thank you very much for taking your free time to achieve this detail.
Looking forward to study your work.
Minor question: Any chances for digital display type?
Good to hear from you, more than 3 years after you started this thread here!

Unfortunately I don't have a patch for digital clocks. Maybe it could work by declaring them directly in the Clocks.dat, similar to the way it is done with speedposts in the speedpost.dat.
The Clocks.dat with a digital clock could look like this:

2
ClockItem( AnalogClock.s analog )
ClockItem( DigitClock.s digital
	Digit_Sets ( 1
		Digit_Set (
			Digit_Position ( -0.97 1.624 -4.02 )		comment(related to pivot of main-subobjebt)
			Digit_Azimuth ( -180 -180 -180 )		comment(facing direction -> seen in eng or wag files)
			Digit_Separator ( ":" )				comment(Sign witch separates the digits of hour, minute an second)
			Digit_Textur ( Numbers.ace )			comment(Texture with Numbers -> seen in Speedpost.dat)
			Digit_Colour ( ffff0000 )			comment(overwrite the color of digittexture -> here "Numbers.ace")
			Digit_Text_Size ( 0.16 0.13 0 )			comment(size of digits  -> seen in Speedpost.dat)
		)
	)
)

The Digit_Set would then define where you would see the digits "00:00:00" on the main shape "DigitClock.s" and with what character they are separated, here with ":". A digit texture, color selection and digit size would be definable by the user.
This way everybody could "glue" a digital clock to every wall, even on already placed shapes of the hole route :-)

#39 User is offline   Hannes44 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 162
  • Joined: 10-October 17
  • Gender:Male
  • Location:Select State/Province
  • Simulator:Open Rails
  • Country:

Posted 13 January 2020 - 01:39 PM

After I installed the older version of ORTS and removed the check for Large Address Awareness my clock worked nicely and flawlessly. Unfortunately this older version without LAA is not of much use to me, I prefer the Monogame version. So I hope that this nice feature will be part of the Monogame version and the latest experimental versions soon.
Thank you Jonas for your efforts!

#40 User is offline   eugenR 

  • Conductor
  • Group: Posts: Contributing Member
  • Posts: 472
  • Joined: 15-April 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 13 January 2020 - 03:13 PM

In Trello is a card for the release 1.4 which is defining an analogue clock in cabview:
https://trello.com/c...lock-in-cabview
Would it make sense to combine this two proposals?
Perhaps the shape-definitions could be the same?

#41 User is offline   roeter 

  • Vice President
  • Group: Posts: Elite Member
  • Posts: 2,453
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 13 January 2020 - 03:32 PM

Cabview analogue clock has already been implemented, for quite some time.
This is the definition in the .cvf file :
                DialClock (
			Hours (
				Position ( 191 286 1 22 )
				Pivot ( 3 )
				Graphic ( "../../../Cabs/Diesel/CAB_DB_628/628-hour.ace" )
			)
			Minutes (
				Position ( 191 286 1 30 )
				Pivot ( 3 )
				Graphic ( "../../../Cabs/Diesel/CAB_DB_628/628-minute.ace" )
			)
			Seconds (
				Position ( 191 286 1 30 )
				Pivot ( 3 )
				Graphic ( "../../../Cabs/Diesel/CAB_DB_628/628-second.ace" )
			)
		)

In this case, it requires three dials (similar to other dials). The clock itself is part of the main cabview 'front' display.

Regards,
Rob Roeterdink

#42 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,443
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 14 January 2020 - 07:37 AM

Hi jonas,
I've inserted your patch in my local copy of OR NewYear MG, and I must say that your clocks look out very well! I have the intention to upload such copy within tomorrow, so everyone has an easy way to test the feature.
One remark about the code: in Shapes.cs you have added these two variables
        private string shapeFilePath;
        private WorldPosition worldMatrix;

however VS says that they aren't used, so you should delete such two lines.
Moreover re writing code please read the paragraph "General Requirements" of this document https://github.com/t...CONTRIBUTING.md and the documents linked within such paragraph, and try to adhere to what is written there where reasonable.
Don't consider the rest of the document as of now, because I'm unsure whether it is still up to date.

#43 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 14 January 2020 - 12:07 PM

View PostCsantucci, on 14 January 2020 - 07:37 AM, said:

...however VS says that they aren't used, so you should delete such two lines.
Moreover re writing code please read the paragraph "General Requirements" of this document https://github.com/t...CONTRIBUTING.md and the documents linked within such paragraph, and try to adhere to what is written there where reasonable.
Don't consider the rest of the document as of now, because I'm unsure whether it is still up to date.
Sorry for unconventional nameings in the code - I didn't think it could be adopted that quickly and I'll read the "General Requirements" right away.
The two unused variables are in fact "development backlogs" and I delete them, thanks hinting me.

View PostCsantucci, on 14 January 2020 - 07:37 AM, said:

I've inserted your patch in my local copy of OR NewYear MG, and I must say that your clocks look out very well! I have the intention to upload such copy within tomorrow, so everyone has an easy way to test the feature.
I am very glad about this and it is really good news! Not because it's my code (which, by the way, was only possible with the active advice of a good OR programmer), but above all because it finally brings the subject of OR-clocks forward and everyone can try it easely. So, of course I like that :-)


First and foremost, I wanted to refresh the discussion here on the topic station clocks with the patch and to hear the opinions of the community.
For an OR-programmer-crack (and unfortunately I'm not one!) it seems to me to be a not too big next step to "beam" a digital clock in form of a 3D text to certain shapes like station buildings or clock-shapes, similar to how platform names work or the digital clock in a Cabview is seen. Easy to say when I can't do it myself, but am I wrong?
Anyway, I would be interested in a discussion about whether, for example, such digital clocks should also be listed parametrically in the Clocks.dat and whether the patch shows the right way for OpenRails to implement external clocks at all.

#44 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Posts: Elite Member
  • Posts: 7,443
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 14 January 2020 - 01:10 PM

Analog station clocks showing game time are now available within OR NewYear MG rev. 49. Take into account, however, that this feature has still to be approved as such by the ORMT (I see that jonas hasn't yet created a blueprint or a Trello box), and, even if approved, could be subject to request for modifications. Anyhow it is useful for testing to have it integrated within OR NewYear MG.

#45 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 592
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 16 January 2020 - 10:48 AM

A small guideline to create analog clocks for the tentative feature in the OR Monogame version.

Attached File  Guideline Handbuch Analoge ORClocks V1.0 eng und deu.pdf (53.88K)
Number of downloads: 642

The first page in English, the second in German.
Please post further suggestions for the guideline here or send me a message. Thanks!

  • 6 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • 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