Cocos Studio Tutorials

  • makalele
    Likes 2

    Well if I’d the one, who would be creating tutorials about cocos studio, I’d do that:

    1. Cocos studio basics (creating a new project, adding few simple sprites, setting properties (opacity, scale, rotation, tint, etc.), loading scene from code in c++/lua/js.
    2. Advanced UI like Label, Button, CheckBox etc. Adding different images to other states (pressed, checked, disabled). Scale 9 grid.
    3. Making animations (with and without automatic frame recording) and using them from code.
    4. Creating new layers/nodes and sprite sheets.
    5. Using particles, tile maps and containers.

    Well that’s mostly what cocos studio can do now. It can have a potential, but it has yet long way to go. Making animation sucks. Many things are missing and some are buggy. But making tutorial on that is a great idea. There are no tutorials for cocos studio for now so I had learn it by myself. There are few things that were trouble to me:

    1. Loading from code. If you use xcode you have to add all generated files to project by drag&drop. If you use Visual Studio in win8.1-universal you don’t have to copy anything. But if you’re using win8-xaml project (which is really only option now for windows phone, because universal doesn’t support 3rd party libs like admob) you have to drag&drop all files to assets directory and (important!) change .csb file properties to content and copy always, because windows phone will skip them if you wont’t do that. In some cases you have to add res directory to search path too.
    2. Using Label. Adding label in cocos studio suggests that if you want to access from code it’ll be Label class. But it’s not. It’s ui::Text. What’s more casting to Label will not crash the game, but you’ll be unable to get or set it’s text (getString()/setString()).
    3. Disable Button, Checkbox etc. At first it seems obvious. setDisabled, right? Nope. It’s setBright :)
    4. Bugs on mac os x. Cocos studio on mac os is not saving csb files propertly. It’s not saving properties like scale and anchor point. I don’t know if it’s fixed in cocos 3.4 / studio 2.1. I’m still using 3.3 + 2.1 beta, because a new version comes with big changes like cocos it’s not inside project folder anymore (which is actually good). But it’s also not generating win8-xaml / win8.1-universal projects and I don’t really now why. And because I’m mostly using cocos for windows phone it’s troublesome. Two things more about windows phone: multitouch doesn’t work and DrawNode is buggy and extremly slow.

    Regards


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Sounds great, this is exactly what we want, the community letting us know what issues they are facing so we can help you overcome them.


  • warning717
    Likes 0

    Awesome! Im hoping for more information on actually implementing elements created within Cocos Studio. On the cocos2dx website, they only explain what can be created in the program where they should be explaining how to use it along with the cocos2dx framework.


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    That is part of the series we will be doing.


    This reply has been verified.
  • kumangkumeng
    Likes 0

    how to deal with multiple screen size.

    pleeeaaaaase include that. angel


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    It’s something that we have been tackling, we will most likely include an overview of it with it covered in more detail in a separate tutorial series.

  • barabasandras1
    Likes 0

    Please include “preloading assets” a.k.a. loading screen during a game! :)

  • Sonar Systems admin
    Likes 0

    Don’t think that it is really for this series but more of a separate video.

  • TheDevil
    Likes 0

    Hi,

    This is very much required by the Cocos Community! Thanks for taking the time to do this. I was just going through the links posted above and one part thats left out is how to use the callback functions for the Button and Checkbox Widget. Other than that, great work. Will keep checking this page for further updates!


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    When was the last time you checked as it's there.

  • TheDevil
    Likes 1

    What is there is how to access the button in code. What I mean is under Properties->Advanced there is a CallBack Feature where the Method can be set on Touch/Click. I wanted to know how to tie this callbaack method in code.


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Honestly we couldn’t figure it out. If you do then let us know. We manually assigned a CallBack feature inside code.

  • TheDevil
    Likes 1

    Check this github:

    https://github.com/chukong/CocosStudioSamples/blob/studioV2_2dxV3/DemoMicroCardGame/Classes/StagePlay.cpp

     

    It might be able to help you. I am also trying to figure out how it works.


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    We will keep looking. Let us know if you find an answer.

  • webkuk
    Likes 0

    Hi, I looked at a lot of your video about Cocos2d. Big THX for this. But now, i have some problem with multiresolution support for android devices with Cocos Studio + Cocos2d js. How i can do one SceneFile in Cocos Studio for 3 different resolutions and use it in my Cocos2d js project like https://www.youtube.com/watch?v=WwFd3l-prdU&index=6&list=PLRtjMdoYXLf7n9bghH1k63kisb-VDzGu1?


    This reply has been verified.
  • Sonar Systems admin
    Likes 1

    Regarding multi res we will be covering this again in more depth after this series. But what we think works best is using a single resolution for all devices something along the lines of 1136x768 (768x1136). Even though devices like iPad Retina have a higher resolution screen we find it looks fine. Just set one design resolution.

  • webkuk
    Likes 0

    Thx, 768x1136 this is safe resolution? Can u show an example layout for this resolution?


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Yes it is safe, we recommend important aspects of the screen are put towards the center so any cropping doesn’t affect the screen.


    This reply has been verified.
  • webkuk
    Likes 0

    I think for this need use cc.ResolutionPolicy.NO_BORDER? or need do bigger background and use SHOW_ALL?


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Use No Border


    This reply has been verified.
  • webkuk
    Likes 1

    Thx very much


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Your welcome :D


    This reply has been verified.
  • TheDevil
    Likes 0

    @Sonar Systems:

    Found this link explaining the use of Widget Reader for Touch Callbacks:
    http://discuss.cocos2d-x.org/t/cocos-studio-linking-button-with-action/19838?u=raccoon

    I think it will help imensely if you are able to incorporate this into the tutorial. 
    Thank.


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Use No border


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Checked the link out but it's more hassle than its worth in our eyes. But we will show our method.


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Sorry we haven’t been doing anymore Cocos studio videos, they are coming just had some issues recording on my Mac. Once they are fixed, videos will commence again.


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Videos again yay :D

Login to reply