Details on Build 1.12 of the Fantastic Worlds iOS Starter Kit

Details on Build 1.12 of the Fantastic Worlds iOS Starter Kit
October 2, 2014 justindike

Three major features, dozens of new properties, and it all leads up to making a whole spectrum of classic style games with our iOS starter kit.

New Feature: Unlimited scores! Keep track of the current score and high score of anything you defeat or collect.

score key, which is essentially just an integer variable saved in the  NSUserDefaults, can be used to track an arbitrary value like points awarded for killing enemies or the amount of an item being collected (by passing the current inventory system). So for example, you could track how many diamonds were collected using a Score key, without having to use the Inventory system to display a diamond icon with the amount collected. So the Score system essentially gives you a simpler way of displaying the amount of some event occurring, and of course, this means it can be used as a classic gaming device: besting your previous high score. So every Score key will track a current score amount as well as the highest ever recorded. Also keep in mind, the current score and high score data persists through the life of the app. So unless the app is deleted, or you explicitly clear the score or high score that data exists.

Scoring Properties For Objects, Collectibles, or Enemy-Fired Weapons

  • ScoreKey – The name of whatever you want to keep score of. This could be something as specific as TurtlesKilled or something as vague as AllPoints.
  • ScoreAmount – The amount you want to add to the score. This could also be a negative number if you want to subtract points for collecting or killing the wrong thing.

Scoring Properties For a Level dictionary

  • ClearScoreKeyFor – An array to list one or more Score keys to equal zero. So if for example, when a level restarts, you want the  current score of TurtlesKilled to start back at zero, include TurtlesKilled here. This will not affect the high score for TurtlesKilled. 
  • ClearHighScoreKeyFor – An array to list one or more Score key to clear the highest ever recorded score for.

Scoring Properties For Labels

  • TextShowsScoreFor – The value here should match that of a Score variable. The label will show the current amount for that particular Score.
  • TextShowsHighScoreFor – The value here should match that of a Score variable. The label will show the highest amount saved for that particular Score.

Scoring Properties for Objects that are Portals

  • ScoreKeyToOpen – If the object is a portal, you can set it to open if a score key’s amount is achieved. Set the value of the score key here.
  • ScoreAmountToOpen – If the object is a portal, you can set it to open if a score key’s amount is achieved. Set the amount here.

New Feature: Advance Levels Automatically with Objectives! You can send the player to any level or menu automatically after succeeding at a particular objective. So this could occur by either gaining a certain score, collecting enough of a particular item, or a combo of both.

  • AdvanceLevel (suggested dictionary name) AdvanceWithScoreKey – The score key which the level will check to see if a certain amount is equal to or exceeded. For example, TurtlesKilled.
  • AdvanceLevel > AdvanceWithScoreKeyAmount – The amount the score needs to equal or exceed to advance levels.
  • AdvanceLevel > AdvanceWithCollectible – The collectible key the level will check to see if a certain amount is equal to or exceeded. For example, Diamonds.
  • AdvanceLevel > AdvanceWithCollectibleAmount – The amount the collectible needs to equal or exceed to advance levels.
  • AdvanceLevel > AdvanceToLevel – The level name to advance to after exceeding either the score or collectible criteria. This could equal the current level and simply send the player to a portal.
  • AdvanceLevel > AdvanceToPortal – The portal name to enter at after advancing.
  • AdvanceLevel > AdvanceToMenu – Instead of advancing to a level, you can alternatively send the player to a menu. In which case, enter the menu name and leave out the previous two properties.
  • AdvanceLevel > NextLevel – If you choose to send the player to a menu instead of directly to a level, you can save the name of the next level to go to. This is useful if you’ll always use the same menu between levels.
  • AdvanceLevel > NextPortal –  If you choose to send the player to a menu instead of directly to a level, you can save the name of the next portal to start at. This is useful if you’ll always use the same menu between levels.

Automatic Game Over!

You can now make objects automatically kill off the leader if they move over or under a certain location. This is useful for games like Space Invaders, where if the enemy ship hasn’t been killed before it goes over, for example, 600 on the y axis, then the game is over.

  • KillPlayerIfYUnder – Enter an integer value and if the object’s y value is lower than this number, the leader will automatically get killed and the level will reset (either starting over, going to a menu, or going to a different level, depending the game or level settings).
  • KillPlayerIfYOver – Enter an integer value and if the object’s y value is higher than this number, the leader will automatically get killed and the level will reset (either starting over, going to a menu, or going to a different level, depending the game or level settings).
  • KillPlayerIfXUnder – Enter an integer value and if the object’s x value is lower than this number, the leader will automatically get killed and the level will reset (either starting over, going to a menu, or going to a different level, depending the game or level settings).
  • KillPlayerIfXOver – Enter an integer value and if the object’s x value is higher than this number, the leader will automatically get killed and the level will reset (either starting over, going to a menu, or going to a different level, depending the game or level settings).

Misc New Properties…

For Objects

  • CarryMultiplier – For any object that carries the player, like a moving platform, this property should be added to adjust how closely the platform and character move together. The default value is 4.5, so if you notice the player is sliding off the platform, or not moving relative to it, raise or lower this number.
  • CreatesObjectWithMax – Used with objects that create other objects. This will cap the amount of objects to generate.

For Levels

  • AddInventoryFor – An array of Collectible key names to automatically add an item to the inventory at the start of the level. Very useful if you want to give users the option to play multiple characters for the level.

Code tweaks

  • When an object is set to approach the character, the object will stop for a couple seconds now when it contacts the character. This prevents a constant pushing effect.
  • The kit now checks to see if the app is being tested in the Simulator, and if so will multiply some of the vectors to better “simulate” the kit running on the device.