When I was starting Cocos2d-x, I found it very very hard to find supporting documentation and tutorials for beginners. There are some but most of them are outdated and/or unapplaicable to version 2.0.So I decided to make my own tutorial for the latest version of Cocos2d-x and Android SDK. Now, let’s get started. We need to set up a few things first before we can actually work on a cross-platform mobile game.
The COCOS2D-X Library
Create professional Cocos2d particle emitters for iOS and macOS. “I have been making console games for 12 years and this puts some of the particle editors I have seen to shame.” – Mac App Store review. Customize over 35 emitter properties by using the sliders or fine tune it with exact numbers. First of all, Cocos2d-X is included as a sub-project. It makes available many different targets that can be built and included in your game. These include the cocos2dx library for iOS & Mac, the CocosDenshion sound engine for iOS & Mac, the Box2d & Chipmunk physics engines, and many other libraries.
In order for us to make a cross-platform game, we need to get the Cocos2d-x library and install in your Mac.
1. Download the library here. The link will take you directly to the official Cocos2d-x download, so just save the ZIP file when you are prompted. NOTE: I am using Cocos2d-x v2.0.4 for this tutorial.
2. Unpack the ZIP file to a location of your choice. I recommend putting it in an easily accessible place. Rename it as you wish but it would be better to just leave it be once you unpacked it. For this tutorial, we will assume the path to which the library is located would be /Users/LGDev/Documents/cocos2d-x and I’ll refer to this as the Cocos2d-x Root.
3. Now open up the Terminal and change the directory to the Cocos2d-x Root using the cd command. Like so:
4. When inside the Cocos2d-x Root run the install-templates-xcode.sh using the sudo command, like so:
You might be asked for a password so just enter your password if you are asked. You might need admin permission to continue.
5. Once that is done, open up Xcode and create a new project. On the left side of the dialog box, you will find cocos2d-x listed under iOS. Select it and you will are all the templates installed for cocos2d-x. Choose cocos2dx and click Next. Xcode will now make your new cocos2d-x project.
6. If you want, try to run it and you will see the Hello World application pop up on the screen.
The Hello World project in action.
You might also want to go back to the Terminal and edit your .bash_profile. Type in this command:
It will open up the GNU NANO tool. Find an empty line and export a variable pointing to your Cocos2d-x Root.
7. Once that is done, the Cocos2d-x library is now installed on your machine. The next step is to set up your machine for Android development. To do this, we must install the Android SDK and NDK on your machine, as well as the IDE we’re going to use, which is Eclipse.
The Android SDK and NDK
Before proceeding, check if your JDK is installed and is greater than 1.6.0. Open up the Terminal and type in:
You should see something like this:
Once you’ve checked it, you can start setting up your Mac for Android Development.
1. Get the SDK from here.
2. Once the download has been completed, unpack it on a safe place. For this tutorial, we will assume our SDK is on /Users/LGDev/Documents/AndroidSDK and I’ll refer to this as the Android SDK Root.
3. Go to the Android SDK Root, tools folder, and run the android executable file. This will open up the Android SDK and the Android Manager. Alternatively, you can run the android executable file via the Terminal.
Locate the tools folder and open the Android Manager App
4. On the Android Manager, check Tools and all the Android API you want to work on. You might also want to check Extras. Once that is done, click Install Packages… and you will be presented by a dialog screen. Click Accept All and then Install to start the installation. Wait for the installation to finish.
Use the Android Manager to download the Android API you need.
5. Next, get the Android NDK from here. Download the Mac version of the NDK. Once the download is done, unpack the NDK and put it in an accessible place, preferably in the same folder as the Android SDK Root. For this tutorial, we will assume the Android NDK is on /Users/LGDev/Documents/AndroidNDK and I’ll refer to this as the Android NDK Root.
6. Download Eclipse from here. The Classic Version is the most recommended one. Mini pc thunderbolt 3. I am using Helios but you can use the latest one (Juno as of writing).
7. Unpack Eclipse and run it. You might want to put it on the Desktop or on the Dock for easier access.
Music for mac. Browse and download Music apps on your Mac from the Mac App Store. The Mac App Store has a wide selection of Music apps for your Mac. Looking for the best Mac music-production software? We compare the best alternatives to Apple's free music-making app GarageBand, including Logic Pro X, Ableton, Cubase, Audacity and more. In the Music app on your Mac, do any of the following to find music you want to add or download. View recommendations tailored for you: Click For You in the sidebar on the left, then scroll through the various categories such as Recently Played and If You Like. See what’s new in Apple Music: Click Browse in the sidebar on the left, then click a category (New This Week, Music by Mood, and so. Apple Music is a streaming service that allows you to listen to 70 million songs. Its great features include the ability to download your favorite tracks and play them offline, lyrics in real time, listening across all your favorite devices, new music personalized just for you, curated playlists from our.
8. On Eclipse, go to Help > Install New Software… and you will see a new window pop up.
9. We’ll first set up Eclipse so that it can read C++ codes. On the Install window, on the Work With box, select your Eclipse version.
10. Wait for the list to be populated and select Programming Languages > C/C++ Development Tools and click Next.
11. Follow the process until it is done. You will have to restart Eclipse once the plugins are installed for it to take effect. Do so and proceed.
12. Go back to Help > Install New Software… and you will be presented back to the Install window.
13. This time, we will install Android plugins. Click Add and put https://dl-ssl.google.com/android/eclipse/ on the Location box. Give it a distinct name like Android for Eclipse.
14. Wait for the list to be populated and click Select All. Click Next and follow the instructions in the wizard to install the Android plugins. You will have to restart Eclipse afterwards. Do so and proceed.
15. We’re now ready to start developing cross-platform games using Cocos2dx. However, we need to do a bit of a tweak just so that everything goes smoothly. Open up the Terminal and enter the following commands:
The GNU NANO Tool will show up. Find an empty line and add these lines:
Don’t forget to change the values to your Android SDK Root and Android NDK Root. We will need these variables later on.
We now have set up your Mac for cross-platform development using Cocos2dx. The next step is creating a cross-platform project that synchronizes on both Xcode and Eclipse, with Cocos2dx of course.
I hope you found this tutorial useful. I will link this to the next step Creating a cross-platform project on Eclipse and Xcode. Stay tuned!
mindnowbot.netlify.com › ► ► ► Cocos2d Lua Mac Cocos2d Lua For Mac ► ► ►
Cocos build for Atom Runs cocos2d-x tasks like build, deploy, run, and release in the Atom editor. And captures build and runtime errors. This package requires and to be installed. How It Works A project are consider as a cocos2d-x project if there is a.cocos-project.json at project root. And it takes projecttype key in this file for the project type ( cpp lua js). For Run simulator without build tasks, it find simulator executable name in:.
initcfg.name in config.json for lua projects. name in manifest.webapp for js projects. And runs debug build executables create by cocos compile -p mac win32 as simulator. Do make sure the above config are correct for your project and cocos compile -p mac win32 commands works well. Features Add Build Targets for Cocos2d-x Projects Supports run build, deploy, run, and release tasks inside Atom.
Build targets for a Lua project: Captures Build and Runtime Errors. Captures build errors and Lua script runtime errors. Provides error link to source code. Cpp build errors: Lua runtime errors: Support Additional Configure in.cocos-project.json Additional key for.cocos-project.json:.
androidABI: Set APPABI for Android build, multiple abi can be set like armeabi-v7a:x86. Default armeabi. Design approach for mac free.
androidStudio: Set true to build Android Studio project in proj.android-studio rather than proj.android. Default false. iosCodeSignIdentity: iOS code sign identity used to run iOS: Release target. IPhone Distribution: xxx. luaEncrypt: Set false to disable encryption of Lua scripts when run Release targets.
Cocos2d Macos
Cocos2d Lua Mac Cocos2d Lua For Mac Free
Default true. luaEncryptKey: The key used to encrypt Lua scripts when run Release targets. Default 2dxLua. luaEncryptSign: File signature for encrypted Lua script files when run Release targets. Default XXTEA Setup. Install and this package apm install build build-cocos.
To setup cocos path you have two options either:. In Atom - Preferences. Packages - build-cocos - Settings - Set the Global cocos console path. Eg: /Users/xpol/Workspace/cocos2d-x/tools/cocos2d-console. Have a project local copy of cocos-console in you project in framewroks/cocos2d-x/tools/cocos2d-console. For Lua project.
You need (up vote this to make it official) to run simulator and captures the runtime Lua errors. Set Lua package path to have src/?lua; rather than add src/ to FileUtils' search path, see example main.lua. Make a xpcall to your main function and call os.exit(1) in error handler. See example main.lua. After that, in Atom open you project root directory which contains.cocos-project.json, run cmd-alt-t / ctrl-alt-t / f7 to displays the available build targets. Set.cocos-project.json:. Set iosCodeSignIdentity if you needs build iOS release ipa.
For lua projects, set luaEncrypt luaEncryptKey and luaEncryptSign to enable encryption for Lua scripts. Android projects, set androidStudio if you want build in project in proj.android-studio.
. Cocos2d-x is an open source game framework written in C, with a thin platform dependent layer. It can be used to build games, apps and other cross platform GUI based interactive programs. Brand New Graphic Renderer: The Cocos2d-x renderer is optimized for 2D graphics with OpenGL. It supports Skeletal Animation, Sprite Sheet Animation, Coordinate systems, Effects, multi resolution devices, Textures, Transitions, TileMaps and Particles. It adopts a RenderQueue design. Performance: supports auto-batching, auto-culling and caching transform, games are running 1x20x faster.
C 11 features: take advantage of the awesome Lambda functions, override and final, template container, auto, threads, smart pointers and move semantics. Cocos2d-x+Lua. Cocos2d-JS is Cocos2d-x engine's javascript version. It supports full Cocos2d-x functionality with a set of simplified javascript friendly APIs. Cocos2d-JS provides a consistent development experience for whichever platform you want to distribute to, either web and native. 'Code once, run everywhere' is incredibly easy and natural in Cocos2d-JS.
Cocos2d For Mac Tutorial
With one a single javascript code base, you can run your game in web browsers and on native platforms including Mac OS X, Windows, iOS and Android. Your game can be published on all major app stores as well as other distribution channels. Furthermore, the javascript friendly API makes your game development experience a breeze, easy to code, test and distribute.
Cocos2d Lua Mac Cocos2d Lua For Mac
Cocos2d-JS also offers Cocos Console, a script tool, to simplify the creation of projects and let you start coding right away. Cocos Studio is a free and professional game development toolkit, that enables game developers to quickly create game content, and and takes that tedious work and simplifies it with straightforward GUI editors. Cocos Studio includes 4 core game development editors: UI Editor, Animation Editor, Scene Editor and Data Editor., Developers can focus on their specific roles and enjoy better streamlined workflow. This enables game studios to collaborate with ease, and focus on what each does best in order to achieve better quality and faster turnaround time.