murkland / tango-legacy

last generation rollback netplay for mega man battle network / 前世代のロックマンエグゼのロールバックネットプレイ
GNU Affero General Public License v3.0
3 stars 0 forks source link

improve fastforward performance #50

Open bigfarts opened 2 years ago

bigfarts commented 2 years ago

not sure why: i had thought this was a fastforwarder issue but simply not setting the dirtyState will also exhibit this issue.

also strangely enough the fastforwarder will always cause a skip of 1 frame but fixing this behavior will actually break everything

bigfarts commented 2 years ago

latency is in the fastforwarder: at high delay, fastforwarder can miss the 16ms input window and cause stuttering

bigfarts commented 2 years ago

testing on my local computer, i can get ~2000fps in the fastforwarder, which sounds like a big number, but it's not:

bigfarts commented 2 years ago

shitty benchmark:

without beef trap (33 frames per frame):

2022/04/03 01:08:32 time taken for 1000 frames: 502.435958ms

with beef trap (28 frames per frame):

2022/04/03 01:09:47 time taken for 1000 frames: 588.009583ms

a somewhat significant difference of 15%