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 8107077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:39:28+00:00 2026-06-06T00:39:28+00:00

I know there are already some posts about this topic, but I cannot find

  • 0

I know there are already some posts about this topic, but I cannot find the answer I need and I do not know where to start.

I would like to create an online multiplayer game for the iPhone where players can play together against each other over the Internet. For example a 2 player racing game where once the 2players are matched and connected they can both control their cars in real time against each other. E.g like mario cart.

I know that the game kit does thus but only over Bluetooth or over the same wifi network. I would like this to be over the Internet (wifi only) where players can play against each other around the world.

I know there are already some frameworks to do this. But they are costly and depend on the number of connections. Is there a cheap or dare I say, free way of doing this? Like have game kit do the matching and then the connections and sending data is done some other way? Like having the iPhones host the games? Rather than having a dedicated server. I do not have the budget nor the knowledge and experience to create a dedicated server.

The matching is simple. There are 30 levels and any 2 players wanting to play the same level are matched.

Any links or book recommendations are welcome. I have very limited networking knowledge and do not know where to start.

I can read and learn the techniques even if they are technical but I will need the right resouces to allow me to make a start

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-06T00:39:30+00:00Added an answer on June 6, 2026 at 12:39 am

    You actually can do exactly what you are looking for using the Game Kit API’s. Basically, you create a match using the GKMatchMakerViewController. To make the match you use the GKMatchMakerViewController to start looking for other players, once it finds other players it notifies the GKMatchMakerViewControllerDelegate that a match has been found and will pass the GKMatch object. Then you need to have an object which implements the GKMatchDelegate protocol to handle the actual data. You set your delegate object to be the delegate of the GKMatch you are passed, and then use methods from the GKMatchDelegate protocol such as – match:didReceiveData:fromPlayer: and methods from GKMatch to send data.

    Heres some example code to help with that explanation. This is just the bare essentials, you of course need to implement your gameplay stuff, and some error handling.

    Also, you can find the documentation you need at these four links

    GKMatchMakerViewController GKMatchMakerViewControllerDelegate GKMatch GKMatchDelegate

    - (void)match:(GKMatch *)match didReceiveData:(NSData *)data fromPlayer:(NSString *)playerID{
        if(matchStarted){
            Packet *msg = (Packet *)[data bytes];
           //do whatever you want with the data received from other people
        }
    }
    
    -(void)sendPosition{
        //call this to update the other players devices (should be self explanatory)
        NSError *error;
        Packet msg;
        //Here the msg object is actually a typedefed struct name Packet. I use this to send and receive data
        NSData *packet = [NSData dataWithBytes:&msg length:sizeof(msg)];
        [myMatch sendDataToAllPlayers: packet withDataMode: GKMatchSendDataUnreliable error:&error];
        if (error != nil)
        {
            // handle the error
        }
    }
    
    #pragma mark MatchSetup
    
    - (void)matchmakerViewController:(GKMatchmakerViewController *)viewController didFindMatch:(GKMatch *)match{
        [self dismissModalViewControllerAnimated:YES];
        self.myMatch = match; // Use a retaining property to retain the match.
        self.myMatch.delegate = self;
        if (!matchStarted)
        {
            // Insert application-specific code to begin the match.
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there are already some solutions to this question but they don't seem
There are already quite some posts about the Singleton-Pattern around, but I would like
Hey I know there are already a few posts about this - yet I
I know there are already many questions like mine but I found no answer
There's already a question on this here. But i want to know if its
I know there has been a lot of posts on this but it still
I've looked trough the already asked questions but couldn't find an answer. I've some
I know there are already objects supporting Office 2007 files, but is there any
I know there are a few questions on stack already regarding this, and I
I know there is a ton of stuff on this already and have tried

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.