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

Saturday, January 17, 2015

[Tutorial] Cocos2d-x: Menu, from basic to advanced

Now, let's start. Create a new Project named Menu as follow, using cmd  >cocos new menu -p com.vn.menu -l cpp -d f:android/project After new Project is created, you should run this command >cocos compile -s f:android/project/menu -p win32 This is the first compile, purpose is linking to libraries in Engine. The first time to compile is so long. The next compile will be much faster because we only change some in Class and Resource. Step...

Posted By Live Blog11:21 PM

Tuesday, January 13, 2015

[Tutorial] Ball - Basic Physics in cocos2d-x

Let's start First, create a new project using cmd >cocos new Ball -p com.vn.Ball -l cpp -d E:/android/project Explain a bit, the above command will create a Project named Ball in folder E:/android/project -p com.vn.Ball is the syntax of package. You can change a bit but must have 2 dots (.) like above.  -l cpp: is the choice of C++ -d E:/android/project: is the folder that Project save...

Posted By Live Blog11:39 PM

[Tutorial] Hello cocos2d-x. The first code - Hello World!

Filled under:

A - Create and run Project First, create a new project named HelloWorld using cmd Run/cmd >cocos new HelloWorld -p com.vn.HelloWorld -l cpp - d E:/android/myproject Wait for 5 minutes to create new Project... It's done. Go to new project in the following path E:/android/myproject/helloworld You can see the folder structure as follow: Classes <- The most important, contains cpp or lua upon to your...

Posted By Live Blog6:49 PM

Monday, January 12, 2015

[Tutorial] How to setup Cocos2d - x V3.0 FINAL on Window OS step-by-step, 100% Working

Filled under:

Setup this Engine is really difficult to many one, because of not simple as running only file setup.exe, then Next, Next, finish. It requires system configuration, and setup auxiliaries for running. And running it also works through an editor program (like Visual Studio).  ...

Posted By Live Blog8:31 PM

Choose an Android item