Need Help For Scripting

İm totally a newbie in scripting Cocos Creator seems simple but scripting is kind of confusing do you guys have any suggestions because APİ seemed little bit too much isnt there easier way to learn scripting ?

i saw these cocos2d-js tutorials from sonarsystems and they are cool if i watch their videos would it be helpful i mean does cocos creator use the same version ?

Hello my friend
I suggest that you read the scripting section of cocos manual

http://www.cocos2d-x.org/docs/creator/en/scripting/

1 Like

try to built your own game alone.
keyboarding
keyboarding
keyboarding*n
till you make your own game

1 Like

page’s link has been changed. New link:
https://docs.cocos2d-x.org/creator/manual/en/scripting/

1 Like

İm totally a newbie in scripting Cocos Creator seems simple but scripting is kind of confusing do you guys have any suggestions because APİ seemed little bit too much isnt there easier way to learn scripting ?
i saw these cocos2d-js tutorials from sonarsystems and they are cool if i watch their videos would it be helpful i mean does cocos creator use the same version ?

I used Sonar videos as a reference some years ago and they are, indeed, a very good and complete source of knowledge for beginners. But, although there are similarities between scripting in Creator and Cocos2d-x, the Creator uses its peculiar node-and-component-based structure.

So, in general, it will be easier to understand how scripts affect the nodes they are attached to if you first learn how nodes and components correlates to each other.

A good practice to follow is to apply your OOP skills to develop reusable and decoupled components. It is important to keep your code-base organized, so you won’t create messy classes. These principles will make your game development a lot easier.

One last advice I would give is: try Typescript. It gives you all the benefits of a typed language, like type-checking, refactoring and code-complete support in IDEs like VS Code.

Edit: I forgot to mention that Typescript offer interface support, common visibility levels, static members, et-cetera.

With all these knowledge in hand, scripting will become much easier.

1 Like

im actually a lot better now i was just new and before game development all i did was web development. i didnt even really try to do anything with game development before asking just felt it was complicated and didnt know where to start from because i felt like there isnt enough content to guide me through. web dev was easy and i feel like i was good at that because there is tons of tutorials but still thanks for the reply 12 month later better than never :slight_smile:

2.1 https://docs.cocos2d-x.org/creator/2.1/manual/en/scripting/