WPF or Silverlight?

I started Mox as a WPF project. I can provide a nice and rich user experience. But lately, I’ve been thinking into switching to Silverlight, another Microsoft-driven technology that is a bit like Flash, in that it runs on the client but through a browser. The main advantage of Silverlight is that it is portable. It works on Mac, Linux and probably even some phones. That is the big selling point for me (WPF is limited to Windows). Silverlight also has the rich user experience that WPF has and has out-of-the-box auto-updating which means clients are always up-to-date.

However, I found out some problems that are making the decision difficult for me. In particular, Silverlight is meant to be a client-only sand-boxed application. For example, it doesn’t allow the opening of TCP ports for listening on the client machine. That means that you cannot have a server-client architecture purely in Silverlight (which is common for multiplayer games). The workaround involves having an actual hosted server to which all Silverlight clients talk to. In addition to adding some latency (especially if both players are far from that server), it would require me to host one/many server(s) that can handle all the players (hopefully a lot!). Of course, in all cases, I need a server for matchmaking, but this is lightweight. I was counting on one of the player to act as the server (or have user-run dedicated servers).

On the upside, as far as I know, normal Silverlight networking involves using the browser’s HTTP stack, which solves NAT traversal problems (going through firewalls). However, I think that .Net 4 introduced this also for lower-level TCP communication so that might not be a real issue.

What do you think?


About fparadis2

Lead Game programmer
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to WPF or Silverlight?

  1. Ben says:

    I did a decent amount of silverlight dev with a couple small games. Since I’m a little behind on the technology, I strongly suggest you verify how Silverlight behaves in .net 4. Silverlight can be used on windows phone 7, but I wouldn’t expect those to have much power to throw at a complex game like this.

  2. Hellfish says:

    I can’t comment on the technology, but hosting anything of the sort will probably get you in trouble if/when WOTC goes on another “Show-People-That-We-Are-Defending-Our-Trademark” crusade.Direct client-to-client is probably the better idea, IMHO.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s