Giter VIP home page Giter VIP logo

cocos2dxsimplegame's Introduction

About

This game is ported from Ray Wenderlich's Cocos2dSimpleGame http://www.raywenderlich.com/352/how-to-make-a-simple-iphone-game-with-cocos2d-tutorial, which is a worldwide famous guideline for cocos2d beginners. So, special thanks to Ray Wenderlich at the start.

I show how to port cocos2d-iphone games from objc to c++ in this sample source, you can build and run it on iOS, Android, winxp/win7 & WoPhone.

Also, a series of tutorial matching this sample code are written here http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Tutorials. Each article shows the tips of language translating and multi-platform porting. These tutorials may help you to shorten your learning curve of cocos2d-x :)

This code is using cocos2d-1.0.1-x-0.9.1 stable release.

How to build

iOS

Before compilation, you need to copy these two folder: Cocos2dxSimpleGame/cocos2dx & Cocos2dxSimpleGame/CocosDenshion into Cocos2dxSimpleGame/Cocos2dxSimpleGame/libs.

Then double click Cocos2dxSimpleGame/Cocos2dxSimpleGame/Cocos2dxSimpleGameForiOS.xcodeproj to open it in xcode. Build and run it.

Android

If you have experience on runing cocos2d-x HelloWorld on android, it will be the same to run Cocos2dxSimpleGame. If you haven't, please read this wiki http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_run_HelloWorld_on_ndk_r4_and_r5 and try.

For beginners, use android-ndk-r5 from crystax.net is recommend, which can modify as little as possible. Just modify these 2 lines

ANDROID_NDK_ROOT=/cygdrive/d/anroid/android-ndk-r5
COCOS2DX_ROOT=/cygdrive/d/Cocos2dxSimpleGame

in Cocos2dxSimpleGame/Cocos2dxSimpleGame/android/build_native.sh is enough. In commend line, run the building script

chmod 777 ./build_native.sh
./build_native.sh

After then, create an android project from the existing source, point to the folder Cocos2dxSimpleGame/Cocos2dxSimpleGame/android, clean the project to pack it, and run on emulator or device.

win32

Double click Cocos2dxSimpleGame/cocos2d-win32.vc2008.sln, open it in VisualStudio, build and run. It's too easy.

WoPhone

Double click Cocos2dSimpleGame/cocos2d-wophone.sln, build and run it on wophone emulator. We haven't prepare it for wophone device, the Makefile.ARM is empty. If you wanna to, please modify Cocos2dxSimpleGameForWoPhone_Arm.TMK3 to generate Makefile.ARM, then build it.

Feedback

Any bug report, any suggestion will be appreciated. Please post to forum.cocos2d-x.org to let me know.

cocos2dxsimplegame's People

Contributors

flyingpacer avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.