هذه مقدمة الموجودة في الجيم ميكر
For two computer to communicate they will need some connection protocol. Like most games, Game Maker offers four different types of connections: IPX, TCP/IP, Modem, and Serial. The IPX connection (to be more precise, it is a protocol) is almost completely transparent. It can be used to play games with other people on the same local area network. It needs to be installed on your computer to be used. (If it does not work, consult the documentation of Windows. Or go to the Network item in the control panel of Windows and add the IPX protocol.) TCP/IP is the internet protocol. It can be used to play with other players anywhere on the internet, assuming you know their IP address. On a local network you can use it without providing addresses. A modem connection is made through the modem. You have to provide some modem settings (an initialization string and a phone number) to use it. Finally, when using a serial line (a direct connection between the computers) you need to provide a number of port settings. There are four GML functions that can be used for initializing these connections:
mplay_init_ipx() initializes an IPX connection.
mplay_init_tcpip(addr) initializes a TCP/IP connection. addr is a string containing the web address or IP address, e.g. 'www.gameplay.com' or '123.123.123.12', possibly followed by a port number (e.g. ':12'). Only when joining a session (see below) do you need to provide an address. On a local area network no addresses are necessary.
mplay_init_modem(initstr,phonenr) initializes a modem connection. initstr is the initialization string for the modem (can be empty). phonenr is a string that contains the phone number to ring (e.g. '0201234567'). Only when joining a session (see below) do you need to provide a phone number.
mplay_init_serial(portno,baudrate,stopbits,parity,flow) initializes a serial connection. portno is the port number (1-4). baudrate is the baudrate to be used (100-256K). stopbits indicates the number of stopbits (0 = 1 bit, 1 = 1.5 bit, 2 = 2 bits). parity indicates the parity (0=none, 1=odd, 2=even, 3=mark). And flow indicates the type of flow control (0=none, 1=xon/xoff, 2=rts, 3=dtr, 4=rts and dtr). Returns whether successful. A typical call is mplay_init_serial(1,57600,0,0,4). Give 0 as a first argument to open a dialog for the user to change the settings.
Your game should call one of these functions exactly once. All functions report whether they were successful. They are not successful if the particular protocol is not installed or supported by your machine. To check whether there is a successful connection available you can use the following function
mplay_connect_status() returns the status of the current connection. 0 = no connection, 1 = IPX connection, 2 = TCP/IP connection, 3 = modem connection, and 4 = serial connection.
To end the connection call
mplay_end() ends the current connection.
When using a TCP/IP connection you might want to tell the person you want to play the game with what the ip address of your computer is. The following function helps you here:
mplay_ipaddress() returns the IP address of your machine (e.g. '123.123.123.12') as a string. You can e.g. display this somewhere on the screen. Note that this
routine is slow so don't call it all the time
و هذا ملخص عنها
للربط بين جاهزين فنت بحاجة الى بروتوكولات الخاصة بالربط و مثل جميع الالعاب الجيم ميكر يوفر اربع انواع من البروتوكولات و هم IPX و TCP/IP و modem و serial المهم بالنسبة لليبروتوكول الاول فهو خاص بالربط امحلي و هو الما يسمى بالنيتورك و لا اعتقد ان هذا ينفعك هنا نوعا ما ...
ام بالنسبة للثاني فهو الخاص لللعب عل الشبكة يعني ان اي واحد و هو جالس في منزله يستطيع لعبها على النت مع اشخاص اخرين و هذا الذي يخصك في اللعبة حسب ما اعتقد ام ال modem فهو يستخدم للربط عبر المودم حسب ما موجود في القطعة السابقة لكن من وجهة نظري انه خاص بالهاتف يعني انا كنت العب بعض الالعاب باستخدام هذا النوع عن طريق الهاتف و مضمونها انك تككتب تلفون الذي سوف تلعب معه و تعمل host و الاخر يكتب رقم تلفونك و يعمل join طبعا هذا الشرح عن المودم من عندي لانه لم يذكر اي تفاصيل في القطعة و الرابع كاتب انه ربط مباشر لكنني لا اعرف تفاصيل عن هذا النوع المهم الذي ينفعك هو بروتوكول ال TCO\IP حسب اعتقادي و هناك اربع وضائف تستعملها لتحقيق هذا الربط (كود) و هي الموجودة في نهاية القطعة لكنني اعتقد ان كل كود يخص نوع من الاتصال و الذي يهمك هو mplay_init_tcpip(addr)
لكنني افضل ان تقرأ المعلومات المرفقة مع كل امر لكي تفهم ما عليك فعله
هذا كان المقدم و طريقة السيت اب للاتصال حسب ما ذكرت في الجيم ميكر و هناك حاجات اخرى سوف ارفقها لك حسب وقت فراغي و اذا انهيتها سوف اضعها كدروس في منتدى البرمجةالالعاب
يتبع