multiplayer network commands: need help please!

Blitz3D Forums/Blitz3D Beginners Area/multiplayer network commands: need help please!

etxtra(Posted 2011) [#1]
hi everyone! I have some questions about the "multiplayer network commands":
-Please, I would like to know: if a player joins a game, I will need to send messages to him/her, so how can I retrieve player ID or IP address in order to send messages to the right player ? (apparently it is not possible to know who is the player that joined and there is no link between "CreateNetPlayer (name$)" and "NetMsgFrom()".)


_PJ_(Posted 2011) [#2]
From the Help documents:

http://www.blitzbasic.co.nz/b3ddocs/command.php?name=NetPlayerLocal&ref=comments

There are many other networking code exaqmples inthe code archives, I personally believe a lot of these are preferable to the NetPlay commands used by Blitz


etxtra(Posted 2011) [#3]
Hi @Malice, I've read the help documents and I can see that "CreateNetPlayer()" "Creates a new local player." but my question is: "how do you create a player that is not local but distant ?"
-
Because when you want to play with an user that is away (not local) over the internet you will need to send him messages:
-how do you achieve this ?


System4 Studios(Posted 2011) [#4]
I recommend taking a look at this example..


http://www.blitzbasic.com/codearcs/codearcs.php?code=1149


It fully uses the DirectPlay engine and shows how to create other players, including yourself and how it sends messages..


It will also teach you about Types which is essential for creating "New" Players..

Last edited 2011