The Cocos2d-x Programmers Guide

I see your point exactly and for that I am sorry @slackmoehrle, that was not our intention.

Lets forget about this and move onto help the community.

1 Like

@SonarSystems - I want to state that I think you guys help the community a great deal. I want to encourage one community working towards a unified effort. Strength in numbers!

Agreed, we will be adding Lua to the guide similar to JS once we do videos on Cocos2d-x Lua which we are hoping to start in the next few months.

1 Like

and Strength lies in the unity of those numbers :smiley:

@SonarSystems - If you submit PRā€™s and add in your art along with what is already there Iā€™d love to incorporate it. Especially in the 3D chapter. Or if you are ok with it a .zip or .tar.gz of the files would work too. If you donā€™t want to do this at all, I understand. I like the art though.

Those images are from Google but we will be creating our own, best if you have those :smiley:

This is going to sound really stupid but how do I make a new thread?

EDIT: Figured out that you can do it by pressing ā€œcā€. Not very intuitive :smile:

But Iā€™m still having trouble creating a new thread. Iā€™m getting a ā€œerror saving post: forbidden 403ā€ message.

When I find a derivative help document I appreciate seeing a reference to the original so I may easily compare and contrast the two.

A big hurdle when learning Cocos2d-x is the scattered, conflicting and outdated information.

To reiterate what Iā€™ve said elsewhere:
To everyone writing documentation, please list the current version of Cocos2d-x youā€™re using to test the samples. Later when the documentation becomes outdated new users can at least reference the Cocos2d-x version number of the documentation and can favor other newer and more up-to-date help.

AFAIK, you cannot create a new topic until you have participated in a few topics. I think you need 10 points. Iā€™d have to ask for webmaster for more exact details.

Hey guys, Iā€™m new and need a bit help, because Iā€™m using Windows 7, instead of iOS, and need a hand to start, which file should I edit, for example, because there are these on the image (although I prefer a empty project :confused: ).

http://imgur.com/jMrL3OQ

@fel486 This isnā€™t the correct topic for these questions.

Jason,

Sorry to be a nag :smile:

Looks like the PR was closed. No feedback, nothing.

Yes, when we did the re-branching they were closed automatically. Donā€™t worry I saved it :smile:

Could I have some help setting up v3.3 please? Iā€™ve previously set up v3.2 and v3.1 but am having some trouble with v3.3. I thought the programmers guide might have made things easier but Iā€™ve just referred to the relevant page there:

https://github.com/chukong/programmers-guide/blob/v3.3/chapters/B.md

I canā€™t follow this part:

Use android-build.py to build cocos2d-x samples

Change your directory to the where the android-build.py script is located.
(usually cocos2d-x/build)
run:

android list targets

to see what targets are available.

Iā€™m in the ~\cocos2d-x-3.3\build directory where the android-build.py script is located but there is no android script or handler from the terminal. Instead I get:

ā€˜androidā€™ is not recognized as an internal or external command, operable program or batch file.

Iā€™ve tried substituting android-build for android which doesnā€™t work. What am I doing wrong?

I am sorry to say this but I donā€™t find the Programmerā€™s Guide to be useful for learning how to make games at all. I could probably use it to make some sprites move around in a little animation kind of thing, but not games.

You teach how to add sprites and all their actions on fly, but there is no word about adding multiple instances of one sprite or about giving them some custom property like when you need your enemies to have hitpoints. I donā€™t have much purely code-based game programming experience, but I think not using custom classes for Sprites is a really bad approach.

The Programmerā€™s Guide is about using cocos2d-x features, not ā€œhow to make gamesā€. How to make games is an absurdly vast subject, with each game type being entirely different. The Programmerā€™s guide canā€™t possibly cover every game type, or even a few ones. If you need to learn how to make a particular game (for example a runner), there are tutorials for that, which easily translate to cocos2d-x once you know how to use cocos2d-x.

No, itā€™s actually a good approach. It is common wisdom in game programming to use ā€œcomposition over inheritanceā€ (you can Google that to find a lot of good reasons).

A simple example to illustrate: you have a class Enemy, which inherits from Sprite, and add a field ā€œhitpointā€. Now if you decide to change that Enemy to be animated with Spine, which isnā€™t quite similar to Sprite, you are going to have a big problem. Or if you decide that your Enemy must have several Sprites instead.

You donā€™t have those problems with composition, because the interface of your class wonā€™t change.

1 Like

I am hearing about this ā€œcomposition over inheritanceā€ argument for the first time. I will do some research. Thank you!

I still think the Guide could use a node, which would describe how to organize stuff, make multiple instances, set their properties. I am aware it canā€™t be universal, but there are some basics that would give most potential developers a good start.

Write something and submit a PR and Iā€™m happy to see where this makes sense to publish. Also, feel free to create a GitHub issue for items you want: https://github.com/chukong/programmers-guide/issues

@mSamyel lol, I would understand that this comment comes from someone who is just about to start making games? :smile:

@Fradow ow yeh! :smile:

Roger Engelbertā€™s ā€œcomprehensible guideā€ to making games with Cocos2dX 3.3 will be released on April :smiley: keep an eye on that guyz.