How To Make a Simple Playing Card Game with Multiplayer and Bluetooth: Intro and Challenge

Ray Wenderlich
Learn how to make a fun multiplayer card game with UIKit!

Learn how to make a fun multiplayer card game with UIKit!

This is just an announcement to let you guys know you are in for a special treat!

Matthijs Hollemans, the author of the IOS Apprentice and co-author of iOS 5 by Tutorials, has written a new epic 7-part tutorial series for you guys – that is completely free for all readers!

The tutorial series shows you how to make a fully functional card game app for the iPhone using UIKit. And the best part about it is it is fully multiplayer using Bluetooth/Wi-fi and Bonjour networking!

Here’s a video showing off the multiplayer card game you’ll make in this tutorial series:

Pretty cool, eh? Keep reading to find out more about who this tutorial is for, when it’s coming out, and our special reader’s challenge!

Who’s This Tutorial Series For?

This tutorial series is best for intermediate or advanced iOS developers who want to learn more about the following topics:

  • Network programming. This tutorial covers a lot of subtle aspects of network programming that aren’t covered anywhere else – such as how to architect your networking code and integrate it with your game logic, how to elegantly transmit packets of data across the wire, how to deal with disconnects, out-of-order packets, and other networking issues, and much more. The lessons you’ll learn here apply to many different networking APIs, not just GameKit/Bonjour.
  • UIKit GUIs and animation. Not only does this tutorial show you how to make a networked card game – it shows you how to make a good looking networked card game. You’ll learn a lot about using UIView animations for neat transition effects, customizing the look of buttons and views, and much more.
  • General good coding/architecture practices. This is a fairly substantial app, and there’s a lot of code to cover. Going through this tutorial will show you a good example of how to separate the model, view, view controllers, and networking code into separate classes, making areas of responsibility clear and the code easily understandable and maintainable.

In short, this tutorial is a great read even if you don’t plan on making a game like this anytime soon – you will learn a lot. I know I did!

When’s It Coming Out?

The first part of the series will be coming out tomorrow (Friday), and subsequent parts will come out every subsequent Friday, for 7 Fridays total.

The reason we’re giving such a long break between each part of the series is to give you guys plenty of time to try each part before we move onto the next one.

There’s a lot of ground to cover, and it’s best if you tackle it a little bit at a time so you don’t get too tired/overwhelmed. Each tutorial will take about 1-3 hours to get through, so if you want to follow along, you just need to set aside some time on your schedule each week to keep up.

And that leads us into the next section…

Reader’s Challenge!

Challenge accepted.

Challenge accepted.

We thought it would be fun to give a little challenge to you guys with this tutorial series, since it’s such a long one.

The challenge is the following:

  • Follow along. Follow along with us each week and complete each part within a week of it being posted (each part comes out on Friday). It’s best if you schedule 1-3 hours each week to go through each part.
  • Race to the finish! When you finish the final part, contact us and let us know that you made it all the way through! (We’re going by the honor system.)

The first three people to make it completely through the series will have their name and photo of their choosing forever immortalized on this post!

Update 9/19/12: And here are the winners: Phoenix, Stephan Pulver, and Greg Pugh!

The Immortal 3!

Why? Because it’s fun! :]

In addition, a random person from the “immortal 3” will win a free copy of the book the iOS Tutorial Team and I are working on (when it comes out) – iOS 6 by Tutorials! :]

If you are reading this post after the “reader’s challenge” officially starts (or is over), you can still do the challenge for fun! Do the tutorial in phases – no more than one a day. That way you can really understand the content and pace yourself. And post here when you’re done!

Update: Some readers have requested we have the final part come out on Saturday so those itching to be the first to finish have a fair chance without it conflicting with work schedules. So the final part will come out on Saturday Aug 11 @ 11AM EST per your requests, the rest will come out each Friday as planned :]


Matthijs and I hope you enjoy this tutorial and learn a lot along the way. Stay tuned for the first part in the series – this Friday – and we hope you follow along with us! :]

Ray Wenderlich

Ray is part of a great team - the team, a group of over 100 developers and editors from across the world. He and the rest of the team are passionate both about making apps and teaching others the techniques to make them.

When Ray’s not programming, he’s probably playing video games, role playing games, or board games.

User Comments


[ 1 , 2 ]
  • My wish: integrated with Game Center :D
  • yeah, what's a good idea to challenge this practise ;)
    Many thanks to you Ray for all you shared with us
  • Looking forward to the tutorial, it may help with my next project, can't believe its free! nice work.
  • rwenderlich wrote:Ohhh I see :} OK - I'll schedule the final tutorial (part 7) to come out on Saturday August 11 at 11:00 AM EST, all others will come out on Friday as planned. Hope that helps! :]

    Great! We have a deal! :D
  • This sounds great! I'm in - starting tonight!

  • Great!

    How do we take part in the Follow Along challenge? Do we have to send the project like every week or so?

  • you guys are so amazing. I can't wait for this. Challenge accepted!

    many thanks
  • @nameghino: No need to send the projects as you go - we're going by the honor system here - we trust you guys!

    If you are able to go through each tutorial (really learning it, not just copy/pasting) and get the entire thing done, drop me an email and let me know. The first 5 people to do so will be in the "Immortal 5!" :]
  • Hey Ray,

    I'm really excited about this series, I already read the two parts and they are really well written and explained! (Thanks to Matthijs Hollemans who wrote the series! Can't wait till Friday to read the next part. I've got a question about the further parts. Will there anything like "realtiime syncing" of the game? Actually I would like to use the network code/logic and adapt it to a realtime physics game (box2d). (Several players (just circles) and a ball). I was thinking of just sending the input of the clients to the server and the server would "simulate everything" and than just send the positions of the objects to the clients and use the transform function of b2body. That's it. A problem could be the latency. But I don't have experience in that, never tried something like this because I never found a tutorial about the Gamekit (with a custom matchmaking code - no peer picker). Would this run smooth on the client side? Is there something similiar (I know there's no physics covered in the tutorial) covered in the tutorial?
    I also read some articles about servertime and clienttime but I didn't understand it very well :/. What do you guys suggest/say about this?

    Maybe you could do a simple tutorial on this: "How to make a simple physics based game with multiplayer and bluetooth" (preferable box2d).
    Or maybe an addition to this tutorial as an extra. Maybe and the end the players could move around their cards and it would be synced on every device? Just as a little gimmick :]

    This isn't just related to Ray, everyone is allowed to answer and give his/her opinion/suggestion to this post. Don't misunderstand me :]
  • Nice job done so far! Enjoying the tutorial a lot!
  • hello ...
    where did you get the cards used in this tutorial?
  • Wow this tutorial is insane! So long, but so good!! I can't wait to get my multiplayer game finished...
  • great!
  • The tutorial's been great so far and this is perfect for our project. Though the problem is that as I go through the tutorial, till the end of part 1 when I want to test if two devices got connected together using wifi. There's no response or debug statements when I host the game using my iPad and join using the simulator. Same also happens when I tried out the final version of the app. My iPad and the simulator uses iOS 7. Advice?
[ 1 , 2 ]

Other Items of Interest Weekly

Sign up to receive the latest tutorials from each week, and receive a free epic-length tutorial as a bonus!

Advertise with Us!

Unity Starter Kit!

We are considering writing a new starter kit on making a game in C# with Unity.

Would this be something you'd be interested in, and if so which option would you prefer?

    Loading ... Loading ...

Our Books

Our Team

Video Team

... 12 total!

Swift Team

... 13 total!

iOS Team

... 52 total!

Android Team

... 9 total!

OS X Team

... 11 total!

Sprite Kit Team

... 10 total!

Unity Team

... 9 total!

Articles Team

... 10 total!