Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3359072
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:49:41+00:00 2026-05-18T02:49:41+00:00

I’ve been working on a card game engine in C# .NET for some time

  • 0

I’ve been working on a card game engine in C# .NET for some time now. It is nearing completion at this point, but the interface so far has just been a simple console one with ReadLine and WriteLine.

For data, I have a GameState object that stores pretty much all of the relevant information to the game at a given point in time. The rest of the game is heavily event-driven.

I’m looking to branch this out into a full-blown online application. I’ve been reading a lot about WCF and its callback support in web services, and this seems like a decent option for me. However, I’m open to other ideas if one fits well.

The only problem I’m anticipating is a threading nightmare when I try to do this. I have an approach I am thinking of that might reduce threading woes as much as possible:

1) Have the WCF service only ever request data from the user (e.g. prompt for some action) through the callback interface AND supply several one-way callbacks to notify the client about updates to the game state. Emphasis: clients can not ‘query’ for game state. The only way for them to send data to the server is if the server asks for it through a callback.

My only worry is that a client might need to request for some data from the server in some way I am not anticipating. If the situation arises, I could provide some ways for the client to read the game state, but now I have to start thinking about Reader locks on the GameState object.

I suppose that if I have to, I will dig in and try to make this thing thread safe, but I wanted to run this by you guys to see if you have any suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:49:42+00:00Added an answer on May 18, 2026 at 2:49 am

    If you want this to be a web application (html) then I would say your best bet would be to use web sockets (natively supported in chrome, flash plugin for other browsers) and integrate a websocket-server like nugget into your code. This enables real push communications from server to clients.

    If you are creating a silverlight frontend you have many options but from what I’ve gathered the only real option if you want to scale past 500 online clients at once is to use a custom server as IIS can’t handle very many clients at the same time. I chatted with the guy making a silverlight version of Agricola and he used a custom server which integrated nicely with iis called websync which is quite pricey for a hobbyist, but seems awesome.

    If you are creating a rich client you are free to throw anything at it, even using binary socket communication natively with WCF.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.