One wrong release can send your entire app to the graveyard. I'll explain why;
In a lot of areas of my program I invoke the use of class methods. Class methods are different from instance methods in that they are not applied to an instance of a class but to the class itself.
If you invoke class methods on your own custom classes, an instance of the class is required. However this is not the case with Foundation classes, don't ask me why.
Now when a Foundation class method is called you do NOT release that class afterwards, doing so will result in a crash of epic proportions.
I have now learnt this lesson for the umpteenth time and have implemented the save and load features successfully.
While testing the application, a local copy needs to be maintained on the test machine to ensure file creation functions correctly. I will need to load local versions of the project on beta testing machines.
Tuesday, 16 March 2010
Sunday, 14 March 2010
iDevice says: Zzzzzzz
Today I came across a piece of powerful code that will be very relevant to my project but that I did not take into consideration;
What this bit of code does is stop the screen of the device from disappearing during the game. As the user will be concentrating hard during the game, obviously, there may not be a user interaction for a period of time and the screen will power down. This code prevents this interruption from occurring.
I came across this code while trying to implement GameKit into the project. What I discovered that understanding and utilising the intricacies of GameKit is a whole project to its self and not something that can be implemented and tested within two weeks.
Therefore I am now thinking that I'll have to abandon this feature of the project for now. However I will discuss it with Mr Smith first.
application.idleTimerDisabled = YES;
What this bit of code does is stop the screen of the device from disappearing during the game. As the user will be concentrating hard during the game, obviously, there may not be a user interaction for a period of time and the screen will power down. This code prevents this interruption from occurring.
I came across this code while trying to implement GameKit into the project. What I discovered that understanding and utilising the intricacies of GameKit is a whole project to its self and not something that can be implemented and tested within two weeks.
Therefore I am now thinking that I'll have to abandon this feature of the project for now. However I will discuss it with Mr Smith first.
Saturday, 13 March 2010
Implementation - "Finished"
Yesterday I made significant progress in the project, implementing features like;
Correcting player queues. Once I realised NSMutableArray works like a normal queue this was simple to resolve.
Including winner and loser handling:
- returns user to menu after game
- plays sound to indicate win or loss
- displays notification to the user
Removing the setup screen. This was done to simplify the UI. The deck is now automatically shuffled.
A Documentation browser that displays helpful web pages. It uses UIbuttons to switch between pages rather than a UITabBar.
Features I still wantto implement include;
Saving and Resuming a single player game.
Getting a multiplayer game working. This will be more difficult to test. It cannot be done without deploying to device.
Beta Testing will take place on device so I'd also like multiplayer to be tested.
Correcting player queues. Once I realised NSMutableArray works like a normal queue this was simple to resolve.
Including winner and loser handling:
- returns user to menu after game
- plays sound to indicate win or loss
- displays notification to the user
Removing the setup screen. This was done to simplify the UI. The deck is now automatically shuffled.
A Documentation browser that displays helpful web pages. It uses UIbuttons to switch between pages rather than a UITabBar.
Features I still wantto implement include;
Saving and Resuming a single player game.
Getting a multiplayer game working. This will be more difficult to test. It cannot be done without deploying to device.
Beta Testing will take place on device so I'd also like multiplayer to be tested.
Friday, 12 March 2010
Card Images - corrected
I have properly assigned the correct pictures to their respective cards. I did this by checking the order the cards were in compared with the order the pictures were in. This proved to be an entertaining exercise considering my lack of car knowledge. However I eventually managed to correct this irritating issue.
Currently I am working on the crash problem that occurs during gameplay. I have made progress in that the app crashes significantly longer into the game than it did so before. However I believe this is because a different issue entirely. I am now in the process of diagnosing why exactly the crash occurs. It appears to be due to a random element as I cannot pinpoint if it occurs after obtaining, or losing, a specific number of cards.
Currently I am working on the crash problem that occurs during gameplay. I have made progress in that the app crashes significantly longer into the game than it did so before. However I believe this is because a different issue entirely. I am now in the process of diagnosing why exactly the crash occurs. It appears to be due to a random element as I cannot pinpoint if it occurs after obtaining, or losing, a specific number of cards.
Wednesday, 10 March 2010
User & Tech Guide - iPhone web pages
I have just finished implementing the User and Technical Guide pages as iPhone compatible web pages into my native application.
I essentially did this by coding the raw html for these two pages, substituting the required text into the respective html files. I added meta data so that the text would be displayed at 480 pixels wide (the iPhone resolution).
I then created a separate style sheet to style the different elements of the page. Namely the 'div' tag, adding a nice rounded rectangle effect, and the 'p' tag to style the text as Helvetica and of 18px, to give a more iPhone feel.
Testing that these files worked as expected in the simulator I then wanted them to load natively within the application. I added them into the Xcode project where they appeared under Resources. I then looked up the corresponding view controller for the views I wanted to display the web pages into.
Using this approach the web pages successfully rendered. However they couldn't be styled by the separate style sheet due to addressing issues. I therefore had to include the stylings in both web pages locally.
I essentially did this by coding the raw html for these two pages, substituting the required text into the respective html files. I added meta data so that the text would be displayed at 480 pixels wide (the iPhone resolution).
I then created a separate style sheet to style the different elements of the page. Namely the 'div' tag, adding a nice rounded rectangle effect, and the 'p' tag to style the text as Helvetica and of 18px, to give a more iPhone feel.
Testing that these files worked as expected in the simulator I then wanted them to load natively within the application. I added them into the Xcode project where they appeared under Resources. I then looked up the corresponding view controller for the views I wanted to display the web pages into.
Using this approach the web pages successfully rendered. However they couldn't be styled by the separate style sheet due to addressing issues. I therefore had to include the stylings in both web pages locally.
Monday, 8 March 2010
Implementation
Progressed significantly in the implementation today. The cards and deck now initiate correctly.
Stumbled across a brilliant website called http://www.iphoneexamples.com/ which has some great algorithms which I am tempted to implement.
Priorities:
High:
Get the game working by modifying the IBOutlets for selfTurn which return int values. I think I can implement this a different way.
Medium:
Get the picture of the cards to show up
Low:
Test the activity notifier
Currently the game part of the program is completely broken and non-operational. Need to find some way of correcting a lot of flawed logic (maybe remove the disputed cards concept).
Stumbled across a brilliant website called http://www.iphoneexamples.com/ which has some great algorithms which I am tempted to implement.
Priorities:
High:
Get the game working by modifying the IBOutlets for selfTurn which return int values. I think I can implement this a different way.
Medium:
Get the picture of the cards to show up
Low:
Test the activity notifier
Currently the game part of the program is completely broken and non-operational. Need to find some way of correcting a lot of flawed logic (maybe remove the disputed cards concept).
Friday, 5 March 2010
Implementation extended
The implementation stage of my project has officially been extended. The reason for this decision was due to the huge amount of runtime errors that were occurring.
I have spent the last week trying to resolve these issues. By consulting the Cocoa Memory Management guide for iPhone I have been able to resolve a lot of these issues.
One of these problems was the use of convenience methods in the init methods of my custom classes.
However, while resolving these issues I have spotted further potential problems in more code which now needs resolving.
All in all, I have made significant progress but there is still more debugging and a little coding to be done.
I have spent the last week trying to resolve these issues. By consulting the Cocoa Memory Management guide for iPhone I have been able to resolve a lot of these issues.
One of these problems was the use of convenience methods in the init methods of my custom classes.
However, while resolving these issues I have spotted further potential problems in more code which now needs resolving.
All in all, I have made significant progress but there is still more debugging and a little coding to be done.
Subscribe to:
Posts (Atom)