The World’s Leading Microsoft .NET Magazine
   
 
The .NET Addict's Blog

My Top Tags

                                                           

My RSS Feeds








Latest Diggs - Programming

Internet Blogs - Blog Top Sites

Site Hits

Total: 2,551,710
since: 19 Jan 2005

Ulysses Agenda : First Cut Networking Design

posted Wed 13 Sep 06

While I was suffering through having the tint removed from my Minivan (who knew that legal tint in Texas would be illegal in New Jersey??), I drew up a rough cut of what I see as the basic network design for Ulysses Agenda. Below is a list of the various meshes that I see being used by the game, as well as a list of the messages that will be sent on them. Hopefully you feel the same way I did when you see this - the power provided by WCF Peer Channels is absolutely insane. I can have completely loosely coupled peer-transmitted events that any client, regardless of purpose, can listen to or push, giving me a truckload of power and flexibility that will come in handy when building this application using Extreme Programming (XP) techniques:

net.p2p://ulyssesagenda/chat

  • User X sends message Y to scope (Z). Scopes in Ulysses Agenda are defined by a scope type and a GUID. For example, you could send a message directly to a player by sending a message to the scope Scope.Player with a TargetID that is the same as the player's GUID.
  • Can also be used for Trade Guild chat, e.g. User X sends message Y to scope Scope.TradeGuild with the GUID of the target guild. Any user whose client receives this message who is a member of that guild would then be able to see that message.

net.p2p://ulyssesagenda/nav/[galaxy id]

  • User X sends radar pong from position Y. When players enter a galaxy, their client will then create an instance of a receiver for nav messages for that galaxy. Since the design of the game doesn't allow players to see positions of other objects outside the galaxy, having a mesh for each galaxy's movement is ideal.
  • User X leaves radar. This message will tell other listening clients that a player has left the radar. By default, the game clients will leave radar markers for other players on screen while waiting for new positions from 'pong' messages. When this message is received, the marker will be removed until the next 'pong' is received. This is to facilitate players with stealth ships, etc.

net.p2p://ulyssesagenda/combat/[galaxy id]

  • Object X fires weapon Y at object Z. These are listed as objects to allow for NPC vs. NPC combat if necessary, NPC vs. player combat, and potentially things like automated drones and subservient fighters to fight on behalf of a player.

net.p2p://ulyssesagenda/shipyard/[shipyard id]

  • User X performs transaction T

net.p2p://ulyssesagenda/starport/[port id]

  • User X performs transaction T

net.p2p://ulyssesagenda/planet/[planet id]

  • User X performs transaction T

net.tcp://[server ip]/universeserver.svc - note that this is not a p2p service, its a standard service

  • login
  • logoff
  • register
  • getgalaxymap
  • getgalaxies
  • getuserstats
  • etc...

Hopefully my next post will be a walkthrough of the code I used to create a sample universe. Again, in keeping with XP goals, I want to create the smallest testable surface area for my application before continuing. Once I am assured that all is in working order, I can begin building out again. What I want to avoid is to get 3 months into the code to find out that something at the lowest level of the application doesn't work and I need to throw it all away. Removing scar tissue and refactoring as I go seems like a good trade off for the reliability and stability of being able to count on my underlying network backbone as I add more and more complexity on top.

tags:                  

links: digg this    del.icio.us    technorati    reddit




1. Christopher Bennage left...
Thu 14 Sep 06 8:28 am :: http://dev.bennage.com

I love what you're doing here.

I assume that the p2p services also communicate with the game server in order to maintain/verify the state of the game? I'm still pretty green with WCF.


2. Kevin Hoffman left...
Thu 14 Sep 06 8:40 am

Most of the p2p stuff is broadcast messages to reflect changes in game state that can be listened to by any other client. The state of the game itself, depending on which state you're talking about, is all maintained in the clients themselves. Where necessary, the state is maintained on the universe server as well.

For example, every single client in galaxy A knows where everyone else is (unless they're stealthed), but the universe server knows where everyone is, regardless of galaxy or stealth mode.


Tag Related Posts

My Macbook Air is masculine, dammit!

Mon 17 Mar 08 6:59 P GMT-05
tags:          

iPhone Underrated as a Gaming Device?

Fri 14 Mar 08 1:50 P GMT-05
tags:        

CLINQ v1 Demo - Network Message Filtering

Wed 09 Jan 08 7:47 P GMT-05
tags:        

Building a Ledger Style for WPF Grids

Tue 21 Aug 07 3:30 P GMT-05
tags:    

Continuous LINQ - Can I write games with it?

Mon 13 Aug 07 3:09 P GMT-05
tags:        

My 2008 Wishlist : A Transformers MMORPG

Tue 26 Jun 07 12:04 P GMT-05
tags:        

My first "Acropolis" Application

Mon 04 Jun 07 1:40 P GMT-05
tags:      

Exploring the Delegate Design Pattern

Mon 14 May 07 6:30 P GMT-05

Orcas' Hidden Gem - The managed PNRP stack

Fri 11 May 07 6:45 P GMT-05
tags:        

Will Silverlight be DOA?

Mon 16 Apr 07 8:02 P GMT-05

Exploring the MVC Pattern in WPF

Tue 10 Apr 07 12:51 P GMT-05
tags:                      

WPF Bindings == WTF Bindings?

Mon 12 Mar 07 6:31 P GMT-05

On MUDs

Thu 08 Mar 07 5:00 A GMT-05
tags:                    

Cocoa Programming vs. WPF : NIB vs XAML

Tue 20 Feb 07 2:09 P GMT-05

Cocoa Bindings vs. WPF Binding

Thu 15 Feb 07 5:41 P GMT-05
tags:                

What I think is a bug in WCF POX messaging

Thu 04 Jan 07 4:58 P GMT-05
tags:      

Ulysses Agenda Makes Redmond Developer News

Wed 29 Nov 06 7:10 P GMT-05
tags:                

Is the continuous beta the new model for Vista?

Tue 21 Nov 06 8:51 P GMT-05
tags:              

A visit to Nintendo World on "Wii Day"

Mon 20 Nov 06 12:37 P GMT-05
tags:          

Ulysses Agenda - Network Engine Test 1

Mon 09 Oct 06 2:26 A GMT-05
tags:              

Ulysses Agenda : First Cut Networking Design

Thu 14 Sep 06 12:46 A GMT-05
tags: