Cocos Creator 1.0

Cocos Creator 1.0
0

#28

You can put this code cc.view.setDesignResolutionSize(640, 960, cc.ResolutionPolicy.EXACT_FIT); into onLoad() function of the script. Then attach the script to the canvas object. I think it should be same for other resolution policy also.


#29

Thank you. Just curious to know if this is present anywhere in the manual bcoz I’ve probably missed it :smile:


#30

When I was working with Cocos previously (v3.7) before Creator came out I had this in my main.js
Is it still needed if I’m making a new project with Creator? Or does Creator handle all that?
ScreenResolution and JSB.
@logidzk @catch_up @cocosdan

/* --- Adjust game resolution --- */
    cc.view.adjustViewPort(true);
    var size;

    if (cc.sys.isMobile) {
        var searchPaths = jsb.fileUtils.getSearchPaths();
        if (cc.view.getFrameSize().width >= 640 && cc.view.getFrameSize().height >= 640) { //Check device's screen size (resolution)
            //This is an iPhone hd or above and Android high res screens
            if (cc.view.getFrameSize().width >= 1136 || cc.view.getFrameSize().height >= 1136) //Check if phone is widescreen or not
                size = 1136;
            else
                size = 960; //This is most likely an old iPhone (iPhone 4)

            if (isLandscape)
                cc.view.setDesignResolutionSize(size, 640, cc.ResolutionPolicy.NO_BORDER);
            else
                console.log("WARNING: " + "Device not in landscape mode");
        }
        //For smaller screen phones (4 inch). Most likely no longer used but we can still support them.
        else
            cc.view.setDesignResolutionSize(800, 480, cc.ResolutionPolicy.NO_BORDER);

        //Set the JS Bindings searchPaths
        searchPaths.push("assets"); // **Used to be res/src folders
        jsb.fileUtils.setSearchPaths(searchPaths);
    }
    //Set web resolution here
    else {
        cc.view.resizeWithBrowserSize(true);
        cc.view.setDesignResolutionSize(1200, 700, cc.ResolutionPolicy.NO_BORDER);
    }
    /* --- End of game resolution settings --- */

#31

For GRAPHICS RESOLUTION…
Just scroll a few posts before, Cocos Creator 1.0

In that image, you can set everything there related to graphics resolution and strategy.
Also this one… for reply of question I asked(

)

Rest other things in your code…like FOR LOADING CORRECT ASSETS(in case you’ve different assets for different device resolution like you showed in your code)… IDK…Yet to explore on that.


#32

Can you please add to the code editor “JUMP TO …” option
For example when you shift left click on function it will bring you to the function definition


#33

Is there a guide to extending the editor, developing plugins and integrating them?


#34

@slackmoehrle
There is a bug in the editor :
When renaming the name of scene backround image in the editor the over game get out of sync.
in the browser im getting error which say that it can’t find the script attached to the child node that is attached to the scene e
and when i try to :
“Reload ignore cache” option all the project get out of sync and even if i restart the editor m getting this :
Endless loading massage


#35

@Boby menu help then userManual then go down to Editor Extension


#36

@pandamicro can you look at this bug reported by @Meir_yanovich


#37

Thanks, that’s a very helpful start. Is there an API documentation anywhere, I can’t seem to find that either, and also, the current guide only covers menu items creation, is there also a guide to creating panels?


#38

@pandamicro
bug reconstruction :

  1. create scene
  2. create background scene , set background image
  3. create some kind of main player sprite on the main scene
    4 .create player script and attache to the player
  4. rename the main scene background image and node to different names
    6 .run the game in the browser

Thanks


#39

I think I read somewhere that it is planned to C++ version. This is true?

edit - I found it by yourself in the roadmap.


#40

@Magniffect
There are already multiple questions in this thread itself asking whether C++ will be there. Also, it’s written in the roadmap too. But anyways, we can call slackmoerl again to answer this question. :smiley: :smiley:


#41

Sure, call me :smile:

Yes, c++ support is coming.


#42

@catch_up @slackmoehrle Oh guys, my english was incorrect. I’m sorry about this.

In this

I would like to say that I found the answer, and if someone has the same question, here’s the link to the roadmap.

Now I’m going to double-check my posts before sending.


#43

#44

Inside Cocos Creator just click the Help button at the top and the API Documentation is right there.


#45

@efares I believe that’s the documentation for cocos2d js engine and the Creator integration layer. I need the documentation for Creator itself, so I can manipulate items in Creator, not in the game. I’ll see if that is also available on that page, but at first look, it is not.

Anyway, I’ve created a separate topic for this yesterday, here.


#46

Ah I see.

Well what about this section [Editor Extension][1] Help -> User Manual -> Scroll the section down to the bottom after Publishing. There’s a section there that isn’t available on the cocos docs website.

[1]: file:///Applications/CocosCreator.app/Contents/Resources/app.asar.unpacked/docs/html/extension/index.html


#49

That doesn’t work anymore in v1.0.1, it takes you to the online documentation now. Anyway, even in the previous version, that section only covered creating a basic menu item that can log messages in Creator’s console window; nothing about panel extensions and no documented functions… well except Editor.log :stuck_out_tongue: