uspgamedev / luasteam

Bindings to connect lua with Steam API
https://luasteam.readthedocs.io/en/stable/
MIT License
116 stars 19 forks source link

Steam network api #26

Closed Ismoh closed 11 months ago

Ismoh commented 2 years ago

I had a look on your documentation and wasnt able to see network functions.

Does your wrapper provide steam network api stuff like https://github.com/ValveSoftware/GameNetworkingSockets ( https://partner.steamgames.com/doc/features/multiplayer/networking ) ?

If I would be able to use C++, I would create a PR, but I never worked with C++

yancouto commented 2 years ago

No, we do not have those functions currently. I don't plan on working on those personally, but we accept PRs.

Ismoh commented 2 years ago

Yea, if you can somehow provide an example, I am interested in creating a PR, but I am not fimiliar with C++ that much. Would be nice to have an example to get used to it.

yancouto commented 2 years ago

Take a look at Contributing.md and the previously closed pull requests, there are a few examples of people adding new methods.

pakeke-constructor commented 2 years ago

Hi @Ismoh, I think we can use luaJIT's FFI to access the GameNetworkingSockets directly from lua. If I have trouble with that, I might try adding the functionality directly to luasteam, (in which case i'll open a PR.)

Ismoh commented 2 years ago

Yea, I think so too, but I am really bad in lua, luaJIT FFI and C++. Still learning. Would be awesome, if you can give me a shout, after your research. Thanks a lot!

pakeke-constructor commented 2 years ago

Unfortunetely, I don't think that GameNetworkingSockets have C bindings, which means they won't be accessible to luaJIT's FFI. :(

pakeke-constructor commented 2 years ago

Nevermind!!! @Ismoh We're saved!! steam does have C bindings for their SDK.

Everything is defined in steam_api_flat.h: https://github.com/Facepunch/Facepunch.Steamworks/blob/master/Generator/steam_sdk/steam_api_flat.h

Ismoh commented 2 years ago

Can you provide an example? We may should dont missuse this issue, maybe?

For further chatting, you can use this: https://github.com/Ismoh/NoitaMP/issues/58

Thanks for the help, I really appreciate it. Much Love!

zorfmorf commented 1 year ago

@Ismoh If you are still interested in it, I'm making good progress. I'm not planning to implement every single function and so far I'm only doing the Sockets API for a client/server architecture, so no NetworkingMessages or P2P functions, but if you need more, it should be easy to add and you're welcome to contribute.

Ismoh commented 1 year ago

@Ismoh If you are still interested in it, I'm making good progress. I'm not planning to implement every single function and so far I'm only doing the Sockets API for a client/server architecture, so no NetworkingMessages or P2P functions, but if you need more, it should be easy to add and you're welcome to contribute.

Awesome! I am currently pretty busy, but I am still interested in. Will get back to this for sure!

zorfmorf commented 1 year ago

I implemented nearly everything aside from some debugging and datacenter connectivity measurement related methods. I'm using it for my own server/client based project and was able to use it as a drop-in replacement for enet and it seems to work completely fine so far. Please let me know if anybody finds any issues. https://github.com/uspgamedev/luasteam/pull/27

pakeke-constructor commented 1 year ago

Thanks a tonne for this!!!

yancouto commented 11 months ago

Closing as #27 is merged and soon will be released