2014-01-27

Cocos2d-x Error: "Skipping selector 'onPopupYesPressed' since no CCBSelectorResolver is present."

Today, I failed to bind a button and the log said "Skipping selector 'onPopupYesPressed' since no CCBSelectorResolver is present.";

The reason is that simply because I forget to define the "Custom Class" name in CocosBuilder !! =.=

2014-01-23

制作游戏的难点


最近和友人談談各自製作遊戲的情況,發現真有點難; 


難一:難在找到志同道合及能力互補的團隊! 

難二:難在找出好的賣點! 

難三:難在製作出好的體驗! 

難四:難在把抽象的事情具體化!

難五:難在把設計實現出來! 

難六:難在放下主觀想法,拿起玩家的想法

游戏开发是梦幻的工业,这是事实,但是令一个事情,就做出好的游戏,是困难重重的,需要热情和能力兼备; 

真正製作的遊戲開發者,就是在不斷克服困難,不斷改进的勇者們!

2014-01-20

以恩典為年歲的冠冕@2013

剛過了的2013, 神給我和我家很多的恩典:

  • 醫治母親的大病 
  • 幫助天藍媽媽能有力量照顧天藍 
  • 天藍健康快樂地成長 
  • 我們更明白神的話和祂的恩典 
  • 為我們預備了裝修的費用和母親的醫藥費 
  • 轉了新工作,可以多些時間照顧天藍和太太 
  • 賜予我們聰明智慧,處理家事和公事
  • 爸媽租到一間又大又好的屋
  • 我們可以搬去大一點的屋

2013-12-20

2013-12-17

Fixing "cocos-ext.h" not found issue

When using the Cocos2d-extension (e.g ScrollView, Button) on my project, 

I found that it is okay to compile in Xcode but not in Android; 
It said cannot found "cocos-ext.h"

The case is easy because Android.mk in the extension folder is configured wrong;

File location: cocos2d-x/extension/Android.mk

Orignal setting: 
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \
                           $(LOCAL_PATH) \
                           $(LOCAL_PATH)/GUI/CCControlExtension \
                           $(LOCAL_PATH)/GUI/CCScrollView

Correct one should:  $(LOCAL_PATH) is added
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \
                           $(LOCAL_PATH) \
                           $(LOCAL_PATH)/GUI/CCControlExtension \
                           $(LOCAL_PATH)/GUI/CCScrollView

2013-12-12

Setup Android Project on Cocos2d-x 3.0

Important things need to make cocos2d-x android project running

1. Make sure the Android SDK (ADT) and NDK ready 


2. Configure the Android.mk 


Need to config the following variables:

  • LOCAL_SRC_FILES : Because we may have more sources than the "HelloWorld" project
  • LOCAL_C_INCLUDES: The related header files will be searched by the compiler
  • LOCAL_WHOLE_STATIC_LIBRARIES: Our project may not need the sdk given
  • $(call import-module, moduleName) : Need to match with the LOCAL_WHOLE_STATIC_LIBRARIES


3. Configure the AndroidManifest correctly 

Need to config these two variables:

  • <uses-sdk android:minSdkVersion="9"/>  : Need to "9" or above to use Native Activity
  • <meta-data android:name="android.app.lib_name" android:value="App" /> : it will link to your native library called "libApp.so"

4. Copy the java source to proj.android

5. Prepare Eclipse to import the android project


Other Troubleshooting

Unable to load native library: "xxx.so"

Problem: Fail to define the native library
Solution: config the library name correctly in AndroidManifest.xml

For example: your library is libs/armeabi/libGame.so
the value defined in AndroidManifest.xml should be like the following:
<meta-data android:name="android.app.lib_name" android:value="Game" /> 
Note: No need to define the path, extension, and 'lib' prefix;

LogCat said "dvmFindClassByName rejecting 'org/cocos2dx/lib/Cocos2dxHelper"

Problem: Missing the java source folder
Solution:  http://www.cocos2d-x.org/forums/6/topics/36265