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

  • Home
  • SEARCH
  • 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 8409735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:59:32+00:00 2026-06-09T23:59:32+00:00

I m new to game devloping in ios. Now I want made a game

  • 0

I m new to game devloping in ios. Now I want made a game similar like “Control Air Flight” and “Air Traffic Controller” ,

where a user can draw line using their finger and an object will
follow that path

so ,anyone can guide me which is best for developing like this.Can Cocos2d is best for it? Or any thing else i have to use for this.

Also If anyone knows of a tutorial already out there or any reference link please suggest me.

Thanks in Advance.

  • 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-06-09T23:59:33+00:00Added an answer on June 9, 2026 at 11:59 pm

    To simply let the object follow your finger, implement touches (and just one of its methods):

    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
        UITouch *touch = [touches anyObject];
        CGPoint toPoint = [touch locationInView:self.view];
        [yourObjectOutlet setCenter:toPoint];
    }
    

    Here, your object’s center will follow your path, but you can adjust its anchor point by editing “toPoint” accordingly to object’s frame.

    EDIT

    If you want to draw the path, then make the object follow that path, do like this:

    //define an NSMutableArray in your header file (do not forget to alloc and init it in viewDidLoad), then:
    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
       //you begin a new path, clear the array
       [yourPathArray removeAllObjects];
    }
    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
        UITouch *touch = [touches anyObject];
        CGPoint toPoint = [touch locationInView:self.view];
        //now, save each point in order to make the path
        [yourPathArray addObject:[NSValue valueWithCGPoint:toPoint]];
    }
    

    Now you want to start the move:

    - (IBAction)startMoving{
       [self goToPointWithIndex:[NSNumber numberWithInt:0]];
    }
    - (void)goToPointWithIndex:(NSNumber)indexer{
       int toIndex = [indexer intValue];  
    
       //extract the value from array
       CGPoint toPoint = [(NSValue *)[yourPathArray objectAtIndex:toIndex] CGPointValue];
       //you will repeat this method so make sure you do not get out of array's bounds
       if(indexer < yourPathArray.count){
           [yourObject setCenter:toPoint];
           toIndex++;
           //repeat the method with a new index
           //this method will stop repeating as soon as this "if" gets FALSE
           [self performSelector:@selector(goToPointWithIndex:) with object:[NSNumber numberWithInt:toIndex] afterDelay:0.2];
       }
    }
    

    That’s all!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a new iOS programming and I'm developing a simple iPhone game that needs
I am developing a game with WPF technology. I want to add new Features
Im developing a game for Android using AndEngine. As of now, I want to
I have been developing a new online game for the past year now. The
I want to develop a game using Andengine and i am new to game
I'm developing in python, still new to the game, and I want to make
I'm developing a game and now I want to make script system for it.
I am pretty new to Android and have been developing a game. Every now
Hello I am new to XNA and Now I am developing a game. For
I'm making a new game that generates a huge grid (lets say 1000x1000). The

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.