Submit Search
Upload
Cocos2dでRPG(第14回iPhone名古屋勉強会発表資料)
•
5 likes
•
2,171 views
Makoto Yamahira
Follow
Cocos2d-iphoneを使ってロールプレイングゲームを作ってみました。 第14回iPhone名古屋勉強会の発表資料です。
Read less
Read more
Technology
Report
Share
Report
Share
1 of 33
Download now
Download to read offline
Recommended
Unityで簡単なゲームを作ってみる(第1回unity初心者勉強会)
Unityで簡単なゲームを作ってみる(第1回unity初心者勉強会)
Makoto Yamahira
Unityで横スクロールアクションゲームを作ってみる(第2回unity初心者勉強会)
Unityで横スクロールアクションゲームを作ってみる(第2回unity初心者勉強会)
Makoto Yamahira
つれづれ
つれづれ
東証ソーシャルかぶコン
20131116 ABC2013 Report in Android Yokohama
20131116 ABC2013 Report in Android Yokohama
Kenichi Ohwada
つれづれ
つれづれ
東証ソーシャルかぶコン
mixiアプリxZendFramework
mixiアプリxZendFramework
清水樹
栃木Twitterセミナーin大田原法人会
栃木Twitterセミナーin大田原法人会
新潟コンサルタント横田秀珠
201304013 LOD Prize in Android Yokosuka
201304013 LOD Prize in Android Yokosuka
Kenichi Ohwada
Recommended
Unityで簡単なゲームを作ってみる(第1回unity初心者勉強会)
Unityで簡単なゲームを作ってみる(第1回unity初心者勉強会)
Makoto Yamahira
Unityで横スクロールアクションゲームを作ってみる(第2回unity初心者勉強会)
Unityで横スクロールアクションゲームを作ってみる(第2回unity初心者勉強会)
Makoto Yamahira
つれづれ
つれづれ
東証ソーシャルかぶコン
20131116 ABC2013 Report in Android Yokohama
20131116 ABC2013 Report in Android Yokohama
Kenichi Ohwada
つれづれ
つれづれ
東証ソーシャルかぶコン
mixiアプリxZendFramework
mixiアプリxZendFramework
清水樹
栃木Twitterセミナーin大田原法人会
栃木Twitterセミナーin大田原法人会
新潟コンサルタント横田秀珠
201304013 LOD Prize in Android Yokosuka
201304013 LOD Prize in Android Yokosuka
Kenichi Ohwada
PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000
Shota Ito
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
sugiuralab
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
iPride Co., Ltd.
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
Ryo Sasaki
UPWARD_share_company_information_20240415.pdf
UPWARD_share_company_information_20240415.pdf
furutsuka
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
Atomu Hidaka
20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory
osamut
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
danielhu54
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
iPride Co., Ltd.
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
More Related Content
Recently uploaded
PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000
Shota Ito
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
sugiuralab
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
iPride Co., Ltd.
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
Ryo Sasaki
UPWARD_share_company_information_20240415.pdf
UPWARD_share_company_information_20240415.pdf
furutsuka
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
Atomu Hidaka
20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory
osamut
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
danielhu54
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
iPride Co., Ltd.
Recently uploaded
(9)
PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
UPWARD_share_company_information_20240415.pdf
UPWARD_share_company_information_20240415.pdf
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Featured
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Featured
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO 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)
How 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 Insights
Trends 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 summary
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
Google'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
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The 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...
Cocos2dでRPG(第14回iPhone名古屋勉強会発表資料)
1.
cocos2d使ってみました! 山平 誠 (開発者名:makohira) 2013年3月16日 ©makohira2013
2.
目次 自己紹介 アプリの紹介 cocos2dとTiledMap 最後に ©makohira2013
3.
自己紹介 名前:山平誠 住所:愛知県尾張旭市 facebook.com/Makoto.Yamahira @makohira 普段の仕事:業務系SE 家で:スマホアプリ開発 趣味:英語、飲み会、カラオケ・・・ ©makohira2013
4.
2013年2月15日 「英文法クエスト」 をリリースしました。 (2本目のアプリです。) アプリの紹介 ©makohira2013
5.
英文法クエストは ロールプレイングゲーム形式 の英文法学習アプリです。 ©makohira2013
6.
画面は こんな感じ。 ©makohira2013
7.
cocos2dとTiledMap 今回の開発では ①cocos2d-iphone ②TiledMap にかなり助けられました。 ©makohira2013
8.
cocos2d-iphone アニメーションの実装がラク。 パーティクル効果の実装がラク。 TiledMapの実装がラク。 ◎良かった点 ©makohira2013
9.
◎アニメーションの実装がラク。 // 5秒かけて右に50ピクセル移動。 [someObject runAction:[CCMoveBy
actionWithDuration:5.0f position:CGPointMake(50, 0)]]; ©makohira2013
10.
◎アニメーションの実装がラク。 // 5秒かけて右に50ピクセル移動。 [someObject runAction:[CCMoveBy
actionWithDuration:5.0f position:CGPointMake(50, 0)]]; 1行で書けます。 ©makohira2013
11.
◎パーティクル効果の実装がラク。 ①ParticleDesignerでパーティクルを作成し cocod2d(plist)形式で保存する。 ParticleDesigner ©makohira2013
12.
②保存したファイルをプロジェクトに追加し、 次のようなコードを書く。 // パーティクルの実装 CCParticleSystemQuad *particle
= [CCParticleSystemQuad particleWithFile:@"test_particle.plist"]; [self addChild:particle]; ©makohira2013
13.
②保存したファイルをプロジェクトに追加し、 次のようなコードを書く。 // パーティクルの実装 CCParticleSystemQuad *particle
= [CCParticleSystemQuad particleWithFile:@"test_particle.plist"]; [self addChild:particle]; 2行で書けます。 ©makohira2013
14.
②保存したファイルをプロジェクトに追加し、 次のようなコードを書く。 // パーティクルの実装 CCParticleSystemQuad *particle
= [CCParticleSystemQuad particleWithFile:@"test_particle.plist"]; [self addChild:particle]; 実行結果 2行で書けます。 ©makohira2013
15.
◎TiledMapの実装がラク。 後で説明します。。 ©makohira2013
16.
cocos2d-iphone 書籍が少ない。 ×悪かった点 ©makohira2013
17.
◎書籍が少ない。 cocos2d関係の書籍が少なかったです。 古い書籍はcocos2dの古いバージョン を使っていたりするので読み解くのが大変でした。 ©makohira2013
18.
私は次の3つの書籍で勉強しました。 ①cocos2dでつくるiPhoneゲーム(工学社) ②Learn cococ2d 2
Game Development for iOS(Apress) ③cocos2dで作る iPhone&iPadゲームプログラミング(インプレスジャパン) ©makohira2013
19.
私は次の3つの書籍で勉強しました。 ①cocos2dでつくるiPhoneゲーム(工学社) ②Learn cococ2d 2
Game Development for iOS(Apress) ③cocos2dで作る iPhone&iPadゲームプログラミング(インプレスジャパン) 最新版に対応しており、 分かりやすいが 情報量が少し足りない。 ©makohira2013
20.
私は次の3つの書籍で勉強しました。 ①cocos2dでつくるiPhoneゲーム(工学社) ②Learn cococ2d 2
Game Development for iOS(Apress) ③cocos2dで作る iPhone&iPadゲームプログラミング(インプレスジャパン) 最新版に対応しており、 分かりやすいが 情報量が少し足りない。 最新版に対応しており、 情報量も十分あるが 英語で書かれている。 ©makohira2013
21.
私は次の3つの書籍で勉強しました。 ①cocos2dでつくるiPhoneゲーム(工学社) ②Learn cococ2d 2
Game Development for iOS(Apress) ③cocos2dで作る iPhone&iPadゲームプログラミング(インプレスジャパン) 最新版に対応しており、 分かりやすいが 情報量が少し足りない。 最新版に対応しており、 情報量も十分あるが 英語で書かれている。 左の書籍の日本語版だが、 cocos2dの最新版に 対応していない。 ©makohira2013
22.
TiledMap マップ用のチップを作成。 テクスチャを作成。 Tiled Mapを作成。 cocos2dを使うと実装がラク。 ©makohira2013
23.
◎マップ用のチップを作成。 画像編集ソフトなどでチップを作ります。 ©makohira2013
24.
◎テクスチャを作成。 TexturePackerというソフトを使いました。 複数のチップ用画像を1枚の画像にしてくれます。 cocos2d用のplistファイルも自動で作ってくれます。 TexturePacker ©makohira2013
25.
◎Tiled Mapを作成。 Tiled Map
Editor(Tiled Qt) というフリーソフトを使いました。 Tiled Qt タイルレイヤーとオブジェクトレイヤー という2種類のレイヤーが結構使えました。©makohira2013
26.
Tiled Qtで保存したファイルは拡張子が(.tmx) というものになります。 このファイルはcocos2dでそのまま利用することができます。 ©makohira2013
27.
tmxファイル、マップチップ用の画像ファイル、マップチ ップ用のplistファイルをプロジェクトに追加し、 次のようなコードを書く。 // TiledMap用のチップ画像の準備 CCSpriteFrameCache *frameCache
= [CCSpriteFrameCache sharedSpriteFrameCache]; [frameCache addSpriteFramesWithFile:@"map_items.plist"]; // TiledMapの表示 CCTMXTiledMap *tiledMap = [CCTMXTiledMap tiledMapWithTMXFile:@"field_map.tmx"]; [self addChild:tiledMap]; ◎cocos2dを使うと実装がラク。 ©makohira2013
28.
tmxファイル、マップチップ用の画像ファイル、マップチ ップ用のplistファイルをプロジェクトに追加し、 次のようなコードを書く。 // TiledMap用のチップ画像の準備 CCSpriteFrameCache *frameCache
= [CCSpriteFrameCache sharedSpriteFrameCache]; [frameCache addSpriteFramesWithFile:@"map_items.plist"]; // TiledMapの表示 CCTMXTiledMap *tiledMap = [CCTMXTiledMap tiledMapWithTMXFile:@"field_map.tmx"]; [self addChild:tiledMap]; ◎cocos2dを使うと実装がラク。 4行で書けます。 ©makohira2013
29.
実行結果 ©makohira2013
30.
TiledMapの表示位置はpositionプロパティで設定できます。 // TiledMapの表示位置を設定 int x
= 84; int y = 19; float mapItemSizeX = (tiledMap.tileSize.width / CC_CONTENT_SCALE_FACTOR()) * tiledMap.scaleX; float mapItemSizeY = (tiledMap.tileSize.height / CC_CONTENT_SCALE_FACTOR()) * tiledMap.scaleY; int itemCountY = tiledMap.mapSize.height; tiledMap.position = CGPointMake(-(x * mapItemSizeX), -(itemCountY - y) * mapItemSizeY); ©makohira2013
31.
実行結果 元の位置 ©makohira2013
32.
実行結果 元の位置 指定した位置 ©makohira2013
33.
makohiraは 今後もスマートフォン向けのアプリ開発 を継続して行っていきたいと思います。 今後ともよろしくお願いします。 ご清聴ありがとうございました。 最後に ©makohira2013
Download now