Well, i’m “porting” my game to iOS, but i’m having this strange problem with sprites not loading… The game runs smoothly on android devices, so the error must be related to something wrong in my xcode project.
I’ve “created” the xcode project by coping the “SimpleGame” project inside samples folder. Then i’ve renamed it and added the resources and source files. It compiles with no errors (just some warnings as shown by screenshot), but when the game tries to create a sprite using CCSprite::create(spritePath) it simply returns null and the game crashes when trying to set the position of the not loaded sprite…
I’ve tried to recreate the project, with no success…
Please, take a look at the screenshots and see if you can find what’s wrong…i’ve lost almos a week of work trying to run this… if anyone needs more info, jut ask
Maybe your png files are not in the correct directory or something like that.
Ok, I finally had the thought of changing the path for loading the image. For my surprise, for some reason, XCode is not letting images inside their folders (eg “Folder/Image.png”), but is compiling the project with every image inside root (eg “Image.png”).
Well, how do I force xcode to compile the resources inside their directories?
Leszek Leszek wrote:
> Maybe your png files are not in the correct directory or something like that.
>
Ok, I finally had the thought of changing the path for loading the image. For my surprise, for some reason, XCode is not letting images inside their folders (eg “Folder/Image.png”), but is compiling the project with every image inside root (eg “Image.png”).
Well, how do I force xcode to compile the resources inside their directories?