The online racing simulator
Searching in All forums
(190 results)
yankman
S2 licensed
Du bist hier falsch, das ist das Forum für Programmierer.
Ich denke das Beginnerforum ist passend für deine Frage.
Ausserdem müsstest du vielleicht noch ein paar mehr Informationen zu deinen Problem geben.
Noch was das Forum hier ist nur englischsprachig.
Wenn du eine deutsches LFS-Forum suchst kuckst du hier.
New E.P. from Trent Raznor
yankman
S2 licensed
Trent Raznor from NIN has released an E.P. with his new project "How to Destroy Angels". There is a free download available here.
yankman
S2 licensed
Quote from Mustafur :If team player means move out of the way so love child can win the race there is no doubt Webber was going to defend the position till the end.
Redbull tried to get Vettel ahead of Webber then they blame Webber for being overly defensive when he was told by HIS TEAM to slow down.

You got me wrong and do a lot of speculation there.
When Vettels car was in front, he should have moved over, there was no need race him that hard with Hamilton right behind.

But hey, your upset and you don't want to understand .
So it is ok. Lets see what the future brings.
yankman
S2 licensed
It was Vettels fault no doubt about it, but it was Webber who don't acted like a team player.
He tried to block Vettel, he failed and he should have let him go for teams sake. I think they will barely work as a team ever again.
Of course the aussies are upset about it.
At the end it doesn't look good for Vettel but Webber put himself in a bad position for extending his contract.

Don't forget who pays the salary.
yankman
S2 licensed
Quote from Mustafur :he did it anyway because he thought he had the right to the line thus he hit him.

I don't buy that. Even when he thought he had the right of line, MW was so close that he hadn't have enough time to move away from SV when he started to turn right. I say SV expected MW has moved already and did not try to force him.
As for the indirect team order thingy, it could really be a bad end for RBRs reputation.
I am not sure either, from what I read, SV was saving some fuel while driving behind. So he had not to change the mixture setting at this time, of course this is all published by RBR (right after the tyre explanation).
yankman
S2 licensed
My view on things.
I all comes down to the state of nr1 driver or nr1a at RBR.
Both drivers were even in points and after the last races it seems like MW would be able to beat Vettel. He had an all time high.
On the other side Vettel had a lot bad luck lately and began to realize that his underestimated team mate is the biggest opponent in the battle for the championship.

So Vettel was driving a few laps behind MW and I am pretty sure he realized that there is no chance of passing if WM doesn't do any mistakes.
So he tried when MW was slower out of the turn for whatever reason. It was clearly a valid try cause he came in the lead before the breaking.
For me it was not the pressure by LH from behind rather than the chance of beating MW on track to show who is nr1a at RBR.

MW himself was also very aware that if SV beat him on track for whatever reason, SV will be everybodies darling again.
He will be put back in second row. So he knew he must prevent SV somehow from overtaking.

My assumption is that in time vettel came in front, there was no reason for MW to keep that close.
MW should have positioning his car for the best possible braking attempt to regain his position after the turn.
I think that was exactly was SV was thinking so he tried to do same.
He was not forcing MW to clean line (which would be quite stupid), he was assuming MW would do it by himself.
So he hit MWs car by accident and not by intension.
Of course is was SVs fault but it remains mysterious why MW hold his line and did not get back to the right.

It is stupid to overate SV actions after the crash. There was a lot of adrenalin involved so it should not be taken to serious.

At the end it was not fight at ease between team mates, it was a fight to be nr1 in team.

Be calm with me, I am not a nativ english speaker .
yankman
S2 licensed
Quote from The Moose : I'd rather have an iRacing sub and a netKar Pro license than 12 licenses for a dead sim.

Isn't there any iRacing or netKar Pro forum, where you can go ?
yankman
S2 licensed
Quote from bunder9999 :i can think of two reasons...
1) money money money

I was thinking of that too.
But I doubt that Tilke's services are cheap.
And if Tilke is designing boring tracks there would be no serious reason to choose him.
yankman
S2 licensed
If tracks designed by Tilke are all that bad, why did they choose him anyway ?
I mean Bahrain, China,Turkey and Southkorea didn't know any better, they had not much experience in case of racing. (I guess it was Bernie who told them to do so)
But USA has a great racing tradition and I suppose has also enough local companies that could do the job.

Could it be that there are only a few guys arround here that dislike Tilke tracks, while the vast majority just keeps quiet ?

Before any bashing, I am neither a fan of Tilkes tacks nor do I hate them.
I am just wondering what are the reasons behind this decision.
Last edited by yankman, .
yankman
S2 licensed
Quote from Crashgate3 :This is one of the joys of a digital signal - it can be broadcast over an analogue medium and even if the signal has suffered from interference during the time it was analogue, it can be rebuilt into a perfect signal again fairly easily.

As an example, suppose your signal starts out as 1001010, which you then broadcast over an analogue medium. Due to a little interference, the signal received by the analogue receiver at the other end could be:

0.91, 0.1, 0.002, 0.987, 0.04, 0.991, 0.086.

As you know the original signal was either 1 or 0, it's very easy to clamp the analogue values back to their original values. You need a hefty amount of interference to flip a bit from 1 to 0 or vice-versa.

You can't be more wrong. What you are talking about is digital transmission.
In analog transmission the signal, a analog wave signal is transmitted via frequency modulation see here. There is no 0 or 1.

To detail out what I was talking about. The digital image would be converted to multiple analog waves. These are going to be transmitted via vga cable and afterwards these waves will be converted again to a digital signal.
yankman
S2 licensed
Quote from dadge :http://h10025.www1.hp.com/ewfr ... /Doc/images/c01532378.gif
red = digital
grey = Analog
i prefere Analog. same with radio. same with music media (vinyl over CD). same with game controllers.

So you have a digital version of the image in your graphics cards memory.
Then it will be converted to an analog signal and put out through an analog vga cable.
The signal will loose in strength with every electro magnetical inteference and of course due to the length of the cable.
After that the signal gets converted to digital again to show it on to your flatscreen.

Are you sure connecting a digital video device through a analog connection is a wise choice ?
yankman
S2 licensed
I've updated insim.txt, so code description as well as general usage description is now being parsed by doxygen (see here).
The zip file includes the changed insim.txt (ispackets.h).
Maybe this can be added to the wiki (although I got no idea how).
yankman
S2 licensed
I also think it should work, but it not nice way of programming.

Use {$} or ${} to identify variables in strings.

I use string concatenation for variable substitution,

<?php 
readfile
('/userbars/'.$uname.'.png');
?>

just for better reading the code and syntax highlighting.

It is bad you can't test the code yourself.
You should think of a local installation for testing or at least have a local php interpreter to prevent typos.
yankman
S2 licensed
I let doxygen generate a documentation for the vanilla version of insim.txt.
I think it looks quite well.

Next step would be to change the appearance of scawens comments so doxygen recognizes them.
live
download
yankman
S2 licensed
Yeah, just ask if there is anything you need to know.
yankman
S2 licensed
It depends, at first it does matter how you generate the pngs.
With gd, which is not the fastest but very reliable, the function imagepng can be used to write the image to a certain location.
Second is you can get the get request with superglobal array $_GET.
So http://www.funracingleague.com/userbars.php?lfsname=makakazo
can be retrieved via $_GET['lfsname'], but be sure to strip any tags and quote it for use in database statements.

To pump a file from disk to the browser u can use readfile.
Send the header for the png first to inform the browser of the data type eg. header('Content-type: image/png');.
Thats basically it.

A better solution however would be the use of mod_rewrite.
It depends on the host if it is available.
With mod_rewrite you can rewrite requests to the webserver via regular expressions.

A .htaccess for your problem should be a in a seperate folder and look like this.

RewriteEngine On
RewriteRule ^(.*)\.png$ userbar.php?lfsname=$1

This would call userbar.php everytime a png is requested. This way userbar.php can directly choose between generating a new png or deliver an already generated one.

The fastest solution from my experience would be somethink like this.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\.png$ userbar.php?lfsname=$1

It says if the requested file is there deliver it to the browser, if not call the script to generate and deliver it.
Now a second script can be run via cron at a certian interval to delete the already generated ones, forcing the generation of new pngs.
yankman
S2 licensed
Quote from Dygear :I think we need a HTML version of the InSim.txt that will link the structs possible member values to it's enum. Something along the lines of the attachment, as it would be nice to have an offline version as well. The Wiki could also use this level of referencing it's self.

Very nice and not only usefull for beginners.
I will have a look at some doc-generators if it can improved further (e.g. index).
yankman
S2 licensed
InSim.txt says M/S (meter per second).
yankman
S2 licensed
The z4 gt3 sounds not that spectacular, although it seems to drive nice.
My favourite is still m3 gtr paired up with striezel stuck.
yankman
S2 licensed
Quote from morpha :@yankman: What reason could someone possibly have to intentionally use outdated software? That's very unprofessional if you ask me

I don't want this to become far off topic, so a short and last explanation.

There are many privateers out there, who startet to rent root-servers (bundled with confixx/plesk etc.) for cutting the costs for hosting multiple sites.
They don't care about linux or php version (actually they don't have an idea what that is). The main goal is keep the server runing at minimal costs, so they run for years (personally I know 2 such guys). As often as I tell them they need to upgrade at least for security reasons,
they are afraid of the costs, the downtime and what else might happen.

So my experience, php 4 might be dead in terms of support but not in terms of usage in servers out there.
yankman
S2 licensed
Quote from morpha :Hardly a drawback as php4 is dead and has been for a while.

Don't be to sure, php applications are part of my work and from time to time there are customers who still use php 4.
Mostly caused by very outdated linux distributions.

Anyway my idea was something like this.

<?php 
class LFSStrConvert
{
    
// Replace Sets
    
public static $consoleReplaceArray = array("\033[30m""\033[31m""\033[32m""\033[33m""\033[34m""\033[35m""\033[36m""\033[37m""\033[39m""\033[0m");
    public static 
$htmlReplaceArray = array('000''F00''0F0''FF0''00F''F0F''0FF''FFF');

    
# Convert Live For Speed String into an ECMA-48 escaped string.
    
public static function lfs_str_convert_console($str)
    {
        
// Extra State Information
        
$isTagOpen FALSE;
        
// Parse String
        
for ($i 0$j 1$l strlen($str); $i $l; ++$i, ++$j)
        {
            
/* Handle Color Codes */
            
if ($str{$i} == '^' && is_numeric($str{$j}))
            {
                
// Get array values' length.
                
$deltaLen strlen(LFSStrConvert::consoleReplaceArray[$str[$j]]);
                
// Set tag status
                
if ($str{$j} < 8)
                    
$isTagOpen TRUE;
                else
                    
$isTagOpen FALSE;
                
// Place ECMA-48 Charaters into String.
                
$str substr($str0$i) . LFSStrConvert::consoleReplaceArray[$str[$j]] . substr($str$i);
                
// Move Pointer Past The Change.
                
$i += $deltaLen$j += $deltaLen;
                
// Get new String Length.
                
$l strlen($str);
                
// Remove The Formatting.
                
$str[$i] = NULL# Remove ^
                
$str[$j] = NULL# Remove Int.
            
}
        }
        
// Close any tag left open.
        
if ($isTagOpen)
            
$str .= "\033[0m";
        return 
$str;
    }

    
# Convert Live For Speed String into an HTML Mark'ed Up String.
    
public static function lfs_str_convert_html($str)
    {
        
// Extra State Information
        
$isTagOpen FALSE;
        
// Parse String
        
for ($i 0$j 1$l strlen($str); $i $l; ++$i, ++$j)
        {
            
/* Handle Color Codes */
            
if ($str{$i} == '^' && is_numeric($str{$j}))
            {
                if (
$isTagOpen == TRUE)
                {
                    
// Set State.
                    
$isTagOpen FALSE;
                    
// Inject Close Tag
                    
$str substr($str0$i) . '</span>' substr($str$i);
                    
// Move Str pointers Past ?.
                    
$i += 7$j += 7$l strlen($str);
                }
                if (
$str{$j} < 8)
                {
                    
// Set State
                    
$isTagOpen TRUE;
                    
// Inject HTML Markup
                    
$str substr($str0$i) . '<span style="color: #'.LFSStrConvert::htmlReplaceArray[$str[$j]].';">' substr($str$i);
                    
// Move Pointer Past The Change.
                    
$i += 27$j += 27;
                    
// Get new String Length.
                    
$l strlen($str);
                }
                
// Remove The Formatting.
                
$str[$i] = NULL# Remove ^.
                
$str[$j] = NULL# Remove Int.
            
}
        }
        
// Close any tag left open.
        
if ($isTagOpen)
            
$str .= '</span>';
        return 
$str;
    }

    
# Strip All Live For Speed Markup From The String.
    
function lfs_str_strip($str)
    {
        return 
str_replace(
            array(
'^0','^1','^2','^3','^4','^5','^6','^7','^8','^9'),
            array(),
            
str_replace(array('^d','^s','^c','^a','^q','^t','^l','^r','^v'),
            array(
'\\','/',':','*','?','"','<','>','|'), $str)
        );
    }      
}
?>

Would be nice to do some profiling, comparing both approaches.
I wouldn't be surprised if the php interpreter recognizes the constant arrays within the functions and does it only initialize once.
yankman
S2 licensed
A class with static arrays for the specific color data as well as static methods for the color handling would be a solution.

Data would be have only loaded once no matter how often you call the methods and the methods would be logically grouped together.

Might sound strange but this object oriented approach should produce less overhead than the original version.

The only drawback afaik would be no php4 support.
yankman
S2 licensed
Well the AI uses actually selected players car,
but I didn't know you can't change the selected car while on track.

Sorry, got no idea then.
yankman
S2 licensed
In game open chat window (T) and type /car FZR.
FGED GREDG RDFGDR GSFDG