Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Simplest MVC framework for 2 player turn based board game

Discussion in 'Scripting' started by eco_bach, Nov 22, 2017.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Hi
    Having a huge problem trying to simply implement a working framework for a turn based (each player takes turns) board game using UNET.
    I have an Eventmanager system I am comfortable with for sending, receiving custom events.
    I want to avoid adding any unnecessary complexity, so no State machine etc.
    Just a Model class
    A Game Controller
    Perhaps a controller for each player?
    And a View for the board and game pieces.

    Not sure whether most of the game logic (calculating score, wins etc.) would go in the Game Controller or Model class.
    Will extend this for use in AR.

    Can anyone help?
    Are there any really useful MVC C# templates that would get me started?
    Any help appreciated!
     
  2. bigmisterb

    bigmisterb

    Joined:
    Nov 6, 2010
    Posts:
    4,221
    It sounds like you have the back end process you are looking for. MVC is simply a methodology for building. Unity does not use that methodology, but it can be created.

    The view that you are thinking of would be the thing that creates what the player sees. In Unity, that is generally either pre-created or created in code. I think you need to figure out what all you want to put on the screen, and at what phases you want to create them. Both have pros and cons.

    I am guessing you are coming from a web creation background. So the best thing I can tell you... Start with the player, make him do what you want, that will make the rest of the work much easier. So many times, I just take a capsule and make a controller and make him move around on a plane. So easy and so rewarding. Do not worry about the small details, and certainly do not start in unity worrying about how everything is going to work. Just start small, and play... but do Start. ;)
     
  3. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601