How does Megamek talk to Mekwars

Topics related to the server software (not campaign)

Moderators: Torren, Moderators

Post Reply
Mekwars Server Operator
Posts: 140
Joined: Sun Feb 17, 2008 3:02 am

How does Megamek talk to Mekwars

Post 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!

MegamekNET Moderator
Posts: 989
Joined: Thu Feb 14, 2008 12:49 am
Location: Cologne, Germany

Re: How does Megamek talk to Mekwars

Post by BeeRockxs »

It's basically serialized Java Objects.

Mekwars Developer
Posts: 3918
Joined: Wed Feb 13, 2008 10:23 pm

Re: How does Megamek talk to Mekwars

Post 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.
Never had much, grew up with nothing
But the music, well it was something
Been down and out, I've been on top of the world,
World that keeps on spinning on a turntable.

Post Reply