artemis-nerds / node-asbs-lib

Low-level node.js library for interfacing with the Artemis Space Bridge Simulator game
Other
7 stars 3 forks source link

Receive packets for multiple ships? #18

Closed mildmojo closed 7 years ago

mildmojo commented 7 years ago

I've got a small server that controls some lights in response to game events, but I can't seem to get packets for multiple ships from an Artemis v2.4.0 server. I expected that setting a different playerShipIndex on connect would do the trick, but no luck.

For example, I'm looking for the redAlert property to toggle inside a playerShip packet, but it never appears.

I'm telling the server I have the science and main screen consoles. I have the actual graphical client connected too so I can trigger events from e.g. the Intrepid. I've tried opening simultaneous connections, using each playerShipIndex from 0 to 7, but only 0 seems to get the full packet conversation.

Is there a trick to it? Does anyone have some example code?

mrfishie commented 7 years ago

Good question.

Unfortunately, this library is not up-to-date at all (the latest commit, from 2015, indicates that work had been started for v2.2.0), so this is probably where your problems are coming from.

As this implies, this library is maintained, and has been for a while (seems to be the same with all of ArtemisNerds, in fact this is the first time I've logged into this account instead of my newer one for quite a while).

It should be possible to update this library to the more recent API changes without too much work -- the protocol docs are reasonably up-to-date, and there were efforts to make a machine-readable version of them, but I don't think that ended up going anywhere unfortunately. I'd be happy to set you as a contributor if you're interested in looking at this.

mildmojo commented 7 years ago

Aha; I got excited and had some (a lot of) success with it and forgot to check how active it was.

I'm interested in looking at updating the library, but it's not something I can do now or for a while. If I'm able to do some work on it, I'll open a pull request. Thanks! 🙂 👍