Hii.
I put on godot steam and everything works fine.
My question:
My game is already finished with the Godot High Level Multiplayer system. Is it possible to use it with the GodotSteam? If so, how do I have to transmit the IPs etc.
I'm assuming you're asking if you can mix Godot's high-level networking with Steamworks networking?
If you are trying to combine Godot's high-level networking with Steamworks' networking, it might be possible. However, most of Steamworks' stuff does not transmit an IP address, just a Steam connection ID. Things like Steam invites and server lobby stuff will probably not play too well with Godot's networking, I will assume.
You can, however, pass IP addresses to certain invite functions which will require parsing to retrieve the IP address and to load into your game. I don't really recommend it though. I tried doing it in my first multiplayer game and had mixed results; plus a bunch of the Steamworks networking stuff just didn't work.
My invite function to Steam looked like:
# Send the Steam invite
Steam.inviteFriend(id, "-host="+str(YOUR_IP))
This will send an invite to the user with a connection string. If they click the invite and they are not in-game, running this during initial boot would get the IP address from that Steam invite:
# Check for command line inputs
func _check_Command_Line():
CMD_ARGS = OS.get_cmdline_args()
# Loop through array if it exists
if CMD_ARGS.size() > 0:
# Set some known command line variables
var INVITING_HOST = "Unset"
var PORT = "Unset"
var CONSOLE = "Unset"
# Loop through the command line arguments
for ARG in CMD_ARGS:
# If the player has a host set, send them on
if ARG.begins_with("-host="):
INVITING_HOST = ARG.split("-host=", false)
logging.debug("Connecting player to inviting host at: "+str(INVITING_HOST[0])+":27015")
global.INVITED_GAME = [true, INVITING_HOST[0]]
If they were in-game, they could parse the invite like this:
# Join request received from Steam
func _join_Request_Received(from_id, connect_string):
logging.debug("Join request from: "+str(from_id)+" at connection: "+str(connect_string))
# Strip the command line part out
var NEW_HOST = connect_string.split("-host=", false)
# Set invite IP as host
global.HOST_IP = NEW_HOST[0]
var FRIEND_NAME = Steam.getFriendPersonaName(from_id)
_join_Game()
And, like I said above, most of the good Steamworks networking things won't work.
All in all, I think it is less complicated to use the Steamworks' networking stuff as they can keep better track of server lists, server options, invite system, etc. It does, however, keep the game tied to Steam for multiplayer.
If you sell your game or want it to run outside of Steam, you could create a hybrid that uses Godot's high-level networking when not running through Steam or it's networking but then does use Steamwork when the game is. It would essentially double your networking code unless you could think of some really crafty functions.
After I get the rest of Steamworks ported into Godot, I may go back and try to make a better hybrid system for fun.
Most helpful comment
I'm assuming you're asking if you can mix Godot's high-level networking with Steamworks networking?
If you are trying to combine Godot's high-level networking with Steamworks' networking, it might be possible. However, most of Steamworks' stuff does not transmit an IP address, just a Steam connection ID. Things like Steam invites and server lobby stuff will probably not play too well with Godot's networking, I will assume.
You can, however, pass IP addresses to certain invite functions which will require parsing to retrieve the IP address and to load into your game. I don't really recommend it though. I tried doing it in my first multiplayer game and had mixed results; plus a bunch of the Steamworks networking stuff just didn't work.
My invite function to Steam looked like:
This will send an invite to the user with a connection string. If they click the invite and they are not in-game, running this during initial boot would get the IP address from that Steam invite:
If they were in-game, they could parse the invite like this:
And, like I said above, most of the good Steamworks networking things won't work.
All in all, I think it is less complicated to use the Steamworks' networking stuff as they can keep better track of server lists, server options, invite system, etc. It does, however, keep the game tied to Steam for multiplayer.
If you sell your game or want it to run outside of Steam, you could create a hybrid that uses Godot's high-level networking when not running through Steam or it's networking but then does use Steamwork when the game is. It would essentially double your networking code unless you could think of some really crafty functions.
After I get the rest of Steamworks ported into Godot, I may go back and try to make a better hybrid system for fun.