Skip to content

Add Steam dedicated server support - #162

Open
Infiland wants to merge 2 commits into
YoYoGames:mainfrom
Infiland:add-steam-dedicated-servers
Open

Add Steam dedicated server support#162
Infiland wants to merge 2 commits into
YoYoGames:mainfrom
Infiland:add-steam-dedicated-servers

Conversation

@Infiland

@Infiland Infiland commented May 10, 2026

Copy link
Copy Markdown
Contributor

Close #157

Summary

  • Adds the Steam GameServer lifecycle for dedicated server builds: initialization, callback dispatch, shutdown, server metadata, heartbeat/login helpers, UDP packet relay helpers, auth tickets, and license/status queries.
  • Adds hosted dedicated server Steam Datagram Relay helpers alongside the existing networking sockets wrappers.
  • Documents the dedicated server setup path and the GameServer-facing APIs.

Audit follow-up

  • steam_update() now dispatches SteamGameServer_RunCallbacks() when the GameServer API is initialized, so server-only builds do not silently skip callbacks if they use the shared update hook.
  • steam_gameserver_get_next_outgoing_packet() now reports success only when packet bytes were actually written to the provided buffer.
  • steam_net_sockets_recv_messages_on_poll_group() no longer frees a struct after transferring it into the result array, matching the ownership pattern used by the socket-pair helper.
  • steam_net_sockets_set_connection_name() now returns false when the networking sockets API is unavailable.

Validation

  • git diff --check
  • xcodebuild -list -project source/Steamworks_gml/extensions/steamworks/steamworks_macos/Steamworks.xcodeproj
  • xcodebuild -project source/Steamworks_gml/extensions/steamworks/steamworks_macos/Steamworks.xcodeproj -scheme Steamworks -configuration Debug CODE_SIGNING_ALLOWED=NO build reaches compilation, then stops because this checkout does not include steam_api.h from the Steamworks SDK.
  • Checked Valve Steamworks docs for SteamGameServer_Init, GameServer callback dispatch, and the dedicated server lifecycle.

Runtime note: I did not run a live Steam dedicated server from this environment because the local checkout is missing the Steamworks SDK headers required for a native build.

@jzavala-YYG

Copy link
Copy Markdown
Collaborator

This feature it's in our internal TODO list, eventually we will include server support for Steamworks.

@Infiland Did you tested this code with your own server?

@Infiland

Infiland commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

I audited this again and pushed dbea49c with hardening fixes around callback dispatch, outgoing packet write success, and networking socket result ownership.

I have not run this against a live Steam dedicated server from this environment. The local checkout is missing the Steamworks SDK header steam_api.h, so the no-signing Xcode build reaches compilation and then stops at header resolution. Local validation done here: git diff --check, xcodebuild -list, the blocked xcodebuild ... CODE_SIGNING_ALLOWED=NO build attempt, and a cross-check against Valve SteamGameServer lifecycle/callback docs.

@ksuchitra532 ksuchitra532 moved this to Triage in Team Workload Jul 28, 2026
@stuckie stuckie moved this from Triage to Backlog in Team Workload Jul 29, 2026
@ksuchitra532 ksuchitra532 moved this from Backlog to Triage in Team Workload Jul 30, 2026
@stuckie stuckie moved this from Triage to In Progress in Team Workload Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Steamworks: Add support for Steam Dedicated Servers

4 participants