Differences

This shows you the differences between two versions of the page.

Link to this comparison view

gdevelop:documentation:manual:built_network [2015/05/18 12:28]
127.0.0.1 external edit
gdevelop:documentation:manual:built_network [2020/06/01 13:10] (current)
rapperdinesh [How the extension works]
Line 9: Line 9:
 ===== How the extension works ===== ===== How the extension works =====
  
-Sockets used by **GDevelop** are based on the UDP protocol, which allows to easily and quickly send data on a network.+Sockets used by **GDevelop** are based on the UDP protocol, which allows ​us to easily and quickly send data on a network.
  
 You can set up a computer for data exchange from within **GDevelop** thanks to the action //​**Initialize data reception**//:​ from there you can set up a port number the computer will be listening to. If no port is chosen, a default one will be assigned. You can set up a computer for data exchange from within **GDevelop** thanks to the action //​**Initialize data reception**//:​ from there you can set up a port number the computer will be listening to. If no port is chosen, a default one will be assigned.
  
-Then, you have to specify which computer to send the data to. You can do so with the action **//Add a recipient//​**:​ insert here the the IP adress ​and port number of the other computer.+Then, you have to specify which computer to send the data to. You can do so with the action **//Add a recipient//​**:​ insert here the IP address ​and port number of the other computer.
  
 Make sure that the IP addresses are correct and the port the same for both computers: Make sure that the IP addresses are correct and the port the same for both computers:
Line 26: Line 26:
 To receive data sent by other computers, you have to first receive data waiting on the network and save them in memory. Use the action **//Receive waiting data//**. This action can be placed in an event without condition, for example at the beginning of the events. To receive data sent by other computers, you have to first receive data waiting on the network and save them in memory. Use the action **//Receive waiting data//**. This action can be placed in an event without condition, for example at the beginning of the events.
  
-When the action is called, data received from others ​computers will be saved in memory. You can get their values using the expressions **GetReceivedDataValue(DataTitle)** or **GetReceivedDataString(DataTitle)**. You can access the data from the expression editor/text editor.+When the action is called, data received from other computers will be saved in memory. You can get their values using the expressions **GetReceivedDataValue(DataTitle)** or **GetReceivedDataString(DataTitle)**. You can access the data from the expression editor/text editor.