Multiplayer gaming in "Mango" using sockets [Developers]

Ricky Tan has published an insightful blog post on MSDN that covers implementing multiplayer gaming on the windows Phone platform. Using UdpAnySourceMulticastClient, Ricky walks us through enabling peer-to-peer support (over WiFi in this case) in a game for Mango (opens in new tab).

Fancy carrying this out yourself? According to Ricky, it's not as difficult as one would assume. Here's some quick points to get you interested (check out the links below for the article with full code viewing, downloads, etc.):

PlatformerGame.cs: This contains the game code and is where the sockets are initialized, and where the sends and receives are handled.UdpAnySourceMulticastChannel.cs: This contains the UDP multicast sockets code for joining the group, sending and receiving data.OtherPlayer.cs: This is a modification of Player.cs to add other players to the game.

Ricky has added peer-to-peer support into the platformer start kit developed by David Russet (opens in new tab). Read more information on this (plus the full download and snippets of code) over at Ricky Tan's blog (opens in new tab). Multiplayer gaming is most definitely in the works, we also have to keep an eye on Microsoft's progress with 'Switchboard' (opens in new tab).

Via: Channel9 (opens in new tab); Thanks, Mark!

Rich Edmonds
Senior Editor, PC Build

Rich Edmonds is Senior Editor of PC hardware at Windows Central, covering everything related to PC components and NAS. He's been involved in technology for more than a decade and knows a thing or two about the magic inside a PC chassis. You can follow him over on Twitter at @RichEdmonds.

  • Yay :D
  • Whoah? What phone is this?
  • HTC MakeBelieve ;-)
  • If WoW really were to be released on a mobile, it would be game over! LOL.
  • Imagine how many people will be throwing their phones out of disgust when they get ganked one time to many. hahaha.
  • then it would break and they would have to buy a new one, and they would because they are that into the game, its a win win
  • I've never played WoW, so I have no idea what you are talking about, but I know that a lot of games have made me throw my phone more than once, especially Angry birds, that one has made me throw it at least 4 times. I always try to throw it lightly, but it hasn't always been the case. I've broken 2 phones like that, and I wonder how long it will be before my Optimus 7 gives out, the battery's plastic is already starting to detach from the battery.
  • I can't wait for Mango. It's going to be so awesome, and maybe that Full House Poker is finally going to get multiplayer support.