Basic Structure of the Property List using the Platform Games tvOS and iOS Starter Kit

Basic Structure of the Property List using the Platform Games tvOS and iOS Starter Kit

Property List Basics in the Platform Games tvOS and iOS Starter Kit

The LevelData.plist file privates data for all the levels in your game, the Home menu (which is the initial start up screen), and any optional menu pages you’d like to show. From top to bottom, let’s look at where each of the arrows is pointing in the image above of the LevelsData.plist.

  • Levels  – this is an Array containing data for each level of your game. Each item provides data for a single level. Arrays are an ordered list, which means the items are in a particular order. So for example, Item 0, which be the first level, Item 1 is the second level and so on. For detailed info on the properties you can added to each level item, click here.
  • VersusLevels – Identical to the Levels array, but this set is meant for levels where players battle other players.
  • Players – This Dictionary should only contain two other Dictionary items, named Player1 and Player2. These dictionaries will define properties for both players. Each level item can also have a Players dictionary containing Player1 and Player2 dictionaries, but if the level doesn’t, the kit will look for the main Players dictionary in the root of the property list. Including a Players dictionary on a per-level basis is completely optional. For detailed info on the properties you can added to each Player dictionary, click here.
  • Home – This Dictionary defines data for the Home menu, which is the startup screen for the app. For detailed info on this dictionary, click here. Do not change the name of this Dictionary. The kit is hard-coded to always open the game by searching the property list for a dictionary named “Home” in the Root.
  • AnotherMenu –  You can include as many other menus as you’d like, with any name. For info on how to load other menus, click here. 

As of Build 1.2 we’ll be adding in a bit more to the Root of the Property List with the following…

  • iPadAdjustments – this will only appear in the iOS version of the kit. As of Xcode 7.1.1, a clear bug with Aspect Fit scenes has required a little adjustment to the iPad sizing. Not to fear, we’ve already got a great work around by hard-coding in some of the GUI locations on icons, text, and such within the Camera. This dictionary will allow you to offset our hard-coded locations.
  • MP3List – an array of MP3 track names simply list them out, and when the game is paused, users can swipe right to scroll through the tracks (and even see the track name / author / etc, which is great for crediting free music). And if the user swipes or presses left on the controller it will toggle off music.