• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

QUESTION Sending race status to socket

Sk_Panda

New Member
Hi everyone! I've been lurking for a long time, but I think this is my first post :)

I would like to "export" in real time data about the race status. Mainly the data I would need to create a standings table, a fastest lap popup, and so on.

My first thought was to send the data from an AC app using RabbitMQ (but I can't get it to work in Python 3.3.5) or a socket (but I got a "ImportError: No module named '_socket'" error).

I also thought about hooking into AC Server Manager, but I would like to avoid to have to install my software on a server. I intend to send the data from my AC (client) to a server I'm writing, who will then do things to that info and show it on a web page, but I'm perfectly fine with having all this software on my machine.

However, I just need to have the data, and I have no special interest in making an app of my own, so if you could advice me on how to either fix my python or get the data from something that is already available, it would be great! Thank you in advance!
 

Sk_Panda

New Member
This race_out file and laps are new after every race:
View attachment 7029
Thank you for the info, I didn't know about that! However, I want that info in real time, not at the end of the session...

I wish to create a sort of "live timing" screen, similar to that of AC Server Manager, but I want it to be available in any race mode, not only online. I've been trying to do it from scratch, but Python is not my forte (I'm an experienced programmer, but I did close to nothing with Python) and the 3.3.5 that AC uses is usually not supported in any library I can find...
 

Sk_Panda

New Member
Apparently it's not that either. I need real-time data about all the cars; shared memory apparently only exposes info about the player's car.

Essentially, I need the kind of data that is retrieved by ACTV. ACTV is open source, so I could study that code and retrieve the data. But I need to make it available outside the game. How can I do that?
 

fughettaboutit

aka leBluem
do smth like this in acUpdate() of your python app:
Code:
#include acsys
...
def acUpdate(deltaT):
    ...
    for carId in range(0, ac.getCarsCount()):
        if ac.isConnected(carId):
            ac.log(str( ac.getCarState(carId, acsys.CS.LapTime)  ))
 

Sk_Panda

New Member
I managed to get the sockets working. I'm afraid the key was to install Python 3.3.5 on my machine, which would make my app hard to distribute. Is it possible that acti's installer also takes care of that?
 

fughettaboutit

aka leBluem
Use only some single modules, copy to your app folder (they have it separated by 32/64bit versions in stdlib/stdlib64 folders), i have no idea how acti installer works, i unpacked manually (motec you must install properly thou to work)
 
Last edited:
Top