Saturday, January 24, 2015

[Tutorial] Cocos2d-x: Box2D - another physics library of cocos2d-x (Part 1)

Filled under: ,

Now, you study how to use Box2D in Cocos2d-x. By default, Cocos2d-x is installed for users to use the library of Cocos2d-x + Chipmunk, if you want to use Box2D, you must do some task to import it into the compiler. In this lesson, you study: + How to setup to use Box2D + An example of physic, applying Box2D physic Bắt đầu chém nào! Step 1 - Setup to use Box2D Because by default, Cocos2d-x forces you to use Chipmunk, so you must do some...

Posted By Live Blog9:06 PM

[Tutorial] Cocos2d-x: Create physics body of the complex objects by using Physical Editor software

We know how to create physics in Cocos2d-x V3.0, but in the case that is a circle, so creating physics body is rather easy. if our object has complex boundary, how do we create? This lesson has two parts: + Create PhysicsBody Polygons from images by Box2d-Editor software + Import into game and make Physics of Engine process through analysis functions. Part 1: Create PhysicsBody Polygons...

Posted By Live Blog7:07 AM

Wednesday, January 21, 2015

[Tutorial] Cocos2d-x: Create the first simple game - Gameover, calculate scores, add sounds for game effervescent (Part 4)

In this last part, we do all remaining tasks: + Check game-Over when monsters collide character + Add sound when shooting bullets and add some background music for more attractive. + Here skip calculating scores. This lesson is only in simple level. Now let's start!!!!! Step 1 - Add sound into game You Download resource, copy into folder Resource of Project Then open file HelloWordScene.cpp, in function init(), add...

Posted By Live Blog7:52 AM

Monday, January 19, 2015

[Tutorial] Cocos2d-x: Create the first simple game - Discover physical collision (Part 3)

In the two previous part, we built a half of project, but the most important that need to do in this project is: kill the monsters by the bullets shot out. How to do? With previous version Engine 1.x, 2.x when building physical collision among objects is not correct, so calculation of coordinator, array, and many kinds of vectors, is very difficult. However, now in this third part, that task is very simple with only some commands. Now,...

Posted By Live Blog8:06 PM

[Tutorial] Cocos2d-x: Create the first simple game - Touch screen event and shoot bullets (Part 2)

In part 1, we studied how to create a character, and monsters from images through class Sprite. And in adding monsters, you notice a block calculating the appearing position, and the moving speed. It's the simple algorithm. In this part, we do some following tasks: + Catch event when touching screen + When touching screen, our character will shoot + Process the direction of the bullet flying following the point when touching Let's Start! Step...

Posted By Live Blog8:57 AM

[Tutorial] Cocos2d-x: Create the first simple game - Create a character (Part 1)

Now we will start making a simplest game. This game in old version here ( for Cocos2d-x V2.2.3) Describe a bit about this game as follow: We have a main character and a lot of monsters, main character will kill monsters by shooting them. The game will calculate score simply (one monster killed provide you one point), and also have GameOver, you can insert music if need. Let's go! Step 1 - Create Project, add Resource images, sounds...

Posted By Live Blog12:15 AM

Choose an Android item