🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

curious about wpf and networking possibilites

Started by
1 comment, last by hplus0603 2 years, 7 months ago

I am into WPF-programming altho' it is kinda considered obsolete by many. I want to make a game mostly based on static content (that is not so much moving around with units on maps etc.) - just a game based on information. The options WPF offer to me are just enough for my intentions. I own a few books on WPF-programming, but none of them cover the possibilites of networking. That is: setting it up so that several players can manipulate the contents within the frame/layout that I am putting forth. I have searched the net, but I might be searching for the wrong thing (I dunno). There are no relevant results to my queries. So, is there a book or any other resource where I can learn how to apply networking to WPF-projects? You may or may not have deduced that I am very noob when it comes to these type of things, but that's why you can ask questions here, right?

Alright, thanks in advance for any answers.

Advertisement

You will need to split your architecture in three parts:

  1. The model of the data
  2. The display of the data
  3. The communication of the data

With WPF, you're already half way there, as generally the model will be split from the UI. However, what's now new, is that the “updater” of the data is not so much the UI, as it is the network. In fact, a common strategy is to only “preview” interactive changes, but then send the proposed change to the server, and not display it actually changing, until you've received the updated state from the server.

You may find that you'll want two copies of state for your entities: one for “locally proposed” and one for “actually received from server” – at least for player-controlled entities. Then display a “ghost” when the player variant is different from / ahead of the server.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement