openBVE logo
Project Status (21st April 2019)
Welcome to the Railsimroutes.net Blog, where I'll be posting progress updates, work-in-progress screenshots, information about the progress I'm making with active projects, as well as anything else I feel is worth mentioning. Hopefully more frequent updates here will make the wait for upcoming releases more bearable! News from 2008, all the way back to 2001, can be found in the News Archive.

Railsimroutes.net YouTube ChannelMy openBVE videos and other comments from users and myself can also be found via my YouTube channel.



Blog and Progress Updates


Animated digital station clocks for openBVE, and 3D cab for 1992 stock released at BVE Routes & Trains

Posted by Anthony Bowden on 14th May 2010 at 6:50 am

Animated digital station clocks

Railsimroutes LogoopenBVE/DemoRoute1 screenshot - click to enlargeI’m not sure if any other openBVE developers have attempted this yet, but a feature I’ve been wanting to add to my routes for some time now, is animated digital station clocks which show the actual in-game time. Of course, we’ve seen a very nice working analogue station clock featured in » DemoRoute1 « (see right), but a digital clock would be useful, too.

I studied the functions in DemoRoute1’s analogue clock .animated file, along with openBVE 1’s source code to see how the display of in-game time is handled, and eventually opted to use multiplication rather than division in my functions as per the animated object in DemoRoute1. You can find some details of the finished set of files below.


Animated digital clock shown in the openBVE Object Viewer utility -- click to download sample files

Animated 24-hour digital clock shown in the openBVE Object Viewer utility.
Sample files can be downloaded here.

Please feel free to download and use the above files if you’d like to adapt them for your own route, all you need to do is create an enclosure for the digits, and translate or resize the digits, to suit your own needs. The digital clock consists of an object which shows a single digit from a texture containing a strip of digits from 0-9, a separator, and a black background. The .animated file is as follows:

digital_clock.animated:

[Object]
States = back.csv
Position = 0, 0, 0

; Hours

[Object]
States = digit.csv
Position = -0.51, 0, 0
TextureShiftYFunction = 0.1 * floor[mod[time * 0.000277777777777778, 24] * 0.1]

[Object]
States = digit.csv
Position = -0.33, 0, 0
TextureShiftYFunction = 0.1 * floor[mod[time * 0.000277777777777778, 24]]

[Object]
States = digit_separator.csv
Position = -0.21, 0, 0

; Minutes

[Object]
States = digit.csv
Position = -0.09, 0, 0
TextureShiftYFunction = 0.1 * floor[mod[time * 0.0166666666666667, 60] * 0.1]

[Object]
States = digit.csv
Position = 0.09, 0, 0
TextureShiftYFunction = 0.1 * floor[time * 0.0166666666666667]

[Object]
States = digit_separator.csv
Position = 0.21, 0, 0
StateFunction = value == 0
RefreshRate = 0.5

; Seconds

[Object]
States = digit.csv
Position = 0.33, 0, 0
TextureShiftYFunction = 0.1 * floor[mod[time, 60] * 0.1]

[Object]
States = digit.csv
Position = 0.51, 0, 0
TextureShiftYFunction = 0.1 * floor[time]

Note: The purpose of the mod[] function used in displaying the hour digits, is to ensure that the displayed time wraps around back to 00 when passing midnight, rather than 24 or higher being displayed.

Here’s a screenshot of the above working digital clock, adapted for use in a prototypical structure at Kings Langley on the Watford Junction to Rugby route; note the displayed time on the clock, matching the in-game time shown at the bottom left of the screen:


openBVE / Watford Junction to Rugby screenshot showing animated digital clock - click to enlarge

openBVE / Watford Junction to Rugby screenshot showing animated digital clock — click to enlarge
Note: Station nameboard textures created using » Station Nameboard Generator v2 «
Horizontal Rule

3D cab for 1992 stock released

Information IconI also just wanted to briefly mention that a new openBVE 3D cab has been released for the London Underground 1992 stock, with animated features including a traction/brake controller, speedometer, and working in-cab CCTV monitor. Night-illuminated cab indicators and screens are also included, and the overall effect created by the cab is very nice, despite a couple of initial teething problems. The 3D cab is an add-on for the BVE4 1992TS, which needs to be installed first; both downloads can be found at » http://bveroutes-trains.co.uk «. A note on installing the 3D cab — at the time of writing, I noticed that the 3D cab download contains an incorrect folder structure, i.e. there’s no “1992TS” subfolder included, and the files could easily end up accidentally being placed in your Train folder directly instead, which won’t work, of course. You will need to be careful as to where you choose to extract the files. For further information, you might like to monitor » this thread « on the BVE Exchange forum.

Screenshot
openBVE / 1992 Stock screenshot
» Download from http://bveroutes-trains.co.uk «

Tags: , , , , ,


9 Responses to “Animated digital station clocks for openBVE, and 3D cab for 1992 stock released at BVE Routes & Trains”

  1. There have already been animated digital clocks in Bvemetro’s Budapest Metro line M3 since summer 2009! You could check that line out too, I suppose you’ll like it!
    It is currently available at http://www.bvemetro.hu/index_en.php

    • Anthony_B says:

      Indeed I wasn’t aware of the M3 line’s digital clocks, thanks for letting me know. I’ve just taken a quick look (and I’ll look at the other routes shortly as well), and both the route and animated clocks are very nice; I could have saved myself a bit of work if I’d looked harder! Where the digits are concerned, we came up with slightly different ways of achieving the same result though; mine uses smaller textures but more complicated functions, while the M3 line’s clock has the reverse, so there’s a little more choice for developers depending on their needs, which is great. 🙂

  2. Rave says:

    So Anthony…Is it possible to make a digital speedometer and put it inside the train (ex.in the passenger car). Have you thought about that?

  3. John says:

    Hi, Firstly I’m amazingly impressed with the amount of effort and detail you’ve put into the software and maps you’ve written, well done!

    I was wondering if you’ve written a rotating arrival/departure style board with the revolving characters or know of anyone that has?

    Here is an image to explain what I mean http://farm3.static.flickr.com/2006/1679994838_eac6714847.jpg

    Thanks John.

    • Anthony_B says:

      Hi John,

      This isn’t something I’ve attempted yet, and I’m not aware that anyone else has either, unfortunately. However I’ll look into it when I have a bit more free time, as it would be an interesting challenge. 🙂

  4. obviously like your website but you need to test the spelling on quite a
    few of your posts. A number of them are rife with spelling issues and I find it very
    troublesome to inform the truth however I will definitely come back again.

Leave a Reply