Multiplayer game???

Blitz3D Forums/Blitz3D Programming/Multiplayer game???

I'm in the process of making a multiplayer game where the players control stick figures that can chat and walk. I know it sounds a little crude. I've got the sprites, images and everything ready, except for I'm a little fuzzy on the chatting part. Any ideas?

The game is basically meant as an online way of chatting.

If you don't need a too fast connection speed, use DirectPlay:
	;-----------------------------------------------------------------------------------	
	;								DirectPlay example
	;-----------------------------------------------------------------------------------	
	;run this example twice, once as a server and once as a client.
	
	Graphics 800, 600, 0, 3
	SetBuffer BackBuffer()

	;start network game
	Select StartNetGame()
	Case 0
				End
	Case 1
				Print "Joined!"
	Case 2
				Print "Server!"
	End Select
	
	;create player
	player = CreateNetPlayer("Bram")
	
	x = Rand(400) + 200
	y = Rand(300) + 150

	;main loop	
	While Not KeyHit(1)
	
		Cls
		
		;cursor keys to move around		
		If KeyDown(203) Then x = x - 10
		If KeyDown(205) Then x = x + 10
		If KeyDown(200) Then y = y - 10
		If KeyDown(208) Then y = y + 10
		
		;send message
		io = MilliSecs() / 50
		If io > ioi Then 
			SendNetMsg 1, y + x * 800, player, 0, 1
			ioi = io
		End If
		
		;incoming messages
		If RecvNetMsg() Then
			msgType	  = NetMsgType()
			msgFrom   = NetMsgFrom()
			msgData   = NetMsgData$()
			a# = msgData   / 800
			b# = msgData Mod 800
		End If
			
		;draw player
		Color 255, 255, 0
		Oval x, y, 20, 20, True
		;draw player
		Color 255, 0, 0
		Oval a, b, 20, 20, True
		
		Flip
	
	Wend
	
End

To run the game locally, a IP adres is not required. However, to establish a real connection, you should enter it.
There is also BlitzPlay, it uses UDP and is faster: http://www.blitzcoder.com/blitzplay/

Cool. Thx

Oh yeah, should I just give this program to someone else, enter the IP address of my website, and then have them enter it too to run the program? Just curious...

Ow .. didn't notice there was another post here.
You have to run ipconfig from the command prompt (start->run->"cmd"->"ipconfig" + enter) to get your ip adres.
Optionally, you could go to whatsmyip.com
Then, run the code, select 'host' and enter your ip adres. Send a copy to somebody else and let him or her enter your ip adres too and select 'join'.