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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:32:37+00:00 2026-06-10T12:32:37+00:00

I want to try to write (amateur here!) a multiplayer game, and now at

  • 0

I want to try to write (amateur here!) a multiplayer game, and now at designing I decided to use the MVC-pattern.
Now my question is: where should I put my networking code? In the Model or the Controller? (Obviously not the View)

EDIT:
Sorry, for the hundredst time my question was unclear.
The game itself will be MVC, and it will firstly communicate with a server (find player), and later with that player (send your turn and get other’s turn). So where should I do that?

  • 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-06-10T12:32:39+00:00Added an answer on June 10, 2026 at 12:32 pm

    You could put the actual game itself in a new project and reference that between your MVC application, that way your game is entirely separated from your web application. This could be useful if you ever wanted to port it to WPF for instance. Another alternative is to have the game as Web Service which the MVC application requests information from and would provide scalability for additional languages to plugin in.

    However, if you decide to keep everything as a whole in MVC then I would suggest the Model.

    As a breakdown:

    • The controller takes care of all the web requests, i.e. GET and POST. It can also populate a model and return the appropriate view for that request.

    • The model contains the domain objects and logic to perform (i.e. extracting information from the repository and manipulating the data to be passed to the view).

    • The view returns the markup which is based upon the data stored within the model.

    In certain implementations additional logic such as checking conditions and Repository calls also take place at the controller level, which is a technique known as Fat Controller Thin Model.

    Edit:

    You should be sending a request to the controller. I.e. In your games controller have a HTTPPost method that connects to the server and then sends the players turn info and gets the new information. For example:

    [HttpPost]
    public ActionResult SendPlayerTurnInformation(PlayerObject player) 
    {
       // logic to connect to the Game Network
       // connection.UpdatePlayerTurn(player);
    
       //return success/fail
    }
    

    You could then do the same to get a specific players turn information and then update your model to be passed to the view which would contain the new information.

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

Sidebar

Related Questions

I try to write a dictionary extension for Google Chrome. Now, I want to
I try to write get method for my class bassed on ListView, I want
I want to try write a simple kernel in C# like cosmos, just for
I write my code in MonoDevelop and I want to try namespace of System.Threading.
I try to write a statement with Razor syntax that use mvccontrib grid where
This is the code that I want to try to write: #include <stdio.h> #include
Mostly I use Visual studio to write mock-up and the back-end code. I want
I try to write a custom decorator in Django. I want to redirect users
I want to create panel with different dataframes, I try to write a function
I want to try and write a function to automate some of the legwork

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.