• Welcome to MX Bikes Official Forum. Please login or sign up.
 
December 07, 2019, 10:50:44 am

News:

MX Bikes beta13c available! :)


Live Timing

Started by PiBoSo, October 04, 2014, 10:46:03 am

Previous topic - Next topic

PiBoSo

October 04, 2014, 10:46:03 am Last Edit: December 03, 2019, 02:34:32 pm by PiBoSo
It is possible to connect to a dedicated server to receive live race data.
Only 1 client can connect to the server.

Communication is made with UDP sockets and strings terminated with "\n".

Send "CONNECT" followed by the connection password ( empty string if no password ).
Reply:
OK -> connected
FULL -> another client is already connected
WRONGPASSWORD -> wrong password

Send "START", followed by a parameter string containing either "0" or "1", to start receiving data.
If the parameter is "1", the track centerline and the track position of the bikes are sent, too.

Data format is "MSG" followed by the message ID and then a stream of strings.
Send "ACK" followed by the message ID after each MSG.

Send "KEEPALIVE" every 15 seconds to keep the connection active.
The server sends "ALIVE" to report that the connection is active.

Send "DISCONNECT" to correctly close the connection.

Niko Mouk

This is a bit blur,
Do you have an exemple somewhere to allow me doing something like I did here : MXS LiveTiming
If you like my work, you can give me a donation :)

PizzaChet

March 16, 2016, 05:49:41 pm #2 Last Edit: March 16, 2016, 07:33:04 pm by PizzaChet
Speaking of timing, I ran a bunch of laps online on Holjes on the SM bike and I don't see my time up there. I've done several sessions, some alone. I do see my times for Forest and Practice Track Short however.
Quote from: YodaIf no mistake have you made, yet losing you are ... a different game you should play.

Steven

Quote from: Niko Mouk on March 16, 2016, 01:57:16 pm
This is a bit blur,
Do you have an exemple somewhere to allow me doing something like I did here : MXS LiveTiming


Could you be a bit more specific? I just started trying around with this, maybe I can help.
What have you tried so far? And what did you have to do to get your site to work with MXS? (By the way your link doesn't work as it is.)

Niko Mouk

Yep I inverted 2 letters, it's http://mxs-concept.com/livetiming/

I don't understand the way you can receive, for my livetiming on mxsimulator I think the strategy is totally different, the game server is writting a text file with all info as they come (rider 2 pass the second checkpoint for exemple) and I'm reading into that file.
Next at the end of the race a command send this file where I want to decode it and display championship results ie.
If you like my work, you can give me a donation :)

Steven

Ah ok, here you have to connect to the server that sends the information (track, players, split times and so on) to you. UDP is used for that.
I don't know about your "qualifications". Are you just looking for some example code or how to do it at all?

Niko Mouk

Maybe I have to understand if it will needed or not for the races and championships we will do. At the moment I think I'll focus myself on track making as the game is a bit poor at this level.  ;)
If you like my work, you can give me a donation :)

Umpossible

Can anybody help me with this? I'm looking to get live timing off of the Weekend Warriors FLCS2 server. Preferably, if it's possible I would love to be able to connect and download all the information from the server over the past week that it's been running but I doubt that's possible, or i could say that it's probably umpossible haha. 

iNsane | WeekendWarriors

June 25, 2018, 01:26:42 pm #8 Last Edit: June 25, 2018, 01:31:01 pm by iNsane
Quote from: Umpossible on June 25, 2018, 12:26:14 pm
Can anybody help me with this? I'm looking to get live timing off of the Weekend Warriors FLCS2 server. Preferably, if it's possible I would love to be able to connect and download all the information from the server over the past week that it's been running but I doubt that's possible, or i could say that it's probably umpossible haha.


well I didn't even enabled live in my server config file tbh., never saw a reasonable point behind that

Edit // enabled it now but I can't even connect to the port i defined there, dunno

PiBoSo

December 03, 2019, 02:27:20 pm #9 Last Edit: December 03, 2019, 02:33:55 pm by PiBoSo

First post updated to add a parameter to the "START" message, that allows to receive the track centerline and bikes' track position, too.