Where do I start?

So I’m pretty new to iPhone programming and I am pretty good with C++ so this is a godsend (considering I don’t really want to learn Obj-C, though I probably should).

But, I downloaded it, got the Hello World project working and now I’m at a loss of where to begin my programming. Where is everything centralized? Are there certain things (like functions) that will help me through this? Anything you all can tell me would be great.

Well from what I have learned, since I am in a similar boat as you, that you will still have to be able to read Obj-C. Most tutorials and guides talk about Cocos2d using Obj-C. Like here:
http://www.cocos2d-iphone.org/wiki/doku.php/

I found this guys tutorials very nice:
http://www.raywenderlich.com/352/how-to-make-a-simple-iphone-game-with-cocos2d-tutorial

I plan to translate the tutorials of raywenderlich, immediatly after the template of cocos2d-iphone-cpp comes out.
In fact, I have completed Cocos2dSimpleGame translation.But it can only run on cocos2d-uphone now. I had to work more.
Well, Cocos2dSimpleGame in c++ will publish in this week.

Sweet, thanks! I’m really looking forward to getting started on it, but currently have no idea what to do. So when that comes out, I’ll definitely look at it and hopefully understand what is going on!

Was just wondering if you’ve put out the simple game for the iPhone C++ port. If you haven’t, can you post here to let me know? Thanks!

OK, in this week, after 0.7.1 release, I will write a tutorial base on Cocos2dSimpleGame

Well, I have done it.
http://www.cocos2d-x.org/wiki/cocos2d-x/Chapter_1*-*Create_a_New_cocos2d-x_project_with_each_platforms

Only chapter 1, take my whole sunday

When I try to install it for the iPhone/Mac, it continually tells me “sudo: install-templates.sh: command not found”.

I’m not sure why this is happening considering the file is in the Coco2d-x folder on my desktop and writing the sudo in the terminal. I’ve done sudo before on other projects and it’s worked fine. This is the only time I’ve ever had this pop up for something that should be working.

Can you explain why it’s not working?

Well, I try to run install-templates.sh again. The result is:
* In the git controlled folder, the script do say that “sudo: install-templates.sh: command not found”
* I download the 0.7.2-rc zip from download.cocos2d-x.org, unzip and run it, it works well.
* I download the last zip from github, it works well

So it seems like some errors if the cocos2d-x folder is controlled by git. I’m using SmartGit.

try:

sudo ./install-templates.sh

or just

./install-templates.sh

Hope that helps

Pat

Sorry, my last post was Anonymous.

I tried sudo: blahblahblah and I also got a “command not found” but with ./ it worked.

I hope ./ works for you.

Pat

Still not working…

The results are the same for each way of getting it (downloading 0.7.2-rc zip from the site, downloading the zip from github, and also using github):

  • sudo install-templates.sh… sudo: install-templates.sh: command not found
  • sudo ./install-templates.sh… sudo: ./install-templates.sh: command not found
  • install-templates.sh… install-templates.sh: command not found
  • ./install-templates.sh… ./install-templates.sh: Permission denied

I’m not sure why the last one is telling me permission denied since I’m on the master login for my Macbook.

1 Like

./install-templates.sh worked on my macbook running xcode 3.2.3

Try to download a zip package, unzip and run in a new folder.
I’m using Xcode 3.2.5 & Mac OS X 10.6.6

Still not sure what’s going on.

I too am using Xcode 3.2.5 64 bit along with Mac OS X 10.6.6.

I downloaded the zip file of 0.7.2 from the site’s download. Unzipped using TheUnarchiver. Just made a new folder, copied all the stuff that was in that folder that was unzipped and then pasted them in a new folder just called “cocos2d-x”. I then opened up the Terminal and wrote “cd Desktop/cocos2d-x” and then “sudo ./install-templates.sh” and still get the command not found.

Argh this is annoying and I don’t understand. Only user on this Mac and it’s acting like it doesn’t know what to do or if I’m the main user (which I am).

I just downloaded the zip to install again to let you know exactly what I did on my mac.

In Safari I downloaded the zip and it extracted itself in the safari download window.

I dragged the Cocos2d-0.99.5-x-0.7.2-rc folder to my pat~~>projects~~>android~~>cocos2d-x folder
I opened up a terminal window.
cd projects
cd android
cd cocos2d-x
cd cocos2d-0.99.5-x-0.7.2-rc
then i typed
./install-templates.sh

Error: This script must be run as root in order to copy templates to /Library/Application Support/Developer/Shared/Xcode
Try running it with ‘sudo’, or with ’~~u’ to install it only you:
sudo ./install-templates.sh

okay, so I typed

sudo ./install-templates.sh

and it WORKED! I did have to add -f as I already had the templates installed.

Hope that works.

Pat

It still didn’t work, but this could be why…

When I type echo $PATH I get:
/Library/Frameworks/Python.framework/Versions/2.6/bin:/Users/jared/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin

This doesn’t seem right. Why is it trying to do it via Python framework?

my path is

echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/workspace/android-dev/android-sdk-mac_86/tools:/workspace/android-dev/android-sdk-mac_86/platform-tools:/workspace/android-dev/android-ndk-r5

you can modify your path in bash_profile

cd ~
pico .bash_profile

then modify bash_profile, just like this

export PATH=${PATH}:/workspace/android-dev/android-sdk-mac_86/tools
export PATH=${PATH}:/workspace/android-dev/android-sdk-mac_86/platform-tools
export PATH=${PATH}:/workspace/android-dev/android-ndk-r5

Wish you good luck!

Was wondering if I am not using the android SDK (since the majority of my programming will be on Xcode for the iPhone SDK), where should it go then?

Later on I plan on doing some Android development once I get the hang of the iPhone stuff.

Info on that would be great! Thanks!

Actually, some guys plan to develop the major part of their iOS & android games in Windows + VisualStudio + cocos2d-x environment. It isn’t possible to debug your android games in Xcode via cocos2d-x.