openBVE logo
Project Status (21st April 2019)
Welcome to the 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. YouTube Channel My 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:


States = back.csv
Position = 0, 0, 0

; Hours

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

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

States = digit_separator.csv
Position = -0.21, 0, 0

; Minutes

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

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

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

; Seconds

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

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 » «. 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.

openBVE / 1992 Stock screenshot
» Download from «

Tags: , , , , ,
Posted in openBVE | 8 Comments »