TSE Starter.racing download
by Joseph Euan · in Torque Game Engine Advanced · 01/09/2006 (7:39 am) · 28 replies
I've uploaded an "early" version of the Starter.Racing pack, if you want to have a play around with it while I'm working on a better release.
Download 10.7MB - Download Now (sorry, download is offline while I move to new server and test resource with latest TGEA)
As I said above, it's an early version so if you do find any bugs then please post details below.
There's no speedometer at the moment because I had to comment it out due to it crashing TSE, but it's being worked on for the next release.
And the "Racing Example" mission might crash now and then (another thing being worked on.)
All types of comments and feedback are welcome :)
Have fun...
Joseph
Update: as of the 20th of march, the starter.racing port has had 329 downloads!
(I don't need any mirror sites on this release, but I might on the next releases)

Don't forget to check out my TSE Demo dev blog at tsedemo.blogspot.com/
Download 10.7MB - Download Now (sorry, download is offline while I move to new server and test resource with latest TGEA)
As I said above, it's an early version so if you do find any bugs then please post details below.
There's no speedometer at the moment because I had to comment it out due to it crashing TSE, but it's being worked on for the next release.
And the "Racing Example" mission might crash now and then (another thing being worked on.)
All types of comments and feedback are welcome :)
Have fun...
Joseph
Update: as of the 20th of march, the starter.racing port has had 329 downloads!
(I don't need any mirror sites on this release, but I might on the next releases)

Don't forget to check out my TSE Demo dev blog at tsedemo.blogspot.com/
About the author
#2
Keep at it :)
@Juan, left me know how the test goes. :)
01/10/2006 (5:17 am)
Nice one John, the speedometer is the only major thing left to fix.Keep at it :)
@Juan, left me know how the test goes. :)
#3
I'm still working on it and will post back a fix once I have it... but this is getting close.
John K.
void GuiSpeedometerHud::onRender(Point2I offset, const RectI &updateRect)
{
// Must have a connection and player control object
GameConnection* conn = GameConnection::getServerConnection();
if (!conn)
return;
Vehicle* control = dynamic_cast(conn->getControlObject());
if (!control)
return;
Parent::onRender(offset,updateRect);
// Use the vehicle's velocity as it's speed...
mSpeed = control->getVelocity().len();
if (mSpeed > mMaxSpeed)
mSpeed = mMaxSpeed;
//---------- RENDER THE NEEDLE ON SCREEN AS A POLYGON PRIMITIVE
mSpeed *= 10;
GFX->setProjectionMatrix( MatrixF( true ) ); //-
GFX->pushWorldMatrix(); // glPushMatrix();
Point2F center = mCenter;
if (isZero(center.x) && isZero(center.y))
{
center.x = mBounds.extent.x / 2;
center.y = mBounds.extent.y / 2;
}
//create the new matrix
MatrixF newMat(1);
//set the on-screen position for the needle
newMat.setPosition(Point3F(mBounds.extent.x + center.x/2 + 25, mBounds.extent.y/2 + 25, 0)); //-
//set the angle of rotation for the needle based upon current speed
F32 rotation = mMinAngle + (mMaxAngle - mMinAngle) * (mSpeed / mMaxSpeed);
AngAxisF newRot(Point3F(0.0f,0.0f,-1.0f), rotation);
newRot.setMatrix(&newMat);
GFX->multWorld( newMat ); //-
//specify the rendering characteristics for the graphics device
GFX->setAlphaBlendEnable( true );
GFX->setSrcBlend(GFXBlendSrcAlpha);
GFX->setDestBlend(GFXBlendInvSrcAlpha);
GFX->setTextureStageColorOp(0, GFXTOPDisable);
GFX->setTexture(0, NULL);
//use Primitive Builder (PrimBuild) to create the simple polygon shape of the needle
PrimBuild::begin(GFXLineStrip, 4);
PrimBuild::color4f(mColor.red, mColor.green, mColor.blue, mColor.alpha);
PrimBuild::vertex2f(0,0);
PrimBuild::vertex2f(10,0);
PrimBuild::vertex2f(10,50);
PrimBuild::vertex2f(0,50);
PrimBuild::end(); //immediately draws the polygon shape on screen
GFX->popWorldMatrix();
}
01/11/2006 (5:59 pm)
I'm closing in on the problem and am getting pretty close. Unfortunately, I was slowed today by a hardware problem. In the spirit od Joseph's 'Early Preview', here's my version of the onRender() method in it's current state. You can find it within the GuiSpeedometerHud class found within game/vehicles/guiSpeedometer.cpp file. I'm still working on it and will post back a fix once I have it... but this is getting close.
John K.
void GuiSpeedometerHud::onRender(Point2I offset, const RectI &updateRect)
{
// Must have a connection and player control object
GameConnection* conn = GameConnection::getServerConnection();
if (!conn)
return;
Vehicle* control = dynamic_cast
if (!control)
return;
Parent::onRender(offset,updateRect);
// Use the vehicle's velocity as it's speed...
mSpeed = control->getVelocity().len();
if (mSpeed > mMaxSpeed)
mSpeed = mMaxSpeed;
//---------- RENDER THE NEEDLE ON SCREEN AS A POLYGON PRIMITIVE
mSpeed *= 10;
GFX->setProjectionMatrix( MatrixF( true ) ); //-
GFX->pushWorldMatrix(); // glPushMatrix();
Point2F center = mCenter;
if (isZero(center.x) && isZero(center.y))
{
center.x = mBounds.extent.x / 2;
center.y = mBounds.extent.y / 2;
}
//create the new matrix
MatrixF newMat(1);
//set the on-screen position for the needle
newMat.setPosition(Point3F(mBounds.extent.x + center.x/2 + 25, mBounds.extent.y/2 + 25, 0)); //-
//set the angle of rotation for the needle based upon current speed
F32 rotation = mMinAngle + (mMaxAngle - mMinAngle) * (mSpeed / mMaxSpeed);
AngAxisF newRot(Point3F(0.0f,0.0f,-1.0f), rotation);
newRot.setMatrix(&newMat);
GFX->multWorld( newMat ); //-
//specify the rendering characteristics for the graphics device
GFX->setAlphaBlendEnable( true );
GFX->setSrcBlend(GFXBlendSrcAlpha);
GFX->setDestBlend(GFXBlendInvSrcAlpha);
GFX->setTextureStageColorOp(0, GFXTOPDisable);
GFX->setTexture(0, NULL);
//use Primitive Builder (PrimBuild) to create the simple polygon shape of the needle
PrimBuild::begin(GFXLineStrip, 4);
PrimBuild::color4f(mColor.red, mColor.green, mColor.blue, mColor.alpha);
PrimBuild::vertex2f(0,0);
PrimBuild::vertex2f(10,0);
PrimBuild::vertex2f(10,50);
PrimBuild::vertex2f(0,50);
PrimBuild::end(); //immediately draws the polygon shape on screen
GFX->popWorldMatrix();
}
#4
I haven't tried it yet (been very busy with work) but I will over the weekend.
Theres not a lot to finish in the starter.racing pack now, so as long as I have enough time over the weekend, it should get finised.
Then I just have a few things left to fix in the starter.fps pack.
Then I have to look for another part time project to work on... TSE RTS Kit hmmm...
01/20/2006 (4:59 pm)
Thanks John,I haven't tried it yet (been very busy with work) but I will over the weekend.
Theres not a lot to finish in the starter.racing pack now, so as long as I have enough time over the weekend, it should get finised.
Then I just have a few things left to fix in the starter.fps pack.
Then I have to look for another part time project to work on... TSE RTS Kit hmmm...
#5
Thought that after 4 years in the field a new version was in order. Note that the texturing isn't finished yet nor the normal map and I'm still working out how to get the suspension animations working out of Milkshape, if anyone has a solution to this and they wouldn't mind sharing.
Anyway, enough of that. Here are some pics and stats...




Original Buggy
Body - 636
Suspension - 142 x 4 (568)
Wheels 256 - x 4 (1024)
Total - 2228
BuggyGT
Body - 780
Suspension - 63 x 4 (252)
Wheels - 366 x 4 (1464)
Total - 2496
*edit these are poly counts
02/21/2006 (8:56 pm)
@ Joseph. Not sure if this would interest you but I've started working on a GT version of the stock buggy.Thought that after 4 years in the field a new version was in order. Note that the texturing isn't finished yet nor the normal map and I'm still working out how to get the suspension animations working out of Milkshape, if anyone has a solution to this and they wouldn't mind sharing.
Anyway, enough of that. Here are some pics and stats...




Original Buggy
Body - 636
Suspension - 142 x 4 (568)
Wheels 256 - x 4 (1024)
Total - 2228
BuggyGT
Body - 780
Suspension - 63 x 4 (252)
Wheels - 366 x 4 (1464)
Total - 2496
*edit these are poly counts
#7
Email GG, see what they say...
02/23/2006 (5:15 am)
Cool looking car Adam, I'm just porting the starter.racing pack over to TSE... it's really up to GG what gets changed (if they use the port)Email GG, see what they say...
#8
02/23/2006 (7:12 am)
I've already sent an email to the appropriate folks!
#9
BuggyGT_test_1.ogg - 2.0 MB
02/27/2006 (7:14 pm)
Just thought I'd share where I'm at with the BuggyGT, I have the animations working out of Milkshape now so its onto the textures. As you can see, link below, the model has a funky lighting issue when its turning due to the polygons. I think the model needs either some normal map solution or more polys at the rear to remedy this. I'm reluctant to add any more polys so the normal option is looking good. (the theora codec actually makes it look a lot smoother than it really is)BuggyGT_test_1.ogg - 2.0 MB
#10
and yeah.. more polys at back + LODs + good texture can make it more nice lookin...
02/27/2006 (7:25 pm)
Hey.. that's very nice looking buggy moving around ;) like it..and yeah.. more polys at back + LODs + good texture can make it more nice lookin...
#11
I've also posted this WIP TDN article on creating a vehicle with Milkshape with a 'Creating a simple object' to follow for the wheel.
03/22/2006 (8:26 pm)
Here is where I'm at with the BuggyGT, am having some issues with the materials at the moment and thought I'd put this out to the community to get some feedback. The glow doesn't seem to work on the lights and I'm not sure why, on an earlier model I got it to work but only if the vehicle was placed as an object not the one you drive. (oh yeah, and the mud is a little excessive - if anyone has a reflective glass shader they'd like to share around that would be cool)I've also posted this WIP TDN article on creating a vehicle with Milkshape with a 'Creating a simple object' to follow for the wheel.
#12
Maybe someone knows why.
04/18/2006 (5:57 am)
We've several errors in the console using this example....
- No card profile profile/D3D9.NVIDIA.GeForceFX5200.cs exists
- No card profile profile/D3D9.NVIDIA.GeForceFX5200.7184.cs exists
...
Engine initialized...
*** Load Main Menu
starter.racing/client/scripts/optionsDlg.cs (57): Unable to find function isDeviceFullScreenOnly
starter.racing/client/scripts/optionsDlg.cs (128): Unknown command onAction.
starter.racing/client/scripts/optionsDlg.cs (100): ::getResolutionList - wrong number of arguments.
starter.racing/client/scripts/optionsDlg.cs (100): usage: Returns a tab-seperated list of possible resolutions.
starter.racing/client/scripts/optionsDlg.cs (100): ::getResolutionList - wrong number of arguments.
starter.racing/client/scripts/optionsDlg.cs (100): usage: Returns a tab-seperated list of possible resolutions.
starter.racing/client/scripts/optionsDlg.cs (150): ::getResolutionList - wrong number of arguments.
starter.racing/client/scripts/optionsDlg.cs (150): usage: Returns a tab-seperated list of possible resolutions.
starter.racing/client/scripts/optionsDlg.cs (57): Unable to find function isDeviceFullScreenOnly
starter.racing/client/scripts/optionsDlg.cs (128): Unknown command onAction.
starter.racing/client/scripts/optionsDlg.cs (100): ::getResolutionList - wrong number of arguments.
starter.racing/client/scripts/optionsDlg.cs (100): usage: Returns a tab-seperated list of possible resolutions.
starter.racing/client/scripts/optionsDlg.cs (100): ::getResolutionList - wrong number of arguments.
starter.racing/client/scripts/optionsDlg.cs (100): usage: Returns a tab-seperated list of possible resolutions.
starter.racing/client/scripts/optionsDlg.cs (150): ::getResolutionList - wrong number of arguments.
starter.racing/client/scripts/optionsDlg.cs (150): usage: Returns a tab-seperated list of possible resolutions.
...
*** Phase 2: Download Ghost Objects
Mapping string: MissionStartPhase2Ack to index: 1
material unmapped: METAL-STRIP
Ghost Always objects received.
Mapping string: MissionStartPhase3 to index: 10
common/client/missionDownload.cs (67): Unable to find function StartClientReplication
fxFoliageReplicator - Client Foliage Replication Startup is complete.
...
Mapping string: ToggleCamera to index: 3
Mapping string: use to index: 4
serverCmduse: Unknown command.
serverCmduse: Unknown command.
Mapping string: DropPlayerAtCamera to index: 5
Mapping string: dropCameraAtPlayer to index: 6
starter.racing/server/scripts/commands.cs (40): Unable to find object: '' attempting to call function 'getEyeTransform'
starter.racing/server/scripts/commands.cs (40): Unable to find object: '' attempting to call function 'getEyeTransform'
Missing file: creator/ui/prefs.cs!
Set::getObject index out of range.
Set::getObject index out of range.
...
pushDialog(): Invalid control: DemoEditorAlert
creator/editor/EditorGui.cs (844): Unable to find object: '' attempting to call function 'open'
...Maybe someone knows why.
#13
2. The starter.racing didn't have a great deal of work done on it before it was released, so there will be bugs and console errors.
04/18/2006 (2:05 pm)
1. Are you using it with MS3? (I haven't tested it on MS3 yet)2. The starter.racing didn't have a great deal of work done on it before it was released, so there will be bugs and console errors.
#14
Thanks
05/01/2006 (5:11 am)
Anyone got a link? I don't know why but it looks like some parts of some posts are being consistently cut off in my broswer (the first post of this thread included).Thanks
#15
When my vehicle is colliding with anything i need the point or coordinates where it is colliding.
Is there any command to get it.
thanks in advance
07/06/2006 (11:05 pm)
Hai allWhen my vehicle is colliding with anything i need the point or coordinates where it is colliding.
Is there any command to get it.
thanks in advance
#16
07/07/2006 (8:11 am)
@Roshan - start a new thread with questions not related to the port of the kit, makes it easier to get an answer ;)
#17
07/08/2006 (11:38 am)
Is there any update to the starter.racing working with ms3 or ms3.5 ??
#18
function:
bit that has an issue:
Error it throws is:
07/08/2006 (1:30 pm)
Hey guys. When using this on HEAD TSE, The following line (in bold) throws an error:function:
void WheeledVehicle::updateWheelParticles(F32 dt)
bit that has an issue:
for (S32 x = 0; x < 2; ++x)
colorList[x].set(pEntry->puffColor[x].red,
pEntry->puffColor[x].green,
pEntry->puffColor[x].blue,
pEntry->puffColor[x].alpha);Error it throws is:
Unhandled exception at 0x008e0427 in TSE_DEBUG.exe: 0xC0000005: Access violation reading location 0x358bbfac.
#19
12/31/2007 (1:14 pm)
Has there been any luck on getting the needle to render sucessfully yet without crashing the game?
#20
03/20/2008 (8:49 am)
Download Link is dead??
Associate John Kanalakis
EnvyGames
There's definitely some issues within the guiSpeedometer.cpp file, specifically, when rendering the actual speedometer needle. For starters, we need to add a call to ...
GFX->popWorldMatrix();
at the end of the onRender() method. It also looks like ...
MatrixF proj = GFX->getProjectionMatrix();
GFX->setProjectionMatrix( MatrixF( true ) );
might need to be added before the world matrix push, which is later followed by a call to ...
GFX->setWorldMatrix( MatrixF( true ) );
At least these changes are getting the needle to render on screen for me and prevent the game from crashing. I'll keep digging into this a bit more and post back my findings later.
John K.