HouraiTeahouse / Backroll

Unity C# Port of GGPO built atop Hourai Networking
MIT License
131 stars 10 forks source link

Migrate BackrollSessionCallbacks into an interface or abstract class #7

Closed james7132 closed 1 year ago

james7132 commented 3 years ago

The C style of passing callbacks works for a C/C++ implementation like GGPO with a C BPI, but does not work well in a C# environment. It might be better to set up a interface or abstract class. There are several benefits of this:

nykwil commented 3 years ago

On point one, the functor overhead is the same as a virtual call. http://kennethxu.blogspot.com/2009/05/strong-typed-high-performance_15.html

james7132 commented 1 year ago

At this rate, please use UnityGGPO, I'm more focused on maintaining the Rust version of this library than the Unity C# one.