Well hello there! I wanted to share with you the latest installment in my Zune series: Building a networked Zune game.
The potential is huge - imagine a group of six people playing Monopoly wirelessly on their Zunes, or some other board or card game. (That's next for me!) But for right now, the goal is to understand the fundamentals. That means going over peer-to-peer architecture and sending network packets.
Important Things to Jumpstart You
DOWNLOAD ZE SOURCE! (164KB) [updated June 17 to include ZuneScreenManager]
- Zune games are perfect for peer-to-peer because of their relatively low processing power and the lack of a central server (unless it's a Zune).
- Peer-to-peer means everyone is running an instance of the same program - there is no client or server.
- Thusly, to implement a lobby, you need to have Create and Join Session functionality in the same program.
- Make ample use of the available NetworkSession events (GamerJoined, GameStarted, SessionEnded) etc.
- This sample shows how to send a network packet between peers with a Vector2 in it. More complex thinking will be necessary to implement a message handling system.
So, let's jump right in.
Video 1: Introduction (download .wmv, 26MB)
Stay tuned for the "how to" bits - subscribe to the blog, more will be available in the next couple of days.