2014년 1월 23일 목요일

Cocos2d-x Multi-platform project 만들기

모바일 게임을 만들고자 여러 엔진을 검토했었다.

cocos2d-x가 1순위 였지만 다루던 언어가 달랐기에 너무 이질감이 생겨서 다른 쪽으로 눈을 돌렸다.

그나마 이질감이 없던 자바로된 바야바 엔진을 공부하며 간단한 게임도 만들어 보았다.

하지만 쉬운 엔진임에는 틀림없지만..편리한 엔진은 아니었다..

그래서 다시 cocos2d-x로 발길을 돌렸으나..

이미 나의 열정은 식어있었다..ㅎㅎ

그러다가 맥도 생긴 김에 간만에 프로젝트를 생성해 봐야겠다..하는 순간!

오호..새로운 기능이 생겼다!

5

그 동안 콘솔에서 잡다한 옵션을 줘가며 실행했던 스크립트가 GUI로 재탄생 했다.

거기다가 프로젝트 경로를 임의로 설정할 수가 있게 되었다!!!

가장 바라던 기능이며 온갖 삽질을 하며 분리 시킨 기억이 있다..

[caption id="attachment_794" align="aligncenter" width="511"][ 프로젝트 생성 GUI ] [ 프로젝트 생성 GUI ][/caption]./tools/project-creator/project-creator.py 를 실행하면 위와 같은 GUI를 볼 수 있다.

 

기본적으로 프로젝트명과 패키지명, 프로젝트 경로, 사용 언어를 선택할 수 있다.






#create_project 

 

First you need install python environment.

 

There have double ways create new cocos project.

Notice:The best of generate path is english path.

##1.UI

* Windows: double click "create_project.py" file

* Mac: ./create_project.py

* Linux: The tkinter was not installed in the linux's default python,therefore, in order to use the gui operate, you have to install the tkinter libaray manually. There is another way to create project by command line.  see below for details

##2.console

$ cd cocos2d-x/tools/project-creator

$ ./project-creator.py --help

$ ./project-creator.py -n mygame -k com.your_company.mygame -l cpp -p /home/mygame

위 내용은 README.md 파일에 적혀있는 내용이며 기존처럼 콘솔에서 프로젝트를 수행하는 방법으로도 사용 가능하다.

[caption id="attachment_795" align="aligncenter" width="515"][ 프로젝트 생성 완료 ] [ 프로젝트 생성 완료 ][/caption]위 그림과 같이 프로젝트가 성공 알림창이 뜨면 프로젝트는 생성된 것이다.

 

생성된 프로젝트를 xcode로 열어보면 아래 그림과 같이 깔끔하게 보인다.

[caption id="attachment_796" align="aligncenter" width="480"][ 프로젝트 오픈 화면 ] [ 프로젝트 오픈 화면 ][/caption]그리고 생성된 프로젝트를 빌드하고 실행하면~짠!

 

익숙한 cocos2d-x의 로고를 볼 수 있다.

[caption id="attachment_797" align="aligncenter" width="480"][ 프로젝트 실행 화면 ] [ 프로젝트 실행 화면 ][/caption]

댓글 없음:

댓글 쓰기