Cocos2dx getting started video tutorial (cocos2d-x)

Source: Internet
Author: User

 

Cocos2d-x is a popular two-dimensional game engine that can develop win32, iphone, android games. We will take you through a game step by step. Positioning is an entry-level tutorial. There are many tutorials for this entry-level program on the Internet, but they are all written. I feel that there is no direct video tutorial.

Prerequisites:

Please install win7, vs2010 or vs2012 because the latest cocos2dx version is not compiled successfully on winxp.

 

Download link: Http://pan.baidu.com/s/1ELk78

The recording format is swf, and QQ audio and video playback can be used on the PC. Install flash player on the android phone to play the video.

This release includes the following three courses:

Lesson 1:

1. Download the installation package
2. Create a project create_project.py python
3. Open the win32 project and compile
Lesson 2:
1. introduced several main categories: Directors, scenes, layers, genie
2. Create an genie,

CCSize screenSize = CCDirector::sharedDirector()->getVisibleSize();CCSprite* player = CCSprite::create(Player.png);player->setPosition(ccp(0 + 20, screenSize.height / 2));this->addChild(player);

3. Modify the background color of the layer.

 

CCLayerColor::initWithColor(ccc4(0, 255, 0, 255))

 

Lesson 3:
1. Menu usage
 

// Use CCMenuItemImage * item = CCMenuItemImage: cursor, this, menu_selector (HelloWorld: responseFunc); item-> setPosition (ccp (30, 30 )); CCMenu * menu = CCMenu: create (item, NULL); this-> addChild (menu );

2. The genie executes the action.
CCMoveTo* move = CCMoveTo::create(2, ccp(0, y));CCCallFuncN* disappear = CCCallFuncN::create(this, callfuncN_selector(HelloWorld::myDefine));CCSequence* actions = CCSequence::create(move, disappear, NULL);mytarget->runAction(actions);

3. How to enable the timer.
this->schedule(schedule_selector(HelloWorld::gameLogic), 2);


Reprinted please indicate the source: http://blog.csdn.net/xingxiliang/article/details/18557631

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.