0
\$\begingroup\$

I have recently found out about Steamworks SDK and after reading through some of the documentation and information from other sources I was left with a few questions.

I found Steamworks because I was interested in how Steam handles multiplayer in games, like co-op games with the lobby creation and all.

This is because of a game I'm developing which is planned to be a 2-player co-op puzzle game. When it comes to networking, how would I program the game to use Steamworks lobby creation? Would I just program it normally with a client server? Because normally that would require atleast one of the users to forward their ports but would the Steamworks work around that? Or do I implement the Steamworks right away?

This would be cruicial to know since adding networking late in to the development is very difficult. Thank you in advance, any links or help is much appreciated! Also, I'm progamming in Java(LibGDX).

\$\endgroup\$
3
\$\begingroup\$

To avoid port forwarding and play a 2-player game, it is best to choose the Steam P2P Network API. It uses libjingle to punch through a NAT, so port forwaring is no longer necessary. It's a bit slower than, say, a UDP socket connection, but it's still faster than you need for your case.

You can use Steamworks4j to use the Steamworks API in Java. There are also some examples of how to use Steam P2P and Lobbies. For more information, see Steam API Doc

\$\endgroup\$
  • \$\begingroup\$ What confuses me is that if the API needs steam to work or if it does the job anyway? Your answer helped alot, thank you for your time! \$\endgroup\$ – Dennis Björk Mar 10 '18 at 14:51
  • \$\begingroup\$ Steam is required to use the Steamworks API. And you first need an app ID from Steam. This can be done by submitting you game through Steam Direct. \$\endgroup\$ – Alrik Mar 13 '18 at 5:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.