Open sprunk opened 6 years ago
I produced some code on the plopreader
branch. It needs a DB migration but should be otherwise complete.
Bleh .. lets make it send json instead?
The current channel only allows 128 chars per message, JSON is likely too much overhead (probably enough in this particular case but not to make this into a framework for stuff like awards, PW battle results etc)
Something like modstats would need some kind of host-side aggregation anyway, so it could just do that. Send lots of small messages instead of a few huge messages.
Similarly, awards already are each a separate message, so JSON will probably fit.
E.g.
SPRINGIE: UnitDestroyed {teamID:1,allyTeamID:1,unitName:factoryveh}
SPRINGIE: FacPlop {unitName:'factoryveh',teamID:1,allyTeamID:1,AccountName:'spreng_llll'}
Having more individual messages and using json will make the protocol much easier to extend as well. I'd rather have that over a couple compressed cryptic messages.
To circumvent 128 limit we could have layer on top of it that would split/merge messages automatically.
Ingame now sends facplop data, same channel as awards.
Format: