We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebGLでプレイできるようにするために通信をWebsocketに移行 親と子どちらも一つのWebsocketコネクションを最後まで使う。
"RoomNotFound" ランダム参加にて部屋がない場合・合言葉が間違っている場合
"LostConnection" ゲーム参加者のコネクションが切れた場合
"MalformedMessageType" 送信のデータ形式が間違っている場合
$ wscat -c "ws://localhost:18080/create_room?accountId=parent&accountName=parentName" or $ wscat -c "ws://localhost:18080/create_room?accountId=parent&accountName=parentName&roomKey=abc" // 人が入ってきたらJoinRoomResponseが届く(JoinRoomResponse) < {"roomId":"1f348ba9bf264296bc6fa87e55575781", "vagrant":3} < {"roomId":"1f348ba9bf264296bc6fa87e55575781", "vagrant":2} < {"roomId":"1f348ba9bf264296bc6fa87e55575781", "vagrant":1} < {"roomId":"1f348ba9bf264296bc6fa87e55575781", "vagrant":0} // 揃ったらReadyResponseが届く(ReadyResponse) < { "roomId":"1f348ba9bf264296bc6fa87e55575781", "yourDirection":"Up", "member":[ { "accountName":"parent", "direction":"Up" }, { "accountName":"child1", "direction":"Down" }, { "accountName":"child2", "direction":"Left" }, { "accountName":"child3", "direction":"Right" } ] } // ゲームスタート // 親はCoordinateを送信する(Coordinate) > {"x":0.1, "y":0.1, "z":0.1, "elapsedTime":1} // 子の操作情報が届く(Operation) < {"direction":"Left", "strength":0.1} < {"direction":"Down", "strength":0.1} > {"x":0.1, "y":0.1, "z":0.1, "elapsedTime":2} < {"direction":"Right", "strength":0.1} > {"x":0.1, "y":0.1, "z":0.1, "elapsedTime":3} // リザルトの送信(SendResultRequest) > {"ghostRecord":[], "isGameClear":true, "elapsedTime":180}
$ wscat -c "ws://localhost:18080/join_room?accountId=child1&accountName=child1Name" or $ wscat -c "ws://localhost:18080/join_room?accountId=child1&accountName=child1Name&roomKey=abc" // 人が入ってきたらJoinRoomResponseが届く(JoinRoomResponse) < {"roomId":"1f348ba9bf264296bc6fa87e55575781", "vagrant":2} < {"roomId":"1f348ba9bf264296bc6fa87e55575781", "vagrant":1} < {"roomId":"1f348ba9bf264296bc6fa87e55575781", "vagrant":0} // 揃ったらReadyResponseが届く(ReadyResponse) < { "roomId":"1f348ba9bf264296bc6fa87e55575781", "yourDirection":"Down", "member":[ { "accountName":"parent", "direction":"Up" }, { "accountName":"child1", "direction":"Down" }, { "accountName":"child2", "direction":"Left" }, { "accountName":"child3", "direction":"Right" } ] } // ゲームスタート // 親のCoordinate情報が届く(Coordinate) < {"x":0.1, "y":0.1, "z":0.1, "elapsedTime":1} // 子の操作情報を送信する(Operation) > {"direction":"Down", "strength":0.1} < {"x":0.1, "y":0.1, "z":0.1, "elapsedTime":2} < {"x":0.1, "y":0.1, "z":0.1, "elapsedTime":3} // リザルトが届く(SimpleGameResult) < {"isGameClear":true, "elapsedTime":180}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
概要
WebGLでプレイできるようにするために通信をWebsocketに移行
親と子どちらも一つのWebsocketコネクションを最後まで使う。
データ型
JoinRoomResponse
ReadyResponse
Member(Object)
Direction(Enum)
Coordinate
Operation
SendResultRequest
SimpleGameResult
ErrorResponse
ErrorType(Enum)
"RoomNotFound"
ランダム参加にて部屋がない場合・合言葉が間違っている場合
"LostConnection"
ゲーム参加者のコネクションが切れた場合
"MalformedMessageType"
送信のデータ形式が間違っている場合
親の流れ
子の流れ
The text was updated successfully, but these errors were encountered: