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