Cocos2d-x 3.0 game instance study notes "parkour" transplanted to android phone
(Here is the reference: Xiaofeng residual month predecessors blog, he is the teiran network of the parkour tutorial, with the cocos2d-x 2.X version of rewriting, I am learning cocos2d-X3.0 so I will use cocos2d-X 3.0 rewrite, take notes
Well, since the conclusion of the previous "parkol", nothing has been done, mainly to fix a few bugs and make corresponding changes in the relevant articles. However, what is the significance of watching and playing on windows !!! As a result, I tried to get it on my cell phone again -- OK, the newborn calf is shameless. Oh no! Not afraid of spraying. Here we will record my porting process. (The new resources are used here. All packages will be provided later)...
Here we mainly talk about several things:
1. A little trouble
2. simple and crude Transplantation
3. Preparations for porting ----- how can we successfully transplant data?
Check out my mobile phone:
VcTHwO/logs + outputs/outputs + outputs/WFuZHJvaWS1xNChu + outputs ++ zcC0v7S/outputs + outputs/YgvNPI67XayP23vb/inputs + qob7P7sS/xL/CvKG/XHByb2ouYW5kcm9pZFxqbmkgwO/fuse/t9bKx9Do0qrM7bzTtcS0 + sLrCjxwcmUgY2xhc3M9 "brush: java; "> LOCAL_PATH: = $ (call my-dir) include $ (CLEAR_VARS) LOCAL_MODULE: = cocos2dcpp_sharedLOCAL_MODULE_FILENAME: = libcocos2dcppLOCAL_SRC_FILES: = hellocpp/main. cpp \.. /.. /Classes/AppDelegate. cpp \.. /.. /Classes/Base. cpp \.. /.. /Classes/BaseManager. cpp \.. /.. /Classes/Coin. cpp \.. /.. /Classes/GameOver. cpp \.. /.. /Classes/MainScene. cpp \.. /.. /Classes/PlayScene. cpp \.. /.. /Classes/Rock. cpp \.. /.. /Classes/Runner. cppLOCAL_C_INCLUDES: = $ (LOCAL_PATH )/.. /.. /Classes \ $ (LOCAL_PATH )/.. /.. /cocos2d/cocos/2d /.. /.. /extensions \ LOCAL_WHOLE_STATIC_LIBRARIES: = libraries ++ = libraries + = cocos_extension_staticinclude $ (BUILD_SHARED_LIBRARY) $ (call import-module, 2d) $ (call import-module, audio/android) $ (call import-module, Box2D) $ (call import-module, extensions)Note that the corresponding code is added here. Don't get some new lines or something .. I am not familiar with this, but it seems that there were too many line breaks in the compilation process. 2, then cmd to the project directory, enter cocos compile-p android-j 10
OK .... That's simple ..... Then, you can wash and sleep... This compilation took over a dozen or even 20 minutes and then appeared similar to the following: (here I stayed here) I mainly saw: BUILD SUCCESSFUL. Congratulations, you have compiled it successfully.
Then you can go to the project directory \ proj. android \ bin to see a Run-Debug.apk... You can copy it to your cell phone ....
OK. Here we mainly want to talk about the fact that no third-party library or anything else is used in games... You do not need to modify Android. mk .. For example, we use the Extension library in the game (I don't know if it's a third-party library)... so we need to modify Android. mk to add something .. Most of these things are available online ....
Okay .. It's over my personal ignorance. Thank you for your correction and discussion!