Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


I ported cocos2d-x( or cocos2dx? that is one of the famous game libraries)'s "chipmunk" & "BOX2D"
to the Android Apps(applications) as to work. ( Movie → )

NOTE : HWc&h = HelloWorldScene.cpp and HelloWorldScene.h ( are "C++(cpp & h) files". )
, Ap = , A =  ( are "mk files". )
Dir(fld) = Directory(or Folder) , j = jni(Dir) , h =  helloworld(Dir) , C = Classes(Dir)
, H = HelloWorld(Dir(fld). TopDir of this changing&creating , not "helloworld(Dir)" above. )
, a_in_t = android(Dir(fld)_in_template(Dir(fld) other than(outside) HelloWorld Dir(fld). )
     /    B2D = Box2D(Dirs or files)
version→ 1112 13beta
intoH Dir "HWc&h" inC(in H)Dir(=2) "HWc&h" inC(in H)Dir(=2) "HWc&h" inC(in H)Dir(=2) ,←All are the same
"A" inC /Ap&A in j / A in h(inj) "A" inC /Ap&A in j / A in h(inj) =6 "A" inj(Ap no changed/No Ain h(inj)&in C) =3
( & "Only 11(except 12or13b)Box2D's Box2D" Dir(on the outside of HDir)ectry are copied into C(in H)Directry. )
into t Dir "Ap" in t =7(&1 Dir(v11 B2D))
*** 1. At the 1st,Create **xCode's cocos2d-x files** by **** in a Dir(fld) of 11 or 12 or 13beta that is one of Dirs(flds) maked by **" the downloaded from and extracted zip file(s) "** . **(** Each xCode's cocos2d-x files(of 11,12,&13beta) create by **"./ -uf "**    within each Dir(fld,of 11,12,&13beta from as above.    In addition , not only these files   that are created, **xCode's working also will change** to behavior of the each version of the files created. However,    their **xCode types**(files&working) **can be changed to other xCode files** by **"-uf**( above)**"**, **any time quickly & freely. )** And also you may have to use each files of chipmunk or Box2D that you want to create, but **only enough to use the "2." files** that downloaded in "this page" **as below.** **( This reason of enough is** also mentioned in next **2.** as follows:i.e. " **B2D** files of no change **aren't be downloaded** ". **)** 2. Change & copy some of **"1.** (above.   =(equal) the **chg**(change)**© list** at the beginning**)" .** It should be noted that **these "chg© list files** (of the changed files from the original files**(except B2D** files)**)" are downloaded in "this page"**. If you use them , **apps can be created soon and quickly**.   Moreover , **the changes are minimum changes as can (** and many changes of the files have been **added annotation**(e.g."# ~ 1205110818 chg ~ ). **) .**   Because I believe very safe that "anyone **can be easy to understand the changes** , not only can create apps soon & quickly ". ( So **B2D** files of no change **aren't be downloaded** in "this page"**.  save Android files of A. below & copy** into position. ) 3. **The way of these porting and Description of** **the minimum changes(& difference of each cocos2d-x files** of versions and types(chipmunk&B2D and android&xCode) **)** as follows.      (   **the way of these porting are bold.**      /      description of difference aren't not bold.   )
(A(=1. & continuation of 1. )) After "1."as above
(i.e. after creating xCode's files of versions and types that you want to create),
please also create android's cocos2d-x files of versions and types that you want to create
by Incidentally, I think no need particularly for descriptions
about modifing "NDK_ROOT_LOCAL" and "ANDROID_SDK_ROOT_LOCAL" at the beginning of
this "" because many descriptions already exist in various other places.
Such as NDK_ROOT_LOCAL="/home/laschweinski/android/android-ndk-r5"( → "/xxx/android-ndk-r(6,7etc)")
ANDROID_SDK_ROOT_LOCAL="/home/xxxxx/android/android-sdk-linux_86"( → "/Applications/android-sdk")
and "the created files of the name that you want to create are used (C) below.
And then,
If you will create App of the later than varsion 11(equal 12,13beta...,in all types(B2D&chipmunk))
Please Change
at the beginning of "" as "NEED_BOX2D=true or NEED_CHIPMUNK=true".
(Be careful if it does not, you can't create App of the later than varsion 11 in all types at all.)

(B(=2.)) Please copy the files that are on the "chg© list" as of the list. By the way, In All versions(as 11,12,and 13beta) which are created by "", 11 includes a "Resourace" directory but it's "(ending in s and) Resources" in 12 and 13b. (As a result, "A in C"( = in C((lasses in H(lloWorld))Dir(ectry)) ) of 11   are only differd , among the "mk.files". ) However, the contents in each Directories(Not only for all versions(11-13b),all types(B2D&chipmunk), too.) are almost the same except that " 12 and 13 don't exist the icon.png but exist the font Dir,     on the contrary, only 11 don't exists the font Dir but exist icon.png ". That's why all you need to do is copy the contents in the "Resource(s)" Dir(ectry) to the "Resource(s)" Dir(ectry) in C((lasses in H(lloWorld))Dir(ectry)) that you want create. ( As an aside,  Not only the files described in the above list,     you can be downloaded "several types of image files (for B2D)" in this page.   These can be chenged as you modify HelloWorldScene.h(of HWc&h files) any time quickly & freely. ) And only if you want to use B2D, each person please save xCode's files of 1. above and copy into position such as sorry in repeating. ( Besides, also as an aside,     HelloWorldScene.cpp( among the HWc&h( = HelloWorldScene.cpp and HelloWorldScene.h) )   are used in each cocos2d-x files of versions and types( = chipmunk & B2D and android & xCode ).     All of them already have been fixed for all type and version. but HelloWorldScene.cpp   for each types( = chipmunk or B2D ) are not changed at all and used in exactly the same content     except that 11 and 12 are "CCPoint point = touch->locationInView(touch->view());"   but only newest 13beta is without "touch->view()" as "CCPoint point = touch->locationInView();".           )
(C) After(A)and(B), prease move to the inside of "android Dir" in "a Dir of the name that you want to create" in "android's cocos2d-x Dir( that you want to create)" and compile using "./". I think you create the completed App as above.

(C'(C2) = a supplementary explanation.   as not same as     " the way of these porting are bold.   /   description of difference aren't not bold. "  above. )
If your created App remains named "Hello World", You need to move to the inside of "android Dir" in "H(HelloWorld)Dir" such as (C) above and modify "NDK_ROOT_LOCAL" and "COCOS2DX_ROOT_LOCAL" at the beginning of "" in this "android Dir". such as NDK_ROOT_LOCAL=/cygdrive/d/programe/android/ndk/android-ndk-r6b(→/xxx/android-ndk-r(6,7etc)) COCOS2DX_ROOT_LOCAL="/home/xxxxx/android/android-sdk-linux_86"(→(the pass of android's cocos2d-x) ) and compile using this as "./"(such as (C) above). or ( Although I am sorry a little that I don't check and try still firmly in fact, ) Using "perl -i -p -e 's/HelloWorld/the_name_that_you_want_to_create/g' `find . -type f`" in H(HelloWorld)Dir and renaming "HelloWorld" to the name that you want to create and compiling with using this as "./"(such as (C) above) is also may be possible. Maybe You're easier the way as above, but the way isn't create e.g."proguard.cfg"(as perhaps preventing to recompile the "apk" file). ( If you only changed the name of App that you want to create,     The easiest and most effortless way, might be "only the modifying of string.xml ". )
The app of 13 beta version might be that "display isn't made some changes at the time of the screen changes". All of the version 13 beta sample ( e.g. "HellowWorld" and not only "HelloWorld"("HelloLua" and "test", and others) that contains from the present, it may be so.       " Please refer to this video. →"
You can’t perform that action at this time.