Cocos2d-x での
クラウドサービス活用方法
株式会社シュハリ
代表取締役 松浦 晃洋
自己紹介
• 松浦 晃洋
• 株式会社シュハリ 代表取締役
• Cocos2d-x ゲーム開発
• 書籍、雑誌などの執筆
• ゲーム専門学校で講師
開発のプロが教える
Cocos2d-x逆引きガイドブック
Cocos2d-x Game
Development Essentials
Building Android
Games with Cocos2d-x
海外での出版に協力
Cocos2d-x 開発者の祭典!
4/2 北京
http://devcon.cocos.com/
週刊アスキー
http://weekly.ascii.jp/elem/
000/000/317/317017/
今日のゴール
ネットワークを使用しての
リソースのバージョン管理
めちゃギントン作った!
イベント中に
絶対に落ちてはダメ
24時間自動運転モード
を作り耐久テスト
めちゃギントンの裏側
データ構成と
データのアップデート
データ
データ
• SQLite で管理
データ
• SQLite で管理
• 更新は SQLite ファイルを丸ごとダウンロード
データ
• SQLite で管理
• 更新は SQLite ファイルを丸ごとダウンロード
• 常にサーバと通信して SQLite 更新ないかチェック
データ
• SQLite で管理
• 更新は SQLite ファイルを丸ごとダウンロード
• 常にサーバと通信して SQLite 更新ないかチェック
• 画像や音声などもバージョン管理して更新あれば
ダウンロード
大変なのは
サーバ側と運用側
クラウドサービス
を使用して効率的に
運用をする
データ更新方法を
考える
Asset Manager
Extension
Multi thread downloading
Asset Manager
Extension
Multi thread downloading File level progression
Asset Manager
Extension
Multi thread downloading File level progression
Byte level progression
Asset Manager
Extension
Multi thread downloading File level progression
Byte level progression
Decompressed zip automatically
Asset Manager
Extension
Multi thread downloading File level progression
Byte level progression
Decompressed zip automatically
Download resuming
Asset Manager
Extension
Multi thread downloading File level progression
Byte level progression
Decompressed zip automatically
Download resuming
Detailed progression informations and error informations
Asset Manager
Extension
Multi thread downloading File level progression
Byte level progression
Decompressed zip automatically
Download resuming
Detailed progression informations and error informations
Possibility to retry failed assets
Asset Manager
Extension
Asset Manager EX
の仕組み
Local Manifest Version Manifest
Resources Resources
Remote Manifest
Local Manifest Version Manifest
Resources Resources
Remote Manifest
Local Manifest Version Manifest
Resources Resources
Remote Manifest
Local Manifest Version Manifest
Resources Resources
Remote Manifest
Local Manifest Version Manifest
Resources Resources
Remote Manifest
check MD5
Local Manifest Version Manifest
Resources Resources
Remote Manifest
check MD5
Local Manifest Version Manifest
Resources Resources
Remote Manifest
check MD5
Local Manifest Version Manifest
Resources Resources
Remote Manifest
check MD5
check MD5
check MD5
Local Manifest Version Manifest
Resources Resources
Remote Manifest
check MD5
check MD5
check MD5
Local Manifest Version Manifest
Resources Resources
Remote Manifest
check MD5
Asset Manager Ex
実装方法
https://github.com/syuhari/AssetsManagerEx
Asset Manager Ex
Demo
まとめ
今日のゴール
ネットワークを使用しての
リソースのバージョン管理
Cocos2d-x で一緒に
ゲームを作りましょう!
• @syuhari
• facebook.com/syuhari

Cocos2d-x でのクラウドサービス活用方法 - 週刊アスキーセミナー