Game Development Community

Speedometer - Racing Kit

by Andreas Siegmund · in Torque Game Engine · 12/14/2004 (8:27 am) · 11 replies

The Speedometer on the Racing Game doesn't work on my installation. I just reinstalled - no success... is it supposed to be that way - meaning disabled, or is there some trick to it?

It shows maximum speed (3 o'cloick) and speed change doesn't seem to have any effect on it.

Thanks!

About the author

Recent Threads


#1
12/15/2004 (11:19 am)
Ermm.. could somebody please reply I am not the only one experiencing this?!

I'm talking about the TorqueSDK_1_3 release

I'm kinda confused because sound was disabled on the racing game aswell, so I am not sure if that goes for the speedometer hud aswell?

new GuiSpeedometerHud() {
profile = "GuiDefaultProfile";
horizSizing = "left";
vertSizing = "top";
position = "440 280";
extent = "200 200";
minExtent = "8 2";
visible = "1";
bitmap = "./speedometer";
wrap = "0";
maxSpeed = "100";
minAngle = "215";
maxAngle = "0";
color = "1.000000 0.300000 0.300000 1.000000";
center = "130.000000 123.000000";
length = "100";
width = "2";
tail = "0";
};

Please be mild with RTFM qoutes, I am still waiting for the 3D-All-in-One book to arrive... Amazon.com shipment to old Europe takes 10-12 days, they say. It already seems like an eternity to me!
#2
12/20/2004 (1:48 pm)
It should be working. Sound should also be working. :)

Don't know what exactly might be wrong; there are many possibilities. The best thing would be to do dig into it with a debugger... It's almost certainly not an RTFM type thing; you have identified a legitimate problem. :)
#3
12/20/2004 (2:46 pm)
Funny i have the same problem as you, speedometer is stuck ie not moving and there is no sound! :(
#4
12/20/2004 (4:51 pm)
It works for me on 1.3. Weird.
#5
12/20/2004 (5:02 pm)
Works for me as well (1.3)


Maybe just your pc?
#6
12/22/2004 (4:43 pm)
Allright, thanks for you response!

Concerning the missing sound problem, I think I'll join in on this thread: Buggy Sound ? engine_idle.wav?, seems like they have the same problem I experienced.

As far as the "speedometer problem" is concerned, I found that the problem only exists in D3D mode! Speedometer works fine in OpenGL mode.

Maybe this is the reason, on the console I get the following missing extensions with D3D mode:

OpenGL Init: Disabled Extensions
EXT_paletted_texture
NV_vertex_array_range
EXT_packed_pixels
ARB_texture_compression
EXT_texture_Compression_s3tc
3DFX_texture_compression_FXT1
(ARB|EXT)_texture_env_add
EXT_texture_filter_anisotropic
WGL_EXT_swap_control

Could this be the problem, as GuiSpeedometerHud makes use of a couple of gl-Functions like glRotatef, glBlendfunc, etc.?

btw, I found a lot of other errors/warnings in the console log, like missing common/default.cs, QuitGUI, etc.?? Some seem due to a quick hack from the FPS?

Thanks
#7
12/23/2004 (5:43 am)
No its not working.
If you switch between openGL And D3D then it works in openGL but not in D3D !
#8
12/29/2004 (10:29 pm)
Yeah, that's what I said. But why doesn't it work?
#9
11/30/2005 (1:21 pm)
I have the same problem with the speedometer, but only in D3D. Just thought I'd post and see if anyone has come up with anything yet (I know the thread is almost a year old, but I did a search and decided it would be better to reply here rather than post a new thread)
#10
12/01/2005 (6:37 am)
You should try to avoid D3D and stick with Opengl.
#11
12/02/2007 (10:59 am)
The speedometer code in the racing example does have a problem with D3D. The call of glRotatef() is not D3D compatible.

Add this code after the F32 rotation declaration, instead of the "glRotatef(rotation,0.0f,0.0f,-1.0f);" line

//d3d fix start
//apparently glRotatef isn't d3d compatible (via Torque's OpenGL to D3D mapping)
//do this in a D3D compatible way, via dglMultMatrix (this is the way used throughout TGE
//glRotatef(rotation,0.0f,0.0f,-1.0f);
//rotation must be in radians
rotation *= 0.01745;
MatrixF rot(EulerF(0,0,rotation));
dglMultMatrix(&rot);
//d3d fix end