Checking in with Build 1.0.8 of the Fantastic Worlds iOS Starter Kit

Hey howdy ho, kit-builderinos. Just wanted to check in with some news for those of you following my Fantastic Worlds iOS Starter Kit. As some of you past buyers are well aware, your download links give you access to the latest “official” build of the kit, and also the next build as it’s progressing, which is 1.0.8. Today I added (and uploaded) a lot of new animation possibilities for characters in the kit. Previously if you were building a top-down character (as opposed to side-scroller character) you had just one set of animated frames for a resting animation. If the character stopped and “rested”, that animation could run. You can now include 4 sets of different resting animations for directions facing up, down, left or right. And with that in mind, you can also include attack animation sequences from the character’s resting state in each of those four directions as well. Previously you could include attack animation sequences for up, down, left and right, the difference now is that these new attack sequences give you the option to differentiate between an attack that was initiated from a still / resting position and those that were initiated while the character is moving / running / walking etc.  All of these new animation sequences are optional. 

Also new, you can offset the world’s center. Previously, you had two options: you could center the world on the character, which would put the character dead-center of the screen, or you could disable centering, and the world would stay in a static location. With the new offset option, you could displace where the world is around the character. 

We’ve also got new movements for Objects / Enemies, a Space Invaders type increment, that will jut the object forward an amount for x number of steps, then optionally move the character down as well. 

Also I’ve patched up a wee-bit of a memory leak that would creep up over time. 

Enjoy!

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

Build 1.0.7 of the Fantastic Worlds iOS Starter Kit has a lot of new utilitarian properties, with one big feature: A Boosters dictionary to eventually store properties that will “boost” the character in some way. For now, your only option is an immunity booster, but of course you can expect more to come. The immunity properties will make your character, you guessed it, immune from damage. And to add to the fun of being immune you can also include a particle effect in back of or in front of the character, as well as an image. In terms of using this immunity booster, this can be done either by equipping it from the inventory, or it can be automatically applied to the character when an item is collected or when an object / enemy is broken / defeated. Also immunity can be applied to the character dictionaries by default. So for example, your character might begin a level immune from attack for the first 5 seconds.

immunity booster in ios starter kit

 

 

 

 

Let’s talk about the biggest “utilitarian” feature, so I can use that word twice this decade (possibly ever). Dictionaries that setup the CSObject, CSWeapon and CSCharacter classes all have dozens of possible properties which can be an eyesore to look at after a while. For example, below is a small screen shot of how properties inside of a typical character dictionary could look….

prop

 

 

 

 

All those properties were previously thrown together into one place. Well now you can organize your properties in ANY way you want (with a few exceptions which I’ll mention in a moment). Take a look at the screenshot below for an example…

iOS Starter Kit Property List example

 

 

 

 

So you can retrofit your existing dictionaries with names of your choosing. Want all physics-related properties in a “Physics” folder. Simply create a dictionary called “Physics”, paste in your existing properties and you’re done. The dictionary names are essentially ignored at build time, and the properties contained inside get used like they would if they were just thrown together like before.

This works for any Objects dictionary, Portals dictionary, CollectiblesForThisLevel dictionary, Weapons dictionary, or Characters dictionary. The only time you can’t choose your own dictionary name is for the animation-related dictionaries for Objects or Weapons (since those have some property names in common like FPS, WillLoop, AtlasFile etc), you’ll need to leave those in their specifically named dictionaries.

This custom grouping of properties also makes it possible to copy and paste multiple properties at once (hooray!).

Without further ado, let’s get into the new properties…

 

In the GameSettings dictionary

DisableAdsPad – If YES, the app will not show iAds on the iPad. Other devices might show ads.

DisableAdsPhone – If YES, the app will not show iAds on the iPhone 3.5 inch. Other devices might show ads.

DisableAdsPhoneWide – If YES, the app will not show iAds on the iPhone 4 inch. Other devices might show ads.

LiftUpOnControlPadCausesJumpStop – A YES value is the default (if excluded), which will make the player stop jumping if the user lifts up the control pad.

TreatControlPadUpAsJump – A YES value sets the control pad (joystick) to treat an upward movement as a jump (for any characters that jump when going up). If you prefer to use a virtual button instead for jumping, set this value to NO. If you exclude this property, control pads will default to YES, so you have to explicitly disable that with this property.

 

For Level dictionaries

PauseOutOfViewObjects – Set this to YES to pause out of view objects. Pausing out of view objects can be done on a per-level basis, and by default this will be NO. For larger levels, you’ll probably want this to be YES. And keep in mind, objects can override being paused.

DisableCenteringPhone - A YES or NO value to disable (or enable) centering on just the iPhone. So you could have the same level be centered around the character on the iPhone (by setting this to NO), but the level would not be centered on the iPad (if the DisableCentering property was set to YES).

OnDeathGoToLevel – This value overrides the normal settings which specify what to do on death. This will force the scene to load a specific level instead of go back to the main menu, last save point, current level or game over menu.

OnDeathGoToPortal – This value accompanies the previous one to set the portal to enter after death.

 

For the Characters dictionaries

HasImmunity - A YES or NO value to initially or semi-permanently give the character immunity from damage. By default this is NO.

ImmunityTime - How long the character will be immune from damage. Set this to a really high number (like 1,000 seconds) if this shouldn’t wear off.

ImmunityParticleFile - The particle file name (minus .sks) to use when the character is immune.

ImmunityParticleOffset – The offset location of the particles from the center of the character. A value of {0, -30} would place the particles at 30 points below the character’s center point.

ImmunityParticleDepth – A positive or negative integer value for the depth of the particles. Any number less than 0 would place the particles behind the character artwork, and any number higher would place the particles visually above the character.

ImmunityImage – The key name in the image assets catalog of an “immunity image” to use. This could be an icon above the character indicating they are immune or something larger like a glowing bubble around the character. This has no effect on the physics of the character.

ImmunityImageDepth – The offset location of the immunity image from the center of the character. A value of {0, 50} would place the image at 50 points above the character’s center point.

ImmunityImageOffset – A positive or negative integer value for the depth of the immunity image. Any number less than 0 would place the image behind the character artwork, and any number higher would place the image visually above the character.

 

The Boosters dictionary in the Root

This Boosters dictionary will be a new one for the Root of the property list. Inside the Boosters dictionary, you can create another dictionary with a name of your choosing. Then set the following properties to create an immunity booster. This could be equipped via inventory, when collected in the scene, or after destroying an object. These property names are identical to those in the Characters dictionary.

ImmunityTime - How long the character will be immune from damage. Set this to a really high number (like 1,000 seconds) if this shouldn’t wear off.

ImmunityParticleFile - The particle file name (minus .sks) to use when the character is immune.

ImmunityParticleOffsetThe offset location of the particles from the center of the character. A value of {0, -30} would place the particles at 30 points below the character’s center point.

ImmunityParticleDepth - A positive or negative integer value for the depth of the particles. Any number less than 0 would place the particles behind the character artwork, and any number higher would place the particles visually above the character.

ImmunityImageThe key name in the image assets catalog of an “immunity image” to use. This could be an icon above the character indicating they are immune or something larger like a glowing bubble around the character. This has no effect on the physics of the character.

ImmunityImageDepthThe offset location of the immunity image from the center of the character. A value of {0, 50} would place the image at 50 points above the character’s center point.

ImmunityImageOffsetA positive or negative integer value for the depth of the immunity image. Any number less than 0 would place the image behind the character artwork, and any number higher would place the image visually above the character.

 

For the Collectibles dictionaries in the root

UseBoosterWithKey - Items in inventory can now equip/use a booster. Simply set this value to the matching dictionary key name of an item in the Boosters dictionary in the Root. The kit will then add a button below the collectible in inventory to use when the player needs it.

 

For CollectiblesForThisLevel dictionary

AwardedAlreadyKey – This value can equal anything you want, but it should be somewhat unique, for example, “Level1_Free_Coin“. The kit will allow this object to be collected ONE time only. After that, the kit will check with the defaults to see if a bool for key of name “Level1_Free_Coin” is set to YES, and won’t add this object to the scene again. This is a good way to give users a “freebie” of an item to test out, or simply limit the quantities of a collectible. If the game is ever started fresh again (either by deletion and reinstall, or buy using a button with the DoesWhat property set to StartGameFresh), then objects with an AwardedAlreadyKey will return.

AddBoosterOnCollect – Enter the value of a matching dictionary key name of an item in the Boosters dictionary in the Root. This will immediately equip the lead character with this booster.

 

For the InAppPurchasing dictionary 

Product1RemovesAds – Will remove iAds if the product is purchased and this is YES. If the primary function of the product is to remove ads, then your In-App Purchase should be set to Non-Consumable. This property can still be YES even if the product is Consumable. For example, you could advertise “Buy 10,000 coins and Remove Ads”. In which case, ads will be removed as long as the app isn’t deleted. If the user deleted the app, then iAds will show again because Consumable products are not restored.

Product2RemovesAds – Will remove iAds if the product is purchased and this is YES. See notes on Product1.

Product3RemovesAds – Will remove iAds if the product is purchased and this is YES. See notes on Product1.

 

For Objects

Movements > MovementStopPausesAnimation – Setting this to YES will pause object animations when movement stops.

FiresOutOfScreenRange – Setting this to YES will allow the object to fire even if it is off screen. For example, if you wanted Donkey Kong to throw barrels even if he is 10 ramps higher than what can be seen onscreen.

AddBoosterOnBreak - Enter the value of a matching dictionary key name of an item in the Boosters dictionary in the Root. This will immediately equip the lead character with this booster.

 

For Weapons

DoNotRemoveWhenOutOfView – Set to YES and the kit will not remove the weapon by default when it moves out of view.

 

Notable Code Tweaks

Previously movements in objects had a two second delay before being initiated. This is no longer the case.

When buttons started the game fresh (via their DoesWhat property equaling StartGameFresh), the code previously cleared out all NSUserDefaults. In hindsight, this obviously removes In-Game Currency as well, which the user could have bought via an In-App purchase, so the code know removes most defaults, with the exception of In-Game Currency.

For past buyers, to update your kit from 1.0.6 (or any past version), 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 which was just emailed to you, along with new copies of the demo projects.

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

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.

IMG_0159

 

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

 

More Features in Build 1.0.5 of the Fantastic Worlds iOS Starter Kit

The latest update to the Fantastic Worlds iOS Starter Kit adds so much cool stuff, I just couldn’t contain it to one blog post. And by the way, new builds are ALWAYS free to past buyers of the kit (you’ll get emailed) and updating from a past version just involves copying and replacing the class files that have changed (you don’t need to start a new project or anything crazy like that). So what else is new. Well how about time-based breaking of objects !  Is that vague? Try this, you can now open a treasure chest by standing near it for a while. Or your character might be standing on a platform and suddenly it will break beneath their feet. You can optionally add a time-meter near the object about to be broken to give players a clue that they are unlocking something or standing on a tricky object.

And you can now use Switches to open portals. Of course switches don’t necessarily have to look like pull-levers, they can be anything you want. Touch enough of theses “switches” and you can open a portal. Previously you could collect x amount of inventory to open a portal, switches are similar but nothing gets added to inventory or carried over to the next level.  Check out more in the video below…

As always, the 200-plus page epically documented iBook for the stater kit has been updated as well!  Its only 30mb though, so check it out on your Mac or iPad without downloading much!Page from the iBook documentation of the Fantastic Worlds iOS Starter Kit

Build 1.0.5 of the Fantastic Worlds iOS Starter Kit brings the Joy (stick)

This update to the Fantastic Worlds iOS Starter Kit adds some of the most exciting features, since, well, version 1.0, I think. And for those of you that requested a control pad / joystick style control, you’ll probably agree this version really takes the starter kit to a whole new level of playability. But of course, all the previous ways of controlling the characters are still intact (even better actually), so you’ve now got three options: gestures (swipes), virtual buttons, and a virtual control pad with optional joystick on top. And you can mix as many buttons with the control pad as you like. Watch the first 3 minutes of this video to get an idea of how cool this is (and if you keep watching you’ll see the handful of properties to add a joystick)…

Other fantastic new features include the option to toss weapons in the exact direction the character is moving (now that the control pad /joystick adds fine tuned movement, weapons can do the same).

Next up, spring platforms have been added. And actually, this is just one simple property called SpringVector where you’ll define the direction like so… {0,5} … Which would be 0 push on the x axis, and 5 upwards on the y axis. Previously, any object could have a bounciness factor using the Restitution property, but this new SpringVector property gives you more control.

Objects (or enemies) can now have “ghost fx” which means, they can fade in and out, and during their most faded out phase, be immune from attack. So for example, an enemy could completely disappear for a moment, then come back. If you’d like to watch a video on both the Spring platforms and ghost FX, you can below…

As always, the 200-plus page epically documented iBook for the stater kit has been updated as well!  Its only 30mb though, so what the heck, give it a download!

A page from the iBook Documentation for the iOS Starter Kit

A page from the iBook Documentation for the iOS Starter Kit

 

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!