That DecodeIncomingMessage() function is more complex than it possibly needs to be but the basic idea is to divide up a long string into shorter strings that have meaning like an entity's x position.
Each part of the string is separated by a "," and the end of the whole string is a "-". What happens is that the message gets divided up and each part is placed in the incoming$() array. Then the client reads the incoming$() array for the information all depending on the type of the incoming message.
So for example we'll look at the shotgun (this is from the FPSNetUpdate in the Networking section of the archives).
SendNetMsg(2, "2," + Left(Str(shot), 1) + "," + Left(Str(shot2), 1) + "," + Left(Str(shot3), 1) + "-", p\iD, op\iD, 0)
This is the message that sends if the shots hit (the game doesn't use actual projectiles which would be more complex than linepicks which FPSNet uses).
This reads the message:
Case 2
p.Player = Object.Player(localPlayerPointer)
CreateSomeParticles(EntityX(p\mesh[1]), EntityY(p\mesh[1]), EntityZ(p\mesh[1]), 255, 0, 0, 10)
If justDied# + 500 < MilliSecs()
DecodeIncomingMessage(NetMsgData$())
Select incoming$(1)
Case 1
health# = health# - 5
Case 2
count = 0
If incoming$(2) <> 0
count = count + 1
EndIf
If incoming$(3) <> 0
count = count + 1
EndIf
If incoming$(4) <> 0
count = count + 1
EndIf
health# = health# - (5 * count)
Case 3
health# = health# - 25
End Select
EndIf
If health# <= 0
health# = 100
PositionEntity(p\mesh[1],5,1,Rand(0, 50))
SendNetMsg(3, "1", p\iD, NetMsgFrom(), 1)
CreateSomeParticles(EntityX(p\mesh[1]), EntityY(p\mesh[1]), EntityZ(p\mesh[1]), 255, 0, 0, 100)
SendNetMsg(5, "1",p\iD, 0, 0)
justDied# = MilliSecs()
EndIf
Case 2 means if this is message type 2 indicated by our sent message as:
SendNetMsg(2,
So if we have a message of type 2 then make some particles where we're getting shot and if we haven't just died lets take some damage.
If incoming$(1), incoming$(2), or incoming$(3) isn't a zero then we got hit by 1 or possibly all 3 shots from the shotgun so let's take some damage.
Also, yes GNet uses Mark's server to list games and you don't need to know PHP/MySQL to use it ... unless you want to move it to your own server which I did for some things.
As for movement, the client moves his/her own player and then tells everyone else where he/she is.
It's been a while since I wrote this code but that's the general idea. This code is a simple peer to peer example game. If you want to start getting complex then a strong client server architecture is required. The Torque Game Engine handles more complex things (like projectiles with ballistics) easily and I probably wouldn't recommend trying to write your own engine dealing with the complex stuff right off the bat. Make some peer to peer games to understand why or what the other stuff is needed for.