Angry Ninjas Sling Shot Game Starter Kit for iOS

Angry Ninjas Sling Shot Game Starter Kit for iOS

A slingshot game starterkit, in the mold of Angry Birds and other variations. Includes an easy to customize XCode and Cocos2D project plus access to high definition video documentation.

  • Language: Objective-C
    Framework: AppKit
    Platform(s): iPad
  • Released: Mar 1, 2012
    Last Update: Mar 21, 2014

This starterkit allows you to create a sling-shot game very quickly, and ride the wave of popularity they are enjoying on the appstore right now (you've probably heard of Angry Birds, the best known slingshot game). All you need to do is build some fantastic levels and add your own artistic vision. We've done the hard part, now you get to do the fun part!

Like all our iOS Starter Kits the project files are included with video guides (accessible online or offline) covering every detail of modifying the app for yourself.

Angry Ninjas slingshot game starterkit

Basic features

  • XCode and Cocos2D v2 project with documentation and easy to understand variable names.

  • Uses the latest version of Cocos2d v2, which supports iOS6

  • Uses Box2D, an advanced physics engine for realistic collisions (the same as another well-known sling shot game)

  • Runs at 60fps.

  • Tested on the iPhone 4, iPhone3GS, iPad 1, 2, 3 and already updated for the iPhone 5

  • Supports high resolution images for the Retina Display iPhone and Retina Display iPad.

  • Preference settings for the iPad or iPhone (for example, you can change things like the stack location, screen pan speed, throw power of the sling shot, etc by changing simple variables)

  • Supports as many levels as you want to build.

  • The in-game Menu will show 10 sections, and each section can have multiple levels. Players will have to complete all levels in a section before the menu unlocks that section to jump to.

  • Level progress is saved in the NSUserDefaults. So even if the game quits, players will have a variable saved for the number of levels they have completed.

  • High scores are also saved in NSUserDefaults

  • You can set the number of characters to toss per level and how much score is required to pass the level.

  • You can set bonuses per level for the number of characters that haven't been used to pass the level.

  • You can change the layers of background art on a per level basis. The clouds, hills, and ground plane are all separate scrolling pieces of art.

  • Drop in your own .mp3 files for sound fx or background music.

  • Includes three sound preferences which get saved even if the player quits the game. So players can enable or disable Sound FX, Voice FX, or Ambient FX ( or Background Music )

  • You can modify the physics such as gravity, the accelerometer, or any other property to drastically change the game.

Additional features

  • It is incredibly easy to add a variety of shapes to your level's stack with built in vector definitions for the collision environment. For example: squares, triangles, circles, trapezoids, parallelograms, hexagons, octagons, pentagons are preset properties for your stack object. Skip to 00:07:21 for details in the demo video for more details.

  • Includes two animated impact FX that can be played anytime a stack object breaks (you can add as many more as you like). Different FX animations can be applied to different objects or enemies.

  • Supports custom break animations for stack objects or enemies. So if you want to include even more animation for a specific object breaking apart you can.

  • Stacks are incredibly easy to build. We recommend using an art program like Flash or Photoshop to design your stack then just copy the center x and y locations of each object into XCode. Skip to 00:18:53 for details in the demo video below

  • Two lines of simple code add each stack object or enemy to the stack. All your properties for the object are defined in one line. Usually YES or NO values for options like: breaksFromNinja , hasAnimatedBreakFrames, damagesEnemy, breaksOnGround, makeImmovable. Skip to 00:10:44 for details in the demo video.

  • Every Stack Object or Enemy can have a custom point value.

  • You can add as many different slingshot characters as you like, depending on level or the order they get thrown in.

  • Slingshot characters have different artwork frames for poses like "standing in line to be thrown", "blinking" , "in air", "roll", "roll and impact", or "on the ground". You can add as many different poses as you like and choose when they appear.

  • Enemies can have damage factors. So it may take more than one collision with a ninja or stack object to damage the enemy enough to be destroyed. In our demo video you'll notice the enemy gets a bandage or two after being collided.

  • Enemies can also have separate animated frames for breaking (for example, the enemy in the template disintegrates )

  • Choose between embedded images or a font for the post-object break Scores (which float above the object that broke). Currently the template uses images for scores in values of 100,500,1000, 5000 and 10000.

Hide

Video Documentation

We've made it incredibly easy to customize this template. Code you might want to change has all been commented, and code you probably never want to change also says so. But aside from specifying the max number of levels you want to add in the GameData.m class, there isn't a lot to change right away.

PLUS you have access to 2 hours of video documentation on Vimeo.

https://vimeo.com/37273523

  • HowToGuide part 1 Images and GameData Class 00:00:00
  • HowToGuide part 2 TheStack Class 00:21:11
  • HowToGuide part 3 TheLevel Class 00:57:01
  • HowToGuide part 4 TheNinja Class 01:27:42
  • HowToGuide part 5 ContactListener Class 01:40:17
  • HowToGuide part 6 TheMenu Class 01:48:38
  • HowToGuide part 7 GameSounds Class 01:58:03
  • HowToGuide part 8 WrapUp Class 02:09:54
Hide

Building Levels

Probably the most work you'll need to do in customizing this template is building some challenging levels. For reference, play some of the other popular sling shot games in the App Store and really get a feel for what makes a good stack of objects and where enemies are positioned to target.

Watch the video guide when you start building your levels. (specifically regarding TheStack class at timestamp 00:21:11)

The template comes with many shapes that you can use in stack. You can add your own shapes easily, but lets assume you use one of our included shape images.

  • Suppose you have a bunch of images. Bring them into Photoshop, Flash, Illustrator, or any image editing program that you can get x and y locations for the object (we used Flash).
  • Arrange your objects exactly as you want them to be stacked up in XCode.
  • Note the X and Y values of each object
  • Your objects on the far left should have x values of 0 to 50 usually. If not move your entire stack so those objects are in that range.
  • Your objects on the bottom have lower y values than those on top. So your Y axis starts at the bottom of the screen (like graph paper in high school, you usually start x:0, y:0 on the bottom left. Same is true here. If your design program starts the y axis in the top right, it helps to just use a grid and write down your own y values on the stage (see the example image)
  • Copy your X and Y values into XCode into TheStack class.

The code to create a stack object is below.

StackObject* object1 = [StackObject objectWithWorld:world location:ccp( 0 + stackLocationX , 20 + stackLocationY) spriteFileName:@"woodShape1" breaksOnGround:NO breaksFromNinja:YES  hasAnimatedBreakFrames:YES  damagesEnemy:NO density:0.25f createHow:useShapeOfSourceImage angleChange:90 makeImmovable:NO points:100 simpleScoreVisualFXType:breakEffectSmokePuffs];
[self addChild:object1 z:depthStack];

The X and Y values go in this part:

location:ccp( 0 + stackLocationX , 20 + stackLocationY)

In that snippet, the X was 0 and the Y was 20.

Other properties for the StackObject include:

spriteFileName: the base filename in the Resources folder, like @"woodShape1" , note you exclude .png

breaksOnGround: YES or NO does the object break when it hits the ground

breaksFromNinja: YES or NO does the object break when the ninja hits it

hasAnimatedBreakFrames: YES or NO if you have included separate frames of animation for breaking, typically this will be NO unless you want to add a lot of animated frames

damagesEnemy: YES or NO does the object damage the enemy

density How dense is the object, 0.1 to 1.0 usually.

createHow: this defines the vector outline of the object, see the Constants.h file for more info

angleChange: 0 to 360 degrees

makeImmovable: YES or NO

points: the point value, can be any value but we've included images for 100,500, 1000, 5000, 10,000

simpleScoreVisualFXType: defines the animation to show when the object breaks, we've included a smoke effect and explosion. Can also be set to show nothing

Enemy objects have similar code. Again, all this is detailed in the video guides.

alt text

Hide

Changing the Artwork (required)

You are required to make significant artwork changes prior to submitting this template to Apple.

Here's why:

  1. If many buyers of this Kit used the same ninjas for example, Apple would start to notice and possibly consider the submissions duplicates of each other. That would get you rejected and in hot water as a developer.
  2. CartoonSmart is reserving the right to use the ninjas specifically in a version we will submit to the App Store.

Please use your own art for the backgrounds, slingshot characters, enemies, start image and menu images. You can use the stack objects provided, explosions, and point score images in your version.

What if you aren't a designer?

  • There are plenty of amazing stock image sites for 2D and 3D graphics out there. Many of the lesser known 3D stock image sites have fantastic deals on art, especially cool military stuff.
  • Consider hiring an artist!
You need to log-in or create an account
  • Create an account
  • Log-in

Please use your real name.

Activation link will be sent to this address.

Minimum 8 characters

Enter your password again

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

X

Save your watchlist

Fill your details below to receive project updates from your watch list - including new versions, price changes and discounts.

I agree to the terms of use and privacy policy.

2 licenses, starting from From » $49.99 View Licenses 14 day money-back guarantee
  • Looks neat and professional. Excellent
    WS Wenpo Sun
    1 year ago, 1 comments
    Was this helpful?
    Flag
  • This is a great component, this will save us lots of time and money in the development of a great game!!
    JE Jaime Enriquez
    2 years ago, 1 comments
    Was this helpful?
    Flag
  • Although I have only just started to look at this kit and watching the first video the developer has already answered my first two queries straight away which is comforting to know that support is there. Am looking forward to getting to grips with this product
    E elpuerco
    2 years ago, 1 comments
    Was this helpful?
    Flag
Post a comment

Or enter your name and Email
  • J Jacob 4 months ago
    Does this version work with IOS 7 ?
    • Justin Dike Developer 4 months ago
      Sure does. Cocos2d kits are usually pretty immune to the changes of iOS7. Obviously the biggest changes was the general user interface, but this kit didn't use any of Apple core UIKit stuff. Thanks
  • E ELDELOLI License holderPersonal License 9 months ago
    hi, just a quick question, I would like to be able to edit all the stuff I want in this game with Xcode and then be able to upload the binary to app store, of course with different names, images etc... would that be possible with the personal licence or do i need to purchase the developer licence ? thanks
  • inixthium 2 years ago
    The ability to pan out and see the whole world really seems like a must have in any physics game in which the world is larger than the screen. In fact I haven't been able to find any of the more popular Angry Birds like games that don't have this feature. In my attempts to research how to do this I can see why this wasn't included. Unless there is an easier way to do this I haven't discovered, the scaling required is a nightmare. Especially for a beginner with box2d. I was hoping this could be done somehow with another layer so the physics in the game wouldn't have to be altered that extensively, but so far I haven't been able to find anything like this. Is there any tutorial or source code you know of that might make this manipulation of the template easier to accomplish?
    • R Ramu 10 months ago
      I been searching for the exact same thing, but could not find the answer :/ Hope there is a toturial out there :D