GithubHelp home page GithubHelp logo

koreldan / pyacc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gotzl/pyacc

0.0 1.0 0.0 78 KB

Tools to access Assetto Corsa Competizione shared memory with python

License: GNU General Public License v3.0

Python 78.75% Makefile 1.74% C 15.92% Shell 3.59%

pyacc's Introduction

pyacc

Tools to access Assetto Corsa Competizione shared memory with python. Most information is obtained from the thread in the official forum.

usage

ACC exposes three types of shared memory blocks, acpmf_physics, acpmf_graphics and acpmf_static. These memory blocks can be accessed in python via a ctypes structure. The helper function get_mapped_object(name) returns such a structure for both windows and Linux, or raises a FileNotFoundError if the mapping does not (yet) exist.

import pyacc
obj = pyacc.get_mapped_object('acpmf_physics')
print(obj.speedKmh)

Linux

The little prog acc_wrapper.exe is needed to map the shared files to linux shm. There are two ways to do this

a) 'automatic' start

Go to the ACC steamapps folder and rename acc.exe -> _acc.exe. Copy acc_wrapper.exe into the folder and rename it to acc.exe. When starting ACC from steam, the wrapper is invoked which then starts ACC, maps the files and waits for ACC to finish.

b) 'manual' start (!! doesn't work yet !!)

Use the acc_wrapper.sh script to start acc_wrapper.exe in the proton prefix of ACC. The script takes two (and an optional third) arguments:

1. proton version, eg "6.3" or "- Experimental"
2. path to the steamapps dir, eg "/games/steam/steamapps
(3. path to the steamapps dir where proton is installed)

Note: the proton version has to match the one that's select in the "Compatibility" properties page of the game.

pyacc's People

Contributors

gotzl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.