-
Notifications
You must be signed in to change notification settings - Fork 0
Home
maru-n edited this page Jul 6, 2013
·
14 revisions
Welcome to the node_pingpong wiki!
- シーケンス図
- フィールド
- 球形のフィールドとする
- クライアントとサーバのデータのやり取りは、 フィールドのminXとminYの点を原点とし、直径を1.0とした相対座標で行う
- 通信時にやり取りするデータ
- basic definition
GameData = {"gameId": int, score: [int, int, int, int]}
FieldData = {"ballX": float, "ballY": float}
PlayerData = {"userId": int, "playerName": string, "angle": float, "width": float}
-
connection (client → server)
無し -
setup (server → client)
{
"gameData": gameData,
"playerData": [PlayerData, PlayerData, PlayerData, PlayerData ]
}
-
start (server → client)
無し -
play (server → client)
{
"gameData": GameData,
"fieldData": FieldData,
"playerData": [PlayerData, PlayerData, PlayerData, PlayerData]
}
- update (server → client)
{
"fieldData": FieldData,
"playerData": [PlayerData, PlayerData, PlayerData, PlayerData]
}
- action (client → server)
{"pressedKey": int}
- pause (server → client)
{
"gameData": GameData,
"fieldData": FieldData,
"playerData": [PlayerData, PlayerData, PlayerData, PlayerData]
}
- end (server → client)
無し