Jump to content
  • Advertisement
Jim Bachalo

C# Simplest C# MVC framework (Unity UNET2 player)

Recommended Posts

Hi
Having a huge problem trying to simply implement a working framework for a turn based (each player takes turns) board game using UNET (Unity).
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!

Share this post


Link to post
Share on other sites
Advertisement

I would want to know why you are trying to use the MVC design pattern for a game in the first place. Game entities tend to want to access some type of global state (i.e. a level) so they can navigate the space. MVC works really well for websites and applications.

Share this post


Link to post
Share on other sites
3 hours ago, kingius said:

I would want to know why you are trying to use the MVC design pattern for a game in the first place. Game entities tend to want to access some type of global state (i.e. a level) so they can navigate the space. MVC works really well for websites and applications.

As mentioned, a turn based, not realtime, board game. Thinking MVC or MVCP makes perfect sense.

After much searching came across this example, with a tutorial as well

https://bitbucket.org/jparham/blog-tic-tac-toe/src

http://theliquidfire.com/2016/05/05/turn-based-multiplayer-part-1/

 

Would appreciate feedback!

Edited by Jim Bachalo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!