The online racing simulator
Kegetys' Ghost Car v1.0 for S2
(191 posts, closed, started )
Quote from theblackrabbi :If you ever get the ghost car mod to work tell me the trick to get it working.

This doesn't work?:

Unzip the files to your LFS folder. Make sure the file structure is like it's supposed to be.

Run lfsgrun.exe. It starts the LFS for you.

Pick track&car and go hotlapping.

When your car appears on track, press "t" and type: /ghost on

Press shift+F4 and check if you firewall is denying the connection between LFS and lfsgrun (port:28888).

It should say ghost enabled or something like that. Also note that you need to drive one full lap before you see the actual ghost. :ghostie:
Finally
Well this worked for me after a week of going crazy thinking it was the d3d8.dll. It had to do with some drivers I installed for my ati x800 card. I guess when I exited the program ATITools then everything worked perfect. So I guess that's one thing to think about just incase you run into the same problem as me.
Thankgod theblackrabbi
I'm sure this is a great app and some excellent programming from Kegetys, but i wont be using it Takes away from realism.
What about someone making a proper telemetry system instead of a ghost car? I know we have replay analyzer but something more in-depth
We should have a best lap kinda ghost replay file post. So other people could download other peoples best times, so maybe they could inprove by racing the ghost of somebody elses best time????!!!!
Can't this be done by replacing the /ghostcar/ghost/trk.car.ghost file with someone else's (ask them nicely )?
One great idea!
I would think so. I mean of course the best way to do better is race yourself, but if you want to try and beat somebody best time it would be a cool way of doing it. Then everyone could post there time if they beat the best ghost time. Maybe it would be a hot-lap ghost chart. If anyone puts it up it's my idea . But it would always have the best time of that track/car on it. Maybe one day it would be a contest. See who can hold the best time and for how long. One day it could be 1:06.870 on South city FZR, but somebody would download that ghost file, and if anyone could beat it then they would have the new record for everyone else to beat.

I'm going to make a site, and try and have this idea going, I think it would be very cool for the people that think they are the

SO classic / FZR
Pos Racer ST BH TH CB CC Laptime
1 biggie C w • 0:41.150
2 Sracer C w • 0:41.320
3 siurek C w 0:41.370


Then people could try and beat those if they wanted the top. Sure it's like what they already have, but it would be the ghost mod version.
First off.. very nice mod Kegetys!! 4 and heif stars out of 5

I'd give you all 5 but I'm getting an error when I cross the finish line that won't allow me to use it. It says:

ERROR: gcPath CreateVertexBuffer failed!

Did just as it said. Copied the files to the root of my LFS folder and executed LFSGrun.exe. It connected to both InSim and OutSim and said it was ready. The split differences show up, the /ghost switches are all enabled, using 1.01, etc. What should I try next?
Does it happen every time, for all tracks? If so, then my best guess would be running out of video memory... Sometimes it is also possible that the ghostcar gets recorded blank if you never cross the finish line during the lap to properly start the recording, which can happen by starting the race from the pits for example (I think ). The CreateVertexBuffer will then fail because the size is 0 bytes. Re-driving a faster lap should fix it though.

For more information on what goes wrong you can look at the debug output, set the debugoutput setting to 1 in the config file and capture the output with DebugView (Set the include filter to *s2ghost* to avoid junk from other apps).
Are there any drivers that might be conflicting with the ghostcar d3d8.dll? I had a simular problem and it had to do with softwar I installed to make my ati card go faster.
Great work!

I had some troubles using Teamspeak Overlay after installing the Ghost Mod, because there is a collision between the d3d8.dll used by Ghost and the dxinjection method used by TSO.
The problem is, LFS uses the d3d8.dll always, so TSO will never run.

A simple fix is to copy the attached ghost.cmd to LFS root folder and use it to start LFS in Ghost Mode. The ghost.cmd is simply renaming the d3d8.dll.bak to d3d8.dll, running LFS with /insim 28888, and after closing LFS it renames the d3d8.dll to d3d8.dll.bak.
So the d3d8.dll will never affect LFS, except you will run the Ghost Mod.
TSO, Fraps etc will work fine now.

regards, elecc
Attached files
ghost.zip - 163 B - 370 views
Well.. umm.. it works! :yipee:

At first it did the same thing when I just tried the same thing I did yesterday. But I downloaded DebugView, turned on the debugging from the config file, deleted the ghost car files so I could get a faster time and sped around. The line popped up and my ghost started following me! I have never been happier to see a ghost.

Now you have the other heif star you deserve!
Quote from nikimere :I'm sure this is a great app and some excellent programming from Kegetys, but i wont be using it Takes away from realism.
What about someone making a proper telemetry system instead of a ghost car? I know we have replay analyzer but something more in-depth

Ive used it maybe once or twice and its fun to see where I am going wrong, perhaps get me a better time. I only use it in single player mode and I think its an excellent application and really shows just what can be done with insim and outsim thingies...

I feel that a proper telementry system as you requested wont be done till S2 full or even S3 is out.

How about not turning away from something till youve tried it? I find it an excellent tool for training, particularly for new drivers, it takes nothing away from realism, many driving schools now use a system where drivers are trained with the use of a safety or pace car..

What I would like to know is, would it be possible to make this "ghost" car, physical, with collision detection, and IS it possible to swap ghost files?

Cheers, and great work... made me think is this the way to real intellegent AI.
Quote from mkinnov8 :What I would like to know is, would it be possible to make this "ghost" car, physical, with collision detection, and IS it possible to swap ghost files?

The former isn't possible using insim/outsim (and even if it was then it would negate the whole purpose of having a ghostcar )

As for the latter, sure you can - just look in the "ghostcar\ghost" directory and you'll find the files necessary, their filenames explain which car/track combo they are relative to.

I've been eagerly waiting for the first ones to be uploaded from any fast drivers using ghostcar...
Quote from Stuff :Well.. umm.. it works! :yipee:

At first it did the same thing when I just tried the same thing I did yesterday. But I downloaded DebugView, turned on the debugging from the config file, deleted the ghost car files so I could get a faster time and sped around. The line popped up and my ghost started following me! I have never been happier to see a ghost.

Now you have the other heif star you deserve!

I've same problem ERROR: gcPath CreateVertexBuffer failed!
and i don't understand that you maked to resolve it, my pc is amd 3800 dual core 2048 mg ram ax700 video card, and i tryed whit a 6600 gt and also don't work, in other pc works very well and in that pc i used two cards same that previos one, can you tell me about you make for solve it?

Thx
Well, I'm not really about the real solution, but here's what I changed:

- I deleted all the .ghost files from ghostcar\ghost folder
x in cfg.txt I turned off OutSim. I turned it on earlier from testing a different mod
x in the ghostcar\config.cfg file I turned on debugging

Other than that, I dunno what else to say?

Edit: Hmm.. I turned OutSim back on and debugging off and it still worked for me. My only advice now would be to delete the .ghost files. Maybe they are corrupt sometimes?
Thanks Stuff i try it later, really i don't understand because i've two portable pc and both are same, in one go and in other no.
i explain if can make go on.
Ok, only deleting .ghost files work perfectly, thanks Stuff.

But the version that i,ve registered don't work, i've maked a new folder and put ghost in. Only waiting a new license for next month and go fully .
Quote from Warryhs :But the version that i,ve registered don't work, i've maked a new folder and put ghost in. Only waiting a new license for next month and go fully .

afaik your license information is stored somewhere in the data/misc folder if you copy the files to your unlicensed lfs folder you should be able to unlock it
Quote from xaotik :The former isn't possible using insim/outsim (and even if it was then it would negate the whole purpose of having a ghostcar )

As for the latter, sure you can - just look in the "ghostcar\ghost" directory and you'll find the files necessary, their filenames explain which car/track combo they are relative to.

I've been eagerly waiting for the first ones to be uploaded from any fast drivers using ghostcar...

Cheers for the reply, the former question was really to see if it was possible to create an actual virtual (solid) copy of my own car, that I could race and try to beat, a step beyond the uses of ghost car, if you will.

Cheers anyway
Nice tool...
Now somebody write me a raf2ghost converter so I can ghost the worldrecords

I might do it myself, but I'd hate fishing for the ghost format
Quote from mkinnov8 :Cheers for the reply, the former question was really to see if it was possible to create an actual virtual (solid) copy of my own car, that I could race and try to beat, a step beyond the uses of ghost car, if you will.

Cheers anyway

What would happen when you touched? Obviously the ghost car cannot deviate from it's recorded path. It just couldn't work, even if you wanted it to. Shows what state the CRC is in if you're having to race yourself nowadays
Quote from TagForce :I might do it myself, but I'd hate fishing for the ghost format

The ghost files use the following format:

First there's a header with the following structure:

struct {
char hdr[4]; // "GHST"
float laptime; // Laptime in seconds
float sp1, sp2, sp3; // split times in seconds
int numPck; // Number of packets
int carID; // Car ID
int trackID; // Not used
} GCHEADER;

then there are numPck amount of the following structures:


struct {
float tbase; // Time in milliseonds
float x, y, z; // Position (from OutSim, in meters)
float rx, ry, rz; // Orientation (heading, pitch, roll, directly from OutSim)
float speed; // Outsim x + y velocity
} GCPACKET;

The file size must be exactly the size of GCHEADER + numPck*size of GCPACKET or the ghostcar will not be loaded.
All the motion is interpolated between the packets, so they can be saved at any rate. The mod itself currently writes them at 20FPS.
The header carID is one of the following:


0, "UNKNOWN"
1, "XF GTI"
2, "XR GT"
3, "XR GT TURBO"
4, "RB4 GT"
5, "FXO TURBO"
6, "LX4"
7, "LX6"
8, "MRT5"
9, "UF 1000"
10, "RA"
11, "FZ50"
12, "FORMULA XR"
13, "XF GTR"
14, "UF GTR"
15, "FORMULA V8"
16, "FXO GTR"
17, "XR GTR"
18, "FZ50 GTR"

Awesome work Kegetys, keep it on!
Alright... Time to get the old Delphi out of the closet... That is of course unless anybody has any real objections about being able to race wr replays in your car?

BTW... Are you using the filename for trackID?
This thread is closed

Kegetys' Ghost Car v1.0 for S2
(191 posts, closed, started )
FGED GREDG RDFGDR GSFDG