{"id":13934,"date":"2023-03-04T18:55:20","date_gmt":"2023-03-04T18:55:20","guid":{"rendered":"https:\/\/anivalegames.com\/?p=13934"},"modified":"2023-03-04T18:59:28","modified_gmt":"2023-03-04T18:59:28","slug":"how-to-port-cocos2d-x-game-to-axmol-game-engine","status":"publish","type":"post","link":"https:\/\/anivalegames.com\/2023\/03\/04\/how-to-port-cocos2d-x-game-to-axmol-game-engine\/","title":{"rendered":"How to port Cocos2d-x game to Axmol game engine"},"content":{"rendered":"\n
<\/p>\n\n\n\n
Cocos2d-x is an open-source game development engine that supports multiple platforms, including iOS, Android. and now they have stopped giving future updates.<\/p>\n\n\n\n
You might wonder what happens for cocos2dx projects.there no issue if you are not giving updates for the game.<\/p>\n\n\n\n
If you want game engine updates and issue fixes. We have found a fork of cocos2dx v-4 with the new name Axmol Game Engine here we have developer support. And regular Bug fixes.the major purpose.<\/p>\n\n\n\n
Creating A New Project<\/strong><\/p>\n\n\n\n Using a console window, the command to generate a new project is as follows:<\/p>\n\n\n\n axmol new -p YOUR.UNIQUE.ID -d PROJECT_PATH -l [cpp|lua]<\/p>\n\n\n\n and then copy the following files from the Cocos2d-x project to the Axmol project:<\/p>\n\n\n\n 3. proj.android directory -> don\u2019t replace the whole directory u need<\/p>\n\n\n\n and activity files and icons as well Step 3: Building in xcode project<\/strong><\/p>\n\n\n\n After copying the necessary files to the Axmol project, it’s time to modify the project files. But to modify the files you may need .xocdeproj for that u need to build based which device or simulator you will be working<\/p>\n\n\n\n => The axmol engine building project will be using cmake.<\/p>\n\n\n\n Ensure xcode12+ & cmake3.21+ are installed, install cmake command line support: sudo “\/Applications\/CMake.app\/Contents\/bin\/cmake-gui” –install<\/p>\n\n\n\n Generate the relevant xcode project using one of the following commands:<\/p>\n\n\n\n Step 4: Modify the project files<\/strong><\/p>\n\n\n\n After copying the necessary files to the Axmol project, it’s time to modify the project files to work with Axmol. Here are the changes you need to make:<\/p>\n\n\n\n Step 4: Modify the resource loading code<\/strong><\/p>\n\n\n\n The next step is to modify the resource loading code to work with Axmol. In Cocos2d-x, you can load resources using the cocos2d namespace cocos2d::Sprite::create function. In Axmol, you need to use the axmol::Sprite::create function instead.<\/p>\n\n\n\n And whenever you add the new class or resource file in the resources folder u may need to rebuild xcode project as given in <\/em>step 3. <\/em><\/strong>New class file you have to add in cmakelist file. if you miss the build u cant use the resource that you are Added to.<\/em><\/p>\n\n\n\n Once you’ve completed all the steps above, you should be able to run your Cocos2d-x game using Axmol Game Engine. Keep in mind that some features in Cocos2d-x may not be available in Axmol, so you may need to modify your code accordingly.<\/p>\n\n\n\n In conclusion, porting Cocos2d-x to Axmol Game Engine is not a complicated process. With some basic knowledge of C++, and game development, you can easily modify your Cocos2d-x project to work with Axmol. By following the steps outlined in this guide, you should be able to get your game up and running on Axmol in no time.<\/p>\n","protected":false},"excerpt":{"rendered":"Cocos2d-x is an open-source game development engine that supports multiple platforms, including iOS, Android. and now they have stopped giving future updates. You might wonder what happens for cocos2dx projects.there no issue if you are not giving updates for the…","protected":false},"author":1,"featured_media":13936,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[73,72],"_links":{"self":[{"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/posts\/13934"}],"collection":[{"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/comments?post=13934"}],"version-history":[{"count":1,"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/posts\/13934\/revisions"}],"predecessor-version":[{"id":13935,"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/posts\/13934\/revisions\/13935"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/media\/13936"}],"wp:attachment":[{"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/media?parent=13934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/categories?post=13934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anivalegames.com\/wp-json\/wp\/v2\/tags?post=13934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}} add dependencies in gradle files and modify manifest file\n<\/pre>\n\n\n\n
4. proj.ios_mac directory -> here u just add the files which ever<\/p>\n\n\n\n required into new axmol project\n<\/pre>\n\n\n\n