Home | Customize | Blog | Extras | Log In | Info
Manual | D&D icons | GML Parser | Archive | Iso City
Username: Password:  
About | Features | Directory | Banners | Contact

Designing Games with GameMaker
Designing Games with GameMaker

Shared data

Shared data communication is probably the easiest way to synchronize the game. All communication is shielded from you. There is a set of 1000000 values that are common to all entities of the game (preferably only use the first few to save memory). Each entity can set values and read values. GameMaker makes sure that each entity sees the same values. A value can either be a real or a string. There are just two routines:

mplay_data_write(ind,val) write value val (string or real) into location ind (ind between 0 and 1000000).
mplay_data_read(ind) returns the value in location ind (ind between 0 and 1000000). Initially all values are 0.

To synchronize the data on the different machines you can either use a guaranteed mode that makes sure that the change arrives on the other machine (but which is slow) or non-guaranteed. To change this use the following routine:

mplay_data_mode(guar) sets whether or not to use guaranteed transmission for shared data. guar should either be true (the default) or false.

Search Search


Alternative versions Alternative versions

You can also read this manual on one single long page (± 1.5 mb)

Also available in: Dutch French German

ZIP Download helpfile

Advertisement Advertisement

GameMaker Manual