Jump to content
  • Advertisement
Sign in to follow this  
CySoftDev

Unity Getting my game logic away from XNA

This topic is 1730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What are the advantages/disadvantages of completely modularizing my game model code into its own DLL, and creating an XNA Game Component to, essentially, function as an adapter between XNA and the game model?  All I want XNA to do is draw stuff and capture user input.

  • One advantage I like is the ability to unit test the game model itself.
  • I also like that it keeps solution files better organized (that's one thing that has driven me MAD with the books I have on XNA game development; there is little to no organization of the solution files...)
  • I like the clean separation of responsibilities, and the portability it affords the actual game logic (it could later be hooked up to Unity, SFML, etc.)

I am aware that it takes more effort, having to develop an interface for the game model; am I overly in love with separation of concerns?

Edited by CySoftDev

Share this post


Link to post
Share on other sites
Advertisement

Sounds similar to other design patterns like MVVM, MVC, MVP, etc. 

 

In my experience it, the big disadvantages are mainly the complexity it adds to a project. It has its time and place, and for simple things is probably not worth it. I think you have already grasped the main advantages - you can decouple the pieces and change/update/upgrade them independently. 

Share this post


Link to post
Share on other sites

The question in this case is, How much portability is it really buying you?

If you're writing in XNA, your game model is most likely C#, which is still going to lock you into Windows... 

The ability to swap Frameworks is interesting, but I doubt it would really be worth it, esp since again, if you write the game model in C#, swap to a frame work that is cross platform your game model is still locking you into windows... 

Share this post


Link to post
Share on other sites

If you're writing in XNA, your game model is most likely C#, which is still going to lock you into Windows

 

That is not 100% true. This and this.

Edited by tharealjohn

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!