Page 1 of 6 123 ... LastLast
Results 1 to 10 of 54

Thread: [HowTo] Shared Memory (API) App

  1. #1
    WMD Member Lars Rosenquist's Avatar
    Join Date
    Oct 2011
    Location
    The Netherlands
    Posts
    268
    Platform
    PC

    [HowTo] Shared Memory (API) App

    Introduction
    With the APP & API forum slowly filling up with apps developed by WMD members, it's time to expand the knowledge on how to actually interface with Project CARS to the general public. The info in this post comes mostly from posts by SMS developers inside the WMD forum (I C/P most of it, so credits must go mostly to SMS for this) and I'll start with a fairly short introductory post, but will keep expanding it and adding on to it as we go along. I suppose this thread is also good to ask questions regarding the SharedMemory itself, but also to ask for tips in case you want to use it in a development environment/language that differs from Visual Studio/C/C++.

    Shared Memory - concept
    The way to interface with Project CARS is by the concept of shared memory. Shared memory (in Project CARS) is basically an in-memory file which contains lots of various real-time information about the game, e.g. physics state, car speed, best lap time, wind direction, contestants info, etc. It's currently updated every render frame. The purpose for this 'in memory file' is to share this real-time data with your external software and hardware. So using the shared memory your app has direct access to the information that is exposed by the game. This is by far the fastest way of getting data into your own app. What you can build is limited only by what you can come up with, e.g. it could range from cockpit simulators, telemetry calculations, to additional info displays. So this is: literally "Created by you".

    Shared Memory vs UDP streaming
    Instead of using Shared Memory, there's also UDP streaming available, please see this topic for more info on how to set this up. Note that Shared Memory only works on PC, but UDP is available on all platforms (PC, Xbox One, PS4).

    Shared memory - implementation
    The shared memory is implemented using a Memory-Mapped file (easier understood as an in-memory file). In memory file is named "$pcars$". It's updated every render frame, so this really depends on your user settings; ie; Resolution: 'Hz'. It's turned off by default, and switched on via the Main Menu options screen, under 'Help & Options' -> 'Visuals' -> 'Hardware' -> 'Use Shared Memory' -> 'Yes'.

    The data structure is defined in "SharedMemory.h" (see the attached files below). You should be able to simply drop it into a C/C++ project with little difficulty. Or instead you could refer to it as a guideline/map/template if you're using other languages. I'll add a more detailed description of what does what at a later moment.

    To make your lives a bit easier please find a small sample project attached below (made by SMS BTW, not me) which just keeps printing a value from the data until you press ESC. Also be sure to check out the threads from the other app developers, as some of them have provided open source implementations (including myself), so that should be good to give you guys a kick start.

    Below is the latest SharedMemory.h

    Code:
    /*************************************************************************************************
      Description: 
        Storage structure for storing and updating shared memory
    
        Copyright (c) MWL. All rights reserved.
    *************************************************************************************************/
    
    #ifndef _SHARED_MEMORY_HPP_
    #define _SHARED_MEMORY_HPP_
    
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // NOTES:
    // 
    //  -The shared memory variables will be updated once per graphics frame.
    //
    //  -Each variable comes with a UNIT, RANGE, and UNSET description where applicable.
    //     UNITS - Is the numeric form which a variable is stored in (e.g. KPH, Celsius)
    //     RANGE - Is the min-max ranges for a variable
    //     UNSET - Is the initialised/default/invalid value, depending on the variables usage
    //
    //  -Constant/unchanging values are included in the data, such as 'maxRPM', 'fuelCapacity' - this is done to allow percentage calculations.
    //
    //  -Also included are 12 unique enumerated types, to be used against the mentioned flag/state variables
    //
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    
    // *** Types ***
    
    // Header version number to test against
    enum
    {
      SHARED_MEMORY_VERSION = 5
    };
    
    // Maximum allowed length of string
    enum
    {
      STRING_LENGTH_MAX = 64
    };
    
    // Maximum number of general participant information allowed to be stored in memory-mapped file
    enum
    {
      STORED_PARTICIPANTS_MAX = 64
    };
    
    // Tyres
    enum 
    {
      TYRE_FRONT_LEFT = 0,
      TYRE_FRONT_RIGHT,
      TYRE_REAR_LEFT,
      TYRE_REAR_RIGHT,
      //--------------
      TYRE_MAX
    };
    
    // Vector
    enum
    {
      VEC_X = 0,
      VEC_Y,
      VEC_Z,
      //-------------
      VEC_MAX
    };
    
    // (Type#1) GameState (to be used with 'mGameState')
    enum
    {
      GAME_EXITED = 0,
      GAME_FRONT_END,
      GAME_INGAME_PLAYING,
      GAME_INGAME_PAUSED,
      //-------------
      GAME_MAX
    };
    
    // (Type#2) Session state (to be used with 'mSessionState')
    enum
    {
      SESSION_INVALID = 0,
      SESSION_PRACTICE,
      SESSION_TEST,
      SESSION_QUALIFY,
      SESSION_FORMATION_LAP,
      SESSION_RACE,
      SESSION_TIME_ATTACK,
      //-------------
      SESSION_MAX
    };
    
    // (Type#3) RaceState (to be used with 'mRaceState')
    enum
    {
      RACESTATE_INVALID,
      RACESTATE_NOT_STARTED,
      RACESTATE_RACING,
      RACESTATE_FINISHED,
      RACESTATE_DISQUALIFIED,
      RACESTATE_RETIRED,
      RACESTATE_DNF,
      //-------------
      RACESTATE_MAX
    };
    
    // (Type#4) Current Sector (to be used with 'mCurrentSector')
    enum
    {
      SECTOR_INVALID = 0, 
      SECTOR_START,
      SECTOR_SECTOR1,
      SECTOR_SECTOR2,
      SECTOR_FINISH,
      SECTOR_STOP,
      //-------------
      SECTOR_MAX
    };
    
    // (Type#5) Flag Colours (to be used with 'mHighestFlagColour')
    enum
    {
      FLAG_COLOUR_NONE = 0,       // Not used for actual flags, only for some query functions
      FLAG_COLOUR_GREEN,          // End of danger zone, or race started
      FLAG_COLOUR_BLUE,           // Faster car wants to overtake the participant
      FLAG_COLOUR_WHITE,          // Approaching a slow car
      FLAG_COLOUR_YELLOW,         // Danger on the racing surface itself
      FLAG_COLOUR_DOUBLE_YELLOW,  // Danger that wholly or partly blocks the racing surface
      FLAG_COLOUR_BLACK,          // Participant disqualified
      FLAG_COLOUR_CHEQUERED,      // Chequered flag
      //-------------
      FLAG_COLOUR_MAX
    };
    
    // (Type#6) Flag Reason (to be used with 'mHighestFlagReason')
    enum
    {
      FLAG_REASON_NONE = 0,
      FLAG_REASON_SOLO_CRASH,
      FLAG_REASON_VEHICLE_CRASH,
      FLAG_REASON_VEHICLE_OBSTRUCTION,
      //-------------
      FLAG_REASON_MAX
    };
    
    // (Type#7) Pit Mode (to be used with 'mPitMode')
    enum
    {
      PIT_MODE_NONE = 0,
      PIT_MODE_DRIVING_INTO_PITS,
      PIT_MODE_IN_PIT,
      PIT_MODE_DRIVING_OUT_OF_PITS,
      PIT_MODE_IN_GARAGE,
      //-------------
      PIT_MODE_MAX
    };
    
    // (Type#8) Pit Stop Schedule (to be used with 'mPitSchedule')
    enum
    {
      PIT_SCHEDULE_NONE = 0,        // Nothing scheduled
      PIT_SCHEDULE_STANDARD,        // Used for standard pit sequence
      PIT_SCHEDULE_DRIVE_THROUGH,   // Used for drive-through penalty
      PIT_SCHEDULE_STOP_GO,         // Used for stop-go penalty
      //-------------
      PIT_SCHEDULE_MAX
    };
    
    // (Type#9) Car Flags (to be used with 'mCarFlags')
    enum
    {
      CAR_HEADLIGHT         = (1<<0),
      CAR_ENGINE_ACTIVE     = (1<<1),
      CAR_ENGINE_WARNING    = (1<<2),
      CAR_SPEED_LIMITER     = (1<<3),
      CAR_ABS               = (1<<4),
      CAR_HANDBRAKE         = (1<<5),
    };
    
    // (Type#10) Tyre Flags (to be used with 'mTyreFlags')
    enum
    {
      TYRE_ATTACHED         = (1<<0),
      TYRE_INFLATED         = (1<<1),
      TYRE_IS_ON_GROUND     = (1<<2),
    };
    
    // (Type#11) Terrain Materials (to be used with 'mTerrain')
    enum
    {
      TERRAIN_ROAD = 0,
      TERRAIN_LOW_GRIP_ROAD,
      TERRAIN_BUMPY_ROAD1,
      TERRAIN_BUMPY_ROAD2,
      TERRAIN_BUMPY_ROAD3,
      TERRAIN_MARBLES,
      TERRAIN_GRASSY_BERMS,
      TERRAIN_GRASS,
      TERRAIN_GRAVEL,
      TERRAIN_BUMPY_GRAVEL,
      TERRAIN_RUMBLE_STRIPS,
      TERRAIN_DRAINS,
      TERRAIN_TYREWALLS,
      TERRAIN_CEMENTWALLS,
      TERRAIN_GUARDRAILS,
      TERRAIN_SAND,
      TERRAIN_BUMPY_SAND,
      TERRAIN_DIRT,
      TERRAIN_BUMPY_DIRT,
      TERRAIN_DIRT_ROAD,
      TERRAIN_BUMPY_DIRT_ROAD,
      TERRAIN_PAVEMENT,
      TERRAIN_DIRT_BANK,
      TERRAIN_WOOD,
      TERRAIN_DRY_VERGE,
      TERRAIN_EXIT_RUMBLE_STRIPS,
      TERRAIN_GRASSCRETE,
      TERRAIN_LONG_GRASS,
      TERRAIN_SLOPE_GRASS,
      TERRAIN_COBBLES,
      TERRAIN_SAND_ROAD,
      TERRAIN_BAKED_CLAY,
      TERRAIN_ASTROTURF,
      TERRAIN_SNOWHALF,
      TERRAIN_SNOWFULL,
      //-------------
      TERRAIN_MAX
    };
    
    // (Type#12) Crash Damage State  (to be used with 'mCrashState')
    enum
    {
      CRASH_DAMAGE_NONE = 0,
      CRASH_DAMAGE_OFFTRACK,
      CRASH_DAMAGE_LARGE_PROP,
      CRASH_DAMAGE_SPINNING,
      CRASH_DAMAGE_ROLLING,
      //-------------
      CRASH_MAX
    };
    
    // (Type#13) ParticipantInfo struct  (to be used with 'mParticipantInfo')
    typedef struct
    {
      bool mIsActive;
      char mName[STRING_LENGTH_MAX];                   // [ string ]
      float mWorldPosition[VEC_MAX];                   // [ UNITS = World Space  X  Y  Z ]
      float mCurrentLapDistance;                       // [ UNITS = Metres ]   [ RANGE = 0.0f->... ]    [ UNSET = 0.0f ]
      unsigned int mRacePosition;                      // [ RANGE = 1->... ]   [ UNSET = 0 ]
      unsigned int mLapsCompleted;                     // [ RANGE = 0->... ]   [ UNSET = 0 ]
      unsigned int mCurrentLap;                        // [ RANGE = 0->... ]   [ UNSET = 0 ]
      unsigned int mCurrentSector;                     // [ enum (Type#4) Current Sector ]
    } ParticipantInfo;
    
    
    // *** Shared Memory ***
    
    typedef struct
    {
      // Version Number
      unsigned int mVersion;                           // [ RANGE = 0->... ]
      unsigned int mBuildVersionNumber;                // [ RANGE = 0->... ]   [ UNSET = 0 ]
    
      // Game States
      unsigned int mGameState;                         // [ enum (Type#1) Game state ]
      unsigned int mSessionState;                      // [ enum (Type#2) Session state ]
      unsigned int mRaceState;                         // [ enum (Type#3) Race State ]
    
      // Participant Info
      int mViewedParticipantIndex;                                  // [ RANGE = 0->STORED_PARTICIPANTS_MAX ]   [ UNSET = -1 ]
      int mNumParticipants;                                         // [ RANGE = 0->STORED_PARTICIPANTS_MAX ]   [ UNSET = -1 ]
      ParticipantInfo mParticipantInfo[STORED_PARTICIPANTS_MAX];    // [ struct (Type#13) ParticipantInfo struct ]
    
      // Unfiltered Input
      float mUnfilteredThrottle;                        // [ RANGE = 0.0f->1.0f ]
      float mUnfilteredBrake;                           // [ RANGE = 0.0f->1.0f ]
      float mUnfilteredSteering;                        // [ RANGE = -1.0f->1.0f ]
      float mUnfilteredClutch;                          // [ RANGE = 0.0f->1.0f ]
    
      // Vehicle information
      char mCarName[STRING_LENGTH_MAX];                 // [ string ]
      char mCarClassName[STRING_LENGTH_MAX];            // [ string ]
    
      // Event information
      unsigned int mLapsInEvent;                        // [ RANGE = 0->... ]   [ UNSET = 0 ]
      char mTrackLocation[STRING_LENGTH_MAX];           // [ string ]
      char mTrackVariation[STRING_LENGTH_MAX];          // [ string ]
      float mTrackLength;                               // [ UNITS = Metres ]   [ RANGE = 0.0f->... ]    [ UNSET = 0.0f ]
    
      // Timings
      bool mLapInvalidated;                             // [ UNITS = boolean ]   [ RANGE = false->true ]   [ UNSET = false ]
      float mBestLapTime;                               // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mLastLapTime;                               // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = 0.0f ]
      float mCurrentTime;                               // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = 0.0f ]
      float mSplitTimeAhead;                            // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mSplitTimeBehind;                           // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mSplitTime;                                 // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = 0.0f ]
      float mEventTimeRemaining;                        // [ UNITS = milli-seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mPersonalFastestLapTime;                    // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mWorldFastestLapTime;                       // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mCurrentSector1Time;                        // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mCurrentSector2Time;                        // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mCurrentSector3Time;                        // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mFastestSector1Time;                        // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mFastestSector2Time;                        // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mFastestSector3Time;                        // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mPersonalFastestSector1Time;                // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mPersonalFastestSector2Time;                // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mPersonalFastestSector3Time;                // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mWorldFastestSector1Time;                   // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mWorldFastestSector2Time;                   // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      float mWorldFastestSector3Time;                   // [ UNITS = seconds ]   [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
    
      // Flags
      unsigned int mHighestFlagColour;                 // [ enum (Type#5) Flag Colour ]
      unsigned int mHighestFlagReason;                 // [ enum (Type#6) Flag Reason ]
    
      // Pit Info
      unsigned int mPitMode;                           // [ enum (Type#7) Pit Mode ]
      unsigned int mPitSchedule;                       // [ enum (Type#8) Pit Stop Schedule ]
    
      // Car State
      unsigned int mCarFlags;                          // [ enum (Type#9) Car Flags ]
      float mOilTempCelsius;                           // [ UNITS = Celsius ]   [ UNSET = 0.0f ]
      float mOilPressureKPa;                           // [ UNITS = Kilopascal ]   [ RANGE = 0.0f->... ]   [ UNSET = 0.0f ]
      float mWaterTempCelsius;                         // [ UNITS = Celsius ]   [ UNSET = 0.0f ]
      float mWaterPressureKPa;                         // [ UNITS = Kilopascal ]   [ RANGE = 0.0f->... ]   [ UNSET = 0.0f ]
      float mFuelPressureKPa;                          // [ UNITS = Kilopascal ]   [ RANGE = 0.0f->... ]   [ UNSET = 0.0f ]
      float mFuelLevel;                                // [ RANGE = 0.0f->1.0f ]
      float mFuelCapacity;                             // [ UNITS = Liters ]   [ RANGE = 0.0f->1.0f ]   [ UNSET = 0.0f ]
      float mSpeed;                                    // [ UNITS = Metres per-second ]   [ RANGE = 0.0f->... ]
      float mRpm;                                      // [ UNITS = Revolutions per minute ]   [ RANGE = 0.0f->... ]   [ UNSET = 0.0f ]
      float mMaxRPM;                                   // [ UNITS = Revolutions per minute ]   [ RANGE = 0.0f->... ]   [ UNSET = 0.0f ]
      float mBrake;                                    // [ RANGE = 0.0f->1.0f ]
      float mThrottle;                                 // [ RANGE = 0.0f->1.0f ]
      float mClutch;                                   // [ RANGE = 0.0f->1.0f ]
      float mSteering;                                 // [ RANGE = -1.0f->1.0f ]
      int mGear;                                       // [ RANGE = -1 (Reverse)  0 (Neutral)  1 (Gear 1)  2 (Gear 2)  etc... ]   [ UNSET = 0 (Neutral) ]
      int mNumGears;                                   // [ RANGE = 0->... ]   [ UNSET = -1 ]
      float mOdometerKM;                               // [ RANGE = 0.0f->... ]   [ UNSET = -1.0f ]
      bool mAntiLockActive;                            // [ UNITS = boolean ]   [ RANGE = false->true ]   [ UNSET = false ]
      int mLastOpponentCollisionIndex;                 // [ RANGE = 0->STORED_PARTICIPANTS_MAX ]   [ UNSET = -1 ]
      float mLastOpponentCollisionMagnitude;           // [ RANGE = 0.0f->... ]
      bool mBoostActive;                               // [ UNITS = boolean ]   [ RANGE = false->true ]   [ UNSET = false ]
      float mBoostAmount;                              // [ RANGE = 0.0f->100.0f ] 
    
      // Motion & Device Related
      float mOrientation[VEC_MAX];                     // [ UNITS = Euler Angles ]
      float mLocalVelocity[VEC_MAX];                   // [ UNITS = Metres per-second ]
      float mWorldVelocity[VEC_MAX];                   // [ UNITS = Metres per-second ]
      float mAngularVelocity[VEC_MAX];                 // [ UNITS = Radians per-second ]
      float mLocalAcceleration[VEC_MAX];               // [ UNITS = Metres per-second ]
      float mWorldAcceleration[VEC_MAX];               // [ UNITS = Metres per-second ]
      float mExtentsCentre[VEC_MAX];                   // [ UNITS = Local Space  X  Y  Z ]
    
      // Wheels / Tyres
      unsigned int mTyreFlags[TYRE_MAX];               // [ enum (Type#10) Tyre Flags ]
      unsigned int mTerrain[TYRE_MAX];                 // [ enum (Type#11) Terrain Materials ]
      float mTyreY[TYRE_MAX];                          // [ UNITS = Local Space  Y ]
      float mTyreRPS[TYRE_MAX];                        // [ UNITS = Revolutions per second ]
      float mTyreSlipSpeed[TYRE_MAX];                  // [ UNITS = Metres per-second ]
      float mTyreTemp[TYRE_MAX];                       // [ UNITS = Celsius ]   [ UNSET = 0.0f ]
      float mTyreGrip[TYRE_MAX];                       // [ RANGE = 0.0f->1.0f ]
      float mTyreHeightAboveGround[TYRE_MAX];          // [ UNITS = Local Space  Y ]
      float mTyreLateralStiffness[TYRE_MAX];           // [ UNITS = Lateral stiffness coefficient used in tyre deformation ]
      float mTyreWear[TYRE_MAX];                       // [ RANGE = 0.0f->1.0f ]
      float mBrakeDamage[TYRE_MAX];                    // [ RANGE = 0.0f->1.0f ]
      float mSuspensionDamage[TYRE_MAX];               // [ RANGE = 0.0f->1.0f ]
      float mBrakeTempCelsius[TYRE_MAX];               // [ UNITS = Celsius ]
      float mTyreTreadTemp[TYRE_MAX];                  // [ UNITS = Kelvin ]
      float mTyreLayerTemp[TYRE_MAX];                  // [ UNITS = Kelvin ]
      float mTyreCarcassTemp[TYRE_MAX];                // [ UNITS = Kelvin ]
      float mTyreRimTemp[TYRE_MAX];                    // [ UNITS = Kelvin ]
      float mTyreInternalAirTemp[TYRE_MAX];            // [ UNITS = Kelvin ]
    
      // Car Damage
      unsigned int mCrashState;                        // [ enum (Type#12) Crash Damage State ]
      float mAeroDamage;                               // [ RANGE = 0.0f->1.0f ]
      float mEngineDamage;                             // [ RANGE = 0.0f->1.0f ]
    
      // Weather
      float mAmbientTemperature;                       // [ UNITS = Celsius ]   [ UNSET = 25.0f ]
      float mTrackTemperature;                         // [ UNITS = Celsius ]   [ UNSET = 30.0f ]
      float mRainDensity;                              // [ UNITS = How much rain will fall ]   [ RANGE = 0.0f->1.0f ]
      float mWindSpeed;                                // [ RANGE = 0.0f->100.0f ]   [ UNSET = 2.0f ]
      float mWindDirectionX;                           // [ UNITS = Normalised Vector X ]
      float mWindDirectionY;                           // [ UNITS = Normalised Vector Y ]
      float mCloudBrightness;                          // [ RANGE = 0.0f->... ]
    } SharedMemory;
    
    
    #endif  // _SHARED_MEMORY_HPP_
    SharedMemory header file: SharedMemoryV5.rar

    Sample implementations
    SMS_MemMap_SampleV4.zip
    C#/WPF demo app by MikeyTT.
    C/C++ implementation by NLxAROSA.
    Java/JNI howto/tutorial.

    EDIT: Update:

    Quote Originally Posted by Tim Mann View Post
    This field has been recently updated for the UDP streamer, it is also present in the shared memory API:

    Code:
    // (Type#9) Car Flags (to be used with 'mCarFlags')
    enum
    {
      CAR_HEADLIGHT         = (1<<0),
      CAR_ENGINE_ACTIVE     = (1<<1),
      CAR_ENGINE_WARNING    = (1<<2),
      CAR_SPEED_LIMITER     = (1<<3),
      CAR_ABS               = (1<<4),
      CAR_HANDBRAKE         = (1<<5),
      CAR_STABILITY	        = (1<<6),
      CAR_TRACTION_CONTROL	= (1<<7),
    };
    Last edited by Lars Rosenquist; 18-12-2015 at 06:57. Reason: Added link to UDP
    PC: i7-4790k/16GB/GTX970 4GB/Z97-PRO/Logitech G27/Xbox 360 Controller
    Laptop: i7-4720HQ/16GB/GTX960M 2GB/Xbox 360 Controller
    LT Profiler: Strength: 100% - Spring 0% - Damper 0% - Center Spring 0% - 900 degrees - game can change
    Game settings (2.5): Classic profile - Tyre Force 80% - Deadzone Removal Range 0.16.
    Author of CREST - CARS REST API - GitHub
    The following 6 users likes this Post: Blackvault, IJerichoI, IJOJOI, Luke Townsend, SkyyJuice, Tiago Fortuna


  2. #2
    WMD Member Lars Rosenquist's Avatar
    Join Date
    Oct 2011
    Location
    The Netherlands
    Posts
    268
    Platform
    PC
    reserved.
    PC: i7-4790k/16GB/GTX970 4GB/Z97-PRO/Logitech G27/Xbox 360 Controller
    Laptop: i7-4720HQ/16GB/GTX960M 2GB/Xbox 360 Controller
    LT Profiler: Strength: 100% - Spring 0% - Damper 0% - Center Spring 0% - 900 degrees - game can change
    Game settings (2.5): Classic profile - Tyre Force 80% - Deadzone Removal Range 0.16.
    Author of CREST - CARS REST API - GitHub

  3. #3
    Superkart Pilot AfterAll14's Avatar
    Join Date
    Jun 2015
    Posts
    208
    Platform
    PC
    We desperately need more data. Ride height, suspension load - at least. Downforce and drag of the cars would be nice to have to study physics of the game.
    numbers don't lie

  4. #4
    WMD Member
    Join Date
    Oct 2011
    Posts
    1
    Seems the in game option has moved to Visuals->Hardware!
    The following user likes this Post: Lars Rosenquist


  5. #5
    WMD Member
    Join Date
    Apr 2012
    Location
    London
    Posts
    48
    Platform
    PC
    Quote Originally Posted by AfterAll14 View Post
    We desperately need more data. Ride height, suspension load - at least. Downforce and drag of the cars would be nice to have to study physics of the game.
    We have been asking for much more information for a while now... I think the API has been buried by post-release patches. Hopefully work will pick up on it again soon.
    i7-2600K (4.7GHz) | Asus P8P67 Pro | 16GB 1600MHz | EVGA GTX980ti SC + EVGA GTX670 4GB SC | 5760*1920 | Thrustmaster T300 GTE | Fanatec CSP v1
    VDash Android App | VDash community | VDash Latest Updates | VDash server building guide

  6. #6
    WMD Member Lars Rosenquist's Avatar
    Join Date
    Oct 2011
    Location
    The Netherlands
    Posts
    268
    Platform
    PC
    Quote Originally Posted by DauRacer View Post
    Seems the in game option has moved to Visuals->Hardware!
    Updated.
    PC: i7-4790k/16GB/GTX970 4GB/Z97-PRO/Logitech G27/Xbox 360 Controller
    Laptop: i7-4720HQ/16GB/GTX960M 2GB/Xbox 360 Controller
    LT Profiler: Strength: 100% - Spring 0% - Damper 0% - Center Spring 0% - 900 degrees - game can change
    Game settings (2.5): Classic profile - Tyre Force 80% - Deadzone Removal Range 0.16.
    Author of CREST - CARS REST API - GitHub
    The following user likes this Post: DauRacer


  7. #7
    Moderator Blackvault's Avatar
    Join Date
    Apr 2012
    Location
    Northern Ireland, UK
    Posts
    795
    Platform
    PC
    I'm going to sticky this post.

    Lars could you include any links to sample implementations in your first post?

    Pete
    Before posting a problem, make sure to check our Known Issues Threads: PC / PS4 / XB1

    Come visit my YouTube channel for TGC races and general Project Cars racing
    The following user likes this Post: gotdirt410sprintcar


  8. #8
    Rookie
    Join Date
    Jun 2015
    Posts
    1
    Platform
    PC
    Is it safe to assume that ints, bools and enums will be 32 bits each?
    In theory they could be 16 or 64 bits depending on the compiler settings used.

    Also packing isn't specified but assuming 32bit ints it looks like everything will be dword aligned anyway.

  9. #9
    Moderator Blackvault's Avatar
    Join Date
    Apr 2012
    Location
    Northern Ireland, UK
    Posts
    795
    Platform
    PC
    Quote Originally Posted by AndyA View Post
    Is it safe to assume that ints, bools and enums will be 32 bits each?
    In theory they could be 16 or 64 bits depending on the compiler settings used.

    Also packing isn't specified but assuming 32bit ints it looks like everything will be dword aligned anyway.
    I think I've got my app set to 32bits for ints.

    Pete
    Before posting a problem, make sure to check our Known Issues Threads: PC / PS4 / XB1

    Come visit my YouTube channel for TGC races and general Project Cars racing

  10. #10
    WMD Member Lars Rosenquist's Avatar
    Join Date
    Oct 2011
    Location
    The Netherlands
    Posts
    268
    Platform
    PC
    Quote Originally Posted by Blackvault View Post
    I'm going to sticky this post.

    Lars could you include any links to sample implementations in your first post?

    Pete
    Done for the ones that have source code public.
    PC: i7-4790k/16GB/GTX970 4GB/Z97-PRO/Logitech G27/Xbox 360 Controller
    Laptop: i7-4720HQ/16GB/GTX960M 2GB/Xbox 360 Controller
    LT Profiler: Strength: 100% - Spring 0% - Damper 0% - Center Spring 0% - 900 degrees - game can change
    Game settings (2.5): Classic profile - Tyre Force 80% - Deadzone Removal Range 0.16.
    Author of CREST - CARS REST API - GitHub
    The following user likes this Post: Blackvault


Similar Threads

  1. [Solved - Shared Memory] Geko system GS 105 dynamic seat
    By stf_m in forum PC - Technical Help & Support
    Replies: 3
    Last Post: 15-06-2015, 14:39
  2. Just how hard is it then to make a game like Project Cars
    By KK78 in forum General Discussion
    Replies: 27
    Last Post: 10-06-2015, 21:31
  3. How to make cars less twitchy?
    By MilkyBarKid16 in forum General Discussion
    Replies: 11
    Last Post: 04-06-2015, 18:25
  4. Project Cars audio make me headache with headphone !!!
    By paulguru in forum General Discussion
    Replies: 38
    Last Post: 02-06-2015, 22:31
  5. [ANSWERED] what its shared memory
    By Chanur in forum PC - Technical Help & Support
    Replies: 7
    Last Post: 08-05-2015, 21:34

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •