SlideShare a Scribd company logo
ポッピンゲームズジャパンにおける
cocos2d-xでの
ソーシャルゲーム開発事例
ポッピンゲームズジャパン株式会社 小林敬介
目次
• 自己紹介
• 弊社開発の歴史
• cocos2d-xへの移行
• 苦労
• まとめ
喋るつもりだった内容がだいたい全部書かれてた
自己紹介
• ポッピンゲームズジャパン株式会社エンジニア統括
• iOS&Android向けソーシャルゲーム
• 「ピーターラビットガーデン」「アリスの不思議なテ
ィーパーティー」「ピクセル&ダンジョンズ」ほか
• blog : http://poppingames.hatenablog.com
• 7月は筑波大学でiOS開発の講義(全三回)
弊社開発の歴史
弊社開発の歴史
• iOSでゲーム作る
• Unityよりcocos2dの方が使いやすそう
• iOSアプリ開発者がいたので
• 三作くらい作った
• Androidのビッグウェーブに乗りたい
• cocos2d-xに けた
Unity不採用
• cocos2d使ってたので
• 慣れたXcodeで開発できるので
• 2Dゲーム主体なので
• オープンソースじゃないので
cocos2d-xへの移行
cocos2d-xへの移行
• 主目的はAndroid対応
• Androidエミュレータはつらい
• 試験用の端末をたくさん買うことに
cocos2d-xへの移行
• cocos2dの経験はそのまま使える
• 普通のAndroid開発のノウハウはあま
り活きないかも
• 環境構築とか、周辺的な部分は役立つ
• あと課金関連
cocos2d-xへの移行
• Xcodeで開発
• シミュレータやiPhone実機で確認するのが
とても楽
• Eclipseの出番はAndroid実機確認くらい
• Android特有の問題はそれほど無い
• リソース関連、課金関連くらい
cocos2d-xへの移行
• project-creator/create_project.py で一発
• Android開発環境の準備はやや手間
• エミュレータがアレなので実機が無いと
辛いのもネック
• 普通のAndroid開発したことあるとスム
ーズかも
cocos2d-xへの移行
• 言語はC++にした
• 外部ライブラリの使用がちょっと面倒
• ヘッダオンリーのライブラリだとちょっ
と嬉しい
• C++11なんか有効にしちゃったり
• 最近JSBの盛り上がりが気になる
苦労
C++
• ほかの言語に慣れた後のC++は辛い
• virtual とか :: とか
• ヘッダファイル長い
• 配列・ハッシュ・文字列がめんどい
• 外部ライブラリもいれなきゃ
CocosBuilderを使う
• なるべくC++のコードを書きたくない
• きっと再利用しやすいはず
• クオリティも上がるだろう
C++
• ひたすらハードコードで紐付けることに
• CCB_MEMBERVARIABLEASSIGNER_GLUE ,
CCB_SELECTORRESOLVER_CCMENUITEM_GLUE
• 妙に長いマクロ
• 「CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD」だの
「CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD」だの
• CocosBuilder自体にまだバグがあったり
アプリ内課金
• 絶対必要なんだけど、めんどくさい
• iOSではObjective-C++でOK
• AndroidはJNIでなんとかする
• Java側も書かないといけない
• がんばりたくない場合
• 外部ライブラリ・サービスに頼る手も…?
外部ライブラリ
• 通信関係がパワー不足
• CCHttpClientはver2.1.4で多少改善
• 内部的にはlibcurl+pthreadなので自分で改良しちゃ
うのもあり
• httpsが使えません
• OpenSSLを自分で用意しましょう
• ver2.1.4からWebSocketが使えるようになった
外部ライブラリ
• POCO
• 何でも入ってるが、そんなに豪華じゃなくてい
いよという気もする
• libcurlで十分なら、いらないかも
• JSONにRapidjson
• cocos2d-x標準でJSONパーサ入らないかなぁ
• C++11も使ったり
画像・音声リソース
• AndroidではSEにwavは not so good 、 ogg が best と書か
れている
• http://www.cocos2d-x.org/projects/cocos2d-x/wiki/
Audio_formats_supported_by_CocosDenshion_on_differe
nt_platforms
• iOSではSEに ogg が使えない
• 全部とにかくMP3、という方針
• OS別にリソース分けるのは面倒だが、質はあがるかも
画像・音声リソース
• iOSではPVRTCがよかった
• Androidだとそうでもない
• これもOS・端末で分ける?
• とりあえずAndroidはpng
開発者探し
• JavaでAndroidって人は割といる
• Objective-CでiOSの人もぼちぼちいる
• スマホでゲームでネイティブっていうとC
++の人あまりいない、というかcocos2d-x
ピンポイント?
• 日本語書籍の発売が非常にありがたい
まとめ
• cocos2dの開発経験は活きてる
• でもそこそこ苦労してる
• 課金、通信、リソース管理などなどはきっと
これから改善されてくって信じてる
• あとJSBに期待
• 日本語書籍は本当にありがたい

More Related Content

Recently uploaded

2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
ssuserbefd24
 

Recently uploaded (12)

論文紹介:ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation
論文紹介:ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation論文紹介:ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation
論文紹介:ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation
 
論文紹介:Deep Occlusion-Aware Instance Segmentation With Overlapping BiLayers
論文紹介:Deep Occlusion-Aware Instance Segmentation With Overlapping BiLayers論文紹介:Deep Occlusion-Aware Instance Segmentation With Overlapping BiLayers
論文紹介:Deep Occlusion-Aware Instance Segmentation With Overlapping BiLayers
 
20240523_IoTLT_vol111_kitazaki_v1___.pdf
20240523_IoTLT_vol111_kitazaki_v1___.pdf20240523_IoTLT_vol111_kitazaki_v1___.pdf
20240523_IoTLT_vol111_kitazaki_v1___.pdf
 
5/22 第23回 Customer系エンジニア座談会のスライド 公開用 西口瑛一
5/22 第23回 Customer系エンジニア座談会のスライド 公開用 西口瑛一5/22 第23回 Customer系エンジニア座談会のスライド 公開用 西口瑛一
5/22 第23回 Customer系エンジニア座談会のスライド 公開用 西口瑛一
 
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
 
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
 
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
 
クラウド時代におけるSREとUPWARDの取組ーUPWARD株式会社 CTO門畑
クラウド時代におけるSREとUPWARDの取組ーUPWARD株式会社 CTO門畑クラウド時代におけるSREとUPWARDの取組ーUPWARD株式会社 CTO門畑
クラウド時代におけるSREとUPWARDの取組ーUPWARD株式会社 CTO門畑
 
部内勉強会(IT用語ざっくり学習) 実施日:2024年5月17日(金) 対象者:営業部社員
部内勉強会(IT用語ざっくり学習) 実施日:2024年5月17日(金) 対象者:営業部社員部内勉強会(IT用語ざっくり学習) 実施日:2024年5月17日(金) 対象者:営業部社員
部内勉強会(IT用語ざっくり学習) 実施日:2024年5月17日(金) 対象者:営業部社員
 
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
 
Intranet Development v1.0 (TSG LIVE! 12 LT )
Intranet Development v1.0 (TSG LIVE! 12 LT )Intranet Development v1.0 (TSG LIVE! 12 LT )
Intranet Development v1.0 (TSG LIVE! 12 LT )
 
ロボットマニピュレーションの作業・動作計画 / rosjp_planning_for_robotic_manipulation_20240521
ロボットマニピュレーションの作業・動作計画 / rosjp_planning_for_robotic_manipulation_20240521ロボットマニピュレーションの作業・動作計画 / rosjp_planning_for_robotic_manipulation_20240521
ロボットマニピュレーションの作業・動作計画 / rosjp_planning_for_robotic_manipulation_20240521
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

ポッピンゲームズジャパンにおける cocos2d-xでの ソーシャルゲーム開発事例