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!


Thomas Wiborg

Member Since 05 Jan 2013
Offline Last Active Yesterday, 05:31 PM

Topics I've Started

Merry Christmas!

23 December 2013 - 05:38 PM

Merry Christmas and a happy new year to all on GameDev!

Let 2014 be a year filled with great IndieGames, and some epic moments here on GameDev! smile.png

 


How C# computes Recursion

04 October 2013 - 01:48 AM

Hello guys, I have this set of code
 

class Factorial
    {
        public int Fac(int x)
        {
            if (x == 1)
            {
                return 1;
            }
            else
            {
                return x * Fac(x - 1);
            }
        }
    }


 static void Main(string[] args)
        {
            Factorial fac1 = new Factorial();
            Console.WriteLine(fac1.Fac(4));   
            Console.ReadLine();
        }

The thing is, I know how factorial works. Like 4! = 4*3*2*1 = 24

But i dont see how the computer computes it. The debugging and breakpoints make me more confused. Does anyone have the time to explain me in detail how this works?

One of my way of thinking is:

First iteration:
return x * Fac(x - 1);    = 4 * 3;
Second:
x * Fac(x - 1);              = 3 * 2
Third
x * Fac(x - 1);              = 2 * 1

But nothing returns 24.

Tho I know that in the end the computer does 4*6 = 24

Thanks for all reply!

Thomas


Where to begin programming games

08 August 2013 - 07:47 AM

Hello guys,

 

Im currently in the situation where I dont know how to START program a game. I know abit more than just the basic with C# / XNA but I dont know HOW i should start.

What kind of classes do I need to create, what sort of methods do I need, fields.... and the list goes on.

 

Even with the basic textbased games im like, "uhm what do I need"

Does anyone have a good idea to what I should do and where to start?

 

Are there any tutorials on "How to think before programming games"

Its not the technical part im having problems with.

 

Thanks for all replies!

 

 

Best regards

 

Thomas


Gamedev Chat

11 July 2013 - 05:11 AM

Has it been considered making a Gamedev chat?

 

Would be great for ultra quick feedbacks. Not everything is needed as a thread. There are always minor questions that could be answered right away.

I believe it wouldent hurt the use of our forum.

 

IRC is not what Im asking for :) 

 

What do you guys think about that?


TheNewBoston any good?

09 February 2013 - 03:36 PM

http://thenewboston.org/list.php?cat=16

Have any of you seen the tutorials on C++ from this homepage?

 

I was thinking of having a look at C++ and wondered if this was a decent place to start learn C++?

 

 


PARTNERS