I'm working on an iphone game that I plan to submit to the app store soon but there's one thing that I havent figured out yet. My game has multiples levels for the player to pass (obtaining scores along the way) to complete the campaign. My question is: can I add more开发者_如何学C levels to the app later through 'level packs', as in, not updating the game itself with those new levels but allowing the user to download/buy the packs separately if they want?
I want to do something like the shooter games for consoles do: have the original game at a price and the map packs (DLC) at a smaller price, but still separate. I understand that I could just update the app with the new levels in it but then the users that had the app purchased before that would get the new levels for free by just updating.
I dont want to have multiple versions of the game (like Angry Birds Original, Seasons, Rio, etc...) if can just have one, with several packs on the side.
In App Purchases are a perfect fit for you. Read about them here. One of the example use cases is:
A game that offers new environments (levels) to explore.
Once the App Store validates the purchase, you can allow the app access to a generated download link or something, and download .lvl
files or similar to the local filesystem, which your game can then search for in a known directory and list them if they're available.
You should use in-app purchases. The user buys more packs, and when the purchase is successful, you can either unlock them using NSUserDefaults
, or download the levels from your server.
NSUserDefaults:
//in-app purchase has completed successfully
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"Level Pack 1 Bought"];
//checking if level packs bought so that you can display them to the user
if ([[NSUserDefaults standardUserDefaults] boolForKey@"Level Pack 1 Bought"] == YES) {
//unlock the packs, such as unhiding a button that links to them, etc
}
精彩评论