The online racing simulator
Searching in All forums
(569 results)
misiek08
S3 licensed
Hmn, we have to include splits (because it's 5 sec interval, AJAX system). You did this if the table looks like
Quote :results { lfsw, name, lapsdone, overallTime, s1,s2,s3,car,pits}

lapsdone gets from the last packet and s1,2,3 too.
overalllTime is ETime from the last SPX or LAP packet.

EDIT: Chagned spX columns to sX columns - that are splits.
Last edited by misiek08, .
misiek08
S3 licensed
I know how to do it but only with the same time of start. Can someone write an algorithm (script) in any programming lang for this? I will translate it to PHP but help me, please.
misiek08
S3 licensed
Someone from polish forum gave me panel. Delete topic please.
misiek08
S3 licensed
You said something about changing API and the plugin can not work. This system will use multi hosts and some other PRISM modules so it can be time wasting now.
misiek08
S3 licensed
Ok. I can select from DB data about last ETime in LAP packet and count laps. So we have now array:

<?php 
$racers 
= array('benten' => array(25150000'XFG'), 'boothy' => array(24149900'XRG'), 'Dygear' => array(25147800'FXO'));
?>

I will do some code in 1 hour so we can finish that today. I will not write all of the LTWT before 0.4.0 because Dygear said there will be big changes in API.
misiek08
S3 licensed
Ok. Now we should take array for players but wchich data is needed and how to compare it. For example we have 4 servers and races didn't started at same time. Track is KY Oval. On 1,2 servers when people are crossing S-F line, on 3,4 servers people crosses SP1.
Comparing last registered times will not work. All data is saved in database. Splits, laps, pitstop have separate tables.
LTWT: Live Teams Web Tracker
misiek08
S3 licensed
Hi!
After LWT wchich is easy (but maybe something will change with 0.4.0 version of PRISM) I will start working on LTWT.

Here is my problem. I can do everything but only when I have 1 server.
Can you help me with script that calculates positions for multi-server race.
First version of defining classes (but I will change if the change will help us) for cars is something like this:

<?php 
$classes 
= array('TBO' => 'FXO,XRT''STD' => 'XFG,XRG');
?>

or

<?php 
$classes 
= array('TBO' => array('FXO','XRT'), 'STD' => array('XFG','XRG'));
?>

misiek08
S3 licensed
I have that application. It's sending live (every 5 seconds) fuel status to my DB but not everyone will install soft.
misiek08
S3 licensed
Hmm... Showing fuel status for others users - no, not this.

I wonna have fuel status for each player because I'm going to do few events with eco driving.

Second reason is saving PB's for races on server. Car with full fuel tank is a little bit slower so it's not good when in quali some drivers have 3% of fuel and some have 90% because it's needed for race.

It will help organizers to make more realistic events. No refuelling between qual and race.
misiek08
S3 licensed
This won't be flashed site. Only HTML and JS code. (PHP backend for sure)
Tracker a'la IGTC is my next project. It will be more extended than this. All the functionallity of GTAL tracker will be included + AJAX.
[InSim]Fuel
misiek08
S3 licensed
I really need fuel status in InSim. In rFactor and few other simulations it is built in. That would be really big innovation because we (programmers) can do more calculations by fuel. For example we can group the lap times by fuel and 10%-40% of tank and more.......

Maybe in MCI packet somewhere or NLP....
Linux panel
misiek08
S3 licensed
Hi!
If anyone of you have a linux control panel for LFS server I am asking for it.
I don't have much time for making new panel but I need it for my first international event wchich I'm gonna do at December if everything will go good....

I need support for multiple machines in this panel because maybe more than 8 lfs servers will be needed for this event and one machine will not get it with insim.
It will be good if the panel is written in PHP. If there is agent f.ex. in Perl it's ok. Source code PHP is needed because I have to add there InSim managing support which need 10 lines to add because InSim manage panel is done.
I have few machines with Xeon and Intel's E7400 on Debian 5.

I will not use this panel for selling LFS server or getting money in any way for it
misiek08
S3 licensed
But it is the future project. IGTC is for teams not for users only. I wonna do something like http://live.f1liga.pl/
misiek08
S3 licensed
I'll make 2 of this.
One for user tracking and one for teams tracking. First version is for user tracking

For teams there will be LTWT: Live Teams Web Tracker - it will looks like GTAL/IGTC tracker.

I wonna see which data you wonna see. All splits, laps, pitstops or what? It will be something like remote but bigger with more functionallity.
LWT: Live Web Tracker
misiek08
S3 licensed
Hi!
I started making live web tracker based on PRISM.
You can follow everything on github.

Now there is logging packets into DB. Next step is table to save live data. Here is my question. What would you like to see on the website. Write here all needed data.
misiek08
S3 licensed
Noob said in other topic: "I forgot most things". He's lying every time. I think it's an kiddy with ban on Search button and Google.
misiek08
S3 licensed
Quote from cargame.nl :What tomorrow exactly?

27-23 = 4.

I know that people like post sometimes kb and kB as the same thing. I think 01.11 will be date for the 0.3.1 release.
misiek08
S3 licensed
Stick it please.
misiek08
S3 licensed
1. It is near getUserNameByPLID and others like this.
misiek08
S3 licensed
Things to fix:
1. The are some undefined function like userGet.....
2. You have 2 classes for handle state. In prism_state.php in prism_statehandler.php (both are required?)
3. In subforum is topic Is_reo you have a discussion about IS_REO packet and I gave there a link for old post where GeForz made patch for IS_REO which is working.
4. Debug cvar is not considerated in the code. For example file: PHPInSimMod.php lines: 172-181

I'll post below new things if I'll found them.
Missing function
misiek08
S3 licensed
If u call getUserNameByPLID from plugin you will get:
Quote :PHP Fatal error: Call to undefined method test::userGetUserNameByUCID() i
n E:\prism\modules\prism_plugins.php on line 388

Fatal error: Call to undefined method test::userGetUserNameByUCID() in E:\prism\
modules\prism_plugins.php on line 388

misiek08
S3 licensed
I've edited it:

<?php 
class IS_REO extends struct // REOrder (when race restarts after qualifying)
{
    const 
PACK 'CCCCC32';
    const 
UNPACK 'CSize/CType/CReqI/CNumP/C32PLID';

    public 
$Size 36;        // 36
    
public $Type ISP_REO;// ISP_REO
    
public $ReqI;            // 0 unless this is a reply to an TINY_REO request
    
public $NumP;            // number of players in race

    
public $PLID = array();        // all PLIDs in new order

    
function unpack($rawPacket)
    {
        
$pkClass unpack($this::UNPACK$rawPacket);

        for (
$pos 1$pos <= 32; ++$pos)
        {
            
$pkClass['PLID'][$pos] = $pkClass["PLID{$pos}"];
            unset(
$pkClass["PLID{$pos}"]);
        }

        foreach (
$pkClass as $property => $value)
        {
            
$this->$property $value;
        }

        return 
$this;
    }
};
?>

And working plugin (get's the REO):

<?php 
php
class test extends Plugins
{
    const 
NAME 'Test';
    const 
AUTHOR 'Misiek';
    const 
VERSION PHPInSimMod::VERSION;
    const 
DESCRIPTION 'Testing PRISM.';

    public function 
__construct()
    {
        
$this->registerPacket('print_rr',ISP_REO);
    }

    public function 
print_rr($packet){
        foreach(
$packet->PLID as $pos => $plid){
            echo 
'Pos:'$pos' / PLID:'$plid' / Nick: ', (($plid != 0) ? $this->getClientByPLID($plid)->UName ''), PHP_EOL;
        }
    }
}
?>

Now the packing part and it will work!

EDIT:
I'll use for now edited pack and parsePackFormat functions from GeForz. I think, it should be added to main PRISM release.
Last edited by misiek08, .
misiek08
S3 licensed
When it will be done, developer?

Maybe it can help:

<?php 
class IS_REO extends ISP {
    public 
$Size 36;
    public 
$Type ISP_REO;
    public 
$ReqI// 0 unless this is a reply to an TINY_REO request
    
public $NumP;        // number of players in race

    
public $PLID = array();    // all PLIDs in new order
    
    
protected $up_format 'CSize/CType/CReqI/CNumP/CP0/CP1/CP2/CP3/CP4/CP5/CP6/CP7/CP8/CP9/CP10/CP11/CP12/CP13/CP14/CP15/CP16/CP17/CP18/CP19/CP20/CP21/CP22/CP23/CP24/CP25/CP26/CP27/CP28/CP29/CP30/CP31';
    protected 
$p_format 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC';

    public function 
unpack($data)
    {
        
$up unpack($this->up_format$data);
        
$this->Size $up['Size'];
        
$this->ReqI $up['ReqI'];
        
$this->NumP $up['NumP'];
        
$i 0;
        for(
$i 0$i 32; ++$i)
        {
            
$this->PLID[$i] = $up['P' $i];
        }
    }

    public function 
pack()
    {
        return 
pack($this->p_format$this->Size$this->Type$this->ReqI$this->NumP$this->PLID[0], $this->PLID[1], $this->PLID[2], $this->PLID[3], $this->PLID[4], $this->PLID[5], $this->PLID[6], $this->PLID[7], $this->PLID[8], $this->PLID[9], $this->PLID[10], $this->PLID[11], $this->PLID[12], $this->PLID[13], $this->PLID[14], $this->PLID[15], $this->PLID[16], $this->PLID[17], $this->PLID[18], $this->PLID[19], $this->PLID[20], $this->PLID[21], $this->PLID[22], $this->PLID[23], $this->PLID[24], $this->PLID[25], $this->PLID[26], $this->PLID[27], $this->PLID[28], $this->PLID[29], $this->PLID[30], $this->PLID[31]);
    }
}
?>

It's not finished but only first step to make it working in my PHPLFS edition.

EDIT:

Someone already did it:
http://www.lfsforum.net/showthread.php?p=1485152#post1485152

Maybe attach it to public release.
Last edited by misiek08, .
Test Day to Night conversion
misiek08
S3 licensed
First try conversing day to night:
http://www.youtube.com/watch?v=sPpsuX4H62E
I did it in 2 minutes and it's the primary conversion but it's not finished. Rate it please.

Only rear light and main light around car. Front light are made for example.
misiek08
S3 licensed
Could you make an plugin for that? For example register say command 'set grid', wchich restarts race and sets grid.
FGED GREDG RDFGDR GSFDG