The online racing simulator
Searching in All forums
(983 results)
Dygear
S3 licensed
I'm doing it straight from the MCI packets, and from the PTH file.
Dygear
S3 licensed
Quote from avetere :Well, didn't mean to harm you ... I guess the directness is merely a lack of speech

No harm inflected, I found it quite amusing.
Dygear
S3 licensed
Quote from avetere :Here you can easily see, that Your approach must be wrong.

You see, this is why I love Germans. They are just so direct! Thank you, avetere, I'll take a closer look at your approach.


<?php 
    
public function toPolyLimit()
    {
        return array
        (
            array
            (
                
'x' => $this->Center->$this->Limit->Left cos(atan2($this->Direction->X$this->Direction->Y)),
                
'y' => $this->Center->$this->Limit->Left sin(atan2($this->Direction->X$this->Direction->Y))
            ), array
            (
                
'x' => $this->Center->$this->Limit->Right cos(atan2($this->Direction->X$this->Direction->Y)),
                
'y' => $this->Center->$this->Limit->Right sin(atan2($this->Direction->X$this->Direction->Y))
            )
        );
    }
    public function 
toPolyRoad()
    {
        return array
        (
            array
            (
                
'x' => $this->Center->$this->Road->Left cos(atan2($this->Direction->X$this->Direction->Y)),
                
'y' => $this->Center->$this->Road->Left sin(atan2($this->Direction->X$this->Direction->Y))
            ), array
            (
                
'x' => $this->Center->$this->Road->Right cos(atan2($this->Direction->X$this->Direction->Y)),
                
'y' => $this->Center->$this->Road->Right sin(atan2($this->Direction->X$this->Direction->Y))
            )
        );
    }
?>

I guess I'll commit this later on today to github for testing.
Last edited by Dygear, .
Dygear
S3 licensed
Quote from avetere :If I'm not completely mistaken you'd have to multiply your Limit and Road values with:

Ok, if you could explain this part to me. Should it not be that the Road and Limit would be giving me the delta from that of the center of the node's X & Y? There by all I should have to do is add them to the X & Y coords to get the information I need. Or am I missing some bit of information.
Dygear
S3 licensed
I'm working a something for LVS. I'm just not getting all of the parts down in my head and it's confusing me a little bit.

So, let's think it out ... We need to know if the player is in node's polygon. To do this we need to get each node's polygon, and to do that we need to load the pth file. So we are going to need to know what track we are on, for this we are going to have to hook into the State packet (IS_STA). We are also going to need to have the pth files some where that is known. (I've made it so that they are stored in $PRISM/data/pth.


<?php 
public function onTrackChange(IS_STA $STA)
{
    
$this->PTH = new PTH(ROOTDIR '/data/pth/' $STA->Track '.pth');
}
?>

Now that we have that down, we need to know the Node the player is currently in, as well as the player's X & Y coords. For this we can only hook into the MCI packet, as it is the only packet that offers this level of detail.


<?php 
public function onMultiCarInfo(IS_MCI $MCI)
{
    foreach (
$MCI->Info as $Info)
    {
        if (
$this->isInPoly($Info->X$Info->Y$this->PTH->Nodes[$Info->Node]->toPolyRoad())
            continue; 
# They are within the node.
        # If we get here, then they are NOT on the track.
    
}
}
?>

I am going to update the toPolyRoad() function to the Node class within the PTH module so that the code really is as simple as that.

Speaking of those changes to the Node class, here they are.


<?php 
    
public function toPolyLimit()
    {
        return array
        (
            array
            (
                
'x' => $this->Center->$this->Limit->Left,
                
'y' => $this->Center->$this->Limit->Left
            
), array
            (
                
'x' => $this->Cetner->$this->Limit->Right,
                
'y' => $this->Cetner->$this->Limit->Right
            
)
        );
    }
    public function 
toPolyRoad()
    {
        return array
        (
            array
            (
                
'x' => $this->Center->$this->Road->Left,
                
'y' => $this->Center->$this->Road->Left
            
), array
            (
                
'x' => $this->Cetner->$this->Road->Right,
                
'y' => $this->Cetner->$this->Road->Right
            
)
        );
    }
?>

Couple this with the lfs provided PTH files found on lfs.net and extract them to your $PRISM/data/pth directory and you'll be all set to go with these.

This is providing that I'm not completely out of my mind, as all of this is very much untested.
Last edited by Dygear, .
Dygear
S3 licensed
I tend to shy away from adding a property that does not belong there, but I agree that the information should be more flexible. I think in the case you described, there will be a proper fix for it in 2.0.0 as you can say how you want the data given to you.
Dygear
S3 licensed
Quote from spiderbait90 :Well, if you don't have sky, you may be loosing Martin completely. There has been some suggestion that Sky have offered him a contract to join their Formula 1 commentary team. Combined with that, Martin has said on his twitter account that he has to look at all of his possible options for 'work'. If sky are offering him a significant amount of money, to cover all of the races, then I do not see why Martin would not move to Sky. Prior to the Sky deal he would have been going to all of the races anyway, so it isn't like there would be significantly increased traveling.

If they happen to also take the whole BBC gang with them, minus Eddie, I'll be quite happy.
Dygear
S3 licensed
BTW, 0.3.0 works with the official 0.4.2 build of PRISM, so you can see what I have been up too.
Dygear
S3 licensed
Quote from three_jump :Is it intentional that the first post links to 1.9.3 instead to the more current 1.9.7 of the SDK?

Nope, over sight on my part. Thanks, going to fix this now.
Dygear
S3 licensed
I'm just pissed because they are messing with the best thing in years. We have it on the BBC, so there are no commercials, we have Martin Brundle and David Coulthard, arguably the best duo since Murry and Martin. More then anything, we are losing Martin and David for half the season, and I just don't know why they felt the need to do this. Just when it get's to be great, they have ruin it.
PHPInSimMod - PRISM 0.4.2 Discussion
Dygear
S3 licensed
You can download PHPInSimMod - PRISM 0.4.2 from that link. Please use this thread to talk about this release.

Thank you.

PHPInSimMod (PRISM) 0.4.2
  • Version changed to 0.4.2
  • Added timeToString & timeToStr functions.
  • Changes to this file allow for the `prism exit` command be used to restart, it also will automaticly restart PRISM in the event of a crash.
  • Fixed an error where the Player class functions would check Flags and not the correct PType property.
  • Removed module prism_state, as it was no longer used by any part of prism. Everything has already been moved over to the current State Handler.
  • Updated CRON to reflect up coming changes (Thanks filur).
  • Updated to current version of LVS.
PHPInSimMod (PRISM) 0.4.2
Dygear
S3 licensed
PHPInSimMod (PRISM) 0.4.2
  • Version changed to 0.4.2
  • Added timeToString & timeToStr functions.
  • Changes to this file allow for the `prism exit` command be used to restart, it also will automaticly restart PRISM in the event of a crash.
  • Fixed an error where the Player class functions would check Flags and not the correct PType property.
  • Removed module prism_state, as it was no longer used by any part of prism. Everything has already been moved over to the current State Handler.
  • Updated CRON to reflect up coming changes (Thanks filur).
  • Updated to current version of LVS.
Dygear
S3 licensed
0.3.0
  • Now supports single player races as well.
  • Removed a lot of code that was not needed right now.
  • File format is now UTF-8 to support the delta (Δ) character.
Dygear
S3 licensed
Ok, sorry, I'm just a little confused without the context on why you would want these.
Dygear
S3 licensed
S2Y version SMX meshes and PTH files, includes all but the AS7 and AS7R Paths. Are you ALSO looking for the older versions of the paths so that you can see what was updated between versions if anything?

@Victor & Scawen, you're missing the AS7 and AS7R path files from the SMX_PTH_S2Y zip, can you please advise.
Dygear
S3 licensed
Quote from Krammeh :cfg file backup or editing?

Manual input into the config file that was not sanitized by the LFS game name parser?

[edit] Oh never mind, apparently Krammeth beat me to it.
Dygear
S3 licensed
This
^1^2^4Zs^3oo^4ti

, should really be sanitized down to
^4Zs^3oo^4ti

that should be Zsooti. The way I read it, the first two colors should have no effect.
Dygear
S3 licensed
Pretty much what avetere just said.
Dygear
S3 licensed
Quote from scipy :Forgive me for my observation (especially if I'm wrong) but, is it just me or is this thread kind of going into the direction of "let's do everything other than the (now) simple original idea"?

As with any project there must be a planning stage. That and no one has said that they are actually going to do this. I've expressed an interest, and that's why I keep on replying to this thread. Anyway what's wrong with having ideas and sharing them?
Dygear
S3 licensed
Quote from Bean0 :Just displaying the gaps to the car in front and the car behind would be enough (or maybe 2 cars each way).

DoP have a HUD like this, so it must be possible.

DoP? It's defiantly possible, but each car's driver would have to be known to the InSim application, so that when a new driver comes in they can take over that car's position and continue to move the race forward for that car.
Dygear
S3 licensed
Quote from misiek08 :And 1 thing more. What do you think about overriding LFS GUI with tracker data? After TO, LFS will show last position and will count laps from 0.

I think that the only way to do the properly is by setting the server into practice mode, and allowing the InSim application to take over race control completely. This would allow for example things like a warm up lap, and a cool down lap.
Dygear
S3 licensed
Quote from Krammeh :Will be releasing it under my secondary S2 licence though, don't want the race linked to cruise :P

LAMO, funny, it's normally the other way 'round.
Dygear
S3 licensed
The first one is by far the better choice.
Dygear
S3 licensed
I had an all McLaren setup, except my drivers so I did quite well this weekend. Pretty happy.
Dygear
S3 licensed
The Black Screen AA bug is a known issue that seems to happen on more then just Intel IGPs. I have the same problem with my i3-2100T using a HD 1000. Not sure if the bug lays with LFS or with Intel Drivers, but I've heard this problem also be reported on some nVidia chips as well. I'm about to get an AMD 6950 and I'll let you know if the AA problems happen on AMD GPUs.
FGED GREDG RDFGDR GSFDG