Page 1 of 1

How does Megamek talk to Mekwars

Posted: Thu Sep 08, 2022 2:08 am
by Ravage
Ok, so this is something that i've been trying to work out for a bit now, as Im trying to have a nodejs script monitor a game and pull data from it. When I connect to the port all it does is come up with garbage, I cant seem to deconstruct. Is it hashed? or in some form of custom format. I've looked at the mekwars source and megamek source, but I cant seem to locate the functions/methods that does the talking between mekwars and megamek.
Any assistance would be awesome! Thanks!

Re: How does Megamek talk to Mekwars

Posted: Sat Sep 24, 2022 8:08 pm
by BeeRockxs
It's basically serialized Java Objects.

Re: How does Megamek talk to Mekwars

Posted: Sun Oct 02, 2022 4:00 pm
by Spork
Mekwars implements the GameListener interface (I think that’s the name). This takes events generated by the Game object and does what it needs to do.

It also the main reason I haven’t figured out a way to implement an HTML mekwars client.