This programm is PUBG image detection module.
It takes PUBG game screenshot and analyze it for bHaptic tactsuit or tactot.
Take about 25 FPS screenshot.
Best performance on 1920x1080, tested on 3440X1440
Cause of d3dshot module, it needs BORDERLESS and ENGLISH PUBG game play
Make keyboard and mouse listener on
Init images like number images
Set mainflow() into new thread
Set timer() into new thread
Set GUI and if UI closes, all thread stops and program ends
Screenshot frame rate controller
Take screenshot
Check what is screen's game phase
Depends on game phase, execute stream() or airflow()
Analyze gameplay screenshot.
Passes what types of haptics this page needs.
Detect Damage, Kill, Action, Bluezone, Vehicle, Reload, Swap, Aim
Manage airplane->freefall->parachute->landing sequence
Passes each types of haptics
Play haptics
Skip if same haptic type is playing
Different type of haptic takes different alt
Check [1], [2]
Number part white high, JOINED part white low.
NOTGAME : [1] off
PREGAME : Detects "MATCH STARTS IN"
INGAME : [1] on, [2] off
PRACTICE : [1] on, [2] on
Mouse left clicked, [3] on
- Punch : [5] off, [4] off
- Trhow : [5] off, [4] on
- Fire : [5] on, [4] change
- Aim : mouse right clicked, [3] on, [5] on
- Reload : Within 150 screen, [4] on, [5] change
Cut [4] into pieces (ex : 150 -> 1, 5, 0), check number images, returns bullet num
- Car : [9] gas log matches Can get speed and vehicle type
- Swap : keyboard 1,2,3,4,5,x pressed, [4] or [5] change Save previous [4], [5] stats and keyboard input to make swapin haptic
- Kill : [10] red part is separated, [10] white part is on
- Action : [8] circular gauge on, [7] matches
- Interaction : [7] 'F' matches
Check [6]. Get y direction sum. When HP bar's first pixel is different to background. Check the pixel's continuity. When HP up is detected, check 5 more frames.
- Bluezone : Check [6], accumulated over 1 HP reduce
- Damage : Check [6], more than 7 HP reduce
Check [6], when [6] detected 0 HP and killer's name detected.
- Airplane : [1] on, [3] on
Get speed when [1] on, [2] on, [4] on, or [1] on, [2] off, [4] off
Cut [4] into pieces (ex : 217 -> 2, 1, 7), check number images, returns speed
- Freefall : Speed over 126
- Parachute actvie : First time speed under 126
- Parachute : After parachute active
- Landing : [2] on, [4] off
Detect KM/H at [4] to check falling at practice mode
Check map's white to check player is on ground, not a setting or inventory page.
Get sound output, apply Fourier transform and tried to get explode sound.
Takes too many resources and hard to detect specific sounds
Tried to detect falling impact by screen shaking.
It successfully detects running by keyboard input and map movement.
Too many haptic when it executes.