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

Update on Role Playing Games with Sprite Kit Part 2

Ahoy-hoy students!

For those of you that enrolled in my first Role Playing Games with Sprite Kit course, here’s how part 2 is progressing. I’m almost to the point of recording the lessons. It took me way longer than I wanted to get to this point because I kept adding, and adding, and adding more and more to this second set of lessons. And fortunately the original setup (what you have at the end of the first part) plays nice with the future parts to come.

So what will change from part 1? Levels are totally non-linear now. In this first set of lessons, we stepped through levels in order, like level 1, then level 2, etc. And we did so by collecting coins. Coin collection was a quick way to advance levels but as I pointed out to everyone who took the course, this was never the end-goal for navigating the world. Role playing games are more about the mystery of discovering items or clues that help you find your way, then they are about simply gathering up money in a mad dash.

Levels can be huge landscape areas or tiny rooms. You’ll typically have a portal to enter (a door, cave, whatever) and a similar portal to exit. So obviously we’ve got a Portals class in the next set of lessons as well.  The game will now have Save Points, so you can choose which levels are deemed worth starting back from. So if the player makes it out of a giant maze, thats probably a good save point.  You can use portals to jump around within the same level or to another level. Portals can be locked and unlocked, and you can optionally create “trick” portals, where if you don’t have a certain item, you would end up someplace you don’t want to be when colliding with the portal. Imagine a hole in the floor type situation. If you the player hasn’t collected the plank item, they would fall through the hole.

Inventory has been added. In fact, I think a good start to this next set of lessons is to program the inventory class. We’ll make the inventory all saved in the NSUserDefaults, so if the user decides to quit the game and play again a month later, their inventory is still there. And what exactly is collectible? Well anything really. RPG’s usually have keys that unlock doors, so that option has been added. You can have portals to other levels that open up once a certain item or number of items has been collected. Inventory can be attained by simply colliding with the item (like the player collided with Coins in the first lessons), and I’ve also added the option to have items collected after attacking an Object (class) or by colliding with the Object.

Objects. We’ve got an Object class in this next series of lessons which can be used for A LOT.  You can collide with objects (push them around using physics properties), objects can damage you (for example a torch might harm you), objects can be animated, they can move back and forth / or up and down, and you can even read pop-up images if you collide with them. So an object could be a person in the game that delivers you a message when you bump into them. Or they could be a little gremlin that roams around to cause you damage. Objects can also  And again, you can attack objects and have them break with an optional particle sequence and optionally leave behind a collectible object.

Map Class / Start Screen. We’ll add a map so the user can choose where to begin the game (from levels they have already gone through). So the game can begin with either the map or just jump them right into the last-played level.

Invisible Boundaries.  While objects can be used as collide-able boundaries, thats not always going to be the option to defined where the characters can go. So we’ve not got a Boundary and Edge class to really fine tune the playable area. The Boundary class will create either circular or square areas that the character can’t enter, and the Edge class can define lines ( better for diagonal areas)

Tiled Backgrounds. Yup, we’ve got some tiled backgrounds with Sprite Kit. So if you wanted to create a path through a level, you could use a single square image, maybe 100 wide by 100 tall,  then tile it so the path repeats over an area that is 200 wide by 800 tall.  Or you could just tile the entire area of the level you want playable, for example, just a bunch of grass tiles. You can also adjust the size of the tiles within the playlist.

Sounds: We’re finally adding sounds!

What Else?  There’s more, but I think this covers most of it. By the end of this next series, you should have a greater understanding of Sprite Kit, and a very playable game.