The online racing simulator
Searching in All forums
(64 results)
can't work IS_INI [solved]
highbridge
S3 licensed
I am making my program for new inSim(W39).

However, my code did not work at "IS_INI".
Always displaying "inSim : guest name must end with zero" after sending "IS_INI" packet.
I'm using this code.


Quote :
IS_ISI is_ini;
IS_TINY is_p;
IS_VER is_v;
WSADATA wsaData;
short listenPort;
listenPort = InSimPort - 1;
if (WSAStartup(0x202, &wsaData) == SOCKET_ERROR)
{
AfxMessageBox("Init : WSAStartup failed");
WSACleanup();
return 0;
}

UDPSocket = socket(AF_INET, SOCK_DGRAM, 0); // create UDP listen socket
if (UDPSocket == INVALID_SOCKET)
{
AfxMessageBox("SetupUDPSocket : Error opening listen socket");
WSACleanup();
return 0;
}
// setup UDP send socket
UDPSockAddr.sin_family = AF_INET;
UDPSockAddr.sin_addr.s_addr = INADDR_ANY;
// Port MUST be in Network Byte Order
UDPSockAddr.sin_port = htons(listenPort); // any port (10000 to 65535)
// bind
if (bind(UDPSocket,(sockaddr *)&UDPSockAddr, sizeof(UDPSockAddr)) == SOCKET_ERROR)
{
AfxMessageBox("SetupUDPSocket : bind failed");
closesocket(UDPSocket);
UDPSocket = INVALID_SOCKET;
WSACleanup();
return 0;
}

is_ini.Size = 44;
is_ini.Type = ISP_ISI;
is_ini.UDPPort = listenPort;
is_ini.Flags = 0;
is_ini.Interval = 0;
is_ini.ReqI = 1;
is_ini.Zero = 0;
is_ini.Sp0 = 0;
strcpy(is_ini.Admin,"");
strcpy(is_ini.IName,"MyProgram");
unsigned int addr = inet_addr(connAddr);
memset(&temp_addr, 0, sizeof(temp_addr));
memcpy(&temp_addr.sin_addr, &addr, sizeof(addr));
temp_addr.sin_family = AF_INET;
temp_addr.sin_port = htons(InSimPort);
if(sendto(UDPSocket, (char *)&is_ini, sizeof(is_ini), 0, (sockaddr *)&temp_addr, sizeof(temp_addr)) == SOCKET_ERROR){
AfxMessageBox("Sendto : send error ISI\n");
closesocket(UDPSocket);
UDPSocket = INVALID_SOCKET;
WSACleanup();
ConnectFlag = false;
return 0;
}
if(RecvWait((char *)&is_v, sizeof(is_v)) == 1){
AfxMessageBox("Can not received IS_VER packet\n",MB_ICONSTOP);
closesocket(UDPSocket);
UDPSocket = INVALID_SOCKET;
WSACleanup();
ConnectFlag = false;
return 0;
}


int myProgram::RecvWait(char *buf, int len)
{
HANDLE hEvent = WSACreateEvent();
WSANETWORKEVENTS events;
int ret,retVal,recvSize;
WSAEventSelect(UDPSocket,hEvent,FD_READ | FD_CLOSE);
while(1) {
ret = WSAWaitForMultipleEvents(1,&hEvent,FALSE,5000,FALSE);
if(ret == WSA_WAIT_TIMEOUT) {
retVal = 1;
break;
}
if(WSAEnumNetworkEvents(UDPSocket,hEvent,&events) == SOCKET_ERROR) {
retVal = 1;
break;
} else {
if(events.lNetworkEvents & FD_READ) {
recvSize = recv(UDPSocket,buf,len,0);
retVal = 0;
break;
}
}
}
WSACloseEvent(hEvent);
return retVal;
}


But did not work...

Please help me.
highbridge
S3 licensed
Quote from russraine :Couldn't get the Http address to work, but the MMS one did.

Quality is bit poor, lots of buffering, but the FPS when it is going is very smooth.

is the 5 connections limit due to peercast or another factor?

I hadn't managed to get peercast to work yet, think it's a port forwarding problem

LFS and video stream are not separate newtwork.
Because sharing bandwidth in same network.
um... I could not watch by peercast at my home.
It may relate for router setting.

Quote from Fischfix :the mms link worked for me as well. the quality isn't the best but at least i don't get that much bufferings. allthough can you restart the race so we don't see all the time that green car stuck in sand???


Yeah, AI car stucked or fuel emptied...
I will schedule for streaming on every Mon and Wed and Fri.
highbridge
S3 licensed
Quote :Hi... it said Channel not found on Peercast.

I'm interested as I have been looking at Peercast myself recently.

Try its
http://58.158.161.235:8080/
or
[url]mms://58.158.161.235:8080[/url]
But its only 5 connections.
highbridge
S3 licensed
Quote :Adding an input field for password would not be a problem, I have made a note to do this.
Nevertheless to make streaming I would suggest to use a client connected to the server and stream from the client. Even if possible to run TVdirector and LFS on different computers, camera movement would be much smoother if both programs are running on the same computer.
Furthermore I would suppose, that performance and connection to the drivers is affected, if the server is running in graphical mode and the computer has to manage the streaming too.

Oh! good news.
I hope for your update

I am trying real stream with TvDirector now.
You may be able to watch video stream by peercast.
Let's try.

http://yp.peercast.org/?type=& ... re=game&status=online
Channel name "WHRT LFS Streaming"
Private rooms on lobby.
highbridge
S3 licensed
I think that anyone is not using lobby...

If it can create private room on lobby. Uhmm

I think many racers use it for meeting spot.Nod
We usually are using chat program for external.
But this is inconvenience... Frown
Last edited by highbridge, .
highbridge
S3 licensed
Quote from duke_toaster :Let me test that, HB.

Quote :Let me test that, HB.

I tried by blank admin password.
It was working and watching movie.
But... blank admin password is so dangerous...
:-(
highbridge
S3 licensed
Quote :Multiplayer, start new game. Clear the admin password field and exit.

I know it...
I want to make real streaming server with this tool.
This tool can not use non blank password.
Because anybody can hijack the server...
highbridge
S3 licensed
Great tool!!

How is the admin password changed?
highbridge
S3 licensed
Quote from the_angry_angel :Because the movement that you'd generate using the outsim data wouldnt be correct? OutSim is designed for actuating sim cockpits (sim-seats), and motion platforms. If you changed to an external view and carried on getting data for the vehicle you're watching it wouldn't be appropriate to the view - because you're basically a in static place, like a spectator.

I need information of car move speed(velocity) and car position.
Direct3Dsound need to information of listener and sound source(Car) position.
Lisener = InSim CamPosGet
Car position = OutSim

But, I re-checked my test program. It got OutSim packet by all view.
OutSim packet.
highbridge
S3 licensed
I am testing function of OutSim and OutGauge now.

But OutSim packet did not receive by view of TV or Heli or follow.
It can receive by view of driver and custom...

However OutGauge did receive by all view.
Why did not OutSim packet receive by all view?
I need this function by my program(Sound MOD).
I want to make program by view of TV.
Because I use 3D effect of Direct3Dsound.

[WHRT] WorkaHolicRacingTeam
HighBridge
highbridge
S3 licensed
Quote from DEVIL 007 :Hi all,
this is actually not a bug.
The result is combination of prediction engine(probably server using only 3packets config)and internet latency.I guess there is nothing which can be done here.
Would be interesting to see how saw your opponent his position in the finish.Maybe it was the other way.

Maybe we could have lap times in 00:00.xxx format instead of current 00:00.xx format.Dunno if this is possible.

Yeah, I think so.
It will have to support 1/1000sec of resolution lap time.
But it will be possible on LFS???
New movie.
highbridge
S3 licensed
Here is new movie of UF1 series(only Japanese racers).

http://58.158.161.236/~whrt/cg ... &file=./upfile/76.avi
http://58.158.161.236/~whrt/cg ... &file=./upfile/99.avi

Those movie were made by yamakawa.
His movie is great!!
His thread.
http://www.lfsforum.net/showthread.php?t=9391

HighBridge
Wait command.
highbridge
S3 licensed
I think wait command usefull for race management.
for example.

rcm.lfs

/rcm Race will start after 30sec.
/rcm_all
/wait 5
/rcc_all
/wait 25
/restart

This example is race start notice to all racers.
It can use without admin authority by all player.
And it's convenience.
Master server down.
highbridge
S3 licensed
How do you recover when master server down?

My degi-server is working at far location.
In this case should re-start degi-server.
However i am not able to re-start soon.
Also, it is not possible in midnight.

I know that degi-server program did not re-connect to master server when master server down.
What are you doing for recovery in this case?
highbridge
S3 licensed
Quote from Scawen :Thank you for the track selection screen discussions, pictures, and so on. I took bits of various ideas that I read on this thread and made what I thought was practical from that. The result can be seen in U17. There's no need to think it's absolutely final - it is only a test patch. But I hope you will find the interface quite useful, the way it allows you to browse the tracks before loading.

http://www.lfsforum.net/showthread.php?t=9869

Great work!! Scawen
highbridge
S3 licensed
Quote from filur :The race movie was great!

(41.avi)

Yeah, very nice movie!
this is his works too.
http://58.158.161.236/~whrt/cg ... &file=./upfile/22.avi
highbridge
S3 licensed
Quote from filur :Logically, one packet reached the server first, got a final result established first, and thus ended up over the next finisher as times are identical. The fact that one car is a tiny bit ahead of the other in the screenshot doesn't really mean anything since the finishing times are the same. Since position updates covers only a few percent of physics cycles, the fact that one car is slightly ahead can be an ever so slight "mistake" by the prediction engine, whilst not actually affecting the "real" time of finishing.

So, my guess is you finished at the exact same time, and network latency decided the final positions.

Maybe 5th is nearer than 6th in the network.

Quote from jtr99 :Can't really help on the original question, but are you sure the precise finish line is where you imply it to be with those screenshots? I always assumed it was down the middle of the chequered paint pattern, not at one end.

Of course I'm sure the relative positions of the two cars wouldn't have changed much over that 50cm distance or whatever it is; I was just wondering.

here is movie.
http://58.158.161.236/~whrt/cg ... &file=./upfile/52.wmv
http://58.158.161.236/~whrt/cg ... &file=./upfile/41.avi
same lap time.
highbridge
S3 licensed
We have raced on last Saturday by UF1000.

Attached image is race result.
5th and 6th finished at same total time.
However, 6th had finished in the replay image ahead of 5th.
How did judgement in this case? illepall

Race mpr: http://whrt.web.infoseek.co.jp/uf1c/uf1club3_race.zip
highbridge
S3 licensed
Quote from XCNuse :hm.. a custom horn, i dont see why not?

this would come in handy for CnR servers thats for sure

+1 from me

Our team mates are using custom horn.
It is voice of "Hard Gay"(Japanese comedian).
http://whrt.web.infoseek.co.jp ... //e/2005/10/photo/foo.zip
We are using other horns too.
ex: police's siren, voice of "inoki".
But other racers can't listen this voice.
Custom horn file
highbridge
S3 licensed
I wanna listen custom horn.
It is download custom horn file from lfsworld.
Also it is like autoskin system.
Such as only one horn file upload to lfsworld for each racer.
My idea
highbridge
S3 licensed
My idea.
can preview scene of each track.
My OutGauge test program.
highbridge
S3 licensed
Quote from highbridge :I bought screen about $180US(20000yen).
And LED indicator is using junk parts.
Broken parts are LAN Hub and any...

[WHRT] WorkaHolic Racing Team
HighBridge

Here is my source code
http://whrt.web.infoseek.co.jp/software/OutGaugeTest.zip

But it is uncompletely and this is only source code.
If you have same display unit,
Please let me know question.

[WHRT] WorkaHolic Racing Team
HighBridge
highbridge
S3 licensed
Quote from Doso :thats very very cool, i want to do this for my cockpit

i would love too see a right up detailing how you did this (if you could :-) )

also how much does that screen cost?, i have been trying to do this with an old LCD screen (LIS lcd panel) without much luck

thanks!

I bought screen about $180US(20000yen).
And LED indicator is using junk parts.
Broken parts are LAN Hub and any...

Here is photo







[WHRT] WorkaHolic Racing Team
HighBridge
highbridge
S3 licensed
Quote from sdether :That rocks. How much do those screens run and are they simple RS-232 connectors or do you have to build a board to connect the display?

Also, did you build the LED rev indicator yourself or where did you find that board?

I did not build board.
It can connect to PC with RS232C or USB interfaces.
Very easily.

I made LED indicator board.
But very simple.
This display has digital I/O interface.
I connect to those ports and control by VisualC++ program.

[WHRT] WorkaHolic Racing Team
HighBridge
OutGauge Test
highbridge
S3 licensed
I made control program for "Noritake GU-3101" by OutGauge.
http://www.noritake-elec.com/3000_series.htm

You can watch test movie!
http://58.158.161.236/~whrt/cg ... 3&file=./upfile/3.wmv

Have fun.

[WHRT] WorkaHolic Racing Team
HighBridge
FGED GREDG RDFGDR GSFDG