pond3r / ggpo

Good Game, Peace Out Rollback Network SDK
MIT License
3.11k stars 360 forks source link

Decoupling the GGPO API from any static program state #62

Open Grouflon opened 3 years ago

Grouflon commented 3 years ago

Hello,

Right now the callback functions don't have any other option than to communicate with your implementation throught some static program variables. This is not great and make having multiple instances of ggpo running in the same program really tedious, which is a shame since it is pretty useful for debugging online applications.

I tried improving that by adding a simple userdata pointer to the callback struct, and passing it as a parameter to all the callback functions.

pakoito commented 2 years ago

I wish this one was merged