Code IDE Framework Mode or Engine Mode

@CitizenK

This is how i create v3.7 project in Mac

  1. Download Cocos v2.3.1 from http://www.cocos2d-x.org/download
  2. Install the Cocos v2.3.1
  3. Download and install Cocos Framework 3.7
  4. Download and install Cocos Code IDE 2.0.0 beta
  5. Open Terminal and use setup.py in Cocos Framework 3.7 to setup.
    /Applications/Cocos/frameworks/cocos2d-x-3.7/setup.py
  6. Create a new project with Cocos Code IDE 2.0.0 beta.

You may need to configure Cocos Code IDE about the Cocos framework v3.7.

Preferences->Other Settings->Cocos Framework->Framework Mode
Framework = /Applications/Cocos/frameworks/cocos2d-x-3.7
Simulator = /Applications/Cocos/cocos-simulator-bin
  1. Create a new project with Cocos v2.3.1
  2. Copy .idea folder from the folder created by Cocos Code IDE to Cocos v2.3.1 project.

You can now code and debug with Cocos Code IDE or Xcode.

Hope this help.

1 Like

Thanks a lot. This works for IntelliJ with Cocos Plugin as well. Seems it’s important to download the framework version with Cocos, instead of the version from the website download.

Thanks for all the replies @Zinitter and @CitizenK . These notes are really helpful!

I’m gonna use Framework for sure, less disk space and I want the same up-to-date framework on all projects. I am currently using Code IDE 1.2.0 but now I know Cocos Framework 3.7 won’t work without updating to Code IDE 2.0.0 beta but I don’t want to use the beta version since I can’t compile/publish with it.

I’m not really familiar with how to use the Cocos Console. As for Cocos Studio I guess I can figure that out by playing around with it.

I’m thinking of switching from Cocos Code IDE to using IntelliJ with Cocos Plugin now and there’s also WebStorm. I really do want to be able to create a project, compile/test and also publish on mobile platforms.

Any tips on which approach/IDE I should use guys? Thanks again guys for your input.

As far as I know, the Plugin doesn’t work with Webstorm. You need the full IntelliJ Ultimate - but you can test it for 30 days, if I remember correctly. Testing works fine, at least in theory as the Android runtime from 3.7 keeps crashing on me (including freezing IntelliJ).

I haven’t tried to make an apk for publishing yet, so I don’t know if this will work - but there is a good chance it won’t. Worst case you can make a copy in a second project directory with the command line tools and compile it there. I actually even prefer them over a full IDE, as the command line procedure doesn’t change every other week, like the IDE stuff seems to.

I see. That is pretty insightful but it seems that there are a lot of crashes going on with Android.

So what’s the proper process that many other developers use then? How do they test on Android? I’m new to Cocos and I’m trying to figure out the best practice to build a simple game.

I’ll do some reading online about it too but just thought I’d ask you guys here.

@Zinitter thanks for the step by step procedure on building a cocos project/game but here’s my dilemma: Code IDE 1.2 has code-completion but doesn’t work with framework 3.7 then Code IDE 2.0 works with framework 3.7 but from what I read it does not have working code-completion.

For current moment, i still using Code IDE 1.2.0 with framework v3.6.1 for debug and testing.

If the coding is complete, then i just copy those source files to the v3.7 project and test.

I do found some crash with v3.7 but not v3.6.1 on cc.DrawNode.drawSegment by passing NaN value into the function. Other than that, my project working fine in both version.

I’m not good in debug Android. But what version of framework you using with your project before v3.7?
It don’t have the crash problems?

To publish with Cocos Console, you can read my other post

I have lots of issues with 3.7.

IntelliJ and iOS simulator crashes after 5 seconds - even with an empty project.

Android Device with simulator works one time. Stopping and restarting crashes Android device and freezes IntelliJ. Even with an empty project.

Running a project with Clipping Nodes in Chrome occasionally even crashes my Mac completely.

Only the Mac version works fine without any issues.

So 3.7. is pretty much not usable for me.

I didn’t test with empty project, but my projects are working fine in Mac/Android/iOS.

I suggest you code with Cocos framework v3.6.1 if that version work fine.

I’m also currently using Code IDE 1.2.0 with Cocos2d-JS framework v3.6.1. I’m having some issues running it and debugging so maybe I’ll copy the src files into a framework 3.7 project like you do and see if that works. I’m trying to follow the Parkour Tutorial but run into an issue when I complete step 4.

@CitizenK is cmd procedure the same as Cocos console? Or are those 2 different things?

It’s the same. 3.6.1 works very well with IntelliJ & Plugin btw. Just the clipping nodes are bugged in 3.6.1, which is quite a pain as I need them. But they are bugged in 3.7 as well, so the update wouldn’t help me anyway.

@CitizenK

What problem are you facing with the clipping node?

I do found that clipping node crashed on iOS but i don’t know why it crashed.

I get lots of crashes related to clipping. Running it in intelliJ with Chrome even managed to crash and reboot my Mac, with 3.7.

In 3.6.1 (and 3.7) the positioning of clippings doesn’t work. The stencil will always stay at 0,0. As I would like to use clippings to make some background animations with rotating primitives, it’s currently a no go. While the sprites can be positioned, rotated and moved, any clipping always remains at 0,0.

I don’t mean to be super picky but there are two different Cocos2d-x v3.7 frameworks in the Cocos Store. There’s “Cocos Framework 3.7” Size 257MB and then there’s “Cocos2d-x v3.7” Size 365MB.

I just wanna make sure I don’t download the wrong one and then as a result run into other issues that will take me time to work around.

@CitizenK
The clipping node do no crash on Mac and Android.

The positioning of clipping node is a bit complicated. But it should able to change position.
Try put it in a cc.Node as parent and positioning the parent node.

@efares
Use Cocos Framework 3.7 Size 257MB. It is a installer.

1 Like

For framework v3.7 and Cocos IDE v2.0 do you still need to use Android NDK r9d or is r10e fine? Does it matter?
@CitizenK do you know?

@efares

I’m using r10d, but r10e should be fine.

I created a project with Cocos Console (which creates an .idea folder in the project) then I imported the project into Cocos IDE v2.0 but I’m not exactly sure how to debug in it. I can run the projects fine using Cocos Console but I’m not exactly sure how to debug the project. I cannot edit the run/debug configurations to setup iOS Simulator or Android.

Why you don’t create the project with Cocos Code IDE v2.0?

It should be the same as Cocos Code IDE v1.2.0 to run/debug with default runtime.

Cocos CODE IDE is no longer in active development so I’m going to use my preferred IDE and Cocos Console is going to become compulsory in the future so I might as well start using it now.

I have read that post.
The All in One Cocos Studio should cover the process in the future.

I have learned to use Cocos Console too.
For the current moment, i only use it to compile the project.

I have tried the “NEW” command to create project but i faced your problem that i don’t how to debug in Code IDE.

That’s why i figured to combine the project created by Cocos and Code IDE. I’m not sure it is the proper way but at least for me, it is easy and save time.