The online racing simulator
Searching in All forums
(225 results)
andy29
S3 licensed
Quote :Anyone into champcar..

Yes!

I'm watching it with Race Director, because I don't have Eurosport 2, and it's worth it in itself. I've watched a few races before but my interest always drifted away. But this year I am really getting into it. I was riding with Justin Wilson for the whole Houston race - that circuit is just a little bit bumpy
andy29
S3 licensed
Thanks
andy29
S3 licensed
Oh right, I didn't think of that! It makes perfect sense. Thankyou!

:bananalla

Another quick question - what's the ^L in the messages? It's a bit difficult to search for
Last edited by andy29, .
andy29
S3 licensed
Fujiwara, Ian... thanks for the information. I am learning with every post

I don't think I really explained it right though. At the moment die is ending the script. What I want to do now is to change it so that it doesn't stop... I want it to keep looping and echoing any messages it gets, if that's possible. I have tried removing die and putting echo in its place, but it seems that it's not as simple as that.
andy29
S3 licensed
So I have a loop waiting for a chat message:


<?php 
while(TRUE) {
  
$packet fread($socketIn1024);
    if(
rtrim(substr($packet04)) == "MSO") {
     
$in substr($packet4128);
     
$out trim($in"\0");
     die(
$out);
     }
    
usleep(100);
}
?>

This works okay. But of course it will only show one message and then end the script. How do you keep it running? I've had a look around and tried print() (because echo() is not actually a function ), but it seems that without having die() there it never displays the message. I can't see why. I guess this should be going on a PHP forum really
andy29
S3 licensed
Quote from GruntOfAction :The numbers are in no way corelation on their rank. They are just the order I went in each server with my experience.

andy29
S3 licensed
Quote :...if you follow the rules you will 99.9% of the time have a blast racing here!



IMHO the proper racing servers should go above the cruising ones, this is meant to be a racing sim first and foremost after all. I'm not starting an argument, I like the city driving servers as much as anyone

This is great idea. When it's done it needs to be made a sticky. It could go in the wiki too.
andy29
S3 licensed
I don't know if this is actually a bug or not, but if it is, it should be going here
andy29
S3 licensed
!?
andy29
S3 licensed
Haha, thanks, I just had to choose now to do this didn't I!

Oh well, I'm learning PHP at the same time too. It's all good practice...
andy29
S3 licensed
Thanks for your help guys. Now I know some of the basics I can do some fiddling and start to learn some more
andy29
S3 licensed
Quote from ajp71 :The UF1 is based on a Mini, the convertible is simply a crude removal of the roof. Due to body flex you'd never ever even consider racing an open top Mini, you'd actually get weight gain due to the amount of reinforcing work that would have to be done to stop the thing folding in on itself.

As the Top Gear guys would say, it would need tonnes of oak trees and girders to keep it from going floppy

Maybe when body flex is implemented it will have an effect...
andy29
S3 licensed
That should be okay

Then try to connect to the same IP:
(edit: and the port you are using too )
Last edited by andy29, .
andy29
S3 licensed
Quote from Cue-Ball :I would say that it would be best to leave the "R" or, even better, overlay the whole word "replay" and drop the sphere for a more simple, clean transition. Something like an image flip or a growing frame would look more professional. The sphere is a little too "trying too hard".

I would say something even simpler, like a quick fade to to the logo and back to the replay. A few years ago the F1 replays would fly in and out in a 3D box, but now the logo flies across the screen and the replay fades in.

I can upload a quick example of what I mean if it's okay for me to borrow a few seconds of the video

Quote from Becky Rose :In fact the full uncompressed HQ streams are twice the size of a DVD so no matter what I do there is always going to be quality loss

Yes, I know what you mean. I can fit 4x almost-one-hour highlights of the F1 races on a DVD, but it is quite low quality. On a standard TV you can't really tell much though, it's only when you watch it on a computer monitor that it's noticeable, but still watchable. I'm too stingy with myself to use more than four DVDs for the season

Being able to buy DVDs, well that will just be cool
andy29
S3 licensed
Ah yes, just had a look, so you are encouraged to use headlights instead, and honking is equivalent to flipping someone off. But Becky allows it because it helps give the drivers personality as it is virtual racing. It would be nice if they weren't used at all but Becky's reason (of course) makes sense

When I say a DVD, I don't mean just the Windows Media files put on a disc, I mean a proper video DVD that you could watch on a TV. Maybe that's what you meant anyway
andy29
S3 licensed
Absolutely brilliant. Again.

I love how you talk about if the stewards have seen people do things and how they are looking at data. And no comment on drifting!

One thing though - maybe you feel different about it - but shouldn't honking your horn be a similar offence to, say, telepitting while still racing? When you watch real life racing on TV, how often do you hear the drivers honking their horn? To me it just sounds silly.

Maybe you should start selling DVDs of the races
andy29
S3 licensed
Quote from MadCatX :You say that Windows can READ ext3 filesystemed partition? Arey you sure about that? Windows cannot see anything other thatn FAT ot NTFS filesystem.

Probably using something like this?
andy29
S3 licensed
Type 'ipconfig' into the command prompt (start > run > cmd) on the hosting computer, and try connecting to the IP address it says it has. Or if you are running the host on the same computer, try 127.0.0.1 .
andy29
S3 licensed
...and if that doesn't work, try a proper DOS bootdisk or a Linux live CD
andy29
S3 licensed
I don't know if it will work, but try renaming it with DOS (well, as close you can get in XP)... go to Start > Run, open 'cmd'. Then type:
rename ^1[TC]^7>Chris<.ply blah.ply

Then if it works at least you can move/delete/whatever it.
andy29
S3 licensed
Ahh right, that makes sense then

So...
insim format
byte S
word C
short c
unsigned C
int c
float f

Have I got that right?
andy29
S3 licensed
*wooshes over head*

NotAnIllusion - yes, it works! I am gradually understanding it. For the data types, for example the flags in the ISI packet, why in the line

<?php 
fwrite
($socketOut"ISI\0" pack("Scc"300001+8+16+321) . str_pad("aaa"16"\0"));
?>

is the pack format for the flags 'c'? According to InSim.txt, they are a byte - 1-byte unsigned integer - but in the PHP documentation the 'c' format is a signed char?

Also, so characters are okay just as strings, and integers need to be packed?
Last edited by andy29, .
andy29
S3 licensed
Wheee, I sent 'hello world' to LFS

First problem - I'm trying to get the version from LFS:


<?php 
fwrite
($socketOut"VER\0" pack("i"intval(0)));
$packet fread($socketIn256);
$lfsV trim(substr($packet,  48));
echo 
$lfsV;
?>

but there is no output. Also echoing $packet itself gives nothing. The problem's probably obvious to you!
andy29
S3 licensed
@rooble
Thanks a lot, that's exactly what I wanted!

@st4lk3r
Yes, I have looked at your tutorial... but I'm trying to learn the absolute basics, just trying to get connected and send a simple packet for the moment. Now I've done that, your tutorial will be very helpful
Very, very basic PHP
andy29
S3 licensed
Hello... I am trying to learn how to use InSim with PHP. First question - can I do this with XAMPP on Windows? I have tried using the example code from the wiki but nothing happens. InSim is set to port 30000.

I'm a complete n00b with PHP, so all I want to do right now is to connect to LFS and send a simple packet. I'm not even worried about even sending the ISI packet yet. Am I right in thinking that LFS should complain about what I am sending to it?

If that's right, then should I just be able to use fsockopen and then send a packet with fwrite? Something like this:


<?php 
$port 
"30000";
$tx fsockopen("udp://127.0.0.1"$port$errno$errstr);
$packet "aaa";
fwrite($tx$packet);
?>

Though that's probably completely wrong
FGED GREDG RDFGDR GSFDG