Suit Up! Game Inventory and Saving User Defaults

Alright, session 4 of my iPhone Game Development course is now available for download (if you already bought it, new dl links should have just arrived). The two big things taught this session were NSUserDefaults and NSPickerViews. The defaults let you save the state of your game in numbers, strings, or arrays, and use them immediately when the game relaunches. So in this case, the character in the image below got his previously-earned armor re-applied when the game was opened again. And the NSPickerView is that big 4 column spin wheel on the right. So you’ll learn how to apply array data to each of those wheels, change the font or color, and obviously do something when a particular row is selected. And each of those NSPickerView¬†wheels will also spin back to their previously assigned state when the game opens again. Finally, you’ll pass the data in the settings class into another class (probably your main game).

Sound fun?? It is. This session is 2 hours and will satisfy your wildest dreams…. okay, not really. But if you like dress up games, or programming character inventory, you’ll dig it. And don’t forget all this iPhone video training will carry over for the iPad too.

Advertisements

3 thoughts on “Suit Up! Game Inventory and Saving User Defaults

  1. Nope. But Tibi you need a Mac brother! You could get the lowest priced iMac and develop on that just fine.

    Well or wait for Flash CS5 to see how well it exports to iPhone apps.

  2. I will think about buying a mac, the problem is that I kinda dislike that apple dose not want to include flash player on ipad, iphone and stuff…:)

    I am from a ex communist country and I hate this kind of things. I want freedom and apple dose not give me that, I know this might sound like a stupid comparison:) …

    Apple is a communist company! LOL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s