Jump to content
  • Advertisement
Sign in to follow this  
ddengster

Steamworks p2p questions

This topic is 426 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'd like to confirm some things about steamworks networking. For my game, I'm intending to set up only a SteamGameServer only for the host, and all other clients to use SteamMatchmakingServers to find and connect to the host. Tell me if I'm wrong on any of this.

1) Steamworks does not allow you to retrieve ip addresess from a steam UserId. (So you can't use their lobby + your other networking code that uses ip addresses)

2) 'Heartbeat' or 'keep alive' packets to the host are not implemented. (There is a Heartbeat packet to the steam master servers for your game, but I'm talking about host to multiple guests 'keep alive' packets)

3) There is no way to retrieve the latest ping to those connected to the host; it's something you have to implement yourself.

 

 

Share this post


Link to post
Share on other sites
Advertisement

Item 1 is mostly true, they have done what they can to restrict direct access.  Many games have various practices that still expose addresses.  Hook up voice chat and you can likely see a direct connection either to the player's IP addrss or to a repeater's IP address.

Items 2 and 3 seem a little odd, so perhaps some clarification is needed.

Severs have a heartbeat to their controllers, but it seems like you are asking about using the server acting as a star, and each spoke in the star being told the status of other spokes on the star. You might be asking something else.

Any game can implement their own heartbeats if they want, and many games do.  Track the time since last message from the player, and if exceeds a specific time you can take an appropriate action.  If you want to spread that among other users, the star's hub could send that out to every spoke or to every leaf node.

Details might get more complicated depending on how your game's logical networking works out.  If you have a full star where everyone must connect directly to the star's hub, or if you require a complete mesh where everyone can talk directly to everyone, you can require them to all chat occasionally.  But if your game allows for other layouts where individual clients can act as a forwarder or repeater, you may not hear directly from another node even though messages are passing through. 

If you want to pass any of that information along within the game, it will be your game's code doing that, not the API.

Share this post


Link to post
Share on other sites

Thanks. I'm trying to keep it simple and have a single server who keeps clients in lockstep and tells them about  other players in the game, so I suppose your thing about a star to many nodes applies. I suppose since steamworks uses connectionless sockets, if one of the spokes crashes without sending a disconnection message I would not know unless I implemented the heartbeat packets.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!