- [WJ-R]: 1980s object removal (Castlethorpe/Hanslope area)
- [XCS]: Pending
- [UkTrainSys]: v0.3.2.0 released
- [Object Library]: Preparing...
- [Website]: Fifth version of website launched
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 admin on May 14, 2010 at 6:50 amAnimated digital station clocks
I’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 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:
[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 Note: Station nameboard textures created using » Station Nameboard Generator v2 « |
3D cab for 1992 stock released
I 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.
openBVE / 1992 Stock screenshot » Download from http://bveroutes-trains.co.uk « |
Tags: Animated Objects, Functions, openBVE, openBVE Community, Screenshots, Watford Jn to Rugby
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
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. 🙂
No problem! 😉
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?
Yes, it is also possible. Check out Peti817172M’s metro train, the 81-7172M “Vízipók” (in English it’s “Water spider”), it also has a 3D cab since January w/ a digital speedometer! The car is quite similar to the Polish 81-717!
Oh, almost forgot to mention the download section of the 81-7172M, so it’s here: http://peti817172m.atw.hu/tube.htm
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.
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. 🙂