cocos2d-x公開講座 in 鹿児島

of 40 /40
cocos2d-x公開講座(3/22) cocos2d-x実践講座(3/23) in 鹿児島 株式会社TKS2 清水友晶

Embed Size (px)

description

cocos2d-x公開講座・ in 鹿児島

Transcript of cocos2d-x公開講座 in 鹿児島

  • 1. cocos2d-x(3/22)cocos2d-x(3/23) in TKS2

2. TKS2(iOS, Android, Windows Phone 8)Web cocos2d-xcocos2d-x Twitter: tks2shimizu Blog: http://tks2.net/memo SlideShare: http://www.slideshare.net/doraemonsss Facebook: http://www.facebook.com/doraemonsss 3. http://cocos2d-x.jp cocos2d-xChukong Technologies cocos2d-x OK!!! cocos2d-x!! https://www.facebook.com/groups/152840204871454/ 4. 3/22 cocos2d-x in 3/23 cocos2d-x in 4/10 shinjuku.cocos2d-xWindowsAndroid 4/17 7 shinjuku.cocos2d-x 5/M shinjuku.cocos2d-xMaciOS 5/M 8 shinjuku.cocos2d-x 6/M shinjuku.cocos2d-xMacAndroid 6/M 9 shinjuku.cocos2d-x 5. 3/22() cocos2d-x WindowsAndroid CocosBuilder CocosBuilder 3/23() CocosBuilder 6. cocos2d-x 7. cocos2d-x 2D MIT Android, iOS, 7 Win32, Mac, Linux C++, Lua, Javascript TestCPP 8. WindowsAndroid 9. cocos2d-x cocos2d-x Android SDK + Eclipse Android NDK Cygwin Java python Eclipse Android 10. cocos2d-x cocos2d-xhttp://www.cocos2d-x.org/projects/cocos2d-x/wiki/Download /Users/Sumomo/cocos2d-2.1rc0-x-2.1.2 11. cocos2d-x Android SDK + Eclipsehttp://developer.android.com/sdk/ C:adt-bundle-windows 12. cocos2d-x Android NDKhttp://developer.android.com/tools/sdk/ndk/ C:android-ndk-r8d 13. cocos2d-x Cygwinhttp://cygwin.com/install.htmlsetup.exe 14. cocos2d-x Cygwin make 15. cocos2d-x Javahttp://www.oracle.com/technetwork/java/javase/downloads/index.html Java 16. cocos2d-x Pythonhttp://www.python.org/download/ Python 17. cocos2d-x PATH Cygwin/cygdrive/c/cygwin/bin JavaC:Program FilesJavajre7bin pythonC:Python27 Cygwin C:cygwinetcfstab1 none /cygdrive cygdrive binary,noacl,posix=0,user 0 0 18. cocos2d-x Eclipse Eclipse ADT(Eclipse) > General > Workspace > Linked Resources COCOS2DX cocos2dx C/C++ > Build > Environment NDK_ROOT Android NDK CYGWIN nodoslewarning libcocos2dx File > New > Project cocos2d-2.1rc0-x-2.1.2/cocos2dx/platform/ android/java 19. cocos2d-x SDK ManagerC:adt-bundle-windows/SDK Manager.exe Android 2.2 (API 8) SDK Platform 20. cocos2d-x project-creator cocos2d-2.1rc0-x-2.1.2/tools/project-creator/ create_project.py cd cocos2d-2.1rc0-x-2.1.2/tools/project-creator/ create_project.py ./create_project.py -project MyProject -package net.tks2.myproject -language cpp -project -packege -language (cpp, lua, javascript) cocos2d-2.1rc0-x-2.1.2/projects 21. cocos2d-x Eclipse File > New > Project Android > Android Project from Existing Code Android Run > Run 22. CocosBuilder 23. CocosBuilder http://cocosbuilder.com cocos2dGUI (MIT) CocosBuilder 3.0 Alpha JSB(Javascript bindings) CocosPlayer (for JSB) cocos2d-xcocos2d-iphone cocos2d-xCCBReader CocosBuilder User Guide cocos2d-xTestCpp 24. CocosBuilder TestCppCocosBuilder CocosBuilder cocos2d-2.1beta3-x-2.1.1/samples/Cpp/TestCpp/ Resources/CocosBuilderExample.ccbproj iOS cocos2d-2.1beta3-x-2.1.1/samples/Cpp/TestCpp/ proj.ios/TestCpp.xcodeproj 25. CocosBuilder 26. CocosBuilder1 JSBcocos2d-x cocos2d-2.1beta3-x-2.1.1/samples/Cpp/TestCpp/Resources/CocosBuilderExample.ccbproj 27. CocosBuilder2 28. CocosBuilder http://tks2.net/nyanrun/images.zip 29. CocosBuilder 30. 31. CocosBuilder 480 x 320 CocosBuildercocos2d-x http://tks2.net/nyanrun/images.zip 32. (1) CocosBuilder CocosBuilder cocos2d-x bg1.png Pos(%)x=0:y=100, Anc x=0.0:y=1.0 bg2.png Pos(%)x=0:y= 25, Anc x=0.0:y=0.5 bg3.png Pos(%)x=0:y= 0, Anc x=0.0:y=0.0 cat_normal.png Pos(%)x=25:y=35, Anc x=0.5:y=0.5 Xcode ccbi AppDelegate.cpp 33. (2) CocosBuilder CCMenu Pos x=0:y=0, Size(%)x=100.0:y=100.0 CCMenuItemImage Pos(%) x=40:y=15 Selector:tappedLeftFoot Target:Document root Normal CCMenuItemImage Pos(%) x=60:y=15 Selector:tappedRightFoot Target:Document root CCLayer Custom Class:GameLayer SelectedDisabled Xcode GameLayerLoader.h GameLayer.h GameLayer.cpp AppDelegate.cpp 34. (3) CocosBuilder bg1.png Doc root var: mBg1 bg2.png Doc root var: mBg2 bg3.png Doc root var: mBg3 cat_normal.png Tag: 1 Xcode GameLayer.h GameLayer.cpp 35. (4) CocosBuilder () CCNode Pos(%) x=25:y=35, Size W=72:H=123, Anc x=0.50:y=0.50, Tag:1 cat Pos(%) x=50:y=25, Anc x=0.50:y=0.25 cat Default Timeline (duration 00:00:20) 00:00:00 Rotation = 3 00:00:10 Rotation = -3 00:00:20 Rotation = 3 Chained Timeline Default Timeline 36. (5) CocosBuilder () Leftfoot (duration 00:00:10) Rightfoot (duration 00:00:10) Tumble Normal Goal (duration 00:00:15) Xcode GameLayer.h GameLayer.cpp AppDelegate.cpp 37. (5) Leftfoot 00:00:00 Sprite frame: cat_leftfoot.png 00:00:00 Position: (%) x=50:y=25 00:00:05 Position: (%) x=50:y=27 00:00:10 Position: (%) x=50:y=25 Rightfoot 00:00:00 Sprite frame: cat_rightfoot.png 00:00:00 Position: (%) x=50:y=25 00:00:05 Position: (%) x=50:y=27 00:00:10 Position: (%) x=50:y=25 38. (5) Tumble 00:00:00 Sprite frame: cat_tumble.png 00:00:00 Rotation: 90.0 Goal 00:00:00 Sprite frame: cat_goal.png 00:00:00 Position: (%) x=50:y=25 00:00:05 Position: (%) x=50:y=33 00:00:10 Sprite frame: cat_goal.png 00:00:10 Position: (%) x=50:y=25 00:00:11 Sprite frame: cat_normal.png Chained Timeline Goal 39. (6) CocosBuilder Doc root var: mTime Doc root var: mDistance Selector:tappedReset NormalTarget:Document root Doc root var: mLeftButton Doc root var: mRightButton Selected Xcode Disabled GameLayer.h GameLayer.cpp 40.