gms_init

Usage: gms_init ( controller_object )

Description

This function only needs to be called when using one of the GameMaker: Studio versions of GameMaker Server.

This function initializes the extension. This function must always be called before any other GameMaker Server function.

If an error says the variable global.__set is not initialized, this function was not called on time.

controller_object should be the object from which gms_init, gms_step, gms_draw and if needed gms_network are executed.

Replies (4)

Last message on 21 Apr 2020

nathanguilbaud on 11 Apr 2020, 15:34:59
- When I run gms_init in window with a good wifi connection it takes about 6s to finish
- When I run gms_init in an android App on my phone connected to the same Wifi it takes 13s to finish
- When I run gms_init in an android App on my phone with no Wifi but a very good 4G connection it never connects

Does that means that I need a good connection in order to connect to the server ?
Size43 (Administrator) on 21 Apr 2020, 10:24:52
For some reason GameMaker's networking api takes a long time to connect on some phones. I am not able to reproduce the issue so its hard for me to debug. If you could figure out which part of the start up sequence takes the longest (by editing the extension and for example inserting some debug messages to measure timing) it would help me a lot.
Template on 24 Apr 2019, 08:46:35
Why loading on the android - long? Please help me.
Size43 (Administrator) on 24 Apr 2019, 12:06:49
This is an issue which I've not been able to reproduce. If you could add some debugging messages to gms_connect and figure out which line is taking the longest that'd help me out a lot in figuring out what's going on and fixing the issue.