• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker network_set_config is Broken ?

Imperial

Member
Hello Everybody

I basically made my own custom server using Python to send and receive data in game maker so it can be hosted easily

but the problem is I need to do a check if the server is up or down before trying to connect using network_connect_raw function

but when I add network_set_config(network_config_connect_timeout,4000); to the game the network_send_raw doesn't send any data anymore

but I'm still connected to the server

anyone can help me please ?

is it a bug on game maker studio 2 ?

thank you so much for your time
 

O.Stogden

Member
If you're using a blocking socket, then the game should just hang until a successful connection is made, or the connection fails. (You'll get a negative number back on your network_connect_raw function if connection fails, instead of a 0 or positive, which means connection successful)

If you're using a non-blocking socket, then the game will carry on, and you'll get an async event happen that'll let you know if the connection was successful or not. Same as the previous paragraph, but this is in an async event, and not immediately retrievable.

If you're already connected to a server, and want to check that the connection hasn't been lost, then you should send a ping packet periodically, and if enough ping packets fail to get a reply, then you'll know the connection has failed.

Also I would presume any "network_set_config" function must be run before any network is created.
 
Top