IntelSDM / DMAByDaylight

DMA Dead By Daylight ESP
MIT License
49 stars 19 forks source link

Question about the flow of execution #1

Closed Marshall-67 closed 4 months ago

Marshall-67 commented 4 months ago

Firstly i'd like to say thanks for releasing all these sources to the public. i've learnt alot

My main question is why you choose to execute everything in the Render thread? and don't multi-thread it. The cheatfunction stuff is pretty cool so i understand that

Wouldn't it be better to read all the playerdata in a seperate thread and then sync with an atomic queue or mutex etc..

I may also just be completely missing something so sorry if i am

IntelSDM commented 4 months ago

The Dead by Daylight cheat doesn't need multi threading, it was built to be very small to make it easy for people to update and use. As it was built to be minimal we are only ever looping 4 players in the player esp. The Actor count in Dead By Daylight shouldn't exceed 2000, since we cache every 3 seconds and eliminate all the other actors within 2 stages of 3x scatter reads it is a very minimal cache; unlike other games such as Rust and Hunt Showdown that can exceed 30k Entities up to 3 stages of scatter reads.
Multi Threading when you don't need the extra resources makes it harder to maintain. The HuntDMA Cheat multi threads with mutexs as the caching takes an entire second to complete.

Marshall-67 commented 4 months ago

Thanks for the response. I suppose you're right and this has made me reconsider how i approach optimising and caching

i'll take a peep at that source