Skip to content

Conversation

@raymondtri
Copy link

This expands on #142 by adding a means for node to either allow all or reject all incoming networking messages.

Additionally, I modified the requires in the base to reference the package itself which makes it more compatible with things like vite.

@raymondtri raymondtri marked this pull request as ready for review February 25, 2025 13:38
@raymondtri
Copy link
Author

I'm going to have to keep this as a fork because it's now highly opinionated due to how I need to handle sessions in my game at a low level.

@raymondtri raymondtri closed this Feb 26, 2025
@ceifa
Copy link
Owner

ceifa commented Feb 26, 2025

Well, this is an opinated library too. Our goal is provide good apis in js to work with steamworks, not a 1:1 api bindings (there are other projects for that)

Do you mind sharing more details about what you think would be a good fit for you project and why it doesnt make sense for this lib?

@raymondtri
Copy link
Author

raymondtri commented Feb 27, 2025

There's some opinionating regarding how p2p should work, for instance I am running the server that handles delta state management and binary encoding as a separate process from the core js game.

But that means that locally if on a "server" process / host you have to communicate over ip address with your own client, while the other players can connect to the server process over p2p since steam doesn't allow p2p to yourself in the new network messaging paradigm -- but it did in the old one. This is only possible leveraging a lower level sockets implementation as opposed to the networking messaging

@RatWasHere
Copy link
Contributor

we've been asking for this for way too long and nobody else is gonna work on doing it your way except for you 🤧

@raymondtri
Copy link
Author

Truthfully I would like to try and handle some things I have implemented a little bit better with callbacks but I don't know enough rust to do that.

Right now it functions similarly to the listenP2P where you have to use a setInterval inside of nodejs and poll for messages.

If someone more experienced with rust/napi callbacks wants to shoot me a message I'd be more than happy to talk about what I've got running so far and how they can be implemented.

@raymondtri
Copy link
Author

Once I've done a lot more testing and gotten comfortable with this implementation I may re-open this PR but I don't want to pull people down the wrong path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants