HouraiTeahouse / backroll-rs

A (almost) 100% pure safe Rust implementation of GGPO-style rollback netcode.
ISC License
351 stars 20 forks source link

Replace SessionCallbacks with a Command Buffer. #11

Closed james7132 closed 3 years ago

james7132 commented 3 years ago

This implements the proposal from #6.

This has the added benefit of removing another generic parameter from all of the associated functions, so compile times should be faster.

The public facing API is simpler, is more idiomatic than the callbacks being used from before, and removes the nasty lifetime interactions it had with reference based callbacks from before.

Currently missing:

Still a draft. There are some notable parts that require alteration to help prevent users of the API from shooting themselves in the foot.

james7132 commented 3 years ago

Local testing has shown that this works just fine.