Hey everybody I am moving into the latter parts of the development of my game and(realistically this is something I should have checked on a long time ago...) realized that I am probably doing this all wrong. So if anyone has any tips or anything let me know :D!
Question 1
The overall organization of my game goes as following(I relied heavily on the monocle studios starting example)
mainMenuScene -> groupSelectScene -> levelSelectScene -> playScene
Once a level is beaten in playScene you go back to levelSelectScene, from any of the scenes you can either move forward or backward to the scenes in front of it or behind it. To accomplish this I simply use:
mainMenuScene *ms = [MainMenuScene node];
[[Director sharedDirector] replaceScene:ms];
I use that exact same style for pretty much all of my scene transitions... all of them. Is that bad? And should I be releasing any of the scenes when I do that? As it stands I am not releasing any of the scenes, and I'm just kinda hoping that it is getting autoreleased. This goes into my next question.
Question 2
What exactly do I need to be releasing? This is a very noobish question I understand, but I am very new any of the c languages let alone objective c. I never use malloc or new anywhere, but for example should I be releasing the sprites I am using?
example.h
Sprite *test;
example.m
test = [Sprite spriteWithFile:@"test.png"];
[test setPosition:ccp(121, 110)];
[self addChild:test z:2];
Should I be releasing that somewhere, or because it is a cocos2d node it gets aurotrealeased? I kind rushed into a lot of this where I should have been taking my time in some of the earlier stages and so now when I am getting ready to release my game I am having to go back and make sure it doesn't crap out on someone else sometime in the future. It is a puzzle game and runs pretty smoothly for the most part(It should since it is a simple tile game ...) So if anyone has any input that would be great. Thanks for the help!