views:

47

answers:

1

We're developing a silverlight multiplayer game using TCP connections. We have all of our game objects and engine stored in a seperate assemble that we meant for the SL client and the server application to share. However, it appears that the special SL assemblies cannot be shared with pure .NET applications and vice versa.

So what are our options? We know that the SL 4.0 beta offers partial shared assemblies of the most basic namespaces, but we're not interested in working with a beta at this point.

Would it be even remotely possible to run all of the game logic on the server side, and then just have the SL client send input to the server, and render graphics as by dictated by the server?

A: 

Pure .NET application are able to link even Silverlight 3.0 assemblies, just try it out. It's only that they do the marketing for that feature now for 4.0. ;-)

However I experienced some minor issues with that (seems some Func<>/Action<> delegates were not compatible). Also Silverlight 3.0 assemblies are not optimized when you choose that compiler option.

What you can do is to add existing source code files in your project as links. But it's surely a pain to maintain when you have a lot and often create new or remove source code files. You can't link complete folders yet. :-/

The Visual Studio tools for the RIA services (the current Microsoft RAD approach for Silverlight LOB apps) use T4 to copy entity class code from the .NET project that runs on the web server which hosts the web service over to the Silverlight project. For me that doesn't feel like a clean approach. But maybe you're not as boneheaded as me and can check to see if you can leverage that functionality for your purpose.

herzmeister der welten
We tried referencing the SL 3.0 assembly, and we got a dialog saying that it was not possible. We're forced to use either TCP or lower level networking to gain acceptable performance.
Qua
Hmm it worked fine for me. I used assemblies for silverlight class libraries of course in which I threw everything out except of System and System.Core. Maybe if there are dependencies on those fancier Silverlight UI assemblies it won't work anymore.
herzmeister der welten
You're absolutely right! We could make the reference but our application chrashed saying that System.Core failed in some way. We assumed it was due to the difference bewteen silverlight and .NET, but the real culprit was the use of Action/Func. Thanks the help
Qua