• WPF Guitar Hero using MVVM & MVP

    Published by Damian Schenkelman on October 8th, 2010 12:19 am under MVVM, Unit Tests, WPF, Windows Presentation Foundation

    3 Comments

    Last semester, at the University, along with other students (Alejandra Stamato, Gonzalo Zamudio and Manuel Soldini), we had to create a game similar to Guitar Hero for the Algorithms & Programming III subject. Being a University subject, it had some specific requirements (mostly related to model specification and the entities that needed to be included). Additionally, we were given the choice to use either C# or Java to develop the game.

    Some of the requirements:

    • Use TDD to develop the game. This lead to approximately 100 unit tests.
    • Use a presentation pattern (similar to MVC). We decided to use WPF and the MVVM pattern. Additionally, we took some elements from MVP to simplify the interaction between the view and the view model.
    • Have a code base that is easy to read.
    • Use known design patterns when necessary. That is way during the development process we determined to use the Iterator and Strategy patterns among others.
    Disclaimer: The solution we developed was required to be coded in Spanish. I have spent time translating almost all the code, but there are some small parts that have not been translated (mostly related to strings and XML).

    Below you can see an image of the game running and this is the link to download the code. I have the idea of “Prisming it up” a bit, but in the meantime I think publishing the code should be positive.  Of course, any feedback you might have is welcome.

    The prerequisites are:

    • Visual Studio 2010
    • .Net Framework 4.0
    • (Optional) NUnit version 2.5.7 to run the Unit Tests

    image

    Shout it

    Tags: , , ,

  • 3 Comments:

    1. DotNetShoutout said on October 8, 2010:

      WPF Guitar Hero using MVVM & MVP…

      Thank you for submitting this cool story – Trackback from DotNetShoutout…

    2. Twitter Trackbacks for Damian Schenkelman’s Blog » Blog Archive » WPF Guitar Hero using MVVM y MVP [southworks.net] on Topsy.com said on October 8, 2010:

      [...] Damian Schenkelman’s Blog » Blog Archive » WPF Guitar Hero using MVVM y MVP blogs.southworks.net/dschenkelman/2010/10/08/wpf-guitar-hero-using-mvvm-y-mvp/ – view page – cached Last semester, at the University, along with other students (Alejandra Stamato, Gonzalo Zamudio y Manuel Soldini), we had to create a game similar to Guitar Hero for the Algorithms & Programming III subject. Being a University subject, it had some specific requirements (mostly related to model specification and the entities that needed to be included). Tweets about this link [...]

    3. Using NDepend to find ways to improve an existing code base | Damian Schenkelman’s Blog said on October 24, 2010:

      [...] very useful when developing software using Visual Studio. I will provide an overview, using the WPF Guitar Hero application as the sample solution, of a couple of the features I found most [...]

    Leave a comment

    Your email address will not be published.

Categories

Archives

Map

SO Profile

Client Dev Twitter