XNA Creators Club Online
Page 1 of 1 (8 items)
Sort Posts: Previous Next

How are you managing your project code?

Last post 6/1/2007 3:34 PM by Joel Martinez. 7 replies.
  • 5/31/2007 7:06 PM

    How are you managing your project code?

     Hey,

      Just wondering how your are managing your porject code? Beside identifible names like,

      player_manager.cs or screen_manager.cs or quest_manager.cs --  , some of these files contain the same code but, used for just for that public declaration. Most of these protected overrided calls are just for these specific file? But since, they are usign the same namespace, doesn't this place them in the same scope of the program? .. And with the protected override calls, we are just overloading the funcation right?

        Any insight on how you are managing your projects?

      region of Properties

      endregion

     namespace

    {

       public item

    {

       code..

    }

     protected override update()

    {

    }

    protected overried draw()

    {

    }|

  • 5/31/2007 8:01 PM In reply to

    Re: How are you managing your project code?

    Protected override overrides the method in the base class, not overload the method (as overloading would have the same name, with a different parameter set, and without the override modifier).

    An overriden method also contains a base.<method> by default, to call the code in the base class. Think of it as a way to add your own code into the methods in the base class.

    Anyway, I'm not too sure what you mean by your question. My code files are in their own folders for their purpose (for example, a folder for the object stuff, then all the different types of object, like a mesh, a test object, and so on, and then a manager to track all of those). Each category is also in it's own namespace too.

    If you are asking what I think, then each code file is generally it's own class, so overridden methods belong to that class, not to the entire project as a whole.

    I think I've just missed the point completely...
  • 5/31/2007 8:36 PM In reply to

    Re: How are you managing your project code?

    if what you're asking is how to organize and design your class libraries, then you're not going to want to look any further than the:
    Design Guidelines for Class Library Developers

    I've ready through the book twice :-D
    Joel Martinez - XNA MVP
    Blog: http://codecube.net
    XNA Unit Testing: Scurvy Test
  • 6/1/2007 7:43 AM In reply to

    Re: How are you managing your project code?

    In a similar vein, I'd recommend this book if you're designing classes for reuse and maintainability (note, it's not XNA specific, rather general to .NET):

    http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321246756

    It won one of the Jolt awards last year and is superb.
  • 6/1/2007 12:10 PM In reply to

    Re: How are you managing your project code?

    I second Joel's selection, but there is a newer version of the same document available here:

    http://msdn2.microsoft.com/en-us/library/ms229042(VS.80).aspx

    I haven't actually looked through them for differences, but we did learn a couple more things about class library design between version 1.1 and 2.0 of the .NET Framework. Hopefully, some of that is captured here. :-)

     

    Stephen Styrchak | XNA Game Studio Developer
  • 6/1/2007 2:01 PM In reply to

    Re: How are you managing your project code?

    ooh, cool ... will have to poke around there to see what's changed.   You know what would be cool?  the same kind of document, but for game development :-)
    Joel Martinez - XNA MVP
    Blog: http://codecube.net
    XNA Unit Testing: Scurvy Test
  • 6/1/2007 3:13 PM In reply to

    Re: How are you managing your project code?

    Joel Martinez:
    You know what would be cool?  the same kind of document, but for game development :-)

    The trouble with that is any time someone writes a document like that, no matter how qualified they are, 50 people come along and tear it apart and then give 50 different alternatives that each are convinced are the better right way. It's tough enough to get a room full of game developers to agree on best practices, let alone an internet full of them. ;)

     

  • 6/1/2007 3:34 PM In reply to

    Re: How are you managing your project code?

    haha, fair enough ... not only that, but a best practice for a given genre might not work for another.
    Joel Martinez - XNA MVP
    Blog: http://codecube.net
    XNA Unit Testing: Scurvy Test
Page 1 of 1 (8 items) Previous Next