I just noticed last night the clever usage of getting OS name for the username default. Very clever!
I added a new "issue" for enchancing this by writing custom usernames to disk (ini file?) and reading it upon next open. drraccoon/GD-Polo#10
It would be nice to remember the last defined IP and ports too.
Currently, the game has a button "join game" connected to a signal, this triggers func join_game() which calls:
var host = NetworkedMultiplayerENet.new()
host.create_client(ip, port)
get_tree().set_network_peer(host)
Although, there is no checks (yet) to return if a server was found at that IP address and port. Implementation was attempted by doing:
var host = NetworkedMultiplayerENet.new()
var joinresult = host.create_client(ip, port)
if (joinresult==OK):
get_tree().set_network_peer(host)
print("Netplay - It worked! I should be connecting...")
else:
print("Netplay - I was unable to connect to the server.")
But host.create_client(ip, port)
returns 0 when connecting to nothing, and when connecting to a known server... Its possible that returning a result off that call isnt the proper way to do this?
I tend to use camelCase for files and directories
While that could work, for the sake of linux compatablity and Godots best practices document, for this project, im trying to keep all lowercase for files and directories.