Friday, December 4, 2009

Working on a new app

Started working on that new app my friend put me onto. It will probably be another 3-4 weeks before it is completed. I will release more details when I submit it. It's a niche app but there's no app for it on the app store.

After that, I plan on doing those tutorials on OpenGL for the iPhone. I already have an idea lined up for it.

Friday, November 27, 2009

Update Released

1.1 has been released.

It fixes the bug with the server names that have spaces and the bug where an item would show the set name instead of the item name.

It also threads all the internet connections so they don't hold up the app while it's connecting and downloading.

Thursday, November 19, 2009

Warcraft Gear Compare FAQ

1) Is this app an account phisher?
- No, it does not ask for any account information. It is not required for full functionality.

2) Isn't there already a World of Warcraft Armory app from Blizzard?
- There is but that app and this app provide different functionality. See Below.

3) Can't I just use RatingBuster or the comparison function provided by Blizzard's UI?
- You can but this app takes things a few steps further. RatingBuster and the native Blizzard UI provide raw stat differences between the items. For example, you would see something like the following.

+16 Agility
-56 Critical Rating
+69 Haste Rating
+10 Attack Power
-11 Expertise Rating

This is useful, but not meaningful unless you know the weighted value of each stat. And if you knew those numbers, you would have to calculate the pluses and minuses to determine which one is better.

What this app does is take those raw differences and using the default weight values included, or ones defined by the user, and calculate a weighted score difference between the items. So instead of what you see above, you would simply see +121 or -189.56.

Wednesday, November 18, 2009

Warcraft Gear Compare Update

An update is in to fix a couple of bugs that were found and to thread the internet connections so they don't hang the app while they're connecting to armory. It's awaiting approval and should be in the app store sometime next week.

Tuesday, November 17, 2009

And it's approved!

The app has been approved and it's on the app store! Linky Linky.

Saturday, November 14, 2009

Still Waiting

So it's still waiting to be reviewed.

My friend turned me onto a new possible utility app for a game. I don't play it myself but according to her, it's pretty popular and there's little support for it on the app store. So I'll be starting research and design on that.

I also found an excellent OpenGL ES tutorial for the iPhone: . I like it because it starts from the very beginning and assumes you know nothing about OpenGL and graphics/game programming. Which I don't. This takes care of the programming part... I don't know that I will ever learn enough to do the graphics part. Fortunately, the same friend that turned me onto the new app idea is really into art and she's damn good at it. So maybe she can help on that end. I'll have to find out if she knows how to do 3D stuff or is willing to learn it.

And I'm also fleshing out 3-4 game ideas for when I know enough to actually make something.

Saturday, November 7, 2009

Submitted for Approval!

It was submitted for approval last night. Took a little longer to finish than I thought but it was my first app. All in all, I'm happy with the results. Now I need to think about another idea for an app while I attempt to learn the OpenGL stuff. I've never done graphics before and I suck at art but we'll see what happens.

Anyways, the app is Warcraft Gear Compare, or just Gear Compare. You search the WoW Armory for an item that just dropped, it loads your currently equipped items from Armory, and using weighted values, calculates which item is better. It comes preloaded with 30 specs and the weights were taken from wowhead and the elitistjerks' forums. You can edit the specs or create your own weights to cater to your need.





Thursday, November 5, 2009

NSURLConnection subclass

So I wanted a way to handle multiple NSURLConnections for different functional areas. The problem with the normal NSURLConnection is the inability to distinguish between the different connections unless you look at the URL.

Which is fine, but just looking at the URL doesn't help when I have multiple objects that use similar URLs and need to keep them separated. One common solution you find on the internet is to subclass NSURLConnection and add a tag variable. Which is what I did, but I needed more than just that.

I also didn't want to have to keep track of multiple sets of data from the different connections so I created a variable for the data and overloaded the methods that send delegate responses to handle the data.

Now it's getting closer to what I wanted. The last thing I wanted was there was only one instance of a connection for each tag. So I created a class variable to handle that.

So in the end, what I had was an NSURLConnection subclass that handles multiple tagged connections with the response data contained in the connection and limiting the connections to 1 instance of each tag.


Anyways, here's the subclass definition:

#import

NSMutableDictionary *instances;

@interface tagConnection : NSURLConnection {

NSString *connID;

NSMutableData *receivedData;

}

@property (retain) NSString *connID;

@property (retain) NSMutableData *receivedData;

+ (void)checkTag:(NSString *)tag Target:(tagConnection *)target;

+ (void)removeTag:(NSString *)tag;

- (id)initWithTag:(NSURLRequest *)request delegate:(id)delegate startImmediately:(BOOL)startImmediately connID:(NSString*)tag;

@end


And this is the class implementation:

#import "tagConnection.h"


@implementation tagConnection

@synthesize connID;

@synthesize receivedData;


+ (void)initialize {

instances = [[NSMutableDictionary alloc] init];

}


+ (void)checkTag:(NSString *)tag Target:(tagConnection *)target{

tagConnection *tempConn = [instances objectForKey:tag];

if (tempConn != nil) {

[tempConn cancel];

[tempConn release];

}

[instances setObject:target forKey:tag];

}


+ (void)removeTag:(NSString *)tag {

[instances removeObjectForKey:tag];

}


- (id)initWithTag:(NSURLRequest *)request delegate:(id)delegate startImmediately:(BOOL)startImmediately connID:(NSString*)tag {

self = [super initWithRequest:request delegate:delegate startImmediately:(BOOL)startImmediately];

if (self) {

self.connID = tag;

receivedData = [[NSMutableData alloc] initWithLength:0];

[tagConnection checkTag:connID Target:self];

}

return self;

}


- (void)dealloc {

[tagConnection removeTag:connID];

[receivedData release];

[connID release];

[super dealloc];

}


- (void)URLProtocol:(NSURLProtocol *)protocol didReceiveResponse:(NSURLResponse *)response cacheStoragePolicy:(NSURLCacheStoragePolicy)policy {

[receivedData setLength:0];

}


- (void)URLProtocol:(NSURLProtocol *)protocol didLoadData:(NSData *)data {

[receivedData appendData:data];

}

@end


And here is some sample code of how to implement the subclass:

- (void)applicationDidFinishLaunching:(UIApplication *)application {

NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://wwww.yahoo.com"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:15];

[theRequest setValue:@"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4" forHTTPHeaderField:@"user-agent"];

tagConnection *testConn1 = [[tagConnection alloc] initWithTag:theRequest delegate:self startImmediately:YES connID:@"test"];

tagConnection *testConn2 = [[tagConnection alloc] initWithTag:theRequest delegate:self startImmediately:YES connID:@"test"];

}


- (void)connection:(tagConnection *)connection didFailWithError:(NSError *)error {

[connection release];

}


- (void)connectionDidFinishLoading:(tagConnection *)connection {

[connection receivedData]; //Do something with the data;

[connection release];

}

Getting close to release

Getting real close to finishing now. At first the programming went really fast because I was mostly sticking to stuff I had learned. That was the first 3-5 days. And I was going at such a quick pace I thought I would have been able to finish it by the end of that week.

But then I started to get into the stuff where I didn't have as much experience, i.e., sqlite3, libxml2, and url connections. Those each held me up a while until I could figure out how to work them. On the plus side, I think I was able to come up with a handy NSURLConnection subclass that I will implement at some point to handle the asynchronous connections that I make to the World of Warcraft Armory. But I might have that along with a few other features I want to add for a future update. Right now I just want to get a working version out onto the app store.

My revised completion date is by the end of this weekend. Which means it won't be approved (hopefully) by Apple and be up on the app store for another week. In the mean time, I will work on an update to thread more functions and add functionality.

I'll post my subclass a little later. And my next post after that will be when I finish the app and submit it for approval.

Saturday, October 24, 2009

Done?

Finished all the lectures. I'm thinking about skipping the last assignment since I don't really need to or want to mess with the Address book API and the search functionality seems simple enough.

I think I'll start on my app tomorrow. Don't want to give anything away at this point about it but it's going to be a simple that will help with tracking a small bit of information from world of warcraft. It's a simple idea for an app I had that doesn't seem to have an analogue on the app store that seems easy enough to implement. I will need to learn how to parse xml and use sqlite though.

My target timeline is to finish it under a month at the most. It seems a little long but I do have a job. I'll update on my progress every so often.

Friday, October 23, 2009

Presence 3

Finally got around to finishing Presence 3. All that's left now is 4 hours of video and one more assignment. Hoping to finish it by the end of the weekend but if not, definitely be mid next week. Then I can start working on an app. I could still use some good ideas that don't require graphics. I'm hoping to learn some non-OpenGL stuff as I go along and maybe make a rudimentary game. Which means I will need to come up with an idea where the gameplay will out weigh the poor graphics. But that's further down the line.

The first part of presence 3 was super difficult and the last part was super easy. The first part was so hard because of the threading for the status updates. I got lucky that I figured it out, it was a complete guess on my part, I found little help on the google group for auditors. But now I know that you have to alloc/init the status updates array right at the beginning or else it crashes. Go figure. One reason I didn't think of that right at the beginning is because it seems to load the array just fine in the thread but doesn't crash until it tries to render. Odd thing is the array responded to the count selector but not to any other selectors. Since it responded to count, I thought that is was allocating fine but I was wrong.

Saturday, October 17, 2009

Presence 2

This assignment turned out to be more problematic than I first thought. The first half of it wasn't too bad. But the last half with the variable height rows were a pain the the ass. I see the merit in not giving the student everything but I think they should at least give us the methods necessary to do the assignment. Ah well, that assignment took up the better part of my day.

Halfway through the classes now, I think the last half might go faster than I had thought. Turns out there's just parts 3 and 4 left for the Presence assignment and then there's no more assignments, just lectures. Looks like I won't be able to make a graphically intense game though. A few factors stand in the way of that. 1) I'm not a graphics person. And most teams have a separate person that focuses on that aspect of the game. 2) From what I can tell, animation requires a lot of affine matrix transformations. Which I am ill equipped to handle with my psychology degree. 3) It doesn't look like the class is going to cover OpenGL.

Tuesday, October 13, 2009

Assignment 4 (Presence) Part 1

So lectures 6 and 7 were confusing. However, the assignment itself was much easier than I expected. There was a small hiccup trying to share data between the views because it wasn't covered in class and it wasn't in the additional class materials but it didn't take too long to find the process through google. Getting close to the halfway point now. I'm thinking I can finish the class in about 2 and a half weeks. Then I need an idea for an app.

Sunday, October 11, 2009

Random Texts

So I got texted by some number I didn't recognize a few nights ago. Called the number the next morning, it went to voicemail, and it turns out I don't know the person that texted me.






Unfortunately for her, she said her name in her voicemail. A quick google search shows a public myspace page. Her profile picture has her holding a baby rofl.



Saturday, October 10, 2009

Assignment 3 finished!

After two days of slacking and general lack of time, finally got around to finishing the extra credit section for assignment three. It took forever! I had to search the internet and the documentation to get what I needed to do them. The next assignment looks interesting. Looks like we will be delving into networking. Should be good, I have a vague idea for an app that would require me to get information off websites.

Wednesday, October 7, 2009

Drawing and Animation

Finally starting on drawing and animation! That was a hard assignment... was very difficult to find out how to get everything to work correctly. Took a long time... maybe I'll start on the extra credit section for practice. Tomorrow maybe.

Tuesday, October 6, 2009

Confuzzled

Got done with 2b but I am thoroughly confused by the two subjects they spend the most time on in the podcasts: Delegation and Memory Management. I don't understand the need for retain and release. I don't see a point when I would have to deal with it outside of the constraints put on us by Obj-C. Oh well, my lack of experience in programming is probably showing.

Took a break to look at some of the extraneous videos from guest speakers. Nothing too interesting. Took a look at their podcast of the student's final projects. Nothing horribly exciting there either. The traveling rock idea was a good idea though. I had a similar idea for a location aware mmo game but alas that requires a server and a server requires money.

Lesson 1/2

Finally finished assignment 1a/1b/2a from the Stanford CS193P class website. Took longer than I first expected. Damn semicolons and square brackets, I keep forgetting them. I also wish there were more examples in the SDK documentation. Trying to find the correct methods and then trying to pass the correct types or assign the result to the correct type was a pain to figure out. But, I was successful! Created my first program for iPhone/Mac!

Monday, October 5, 2009

Learning the iPhone

Today begins day one of my attempt at learning to program the iPhone. I downloaded all the podcasts from Stanfords 193p class and intend to watch them and do the assignments. This should be the easy part. The hard part will be coming up with an idea and implementing it. So if anyone has an idea, I'd love to hear it. I intend to start out by making utilities because I have little experience making games and no experience with OpenGL or any other graphics APIs. That and my art skills are extremely poor.

My goal is to learn a new programming language and hopefully, be successful enough to break away from my current job and make a living off this.