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 raywenderlich.com 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 :]

Enjoy!

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 an indie software developer currently focusing on iPhone and iPad development, and the administrator of this site. He’s the founder of a small iPhone development studio called Razeware, and is 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

30 Comments

[ 1 , 2 ]
  • My wish: integrated with Game Center :D
    horaceho
  • yeah, what's a good idea to challenge this practise ;)
    Many thanks to you Ray for all you shared with us
    ckimoi
  • Looking forward to the tutorial, it may help with my next project, can't believe its free! nice work.
    northy179
  • 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
    marcos.hgb
  • This sounds great! I'm in - starting tonight!

    Mat
    piratemc74
  • Great!

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

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

    many thanks
    LittlePeculiar
  • @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!" :]
    rwenderlich
  • 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 :]
    cocos2dbeginner
  • Nice job done so far! Enjoying the tutorial a lot!
    oklunden
  • hello ...
    where did you get the cards used in this tutorial?
    never
  • Wow this tutorial is insane! So long, but so good!! I can't wait to get my multiplayer game finished...
    fizzyfrosty
  • great!
    tuyenbq
  • 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?
    pmpascua
[ 1 , 2 ]

Other Items of Interest

Ray's Monthly Newsletter

Sign up to receive a monthly newsletter with my favorite dev links, and receive a free epic-length tutorial as a bonus!

Advertise with Us!

Vote for Our Next Tutorial!

Every week, we alternate between Gaming and Non-Gaming tutorial votes. This week: Non-Gaming!

    Loading ... Loading ...

Last week's winner: How to Make a Simple 2D Game with Metal.

Suggest a Tutorial - Past Results

Hang Out With Us!

Every month, we have a free live Tech Talk - come hang out with us!


Coming up in October: Xcode 6 Tips and Tricks!

Sign Up - October

Our Books

Our Team

Tutorial Team

  • Tony Dahbura
  • Kyle Richter

... 52 total!

Update Team

  • Ray Fix
  • Zouhair Mahieddine

... 14 total!

Editorial Team

... 22 total!

Code Team

  • Orta Therox

... 3 total!

Subject Matter Experts

  • Richard Casey

... 4 total!