Build 1.12 of the Fantastic Worlds iOS Starter Adds More Classic Game Goodness.

Alright, I’m pulling the “It’s Official” lever on Build 1.12 of the Fantastic Worlds iOS Starter Kit, and I think all of you loyal buyers will agree the common theme here is classic games!

  • The first big feature this build is Scoring!  You can now track the current score and high score for anything. The kit has always had the option to add up XP, In-Game Currency, and an unlimited number of inventory items. The inventory system could have been used to track something as simple as a score, but it also would have involved displaying an item in inventory to do so, which just doesn’t make much sense for some games. So we’ve now got a very simple Score system in the kit.

You can score anything too. Typical score keys (e.g. variables) might be something like AllEnemiesHit or a specific thing like EnemyMissilesHit. Or you can score items as they are collected, which again, lets you bypass the inventory system. So your score key might be DiamondsCollected.  Whenever you set an object to add an amount to a particular score key, the kit will also check to see if the current amount of the score is higher than the highest score ever for that key. So optionally, you can display a text label for both the current score and high score.

Each level can also clear the current score or clear the high score.

  • The second major feature this build is Automatic Advancing of  Levels, without having to walk into a portal to do so. Previously you might have to collect 8 diamonds to open a portal and leave the level. Now you can simply collect the 8 diamonds. You can also advance levels with a certain amount of Score. And if you want to send the player to a menu instead of the next level, you can do that as well. This could be a shared menu that always occurs between levels (to display the score or whatever), in which case you can also add a NextLevel and NextPortal property, and use a button to go to the next level achieved.
  • The third major feature this build is Automatic Game Over properties for Objects. Right now we have 4 location based properties to automatically kill off the leader player. So if a particular object goes above or below a value on either the x or y axis, this will end the level. Think Space Invaders, if they get low enough, the game is over.
  • In lesser “What’s New” news, we’ve got a new level array to automatically add inventory to the level, appropriately titled AddInventoryFor.  This is really useful for adding either weapons or entire characters to the inventory at the beginning of the level. So for example, you might start with Mario, but be able to switch to Luigi or Princess right away.
  • The CarryMultiplier property has moved it’s way from obscurity to essentially being required for objects that carry the leader.

Does all that sound interesting? Check out the official iBook documentation for the kit here, and check the What’s New section or Version Notes section for details on each new property.

iOS Starter Kit example Space Invaders Type Game

New Features in Build 1.0.6 of the Fantastic Worlds iOS Starter Kit

I originally thought this would be a rather “light” update to the Fantastic Worlds iOS Starter kit, but looking at my list of new properties added in the last couple weeks, I guess thats not the case. The more notable new features include: a friction setting for objects (how slippery something is), within-radius detection for objects to fire at the character, new collision body types and a collision body offset, random lines of text (great for character interactions with objects), screen panning between portals, footstep and jump sounds, and the option to add a death animation and sound to the character. Also on the art-front, I’ve waxed and polished the side-scroller/top-down starter kit a tad more with some better graphics. As always, past buyers have been emailed an update to the kit.



For Levels 

  • Friction – this will override the friction settings in the constants.h file for all polyline-based bodies.
  • PanTimeBetweenPortals – the number of seconds the world will take to pan between portals when jumping around within the same level, excluding this property provides 0 pan time. Try this out, its a nice property!


For Objects

  • WillBreakWithCollectibleKeyName – You can have an object break with a  specific number of collectibles in inventory. The value for this property will be the collectible key name required.
  • AmountOfCollectibleRequired – If you set the previous property, you can also use this companion property to set the number of that collectible required. If excluded, this will default to 1. So for example, if you are only requiring 1 key to open a chest, you could exclude this.
  • DeductCollectibleAfterBreak – A YES or NO value to deduct the item from inventory used to open the object. If for example, four keys were required to open an object, then four would be deducted.
  • LeaveInSceneAfterBreak – A YES or NO variable to leave the object in the scene after it breaks. This will destroy the physics body so the character can walk past the object.
  • LeaveInSceneAfterBreakWithBody – – A YES or NO variable to leave the object in the scene after it breaks with the physics body intact.
  • Friction – this will override the friction settings in the constants.h file for objects. 0 is very slippery. Any number higher gets far less slippery, very fast.
  • FacesCharacter – A value of YES will make the object face toward character by flipping the x scale. This assumes your artwork faces to the right. If that’s not the case, the exclude this property and use the next one.
  • FacesAwayFromCharacter –  A value of YES will make the object face away from the character by flipping the x scale. This assumes your artwork faces to the right.
  • UseRadiusForFiring – A YES or NO value to use a radius (circle) to check if the object is within range before firing a weapon. By default this is set to 200, if you exclude the next property.
  • RadiusDistanceToScan – A number for the radius to scan when using the previous property.
  • CollisionBodyType – This property previously only had two options, circle and square. You can now use circle, square, wide_square, or tall_square. The last two options will either create a thin wide square or thin tall square as the collision body. You can offset where this square appears using the next property. This is useful if you want to create a portal door or villager that the character can interact with but “appear” to not collide with. Basically the character steps on a thin square below the object which triggers the any interactions, like pop up labels or images. In the example image (in the iBook documentation), the portal on the left has it’s CollisionBodyType set to square, whereas the portal on the right, has it set to wide_square (it is also offset from the center using the next property).
  • OffsetCollisionBody – This value in {x,y} format will offset where the collision body appears in the object, from the center. For example, in the previous image, the value was {0, -33}, so the collision body was offset nothing on the x, but down 33 on the y axis.
  • DoNotPauseWhenOutOfView – When set to YES, the object will not pause any actions, animations or movements when out of the visible area of the world. As of Build 1.0.6, objects are paused when out of view to optimize the speed of the app. You do not need to set this value to NO, because it will be by default. So why let an object play when out of view? One reason might be to keep two objects in sync that could potentially be seen one before the other by the player. For example, if two objects both had movements (like a monster seemingly floating back and forth on a platform), if the platform were “seen” by the player before the monster, this could potentially make their movement actions out of sync.


For Weapons

AffectedByPhysics – A YES or NO value to enable or disable physics of a weapon projectile. By default this is always YES. It will probably be rare that you want to exclude a weapon from the physics simulation but you have that option now by setting this to NO.


For Images acting as a control pad

LimitMovesToStartingSide – Set this to YES to only allow moving the control pad on whatever side of the screen it started at. This property only works if the MovesBasedOnTouch property is also set to YES.


For Characters

OffsetCollisionBody – This value in {x,y} format will offset where the collision body appears in the object, from the center.

FootStepsSound – This will be the key name in the FXSounds dictionary of the GameSounds.plist file for a looping sound to play when the leader is moving. Like all sounds, this can be random.

JumpSound – This will be the key name in the FXSounds dictionary of the GameSounds.plist file for a sound to play when jumping. Like all sounds, this can be random.

UseDeathFrames – A YES or NO value to play a death animation when a character dies.

DeathAtlasFile – The atlas file containing the death frames.

DeathFrames – An array of items with values for the frame order of the death animation. These are the names of the files in your atlas folder (only include the names of the standard definition files, not the @2x ones).

DeathTime – A decimal value for the amount of time to pass between death and restarting the scene. Even if you don’t include a death animation, you can set the DeathTime to make the scene wait a bit after death to restart (or go back to the start or game over menus).


For Buttons

DoesWhat can now equal Jump. This adds some finer tuned controls in conjunction with the control pad.

OffsetFromControlPad – If your button also uses the ShareYLocationWithControlPad property, you can set this value, in {x, y} format to offset where the button is relocated in relation to the control pad. For example, if the control pad moves to a y location of 300, you might want your attack button to move to 320. So you would set this value to {0, 20}.

OffsetFromControlPadPhone – Same as the previous property but for the iPhone.



For Labels

RandomLinesOfText – You can create an array containing other arrays for lines of text.  See the iBook for an example image

LeaveUpDuringContact – A YES or NO value to leave up a label as long as it is contact with the object that triggered it being shown. If this is YES, the FadeOutOverThisManySeconds property is still used to fade out the label.


For Tiles 

ParallaxOffset  – An offset value in {x, y} format for the amount to shift the object when the character moves (or when the world is moved essentially). You can create parallax scrolling effects on either the x or y axis (or both) using these amounts. They can be positive or negative decimal values. For subtle effects, use small decimal values.


For Collectibles

AlreadyEquippedImage –  an image to show if the weapon or character that the inventory item equips is already in use.


For Portals

If DisableCentering is set to YES in your app (its probably not), you now have two ways to manage moving from one portal to the next and changing the “world view” to account for the location change. Keep in mind, when the world is centered on the main character, this isn’t an issue, so these properties are not used when DisableCentering is NO.

Recommended Option #1 – the RoomGrid property will have a value in { x, y }  format where the numbers define the gridded location of the “room” the world-space is being moved to. So for example, a value of {0,1} moves the world nowhere on the x axis, but down 1 “room” on the y axis, (how far down is determined by the screen size height). RoomGrid only needs to be entered into the portal the character is arriving into (for example, the starting point), since obviously that portal is in the same room the world is being repositioned to.

Not-so-recommended Option #2 – The RoomOffsetX and RoomOffsetY can be entered into portals for the exit or entrance of your room (I would recommend choosing one or the other, for example add these properties only to portals you enter, or only to portals you arrive through, just not both). You can also set the RoomOffsetX and RoomOffsetY in the Levels dictionary to initially offset the world view.

The constants.h file

Most changes to the constants files you could probably care less about, but there’s a few notable ones this build. Here’s the new guys…

  • lineFriction – This sets the slipperiness of all line-based boundaries in the kit. The default is 0, which means there’s no friction, so lines are pretty slippery.  This value can be overridden on a per-level basis though. This really only comes into play if you’ll be creating lots of ramps for the character to walk up or down.  The range is 0 to 1.
  • objectFrictionThis sets the slipperiness of all objects in the kit if you don’t explicitly set the Friction yourself. The default of 1 means there’s a lot friction so the character will not slide on objects by default.  Thats a good thing.  This value can be overridden on a per-object basis though. The range is 0 to 1.
  • extraSceneDetection – This is set to 100, which gets added into the code when checking which objects are within the screen’s view. Objects (and their actions) are now paused by default when out of view (unless you set them to be otherwise) so added a little extra to the “in view testing” lets objects begin their animations or actions when they are right on the edges of the screen boundary. A default value of 100 is a good number I think.
  • timeBetweenReplayingSameSound – by default this is set to .5. If you lower this number you can replay the same sound faster. Raise it to prevent replaying the same sound. This is mostly here to minimize awkward rapid fire sounds when pressing the weapon button very quickly.

Property List Tweaks

The ResizeBorderBy property for Objects and Weapons can still be used, but I’ve renamed this to ResizeBodyBy. 

Likewise, the inappropriately long CollisionBodyCoversWhatPercent for Characters has also been renamed to ResizeBodyBy, and StopGoingUpAfterHowLong is now, simply JumpTime. The past properties still work just fine.

The ButtonImage property (for Collectibles) has been renamed to EquipImage. The previous property name still works.

Code Tweaks

The kit will run even faster than before now that objects out of view are paused by default. If this causes any issues in your app, simply use the DoNotPauseWhenOutOfView on any object you want to keep running off screen.


To update your kit from 1.0.5, make a back up copy of your version of the kit (as a precaution of course), and open the zip labeled Changed_Files_for_Latest_Build.

As always you will need to manually change the Build number in the Project Settings from 1.0.5 to 1.0.6


Build 1.0.4 of the Fantastic Worlds iOS Starter Kit adds even more fantasticalness.

Huh. Fantasticalness is actually a word.

The Fantastic Worlds iOS Starter Kit is now updated to Build 1.0.4. Past buyers should have gotten an email already with a new download link. Check your Version Notes in either the kit or the updated iBook for which class files got updated (just copy and paste over the old ones).

  • 8 directions of control for top-down games. Diagonal movements are now possible.
  • Create toggle switches to open portals. Switches can be anything (they don’t need to look like levers). So you can now open doorways based on the number of “switches” that have been contacted.
  • Moving platforms can optionally disable carrying the player (so you have the option to go back to how they acted in Build 1.0.2).
  • Code tweaks for holding down movement buttons and firing at the same time (its totally smooth now).
  • Gestures can be disabled on a per-level basis. If you are using buttons to control the character, gestures should be disabled (mixing swipes and buttons can tamper with things).

As always, buyers of the kit should feel free to send me any suggestions to make this the best darn 2D RPG platformer / top-down iOS kit ever (a couple of you are sending me some great comments, thanks Kevin and Chris!) .

Screen Shot 2014-05-30 at 10.54.33 PM

8 directional arrows (the diagonals are more muted) and on the far right an attack button.


New Examples and Video section in the iBook documentation for the Fantastic Worlds iOS Starter Kit

I just updated the iBook documentation for the Fantastic Worlds iOS Starter Kit. We’ve got a new Examples chapter, which you can peruse without downloading the iBook using the gallery images below.  Also too I’ve added a Videos section which has links to all the videos I’ve recorded so far. If you’d like to download the iBook now, its right here.

This new Examples section should give users of the kit a quick reference for creating things like collisions objects, non-collision objects, animated objects, moving platforms, instant death areas, laser units, ghosting bad guys, objects that drop when the character is near, repeated objects, tiles, and switches (something new for Build 1.0.4).  All these same objects appear in the demo version of the kit, so you can always copy and paste properties from the kit itself, but I understand its nice to just flip through pages in the iBook and get your reference there without unfolding properties in the plist.

Enjoy, more examples are coming!

Build 1.0.3 of the Fantastic Worlds iOS Starter Kit is a GO!

I added lots of fun features to the Fantastic Worlds iOS Starter Kit last night (if you’ve already bought it, you should have gotten an email last night). Here’s the quick list of what your new favorite 2D RPG platformer can do now:

  • iAds integration
  • Objects can stay in the scene after breaking (for example, you might leave a chest open after taking its goodies)
  • Conveyor belt effects for objects which will shift the character left or right when standing on the object
  • Weapons can be animated while being thrown
  • Ghosting effects for bad guys (or any object). At its most simple, this will fade in an object when the character is in view of it. You can also extend this feature to fade the object out again and reverse the effect on a loop. And you can optionally make the object immune from contact when it is in its ghost phase (or most faded out phase). You can choose the alpha settings yourself, so you might go from 10% alpha to 100% alpha, or 0% alpha (invisible) to 50%.
  • Code tweaks for horizontal moving platforms (they actually move the character). In the previous versions of the kit, my horizontal moving platforms were subtle enough that I didn’t even notice the character wasn’t actually traveling left and right with the platform. And I say “platform” but really any object moving left or right can now carry a character.
  •  Gravity can be applied to objects when the character is in view (much better for timing things to drop on the character). You can also delay gravity affecting the object from the point when the character is in view. So for example, 3 seconds after the character sees an anvil, it might drop on them.
  •  Code tweaks for anyone using Tiled with centering disabled. Now portals can shift the “world” when the character enters them. This was a necessary option for when the character goes from portal to portal (e.g. “room to room”) in one level with the centering option turned off. Normally the world follows the character around (the world is centered on the character). But with centering disabled, you previously could not jump to a portal inside the same level if the portal was outside of the visible screen space.

Details on all these new features can be found in the iBooks documentation which has already been updated.  New properties have been added to their appropriate places within the book, and there’s now a dedicated chapter in the back for Version Notes which lists all these new properties in one spot. The same version notes can be found in a rich text file in the Xcode project, but it sure isn’t as pretty as the iBook….

iBook documentation for the Fantastic Worlds iOS Starter Kit

New features in Build 1.0.2 of the Fantastic Worlds iOS Starter Kit

I suppose I should start posting new entries to the documentations for the Fantastic Worlds iOS Starter Kit right here on the blog. The documentation has all these same properties already noted, so you can follow the link(s) to the documentation in the previous link, or go here to download the iBooks file or PDF file directly.

New in Build 1.0.2

For Levels

  • ReverseGravityThisOften – A decimal value for how often (in seconds) the level will reverse (or change) gravity using the value below.
  • GravityReverse – (for Levels)This is a vector defining the x and y direction that gravity will switch to using the property above.  For example, a value of { 0, 1 } would pull the character up some, if the regular gravity was normally { 0, -2 } . This example could be used to make a side scrolling level appear to have a watery effect to moving through it.

For Objects

  • GainHowMuchHealthEverySecond – a decimal value for the amount of health an object will recover every second. This could be useful for “boss” characters that are meant to be more challenging to kill.
  • ParallaxOffset – An offset value in {x, y} format for the amount to shift the object when the character moves (or when the world is moved essentially). You can create parallax scrolling effects on either the x or y axis (or both) using these amounts. They can be positive or negative decimal values. For subtle effects, use small decimal values. When experimenting with parallax scrolling, I would recommend leaving either the x or y at 0 to see how the effect works on just one axis first.  For side-scrolling levels, this would mean leaving the y value at 0.
  • DontDestroyWeaponsOnContact  – A YES or NO value that prevents weapons (thrown by a player) from being destroyed on contact.  For example, you might want a rock (thrown as a weapon) to simply affect the physics of this object, if so, set this property to YES. By default, this value is NO, so any player-fired weapon breaks against it.

For Buttons

  • DoesWhat with a value of UseWeaponAndAttack will do exactly what tapping the screen does (if tapping to attack is not disable). This makes the character use their attack animation frames, and use a weapon (fire a projectile). So for example, the character might fire a gun, and the animation would show a little kick-back from the gun.   (sorry this should have been in Build 1.0 for anyone using a virtual D-pad).

For Weapons

  • FiringParticleFileName –  This optional property is the name of the .sks file to show when the weapon is fired. Like all uses of Sprite Kit Particle files, you do not need to enter .sks into the value. So if you plan to use a file named GunFire.sks the value to enter here is just GunFire.  This particle effect will move along with the projectile.
  • NumberOfFiringParticlesToEmit – An integer value for the number of particles to emit.
  • FiringParticleXOffset – An offset number value on the x axis for where the particles will initially appear. This value is multiplied by -1, if the character is facing left.
  • FiringParticleYOffset – An offset number value on the y axis for where the particles will initially appear. This value is multiplied by -1, if the character is facing up.
  • FiringParticleDepth – The depth the properties appear at. Use -1 or any number lower to make the particles appear behind the image of the weapon. Use 1 or any number higher to make the particles appear above the weapon.

For buyers, to update your kit from 1.0.1, simply copy and replace the… Version_Notes.rtf,  CSWeapon.m, CSLevel.m, CSObject.h, CSObject.m, CSInventory.m, CSButton.m, constants.h . You’ll be emailed new versions shortly.


Video documentation for the Fantastic Worlds iOS Starter Kit.

Last week we launched the Fantastic Worlds iOS Starter Kit (with epic-length subtitle) For Side-Scroller, Top-Down or Isometric Role Playing Games (told you it was long). And now comes the onslaught of video documentation. I’m not one for brevity in these videos, so if you enjoy my voice and over-explanations of nearly everything, have at it (more are coming this week too)…

Fantastic Worlds on Vimeo

Fantastic Worlds on Udemy (with Discussions Board)

And if you want something a bit shorter, check out the playback demonstrations of the kit…

Playback Demos on Vimeo

These show the kit running in a side scroller view, top down view (your more classic RPG style) and the Kids App demo even has an isometric view. And if you just want a quick 2 minute introduction, the video below shows some minimized versions of the playback, along with the iBook documentation, and a little hint of how Tiled and the Property List function together.