View Full Version : openGL overlays for pCars in windowed mode for PC

19-12-2016, 21:10
hi guys

here are 4 openGL overlays for pCars in windowed mode.
i run pCars on a TV at 3840x2160 and 29Hz windowed
for transparency repositioning resizing and make everything borderless i used the open source software AutoHotKey


if you like it more colorfull, then you can change all colors via start options


gears - displays the gears, aero damage, brake, throttle, lap count and status of the headlights
it also warns if a car is inside a 6m radius by changing the gears color to red
if the current lap is invalid the lap count color changes to red

laptimes - personal best, current, fastest, last lap, split time ahead, split time behind, invalid lap changes current lap color

standings - 11 drivers, position, name, distance to P1 in m, max driver, lap count, time + time left in event if in warm up qualy or training

all drivers - 64 drivers max (max posible participants in dedicated server; i had to pic a number ;) )
position, name, distance to P1 in m, max driver, lap count, time + time left in event if in warm up qualy or training

the gears, standings and all drivers overlays ask you for the name or part of the driver's name you want to track/highlight at start up
it happens that the overlays loose track of the specified driver, then i simply close and restart this certain overlay and try a different name search pattern
example: i want my nick name to be highlighted so i search for j_
bigj_ms is always found when names are available and my name is in the list ofcourse
if something goes wrong during a session and the race hasent started yet, then i try again with 'big' as search pattern
if tracking goes wrong, the driver with index 0 is tracked: in multiplayer thats the host
confusing when the gears turn red because some car is near the host's car but nobody is near you car :)
(nobody's perfect, i'm just a hobby programmer ;) )

for coding i used codeblocks and cpp
OS is windows 10

some system specs: AMD 8 core 4GHz, radeon 270X, 16GB DDR3

running all 4 overlays at a time has no recognizable effect on performance
<4% higher CPU load

they also work with replays, but there is less data available so some values are missing or zero

here are the files

you need to modify the ahk-script if running in a different resolution then 4K
the script's key bindings:
ctrl+1: transparency, reposition, resize, borderless
ctrl+2: close/terminate all overlays
ctrl+3: minimize all 4 consoles (opengl runs as console application: so 4 consoles and 4 overlays)
ctrl+4: different position for the gears overlay (if i run only this one, i like it to be on the bottom in the middle of the screen)
in order to run the script successfully the focus has to be on a different window then pCars (explorer or one of the overlays)

check all files for viruses
i'm not aware on my system are any, but to be sure ;)



Edit: updated the gears overlay with ABS SC and TC display (!!shows up only when triggered!!)

happy racing :)

Edit2: with pCars its like Gundalf said about hobbyts: you can study it 100 years and it will still surprise you :)
so i made a damage overlay (brakes and suspension) and a speed overlay (3 modes: mps Mph Kph)
the gears overlay also displays the engine damage now
the standings and alldrivers overlays have two modes now: distance to P1 and distance to tracked driver

here are all updated overlays, ahk script and the examples text:

all overlays:
(alldrivers in mode 1: distance to P1; standings in mode 2: distance to tracked driver; speed in mode 3: Kph)

bigj ;)