lunes, 29 de diciembre de 2014

Entering: Cocos2d-x

So last time, I was complaining a lot about the state of the market, now am actually going to do some development.

I have been trying to learn a tool that allows me to flex my C++ muscles and do some 2D games, I thought about going to Unreal Engine 4,  but UE4 is still on my backlog (perhaps I will get to it once we are done with Pause Play Stop) or even before at this year's GGJ (Costa Rica has a site!!).

Right now, I started looking into Cocos2dx (had looked at it before, but never really got around to actually starting something). I am going to be documenting my progress here so at least I have something to come back to once I FORGET EVERYTHING I DID.


So let's get to it! Getting the thing, right now I am working on Mac OS X Yosemite, so it's already bundled with the latest version of Xcode, if you are reading this and you are working with windows, you can also follow some of the instructions, but you will have to windowsdify them.

Downloading Cocos2Dx and it's prerequisites
This part am not 100% sure,  but it always works to take it into account.
First download and install Python
Then download and unzip Cocos2d-x

I am currently using version 3.3 (latest at this moment) and it seems like it's running properly.

Setting up the new project
Now, we want to setup a multi platform project, so first, navigate this:

Root Cocos2dxFolder --> Tools --> Cocos2d-Console --> bin 

When you are there, you can use the following command  (remember the ./ at the beginning so the system knows it's a command!):

./cocos new --package com.something.darkness --language cpp --directory ~/wherever nameOfTheGame

Where
-com.something.darkness : name of the package for your game
-cpp : we will be using C++ as the language for the game, you can select other languages too!
- ~/wherever: the directory where you want to setup your game
-nameOfTheGame: well... the name of the game

And there you have it! you should have a new folder that contains the code for all your projects (iOS,wp,windows,OsX,android). You can actually open each project and open the Xcode project file to start working!


Next time I will start sinking into the C++ of this new game I am going to work on :)
(BE sure to check this out! http://wizardfu.com/book/cocos2d-x/project-setup/, am trying to use it as a base for my project)

No hay comentarios:

Publicar un comentario