The online racing simulator
Searching in All forums
(190 results)
yankman
S2 licensed
Where is the "16hRace-Logo" and the "Numberplate", I can find it in the download section of your page.
Last edited by yankman, .
yankman
S2 licensed
q 'n' d way.

// socket handling
WSADATA wsaData;
SOCKET ogSocket;
int iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
if (iResult != NO_ERROR)
{
cout << "Error at WSAStartup()" << endl;
return 0;
}
ogSocket = socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
if(ogSocket == INVALID_SOCKET)
{
cout << "Error at socket(): " << WSAGetLastError() << endl;;
WSACleanup();
return 0;
}
sockaddr_in service;
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr("127.0.0.1");
service.sin_port = htons(27015);
if (bind( ogSocket, (SOCKADDR*) &service, sizeof(service)) == SOCKET_ERROR)
{
cout << "bind() failed." << endl;
closesocket(ogSocket);
WSACleanup();
return 0;
}

yankman
S2 licensed
Quote from Gabkicks :lol@ u gus all blaming C. A and b are clearly oval noobs or are having a bad day.

Exactly the point.
Of course C could have backed off to avoid the accident,
but if driver A and driver B would have had hold their line, everything would have been ok.

As a circuit driver u might think it is ok the block a car (like driver B tried to), but on the oval blocking a car is ridiculous, especially at an early stage in the race.

Also driver A has clearly problems controlling his car.

Imho it is a race accident.

For the next episode I would like to see the inboard cam. It should give a much better impression of what the drivers does and sees.
yankman
S2 licensed
The name of the host in the connection list can be changed by defining a player name for the actual host.
Edit the cfg.txt, search for Ply Name and add whatever u like.
yankman
S2 licensed
Check the ports that are already used by your system.
With windows: netstat -an
With linux: netstat -ln
The port u want to use for lfs should not be listed there otherwise change it.
yankman
S2 licensed
For convenience change line 986 in wine-0.9.39/programs/wineconsole/curses.c
from
nodelay(stdscr, TRUE);

to
nodelay(stdscr, FALSE);

yankman
S2 licensed
Quote from the_angry_angel :
Yes it'll work, but its still producing all the errors unfortunately

Did u try to fix this issue in curses.c ?
yankman
S2 licensed
Problem here was that even with no nohup (which just prevents the app from getting standard signals) the wgetch function of ncurses returned with ERR when starting wineconsole out of a script. This runs the mainloop over and over again as fast as ur cpu is. (->hi load)

If I started it directly from bash it worked out. I have not idea why, could be even a ncurses problem.

So I thought give wineconsole a stdin,stdout and stderr and everything is fine. Just what screen does. Only thing in my command is, it gets the process id of the detached screen rather than wineconsole itself. But if screen gets closed it closes the wineconsole process too.


PS: I wonder how ur pal does all these things w/o knowing just a bit english.
Last edited by yankman, .
yankman
S2 licensed
I guess it is still not perfect.
If I tried to start wineconsole via shell script and it is still producing errors.
However I used screen as a workarround.
The actual command I use in the script is now:
screen -D -m $WINE LFS.exe /cfg=$CFGFILE & echo $! > $PIDFILE

Of course with WINE, CFGFILE, PIDFILE defined somewhere before.

Works forme so far.

I would be nice if the server could some get some load:
FPR | Public#1 0.9.39
FPR | Public#2 0.9.39
Last edited by yankman, .
yankman
S2 licensed
Ok looks like I found the console error.

In wine-0.9.39/programs/wineconsole/curses.c

enum init_return WCCURSES_InitBackend(struct inner_data* data)

ncurses is init with nodelay(stdscr, TRUE);

Which causes an instant return of static void WCCURSES_GetEvents(struct inner_data* data) together with the message "Ooch. somebody beat us"
cause there is no input waiting.

I change the nodelay to false, which causes a blocking call while waiting for input.
I compiled it and it seems to work.

If someone is interested in testing:
lfs://|FPR+%7C+Publicserver%23Test|0|S2|/
yankman
S2 licensed
Quote from MaKaKaZo :What do you mean by a dummy? You must have an x-server running with all the CPU and mem usage that it means? Or can you have it somehow "disabled" so you can save all those resources?

xvfb for instance ... it is a virtual x-server that need no display.
Also xvnc is possible which runs without a display but can be used with vnc clients.

But as long as I am not sure that the udp problem is fixed with 0.9.39, I will not install X just for testing
yankman
S2 licensed
Tried 0.9.39 myself ...also got this error ->
"fixme:curses:WCCURSES_GetEvents Ooch. somebody beat us"
yankman
S2 licensed
But running newer versions of wine will require an x-server ... at least a dummy, if i am correct.
yankman
S2 licensed
Maybe take the other way round and look for applications that are more popular then lfs and produce a high amount of udp packets (p2p, other online games) ? They should have equal probs.
yankman
S2 licensed
So the plan is to build a wine with debug symbols and use gdb for debugging.
The problem is u need to know when a problem occurs in first place.
Otherwise I have no idea how to recognize the problem from inside the debugger.
But anyhow, if u are ready to test give a sign.


PS: Has anyone ever thought about contacting the wine developers ?
yankman
S2 licensed
Quote from the_angry_angel :
Edit: for brevity I'll repeat my previous posts;
If the team are interested in providing a non-windows server, and are interested, there are multiple people including myself, who are willing to spend our own time on it, for free.

If anyone else is interested in this, and the team are not, then perhaps anyone with a penchant for reverse engineering network code would like to spend some time on this with me..?

What do you need for your testing ?
yankman
S2 licensed
It is logical that wine is the reason or the underlying os itself.
When using windows u don't have those problems
yankman
S2 licensed
Running 2 Servers

FPR | Publicserver Patch X
FPR | Publicserver#2 Patch X2

OS SuSE 9.3 64bit
Kernel 2.6.16.27
Wine 20050211

From time to time there is the no guest information message.

But both servers never ever had heavy load.
Last edited by yankman, .
yankman
S2 licensed
For sure it does ... but somehow it must handle the huge amount of connections tries without locking itself.
yankman
S2 licensed
I guess there is still a way to go till lfs savely supports 32 players ...
yankman
S2 licensed
I was there ... wanted to join ... the join screen did not disappear.
I hit alt + f4 after that i could see cars but it stucks with the message "exiting..." .
Afterall i killed lfs with the task manager and now I always get the message a player is connecting
yankman
S2 licensed
I am not getting the sense out of it ... .
While racing such a feature eats to much of the screen.
So I guess barely anyone would use it.
If u submit replays of a race u would need to submit the overlay software and all the images of cars/drivers, so someone could use it.

And if u wanna capture race movies ... I guess a post production is the easier way to implement this, as well as suiting ur thoughts of how it should look like.

Beside that I might look good, it is a waste of time for a programmer imho.
yankman
S2 licensed
I use #38.
yankman
S2 licensed
I tested it ... and it is just as you both said.
If I constantly press the 'n' key I can't close via the exit button but
it still works with alt+f4.
Well at least it is not a big problem for ppl who are addicted to lfs .
yankman
S2 licensed
Sound like a good explanation ... to bad I didn't check for any keys pressed accidently.
FGED GREDG RDFGDR GSFDG