81 lines
1.2 KiB
Plaintext
81 lines
1.2 KiB
Plaintext
Client:
|
|
SceneManager:
|
|
TCPSocket
|
|
end
|
|
end
|
|
|
|
Server:
|
|
TCPServerSocket
|
|
SocketList --list of all client sockets if one is closed, remove it.
|
|
end
|
|
|
|
When the player enters the lobby, they can choose what server to connect to. When they connect to the server, they'll enter a sort of character creation screen. Once that is done, they will enter the game world proper.
|
|
|
|
This is controlled through the config files for now.
|
|
|
|
using ';' delimited commands, how can I get it to work?
|
|
|
|
-------------------------
|
|
|
|
UDPNetworkUtility:
|
|
void Open(port, packSize)
|
|
void Close()
|
|
|
|
//bind to an available channel
|
|
int Bind(ip, port)
|
|
int Bind(address)
|
|
|
|
//bind to a certain channel
|
|
int Bind(ip, port, channel)
|
|
int Bind(address, channel)
|
|
void Unbind(channel)
|
|
|
|
int Send(channel, data, len)
|
|
int Receive()
|
|
|
|
GetIPAddress(channel)
|
|
|
|
GetOutData()
|
|
GetInData()
|
|
|
|
GetOutPacket()
|
|
GetInPacket()
|
|
|
|
UDPsocket socket
|
|
UDPpacket packOut
|
|
UDPpacket packIn
|
|
end
|
|
|
|
-------------------------
|
|
|
|
packet_list.hpp:
|
|
Ping:
|
|
end
|
|
Pong:
|
|
end
|
|
JoinRequest:
|
|
avatarName
|
|
...
|
|
end
|
|
JoinConfirm:
|
|
yourID
|
|
end
|
|
NewPlayer:
|
|
id
|
|
position
|
|
motion
|
|
avatarName
|
|
end
|
|
MotionUpdate:
|
|
id
|
|
position
|
|
motion
|
|
end
|
|
union Packet:
|
|
MotionUpdate
|
|
end
|
|
end
|
|
|
|
-------------------------
|
|
|