Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4069416
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:29:54+00:00 2026-05-20T16:29:54+00:00

Does anybody know how slicing effects work in the Fruit Ninja game? Or any

  • 0

Does anybody know how slicing effects work in the Fruit Ninja game?

screenshot of Fruit Ninja game

Or any other way to achieve a similar effect?

How to get that all swipe point at how to draw line on that
please help ….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:29:55+00:00Added an answer on May 20, 2026 at 4:29 pm

    i draw the many lines to give slicing effect and removed points simultaneously from that mutable array where i put the point to draw line

    code:-

    -(void)init
        {
         [self checkAllArray];
         [self schedule:@selector(removePoints:) interval:0.0001f];
        }
    -(void)checkAllArray
    {
        if (naughtytoucharray==NULL)
            naughtytoucharray=[[NSMutableArray alloc] init];
        else
        {
            [naughtytoucharray release];
            naughtytoucharray=nil;
            naughtytoucharray=[[NSMutableArray alloc] init];
        }
    }
    
    -(void)draw
    {
        glEnable(GL_LINE_SMOOTH);
        glColor4ub(255, 255, 255, 255); //line color 
        //glLineWidth(2.5f);
        for(int i = 0; i < [naughtytoucharray count]; i+=2)
        {
            CGPoint start = CGPointFromString([naughtytoucharray objectAtIndex:i]);
            CGPoint end = CGPointFromString([naughtytoucharray objectAtIndex:i+1]);
                    ccDrawLine(start, end); // line 1
            ccDrawLine(ccp(start.x-2,start.y-2),ccp(end.x-2,end.y-2));// line 2
            ccDrawLine(ccp(start.x-4,start.y-4),ccp(end.x-4,end.y-4));// line 3
            ccDrawLine(ccp(start.x-6,start.y-6),ccp(end.x-6,end.y-6));// line 4
            ccDrawLine(ccp(start.x-8,start.y-8),ccp(end.x-8,end.y-8));// line 5
        }
    }
    
    - (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 
    {
        CGPoint new_location = [touch locationInView: [touch view]];
        new_location = [[CCDirector sharedDirector] convertToGL:new_location];
        CGPoint oldTouchLocation = [touch previousLocationInView:touch.view];
        oldTouchLocation = [[CCDirector sharedDirector] convertToGL:oldTouchLocation];
        [naughtytoucharray addObject:NSStringFromCGPoint(new_location)];
        [naughtytoucharray addObject:NSStringFromCGPoint(oldTouchLocation)];
    }
    
    -(void)removePoints:(ccTime *)tm
    {
        if ([naughtytoucharray count]>0)
        {
            [naughtytoucharray removeObjectAtIndex:0];
        }
    }
    
    -(void)dealloc
    {
        //NSLog(@"deallocing lightning\n");
        [self removeAllChildrenWithCleanup:YES];
        [super dealloc];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anybody know of a way to automatically find any variable, where the type
Does anybody know any way or any software which could decompile swf file to
does anybody know of an extension of shouldjs or some other assertion library which
Does anybody know a way to enable response character set selection by client for
Does anybody know how I use asp.net mvc routing to force any non ajax
Does anybody know whether there's a way of finding out whether a particular file
Does anybody know how I can delete the fading effect after dropping or sorting
Does anybody know of a way to make jQuery Mobile load only on pages
Does anybody know a way to create a keyboard shortcut for the button 'Expand
Does anybody know a quick way to force an outgoing http request to go

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.