antistasi icon indicating copy to clipboard operation
antistasi copied to clipboard

Personnal money/rank/garage dont save on disconnect/reconnect

Open highwave70 opened this issue 7 years ago • 9 comments

Guess its a bug (or not ?) : on my linux dedicated server (+ 1 HC), personnal money, rank and garage dont save on disconnect/reconnect. If it is not a bug, it will be nice to save all effort done in the (sometime long) game session.

I tried to save game and then reload it on map restart, but this is the same.

Cheers

highwave70 avatar Oct 02 '17 04:10 highwave70

Thanks for the report. That is obviously an error ^_^. I will work on that.

LordGolias avatar Oct 14 '17 05:10 LordGolias

@LordGolias , will you be moving over to MySQL eventually? Just curious as I've always seen issues with saving to the server on other mods with large groups. I'm still learning SQF so my opinion don't matter much at this point. I've been watching your progress though and LOVE your documentation. Awesome job!!

geekwithbadge avatar Oct 15 '17 21:10 geekwithbadge

Hi @geekwithbadge. Thank you for the kind words.

We move to MySQL if/when its advantages outweighs the current solution's disadvantages so much that it is worth the work (i.e. positive ROI higher than other issues).

The way we save a game currently is through a no-sql non-standard implementation (similar to JSON hierarchical file). I recently made the code available for this as a own (unit-tested) Mod: https://github.com/LordGolias/dictionary

Some comments comparing it with Mysql:

  1. it is much more flexible (because it has a trivial map from in-memory to disk)
  2. it is simple to maintain the database
  3. it is trivial to maintain save-game backward compatibility (because it does not need SQL to do table migrations)
  4. it does not require a mysql service running
  5. it has no external dependency (e.g. it is all BSD-3)
  6. it is much faster to READ and WRITE in-game (because it is in-memory)
  7. it is slower to load and save the game (because the parser is in SQF, which is slow)
  8. it is slower to SELECT * WHERE on very large tables (because it has no indexing)
  9. it is slower to do JOIN and related (no relational, no indexing).
  10. it has a more complex schema (because things are not tables, but hierarchical structures)

IMO currently there is not even a case (Return < 0) for mysql because there is no table with more than 100 elements. I do not see that to change in the near future. Fundamentally, Mysql (and RDBMS more generally) specifications' are not so well suited system with highly heterogenous (e.g. hierarchical data structure) persistent data like Antistasi.

LordGolias avatar Oct 16 '17 05:10 LordGolias

@StefArma, @Warhammer47 or @highwave70, could any of you check whether this has been fixed on MP dedicated and non-dedicated?

LordGolias avatar Oct 23 '17 16:10 LordGolias

Doing it right now

StefArma avatar Oct 23 '17 17:10 StefArma

Think i've something different, the version is develop one updated right before you changed the Readme 10 h ago...

dedicated server windows i save, abort, reconnect and i don't get the player initialized..

it also happened that the 3rd guy connected got shot by petros

StefArma avatar Oct 23 '17 17:10 StefArma

Now that the initialization error is fixed, could you test this again @StefArma?

LordGolias avatar Nov 12 '17 12:11 LordGolias

Tested now with 5 people, i've my money reset to 100 so the others do.

StefArma avatar Nov 12 '17 13:11 StefArma

I think this is related to this: https://github.com/LordGolias/antistasi/issues/141

See my comments there

Kortonki avatar Dec 28 '18 08:12 Kortonki