Advertisement Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

About this blog

iPhone Game Development

Entries in this blog


When color isn't just color anymore

[font="Arial"][size="3"]My background has been primarily dealing with digital devices which has allowed me to only work with RGB, blissfully unaware that anything else existed. Sure, I would see that there were other alternatives in dropdown lists of Photoshop, but what were those for anyway?[/font]
[font="Arial"] [/font]
[font="Arial"][size="3"]And then I started working on Genegrafter from a different angle: Moving from digital to print media meant that I needed a crash course in how they were different. So for anyone that doesn't know the difference, here is a quick run down.[/font]
[font="Arial"] [/font]
[font="Arial"][size="3"]What is a colorspace?[/font]
[font="Arial"] [/font]
[font="Arial"][size="3"]Wikipedia defines a color model as "colors [that] can be represented as tuples of numbers, typically as three or four values or color components". So the colorspace is a mapping between this model and our implementation of color. This is a fancy way of saying that we look at color differently depending on which color space we are using.[/font]
[font="Arial"] [/font]

[font="sans-serif"][size="3"]CMYK vs RGB[/font]
[font="sans-serif"] [/font]
[font="sans-serif"][size="3"]I mentioned RGB before, and this is what I've been used to. The reason is because RGB is what electronic devices use. It is an additive model, Red, Blue, and Green are added together to produce colors. You can't use this when printing in the real world however because this method would just give you a bunch of mottled browns and blacks. [/font]
[font="sans-serif"] [/font]
[font="sans-serif"][size="3"]CMYK is able to get around this because it is subtractive. Since the color white is actually the presence of all color (and conversely black means that all color is absent) we can add Cyan, Magenta, and Yellow (the CMY) to strip away (or subtract) colors from the white paper in order to get the colors we really want. This process can actually be affected by the starting color of our paper as well; printing on an off-white page would not be the same as if it had been pure white. K in CMYK is black and can actually be obtained by combining the cyan, magenta, and yellow but then we would have to use three times as much ink, so it's generally better to have a separate mix of black available. [/font]
[font="Arial"][font="sans-serif"] [/font][/font][font="Arial"][font="sans-serif"][size="3"]The following is the same image but one is using CMYK and the other is RGB[/font][/font][font="Arial"][font="sans-serif"] [/font][/font][font="Arial"][font="sans-serif"] [/font][/font][font="Arial"][font="sans-serif"][size="3"]
[/font][/font][font="Arial"][font="sans-serif"] [/font][/font][font="Arial"][font="sans-serif"][size="3"]The moral of the story is to make sure that if you ever plan on printing anything, you ready it as CMYK but use RGB for anything digital. Most of the time you will use one or the other, but every once in awhile you may want to cross over to the other side, and when you do, there are considerations to be made as seen in the image above. [/font][/font]




Don't forget your theme

[font=Verdana, Helvetica, Arial, sans-serif]While working on Genegrafter I have to admit that I abandoned one of the cardinal rules of design, keep the theme consistent.

While incorporating some of my favorite mechanics from different games I may have forgotten this when I added bluffing. While it can be a lot of fun if done correctly as part of a social game, the way I originally put it into Genegrafter didn't work well.

In the beginning, you could play a card once per turn face down into your Trophy Pile. It didn't have to be a card with a Trophy Icon on it, but any player could challenge if it was a legitimate Trophy card or not. If they were right, they were rewarded with a Trophy of their own (the one the opponent just tried to play), otherwise the challenger lost a Trophy of their own.

As a social aspect in this game it was very fun, but thematically it just didn't fit. There wasn't any way to accurately judge if a player was bluffing other than chance. There weren't any cues like in poker where betting patterns could give some indicator of previous or future bluffing. Games were also too short to gauge bluffing unless you were playing with friends that you already knew well enough to read.

And worst of all, it just didn't fit with the theme of a superhero game. I don't know about others, but I enjoy this genre as a way to mini role-play as one or more of the characters with super powers. I find it fun to go into a battle armed with a laser cannon for an arm or shooting lasers from my eyes because those are things that I can't do in real life.

It was pointed out that by adding the bluffing, this tension in battle and reliance on powers is completely negated. Players could potentially never play a character and just get lucky enough to pull a Trophy card every turn to put into their pile.

I'm not saying that I got rid of bluffing entirely, but it definitely had to change to fit the theme and style of the game. But that's a story for a later blog.

Please feel free to check out our Kickstarter project and follow our progress:

The following image is for printing in CMYK, so non-Safari browsers may make the colors look a bit odd/dark:[/font]
[font=Verdana, Helvetica, Arial, sans-serif][/font]
[font=Verdana, Helvetica, Arial, sans-serif]




Another evolution in my project: Genegrafter

Looking back, it's been quite some time since I posted and a lot has changed. For the better I hope.

I started with a game called iHero that was basically nothing more than a Mafia Wars clone with a superhero skinning. Looking at it now it's a bit embarrassing (both in design and code) but I think that also reminds me how much I've learned since then.

I'd like to start posting more details over the next few months as I work on finishing up the successor to the iHero project: Genegrafter.

During the course of development I found myself pulled in many directions while trying to create a full blown IP. One of which resulted in the following Kickstarter project: Genegrafter

In an attempt to simplify some game mechanics within the video game, I started creating physical representations of each item, character, and ability in the game using index cards. This really helped me to visualize how powers stacked and interacted in a less abstract way. But as you can see, it actually ran away with a life of its own and I plan on using the card game that came out of it as a mini-game within the Genegrafter video game.

I also participated in NaNoWriMo (a month long event in November in which authors write a book of 50K words or more from start to finish during the month) which helped me to flesh out my characters and story for the game. The goal is to outline each of these elements and hopefully shed some insight as to how the Genegrafter video game was managed from start to finish and, hopefully, becomes a recognized IP in its own right.

Thanks for taking the time to read this, and I look forward to sharing more with you soon.





Data Spire
While iHero is the primary project, I did not feel that the journal title or description were fitting any longer. This will now be a forum for any new games or enhancements developed under the DS moniker.

Word Cascade
New title. New Look. Click on the links below to see the new screenshots. A new leaderboard for high scores has been added as well to encourage the more competitive players to continue playing.

There are some changes being made to the user interface as well as some great new features. These will be posted as soon as Apple approves the other three applications in review right now.

Thanks for the comment on the last post. Many times it feels as though I'm not contributing anything when I go 6 months without any feedback. It's nice to know that someone is still reading. As a follow-up to that, any recommendations on some Rails resources that you've found beneficial?





So I was finally introduced to Ruby on Rails today. And it's perfect for what I need right now. I spent all day in the bookstore reading up on it and I think I've got it down but I still need a decent web hosting site to provide me with some pre-built cloud space. Anybody able to recommend one?




I hate this part

Game Server
Even though my MS is in Security Management I absolutely hate being the one responsible for setting up security on my own server. I would attribute this to the fact that I know all of the things that can go wrong and that could be done incorrectly. It would be far easier to be able to blame someone else when it did :-)

My server needs are currently very simple: store and manage high scores for one game. However, those won't remain my only requirements for very long and I will eventually need to manage users, game instances, scores, and player profiles that I can scale up. I'm currently considering Project Darkstar since it totes that it is a Java Game Server built for the developer that doesn't have time or expertise to do everything from scratch. So far it looks promising but I haven't heard much about it one way or the other.

Has anyone heard anything about the reliability of Project Darkstar? Are there better alternatives that I should be considering?





Did I mention how much I hate the iPhone review process lately? It's been 18 months and the 'process' still sucks. iHero has been sitting in review for about 6 weeks now. In that time I've created two additional submissions for it to enhance the game. Unfortunately I can write code faster than Apple can 'review' it. What exactly this review process is I have no idea, but it goes something like this:

Submit code for review
Someone at Apple opens the application with device #1 (embedded tracking code tells us this)
Someone at Apple opens the application with device #2
Wait three weeks with no further activity
Application either gets approved (no email sent so just have to see it in the store) OR receive an email that the application has been rejected for some subjective reason, go back to step 1

I have a new application (Bass Master) and updates for both iHero and Cascade sitting in review status right now. It certainly feels like I'm in an endless cycle of waiting for Apple to do anything. And don't even try to contact them, they simply cannot be bothered. So much for weekly updates.

I've started implementing a global high score system. I was thinking I would use Java Servlets to handle this on the server side since Java is what I'm most familiar with. Anybody have any good code they can point me to for this? Preferably that uses MD5.

Or am I on the wrong track? Maybe there is an easy way to implement something that is more iPhone specific.

Here is the new Equip screen that will be added whenever the next two versions get approved. Heroes can now carry more items by equipping some of them.





It took a couple days this weekend, but the application has been completely re-written. I have a more complicated version I'd like to implement but I'm just happy to have gotten the new settings view and particle effects completed so quickly.

Have a look at the video by clicking the link below.





So I finally decided it was time to learn about "particle effects". Something I was always afraid of looking at because it looked so complicated when really in a nutshell it's just a way to generate a random object that has some physics applied to it. Okay, so that makes it SOUND easy.

Not being one to re-invent the wheel, I went out and found Cocos2D. Too complicated for a first crack. So I found this:

click me

Much better, code, and it comes with a really long video tutorial to help explain what each part is doing. My only problem was that it didn't work the way I thought it might so I gave up in frustration, turned off my computer, and went to bed. When I came back the next day and ran it, it worked. Must have been the XCode Gnomes.

I'll throw a video up of the particle effects used in Cascade once I finish it, but does anybody happen to know how I make a layer's background transparent in OpenGL? Right now when I add it the background is black and covers everything else on the screen. I'm really afraid that someone is going to tell me I can't mix OpenGL and the iPhone's UIKit stuff.

City of Heroes
I don't normally play MMOs because I barely have enough time for the life that I already have. But this was 'market research'. Yes, market research that ate up half a day of programming and when I finally started getting into it, crashes. Seems like my computer locks up after about an hour or two of playing the damn thing. And then I found out about the subscription model. I always thought this one was just the game that you payed for. Silly me.

The character creation system is great. Which I knew it would be from everything that I've heard. And I wanted to build something like that into iHero, but that's a huge learning curve and some more resources before that happens.

One thing I always try to keep in mind when designing my own games is that NOT EVERYONE WANTS TO MAKE FRIENDS ONLINE. This would be a great game. If it ran. And I didn't have to go online to play. And I didn't have some idiot constantly broadcasting to join his "super-dicilous most rad hero group". I'm not even playing a hero. I always go for the villain and now I'm not even allowed to punk other villains that annoy me (yes, I know, as I newbie I would be the one having my @$$ handed to me, but still).

Domain of Heroes
Over it. Got thru about all of the quests and now I can make really cool stuff after using up my 3 wishes. But why? I've already done everything. Granted, it's free so I'm not complaining but it definitely reminds me that I need to build something in for replay value.

Something else
I forgot what else was going here. Look for the EDIT tag if I remember.




Round 2

iHero version 2.0 has finally reached a point where it can be re-issued with its new face. I left the old one out there figuring I might as well keep making money even if the product wasn't exactly what I wanted. My rationale was that anyone that bought it would get the free upgrade to the much better playing system and would hopefully give a more enthusiastic review/rating.

I know I still have a few things to clean up from an advancement curve perspective and I'm really hoping some of my players provide some input on this. The goal is to do weekly/bi-weekly updates of the game that introduce new locations, powers, and items to keep everyone playing. I also have some new game mechanics to introduce in the future but I'll bring those in slowly so I can have time to do lots of regression testing.

So what's next?
Other than my iHero updates I'm planning on going back to re-work Cascade as well. I created Cascade, put it in production, and then never touched/played it again. Not really a sign of a good game. But then one of my friends got a hold of it and started playing...and bragging about their high score. My competitive nature then promptly forced me to drop what I was doing to beat it. And then beat it again when they topped it.

Which has started the endless cycle of playing the game and actually enjoying it again as long as I have competition. This also brought me back to a design element that I didn't have the time/resources to implement previously: the game server. Just a simple servlet to handle the top scores will go a long way to keeping others playing this game as well. Not to mention the original concept/game mechanics I left out to make a quick buck (sometimes when your only income is generated from revenue sales you have to sacrifice your vision, for a time at least).

And on a personal note, I only have about 5 days left in my current city which always has that dual fear/excitement feeling of impending adventure/doom. Probably because I'm not much of a planner. Packing everything in my car and driving towards the northwest U.S. to see what happens. And no, I don't have a job or place to live lined up. Just hitting the road again because nothing exciting can happen to you when you stay in one place too long. For someone that used to have so much 'stuff' I have to admit that I really enjoy my freedom of mobility.

And of course, some eye candy. Well, at least I hope it tastes good. The first is the new splash screen for the game and then second is a progression of how the edit hero screen has evolved.





I'm so glad that I've taken more time working on this iteration of iHero. Playtesting this week revealed a flaw that can keep you trapped in a specific city without any help of leaving unless you use your Reward Points. An easy fix, but could have been very bad in production.

Now my only problem is avoiding feature creep. I have way too many things that I want to do with iHero but only a limited amount of time. So I'm going to re-submit it to Apple on Monday and start doing weekly updates thereafter. Should help me with my need to keep 'improving' the game and give stable players new content to look forward to. Since everything is in place infrastructure-wise it should be fairly simple to keep adding new powers, actions, items, and locations. Famous last words right?

So this weekend is all about fixing an error in the way my data is being read in from the time server. For some reason it seems to truncate it as an int instead of a long so my seconds are all off. Hopefully a quick google search will give me some decent code to use. Here is what I have now:

EDIT: Got it. Now take all of the code below and replace it with the following line:

timeString = [[NSString alloc] initWithData:receivedData encoding:NSASCIIStringEncoding];

int length = [data length];
const uint8_t *bytes = (const uint8_t *)[data bytes];

if(length 4)
; // oops, handle error

// demarshall the big-endian integer from 4 bytes
uint32_t myInt = (bytes[0] 24) | (bytes[1] 16) | (bytes[2] 8) | (bytes[3]);
// convert from (n)etwork endianness to (h)ost endianness (may be a no-op)
// ntohl is defined in
myInt = ntohl(myInt);

// advance to next datum
bytes += 4;
length -= 4;

// demarshall the string length
if(length 2)
; // oops, handle error
uint16_t myStringLen = (bytes[0] 8) | (bytes[1]);
// convert from network to host endianness
myStringLen = ntohs(myStringLen);
bytes += 2;
length -= 2;

// make sure we actually have as much data as we say we have
if(myStringLen > length)
myStringLen = (uint16_t)length;

// demarshall the string
NSString *myString = [[NSString alloc] initWithBytes:bytes length:myStringLen encoding:NSUTF8StringEncoding];
bytes += myStringLen;
length -= myStringLen;

return myString;




Hong Kong

iPhone 3GS
So much for the two week release date. I did get my iPhone 3GS on time. I did not however, get my number transferred immediately due to the fact that I'm always the exception to any rule. I love the phone though and am so glad that it works as well as I had hoped. After lugging around the Google G1 for so long it's nice to have something that works the way it's supposed to.

Market Research
The greatest thing about developing games for a living is that all the stuff I enjoy doing I get to write off as a business expense. I had to buy Prototype to perform some market research on my competitors. This is a game I've been waiting for for two years now and I can't say that I was disappointed. As always, I think some of the achievements are a little ridiculous but I'm just glad that I've gotten over the whole 'must get every achievement' completionist phase. My only complaints are that 1) People I need to consume to get all of the Web of Intrigue completed keep dying (sometimes right in front of me before I get to them) and 2) I don't get to keep all of my powers when I restart a new game.

Domain of Heroes. For a free web-based RPG it isn't bad. I've actually found a few elements that I would like to incorporate into some of my own games in the future. What I'm not crazy about however is the fact that I can't forge better items until I spend 'wishes' so that I can carry enough materials to do so. As a person that doesn't really spend a lot of time networking with other players online, this kind of sucks for me. Click here if you want to check it out. And if you buy any wishes of your own it'll help me get some referral points to get over my little inventory dilemma.

Hong Kong
I'm out here doing research for another location in iHero. I think I've nailed down the areas that I'm going to use in the game. The hope is to generate enough interest that I can continue providing weekly updates whether they are new items, powers, features, or locations. I'm a big fan of player-generated content and would love to have a community that has constant input as to the direction the game takes.

So far I've had a problem getting the new in app purchasing functionality working for the new iPhone OS. It appears that everything has been configured properly but iTunes doesn't actually seem to be returning any products to the application. Since it's a new feature there doesn't appear to be much in the way of tutorials or help either besides the one-page description in the Store Kit Programmer's Guide.

Also, I'm looking at using Pinch Media to help do some statistics tracking for the application. Does anyone know if this is the best one to use? It's been the only one suggested to me so far so I can only assume it's the 'industry standard'.

I revamped this screen again. I have no idea why I thought it looked good with those giant yellow buttons the first time but when you guys see me post something that gaudy, do me a favor and flame me so I change it. Here is the new vs the old edit hero screen:




Two Weeks until release!

The re-release that is. What started as an exercise in cleaning up memory management has resulted in a completely new game. One that I hope provides much more for the casual iPhone gamer. With the date now set for release of the iPhone 3GS I can work towards integrating the Store Kit functionality for microtransactions.

And I spent some time revamping a few pieces of artwork for the game. Here is the old vs the new, well, Vs screen




I am the world's worst googler.

Ever. I think it's because I don't think about things the way "normal" people do. So why do I bring this up? Because I have spent the past hour trying to find some simple sample code about how to use NSURL or something similar to make HTTP requests on the iPhone. If anybody knows of a quick tutorial to get me started that would be awesome.

I completed the revamp of the damage model to subclass damage types and make it easier to compute damage modifiers. As a result, powers like Cyrokinesis and Pyrokinesis now have immunity to their respective subtypes.

Also reworked the 'main' screen. Hopefully it looks better than it did before:

Edit: Ha! I always find stuff AFTER I post a question. So here is some code that has gotten me started down the right path. I just need to figure out how to read the bytes and save it off as an NSString object.

// Check connection to the server
// create the request
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@""] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0];
// create the connection with the request
// and start loading the data

NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {
// Create the NSMutableData that will hold
// the received data
// receivedData is declared as a method instance elsewhere
receivedData = [[NSMutableData data] retain];
genericAlert.message = [NSString stringWithFormat: @"Network found!\ndata length: %d",[[[NSMutableData data] retain] length]];
} else {
// inform the user that the download could not be made
genericAlert.message = @"Network Could not be found";

[genericAlert show];

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data

// append the new data to the receivedData
// receivedData is declared as a method instance elsewhere
[receivedData appendData:data];




Post Vacation Progress

So I just spent the past week in Paris. Mostly eating and walking. Took my laptop and managed to get some work done, but not a whole lot. I'd say that I'm about halfway through the iHero rewrite. Currently adding Missions to each location. Missions will cost energy, require specific powers to complete, and will provide monetary and XP rewards. An example would be:

Save kids from burning building:
Requires 20 Energy and Pyrokinesis
Hero Gains 5 XP and $20

I have no idea how to determine what powers are required though. Initially I'm thinking that some of them will be generic (either requiring a Physical, Mental, or Energy power). Any ideas?

I've also started 'trimming the fat' to remove the less important aspects. Such as avatar selection. A 100x100 image takes up a lot of room when you're talking about iPhone screen real estate. And there isn't much that an avatar does for the game. So here is a before and after view of the current state of the Edit Hero View:



I'm still re-working some things here. Like the fact that the actions available won't be shown here, but in a more detailed stat view. Taking it's place will be a placard-like image with a few buttons and info. And still trying to find the best way to configure things like health and energy so that they are easy to read. This is the part where it really hurts to not be artistically inclined. I lose so many hours trying to photoshop and move things around instead of coding.




So I haven't slept in two days...

...but I've almost completely re-written iHero. At least the guts of it, the outside still needs some makeup, a low-cut dress, and heels. I sat down and started looking for ways to make it more efficient (which always seems easier after I've coded an initial version). And I played Mafia Wars a bit more. I still don't get it, how is this game so popular? It basically boils down to clicking a button 12 times and then waiting hours to click it again. And the same people that think it's the greatest thing since sliced bread (overrated btw) tell me that mine is too flat.

If that's what the masses want, then I guess that's what they will get. I've revamped the combat system so that it is easier to understand, code, and implement for online battles. I originally had a campy storyline that was supposed to guide the player from city to city and give them some purpose. I think it's time to remove it since it doesn't appear to be adding much and I could use that space for other things like missions and more enemies.

I'm also removing status effects for the time being to try and simplify things a bit. If I get more players that are interested then I can add them back with the countdown timer I was working on. I'm still on the fence about what to do with items though. Right now a Hero can only carry 6 items. One option is to allow them to carry as much as they can afford. The other is to keep the limit and allow players that choose Super Strength to carry more. I like this option more because I feel it keeps the flavor of the game and I like the little bonuses/perks that some powers provide over others.

Now that I've changed half the game I guess it's time to figure out how to create more art assets...




I figured out memory management but then I forgot

So after about a week I'm wondering when this is going to end. When I started I was creating every object I would ever use at once and then slowly leaking memory. For iPhone users this caused a crash pretty quickly, so I went to the documentation and started cleaning up my code. By the time I was done, my app was actually eating up memory FASTER than when I started without any knowledge of what I was doing when using alloc, release, autorelease, etc.

One of the big things I read was not to use the imageNamed convenience method of UIImage because it would store an entire copy of the image in memory. So I converted everything to use the UIImage InitWithContentsOfFile which promptly used up the memory AND added more overhead when it created CFStrings from [NSBundle mainbundle]. I tried to track down why CFStrings and img_data_locks seemed to be taking all of my memory but could never figure it out. And apparently I'm the worst person in the world for soliciting help because every post I've made in every forum has gone unanswered for at least a few days.

So I scrapped the whole design and started rebuilding from scratch. Probably building it the way I should have to begin with. Only creating objects as I need them and using NSMutableDictionary to store objects that I will need repeatedly. Which if anyone can tell me why this crashes but doesn't give me anything other than a EXC_BAD_EXCESS error that would be great:

NSMutableDictionary *actions = [[NSMutableDictionary alloc] initWithCapacity:0];
Action *action = [self getActionFromDatabase:actionId];
[actions setObject:action forKey:actionId];

On the plus side of things, I finally downloaded Mafia Wars today for the iPod to check out what all of the hype is about. And I think I have a better game. Maybe not in implementation just yet, but in terms of scalability and my vision for it. As successful as that game has been it gives me hope and it helps me look at my pile of spaghetti code with renewed determination.

Edit - And of course right after I say nobody answers I got a reply back, but I'm not complaining. So it turns out I have to use an object for the key and the int wasn't cutting it. I tried 'casting' at one point but I don't think I did it properly for Objective-C. So the last line should look like this:

[actions setObject:action forKey:[NSNumber numberWithInt:actionId]];




Missing something fundamental

I was hoping someone here might be able to shed some light on a problem that I've been having. At first I thought it was a simple memory management issue on my part; not performing alloc/release correctly. I went through and corrected all of the obvious leaks but now seem to be stuck on a different problem.

The image below shows something I took out of Instruments when looking at the objects allocated. For some reason, every time I remove all views from superview and add a new one the memory goes up by .05 to .1 MB. Doesn't removeFromSuperview automatically free this up if I released the object after adding it?

I also send messages back and forth between a couple of classes and it looks like the objc_msgSend eats up some memory but I don't know how to get rid of this. It's most noticeable within the PurpleEventTimerCallBack.




alloc, release, rinse, repeat

So another 3 days and 50 pages of memory management documentation reading later and I think I've got most of it figured out. Even managed to squeeze in a complete re-write of the Learn Powers View. This originally used a UITableView but it had problems because if I used the built in method for freeing cells the transparency didn't work correctly. And if I didn't, scrolling up and down would quickly eat up too much memory and cause the app to crash right after picking your first power.

So the next day or so will be playtesting to make sure that I didn't break anything that was working. If everything looks good then I'll be submitting the new version to iTunes and hopefully appeasing some very angry people.

Here is the modified power selection view:




malloc/free oh how I hate thee

Thanks to everyone that replied with encouragement on my last post. I feel like I've been plugging away for quite some time to find an idea that people are as excited about as I am. Delta Spire originally received a pretty low response. The three iPhone apps I have released only seem to generate a few reviews no matter how many copies are sold. I've been looking at a few ways to get people people involved with some content additions to iHero if I can ever get through the following...

So the current issue with iHero is that it gobbles up memory like crazy and I can't seem to free anything to remove the leaks. Here is where the debugging tools are telling me that I have a total of 4 leaks (2 at _NSPlaceholderArray initWithCapacity: and 2 at either NSCFArray insertObject:atIndex or _NSPlaceholderArray initWithCapacity:, not sure which)

And here is the code that seems to generate that:

// Creates an empty array
NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:0];

// Creates an object, adds it, and then releases the object
Location *location = [self getLocation:locationId];
[array addObject:location];
[location release];

// After array is passed back to another method it is used and released (it's named array there as well
[array release];

Any ideas on why this doesn't seem to work? I have even tried declaring NSMutableArray with the autorelease modifier during alloc. I'm curious if this is in fact not a leak and the memory gets freed up when needed or if there is something different I have to do to release it.

Objective-C memory management is described in terms of ownership. If an object creates another object it is supposed to be responsible for destroying it. But if you create an array and pass it off I don't see how that is possible. And freeing it after it's used doesn't seem to work either. Somehow doing release twice to decrement the counter doesn't seem like the most conventional way to go either.




You ever just have one of those days?

Yeah, I've had a few of them. In a row. So it turns out that the memory issues on the iPhone are more prominent than the iPod Touch. Which is bad, because now I have some angry customers and it's going to take some time to track down why the memory is so bloated for them.

I heard about a tool today that is supposed to help link the .dSYM file of the application and the crash logs to generate something meaningful in debugging. Unfortunately, they told me about it over the phone and I have been unable to find it online. I thought they said Symbolic8 but apparently I was mistaken. If anyone knows of another tool to do this that would help immensely.

And how is it that everyone on iTunes seems to have 5000 reviews and I struggle to get 20? Is there some super secret society I don't know about for generating tons of traffic to your app? Are there specific sites I should be soliciting users for feedback or to try out my application?

First comment on my journal gets a free promo code to try out iHero. Crashes and all :-)





iHero has officially been released on iTunes. I'd like to thank David Baumgart once again for the great artwork that he turned around on such short notice. I should probably point out that anything that looks bad on the app is probably something I didn't have enough to commission him for :-)

If any of you would like to support a fellow independent game developer (this is my only source of income right now) I'd really appreciate it. I could also use some constructive feedback from a solid gaming community about how to make it better. If there is enough interest I would like to provide weekly updates that provide more content.

A brief description and some screenshots can be seen here:






Almost there. In this screenshot the handpanel has been adjusted and scrolls with the buttons shown to its left. Also, pressing the rotate button will cause the trihex to do the following:
rotate to the next pile (hand, reserve, lost)
Update the current pile name
Update the number of tokens in the current pile
Update the handpanel with all of the visible tokens in the current pile (Some piles such as the reserve will not allow you to view their contents except during specific times such as searching thru your "deck")

There is now enough functionality that I think I can start on the tutorial. Just have to figure out if I want to try that with flash or some mockup of the game that forces you to do certain actions to continue. Probably going to go with flash, maybe I can do some of this in Flex and get a little practice there too.




Enjoy this moment of Zen...

I'm just constantly amazed at how many people are willing to throw in the towel. To take the normal job, the normal life. Most people I know at work hate their jobs and could easily make more if they left. But they've put themselves in a position that makes it risky to leave in the event something does go wrong. I've also seen that the more you make the more you spend, a habit I'm trying to break. After pursuing money for so long it's quite liberating to find how happy you can be with so little given the right circumstances. Don't get me wrong, I'll keep looking for ways to make good money, the only difference is I'll be doing it on my own terms.

Delta Spire
The hand panel is almost complete. Almost. Who knew something that should be so simple could take this long? First I tried rotating an Image but got some weird results. Turns out raster-based graphics have a hard time not degrading over time when you keep applying transforms to them. To alleviate this I just kept track of the amount of change instead and kept reusing the same graphic. Also, it's a good idea not to put your counters in paint if they need to be accurate since paint isn't necessarily invoked everytime you call for a repaint. I know that goes without saying, but I still made the mistake for about a minute today.

I'm feeling a lot better about getting this tutorial out within the next week or two. It's a milestone that may actually keep me working on the damn thing.





Since this journal has become a way to help me remember what happens in my life...
I ordered a part about 2 weeks ago but never received it. Turns out the girl that took my order quit the company. As someone pointed out to me, this is the kind of thing that only seems to happen to me consistently.

Delta Spire
I now have a solid idea of how I want to handle the hand panel for now. Hopefully I can get that done by the end of the week and cobble together the tutorial (or at the very least, the rules). Managed to get Log4j configured today, but it seems odd that Eclipse makes me choose a non-relative URL for my Classpath. I keep everything on a jump drive and the drive name changes based on which computer I am using which is a pain.

Also finished up the panel for global effects. Just have to finish up re-writing token movement (from hand to board, hand to character, etc) and everything will be in place to make some static gameplay shots.



Sign in to follow this  
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!