ZeroK-RTS / Zero-K-Infrastructure

Website, lobby launcher and server, steam deployment, .NET based tools and other vital parts of Zero-K infrastructure
GNU General Public License v3.0
53 stars 52 forks source link

Read plop data #2279

Open sprunk opened 6 years ago

sprunk commented 6 years ago

Ingame now sends facplop data, same channel as awards.

Format:

SPRINGIE:facplop,%s,%d,%d,%s,END_PLOP
                  │  │  │  │
                  │  │  │  └ nick (always "valid": Nightwatch for AI, ChanServ for unknown)
                  │  │  └ allyTeamID
                  │  └ teamID
                  └ unitname (eg factorycloak)
sprunk commented 5 years ago

I produced some code on the plopreader branch. It needs a DB migration but should be otherwise complete.

Licho1 commented 5 years ago

Bleh .. lets make it send json instead?

sprunk commented 5 years ago

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)

Anarchid commented 5 years ago

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'}

DeinFreund commented 5 years ago

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.

Licho1 commented 5 years ago

To circumvent 128 limit we could have layer on top of it that would split/merge messages automatically.