BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Digital Speedometer

3 posters

Go down

Digital Speedometer Empty Digital Speedometer

Post by Tstageman Wed Apr 25, 2012 6:32 pm

Guys,

Am trying to incorporate a digital speedometer into one of my tram cabs but have read through the guide on the Open website and it may as well be written in double dutch, it doesn't make the blindest bit of sense to me, anyone have any ideas where to start please?

Thanks

Tom
Tstageman
Tstageman

Posts : 154
Join date : 2011-10-21

Back to top Go down

Digital Speedometer Empty Re: Digital Speedometer

Post by graymac Wed Apr 25, 2012 7:03 pm

Probably the same principle as the digital clock, with code to link to the ats function for kph. I've done a digital clock but not the speedo. However, in OpenBVE the route clock is displayed (ctrl+C) and the speed is displayed (ctrl+V) so there is that in common.
In the clock the figures on the bitmap are shifted by the formula:

TextureShiftYFunction = 0.1 * floor[mod[time * 0.000277777777777778, 24] * 0.1]

so maybe if you substituted time for speed it would work.
Of course clock uses 12 units/hour and 60/min so speed might be simpler as its strictly decimal.
graymac
graymac

Posts : 2134
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Digital Speedometer Empty Re: Digital Speedometer

Post by Dexter Wed Apr 25, 2012 7:55 pm

What kind of cab is that? 2D or 3D?
Dexter
Dexter

Posts : 2137
Join date : 2011-07-08
Age : 36
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Digital Speedometer Empty Re: Digital Speedometer

Post by graymac Wed Apr 25, 2012 8:37 pm

I think it HAS to be 3D construction for it to work. Animated file format is used for the clock, which is what I was thinking when I mentioned it.
If it is possible with a panel2 cab I would like to know, but I don't think it is.
graymac
graymac

Posts : 2134
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Digital Speedometer Empty Re: Digital Speedometer

Post by Dexter Wed Apr 25, 2012 9:02 pm

graymac wrote:If it is possible with a panel2 cab I would like to know, but I don't think it is.

It actually is, digital clock (and also speedo) can be used in a panel2 based cab. Download this train, which will prove my words. I will incorporate the feature into an eventual new class 362 cab.
Dexter
Dexter

Posts : 2137
Join date : 2011-07-08
Age : 36
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Digital Speedometer Empty Re: Digital Speedometer

Post by graymac Wed Apr 25, 2012 9:09 pm

OK Derryck, thanks for that tip! Very Happy
graymac
graymac

Posts : 2134
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Digital Speedometer Empty Re: Digital Speedometer

Post by Tstageman Wed Apr 25, 2012 9:29 pm

Thanks for the replies guys, the cab I'm trying to build is a 3D cab but I've never attempted anything like this so its all a new theory. I'll maybe have a go at building a digital clock into the cab to see how I get on with that and then maybe attempt the digital speedo. I'll have a look at some others and see how theyre constructed but sometimes thats more confusing! What am I going to need to make this work like which components?

Regards,

Tom
Tstageman
Tstageman

Posts : 154
Join date : 2011-10-21

Back to top Go down

Digital Speedometer Empty Re: Digital Speedometer

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum