Where to start in customizing:
Change the graphics:
- All the Default.. files (the splash screens)
- All the icon.. files (the app icons)
- Resources/ bg_ipad, bg_5
- Resources/Buttons/ logo.png, logo_small.png
Configure ads(if any) for RevMob and Chartboost ad networks (read below)
Configure InAppPurchases of coin chips(read below)
Set up a GameCenter leaderboard in iTunes Connect and plug its name into method viewDidLoadPrepareGameCenter of file IntroViewController+GameCenter.m
Edit the MoreViewController xib to match whatever you want (link to other of your apps or write down some help instructions); or hide the more... button from IntroViewController (don't forget to also delete the contents of its method viewDidAppear )
Main files and classes:
AppDelegate.m - the entry point
- for configuring ads, you'll want to edit the contents of the initAds method
IntroViewController - the first screen, the menu
- for configuring Appirater (the popup that asks the user for review), you'll want to edit the prepareAppirater method. You will also want to edit the predefined titles and messages for that popup, in the Appirater.h file)
- if you don't want Appirater, you'll need to comment the contents of that method as well as the call to Appirater in AppDelegate:applicationWillEnterForeground
StoreViewController - the buy coins store screen ; handles in-app purchases, updates the user's coins by the proper amount
the buy coins buttons are identified by their tags: 1011, 1012, 1013, 1014 ; remember this if you want to have more coin packs and update both xib files and the contents of the buyCoins method.
the number of coins in a coin pack is defined in 2 places: the External/MKStoreKit/MKStoreKitConfigs.plist file and iTunesConnect, in the localized name of the in-app-purchase (as in 250 Coins). The values must match.
the Product ID of each InAppPurchase must match in iTunesConnect, External/MKStoreKit/MKStoreKitConfigs.plist and External/MKStoreKit/MKStoreKitConfigs.h ; for more information read http://mk.sg/1m
PrefsViewController - the preferences/options screen ; you can enable/disable sounds, the autoholding of cards or extra animations
GameController - the game screen and the logic around it (handling buttons taps, displaying/holding the cards, displaying the payout table and updating it depending on the hand won, updating the score, etc)
The Sources/Game subfolder contains the main logic of the game. It includes reusable generic classes such as Card or Deck, as well as VideoPoker specific classes: Game, the Game+Counter class extension and JacksOrBetterGame derived class
Game - the video poker game logic; contains the main logic of the game; main method: deal
Game+Counter - class extension for Game with the logic around checking the player's hand and seeing what poker combo he/she has: NONE, ONE_PAIR, TWO_PAIRS, etc.. ; the main method is valueSortedHand
JacksOrBetter - inherits from Game, defines the names of the winning combos, as well as the payouts for them. The payouts table in GameController is displayed automatically based on whatever we've defined here (only for payouts of amount > 0). Method valueSortedHand calls the super method and adds extra logic for identifying if the ONE_PAIR was a JACKS_OR_MORE or not.
PlayerInfo - handles the player - the daily score, the number of coins she has, etc. Loads default score. At each daily startup, offers a bonus of BONUS_DAILY_COINS and, each hour, BONUS_HOURLY_COINS bonus.
Utilities classes and methods:
IntroViewController+GameCenter - logic for interacting with GameCenter : login, send highscore, display leaderboards
ABSmallSoundPlayer - simple utility for playing sounds ; manages a cache of sound clips, to optimize performance
Utilities - common reusable methods for displaying particle effects (such as when you start the game, or when you win a hand) or blinking a view. Also operations for securely writing (to the keychain) of variables (money, coins). Utilities.h has macros for common operations (DLog, read/write from User Defaults), etc.