FlutterTal / godot_ggpo

A custom module in C++ to implement GGPO to Godot Engine
MIT License
45 stars 6 forks source link

Issue with state saving and loading #9

Open Sciman101 opened 3 years ago

Sciman101 commented 3 years ago

Looking through the code and generated documentation, the save_game_state and load_game_state calls use a PoolByteArray to hold the game state. Issue is, Godot passed PoolArrays by value, not by reference, so in save_game_state specifically writing to the array won't actually have any affect. Though, even before then, for some reason when calling save_game_state, the buffer parameter is being passed as a single boolean value. Not too sure how that happened, but it doesn't let me actually write meaningful data to it

FlutterTal commented 3 years ago

Well yeah, I'm not really a good connoisseur with GGPO, but I know the save_game_state callback has to be a signal for godot, which always returns a void. Maybe making a PoolByteArray variable named game_state would do the trick, but for now, I think I'm gonna count on the godot and GGPO community to help me with that ^^'