Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 18 Apr 2005
Offline Last Active Sep 04 2013 06:39 AM

Posts I've Made

In Topic: Why are static variables bad?

03 September 2013 - 07:07 PM

No I agree, it depends on the situation. But having too many arguments - especially of the dependency injection variety - is at the very least a potential code smell that needs to be investigated. Often there is a better solution.

In Topic: Multiple classes question, yay or nay

03 September 2013 - 07:04 PM

You're welcome. Good luck!

In Topic: Game Programming Online Courses

03 September 2013 - 06:56 PM

There's a c# game dev course that's new on coursera.

Was just about to mention Coursera smile.png They have some video game-related courses but now there's even a game programming course, pretty cool stuff.


Edit: there's another one too, about making games in Python - https://www.coursera.org/course/interactivepython

In Topic: Multiple classes question, yay or nay

03 September 2013 - 06:45 PM

I'm more of a Java guy and not that closely familiar with C#. I have not read any C# books but I think the C# Yellow Book might be worth a look to start with. It's a university level text, it's supposedly written for people with no programming experience, the latest update was just last year, and you can't argue with the fact that it's free cool.png

In Topic: Multiple classes question, yay or nay

03 September 2013 - 06:14 PM

The exact answer to this question depends on what you want to do and should become clearer as you become more familiar with object-oriented programming.


Generally, 10,000 foot view: you can think of classes as blueprints for objects, and objects as concrete instances of classes. You will run into situations where, from some classes you only make one or two objects because you do not need more (example: ItemFactory), and from some other classes you make many thousands of objects (example: Item).


You do not generally want to call into every single object from the same main method, instead you create some objects and call into them, and they might have some other objects in their variables and they will work on those, and those objects might be composed of other objects who they can call as needed, etc, etc. 


I think the best thing you can do right now, if you want to stick to C# and XNA (which is a good choice for a game programming language and platform IMHO), is read a book about general object oriented programming written specifically for C#. Things will then very quickly become much clearer.