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 3755612
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:43:31+00:00 2026-05-19T09:43:31+00:00

So far I have pretty much working game, but I really can’t add all

  • 0

So far I have pretty much working game, but I really can’t add all features as I want so far, because I can’t solve that problem.

Let’s say I have class Board, and each board have squares and pieces on those squares.
I have many players connected to game, for each two players (and observers etc) I need to have single board. My question is where to start with that ?

I think first of all I need multiple instances of class Board, and then I need a way of binding those boards to and individual games (games are identified by GUIDs).

My question is where to start with this?

So far I have it working but it heavily uses database and it not really optimal and with my current approach I can’t really do all things I wanted (move verification, dumping board state for future reference etc).

  • 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-19T09:43:32+00:00Added an answer on May 19, 2026 at 9:43 am

    Because of the complexity involved in storing the state of the game, board games can make excellent use of a non-relational database like MongoDB.

    If this isn’t an option (I assume you’re using a full Microsoft stack) I’d still avoid a relational approach to the data storage. Without knowing the specifics of your game, I can only speculate. Because of that, I’ll use scrabble as an example.

    Dumping The Board

    You could store the entire board state literally in a boardState table, like this (5×5 non regulation scrabble board :))

    * * * o *
    * w o r d
    * * v * *
    * * e * *
    * * r * *
    

    All processing could then be handled by the application logic. Imagine the database overhead if you were to try to relationally store this information!

    Move Verification

    Although scrabble doesn’t have “moves” to speak of, this is something that should avoid the database anyway. All processes like word-checking, board limits, game logic, etc should be handled entirely in the application layer.

    Application Implementation

    If I were you, I’d continue on the path you were going with having many instances of the Game class, each containing a Board object. Store everything in memory and do all computations you need to in the application layer until something needs to persist (Board state if you want to save the game for later, game scores). At this time, dump it to the database.


    Without knowing more about your game logic I can’t speculate on how I’d handle it, so there’s a 20,000 ft. top down view.

    Update:

    Based upon the new information, I’d just load a GameCollection class with GUID identifiers into memory. You’d be able to access the individual games through something like colGames[GUID] and boards with colGames[GUID].Board. Store all relevant information in the database after the game ends/is saved and remove it from memory.

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

Sidebar

Related Questions

I am pretty new to this iPhone dev thing but so far I have
So far I have been creating Web Portal but recently I had a request
So far all the serialization examples I have found on the web are related
I have toyed with a number of ideas to do this, but so far
Ok so I've gone through pretty much all the SO articles on this subject
I am working on a poker game. So far I am stuck on comparing
i have a form and it validates and submit successfully. all i want is
Question pretty much says it all, though explicitly I'm looking for the things I
So far I have encountered adjacency list, nested sets and nested intervals as models
So far i have got the code below which works lovely when trying an

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.