Introduction

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Introduction

      Hi there!
      I just wanted to introduce myself (well, I know it's a little bit late,
      since I have already been on this forum for about half a year, but better late than never, isn't it?).
      I'm a 20 years old computer science student from Germany and startet programming in my first semester (I'm now in my 4th semester). I know Java, C++ and C#.
      While we need (only) Java at University, I learn C++, because I was very interested in it. When looking for projects to do with C++, I came across game programming and especially GCC. Thank you very much, Mike and Rez, for this wunderful book. I haven't completely finished it yet, but I really like the architecture and especially the Event- and Process- systems. Your book has taught me a lot, and I can only recommend it, it's one of the greates books I've ever read (which are not too less).
      I also really like this forum, I'm reading every day here, and lately I've been thinking about simply introducing myself to join this wonderful community. Well, here I am :)
      About one month ago, I became interested in C#, and since I am able to learn quite fast and already know Java and C++, this was possible quite fast.
      Now that I know the basics of C#, I'm reading a book about C# game programming (amazon.com/books/dp/1435455568), which is also great IMHO. Thus far, I have only done a few minigames (like Snake, for example), but as soon as I finish said book and have some free time, I want to make a more complex game, something like a small RPG.

      That being said, I also have a question: Do you all programm your games in C++? I know C++ is faster than C#, but just how big is the difference? I've read a lot about this, but I wanted to know if someone has some practical experience about this. Since I only want to make some 2d games (because I'm mainly interested in AI), I think C# will be sufficient for my purposes, and I know it's also often (been) used in order to make games via XNA (which sadly will not be supported anymore :( ).

      I'm sorry for my post being so long and for talking so much about programming langauges. Well, anyway, I'm really interested in your opinions!
    • I make games mainly in C++, but I also use flash, unity, udk and html5. Unity of course has C# and javascript (unityscript).
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • RE: Introduction

      Originally posted by Dendra
      That being said, I also have a question: Do you all programm your games in C++? I know C++ is faster than C#, but just how big is the difference? I've read a lot about this, but I wanted to know if someone has some practical experience about this. Since I only want to make some 2d games (because I'm mainly interested in AI), I think C# will be sufficient for my purposes, and I know it's also often (been) used in order to make games via XNA (which sadly will not be supported anymore :( ).

      I'm sorry for my post being so long and for talking so much about programming langauges. Well, anyway, I'm really interested in your opinions!


      Novice programmers can't really write faster programs in C++ than C#. ( I am not saying that you are novice or something by the way :) )
      Blindly believing that all C++ programs are faster than C# programs is just silly.
      That being said, you have to know C++ anyway if you want to do it professionally at some point. So just learn to use C++ effectively. It shouldn't take too much time for a computer science student. There are many game development frameworks supporting C++.

      The post was edited 1 time, last by column_vector ().

    • Thanks for your fast replies!



      I make games mainly in C++, but I also use flash, unity, udk and html5. Unity of course has C# and javascript (unityscript).


      I wasn't aware of Unity's C# support, good to know :)
      I am currently working with the taoframework, I know it has been superseded by OpenTK, but I think I have read somewhere that my project will also run if I simply include OpenTK instead of tao.OpenGL, so I could simply exchange that.
      But maybe I will give Unity a try later on.



      This is an article I read a while back and it might help you with your doubts.

      codingthewheel.com/archives/c...us-and-c-sharp/



      Thanks for that link! It really makes my decision a bit easier :)

      The post was edited 1 time, last by Dendra ().

    • Unity is pretty good, but in my opinion there is nothing like having complete control over the framework you are using, Unity will only give you so much.
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • RE: Introduction



      Novice programmers can't really write faster programs in C++ than C#. ( I am not saying that you are novice or something by the way Smile )
      Blindly believing that all C++ programs are faster than C# programs is just silly.
      That being said, you have to know C++ anyway if you want to do it professionally at some point. So just learn to use C++ effectively. It shouldn't take too much time for a computer science student. There are many game development frameworks supporting C++.



      I never claimed my C++ programms would run faster than those I write in C#, and I am well aware of the fact that in order for your programs to run faster with C++, you have to know C++ really well. Like already mentioned, I know C++, at least the basics (inheritance, polymorphy, templates, a reasonable part of the STL, etc.), but I just think that I will be more productive using C#. Also, I am far away from being a professional C++ programmer, so there is a high chance of my C# programs running faster :)

      I don't really know whether I want to do game programming professionally or not. It is of course an option, but at least for the moment, it is "just" a hobby of mine. Of course, knowing C++ well can't do any harm :) But I think it will also be useful just to make some games, no matter whith wich language, just to gain some experience.

      The vast amount of frameworks and libraries available for C++ is one of the main points why it has such an impact on me, I think. But then again, you can't learn or work with every single framework available, if you want to make games^^





      Unity is pretty good, but in my opinion there is nothing like having complete control over the framework you are using, Unity will only give you so much.



      Okay, thanks - I will definitely have a look at it :)

      The post was edited 1 time, last by Dendra ().

    • RE: Introduction

      Guten Tag Dendra!

      Welcome to the forums.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • RE: Introduction

      Welcome to the forums. :)


      Novice programmers can't really write faster programs in C++ than C#. ( I am not saying that you are novice or something by the way )
      Blindly believing that all C++ programs are faster than C# programs is just silly.

      This is somewhat incorrect. If I write the exact same algorithms in C++ and C#, the C++ version will be faster. C# needs to go through a virtual machine, which is always going to be slower than simply executing byte-code compiled explicitly for that architecture. We did a number of performance tests when switching over to using C# for the gameplay code. That having been said, your point is certainly correct that a novice programmer is not usually in a position to make use of that horsepower.

      In the professional game development world, you typically use C++ for the engine and some higher level language (Lua, Python, C#) for the gameplay code. Most of our gameplay programmers write very little C++ on The Sims 4. Indie games are all over the place. STL was written 100% in C++. I think Super Meat Boy was all C#. I know Monaco was like 95% C# with a few bits of C++ (like line-of-sight).

      If you're a new programmer, you should use whatever you're familiar and most comfortable with. Once you have a few games under your belt, start pushing for C++ and other things.

      -Rez
    • RE: Introduction


      This is somewhat incorrect. If I write the exact same algorithms in C++ and C#, the C++ version will be faster.


      My thinking was to compare the speed of programs as a whole, not to compare the speed of particular algorithm implementations in different languages.

      I think bad C++ practices ( like copies all over the place? ) might produce slower programs than the ones programmed in C#.

      Of course I might be wrong here. It would be good to hear more experienced thoughts from you. :)
    • @Rez:
      Thanks a lot!

      C# needs to go through a virtual machine, which is always going to be slower than simply executing byte-code compiled explicitly for that architecture


      Is this really ALWAYS true? When I started learning C++,
      I did a lot of research about how much faster C++ really is when
      compared to Java. While researching, I found an article stating that in some cases,
      Java can outperform C++, even when doing "heavy computations", due to the JIT. Of course, that is not always the
      case, and in that article it was also stated that usually, Java needs
      30% more time than C++ (I have to say, that article was about
      Java Version 5, and the JVM has of course improved since then).
      Unfortunately, I can't find that article at the moment (well, I also just tried for 5 mins^^), but if I find it, I could give a link.

      Well, of course I don't doubt that C++ is faster than Java or C#,
      all I want to say is that due to the JIT, I think Java and C# are (or
      can become) able to compete against C++ in terms of
      performance. (I don't mind being (proven) wrong either and I don't want to say you are wrong or something btw^^)



      In the professional game development world, you typically use C++ for the engine and some higher level language (Lua, Python, C#) for the gameplay code. Most of our gameplay programmers write very little C++ on The Sims 4. Indie games are all over the place. STL was written 100% in C++. I think Super Meat Boy was all C#. I know Monaco was like 95% C# with a few bits of C++ (like line-of-sight).


      I think the most important factor for choosing C# or Lua over C++
      for gameplay code is the reduced development time, isn't it?



      @column_vector:



      I think bad C++ practices ( like copies all over the place? ) might produce slower programs than the ones programmed in C#.


      I have an IMO quite funny anecdote about that. At our university,
      we (the computer science students) don't need or learn C++, I
      just did it because I really wanted to. But the Bioinformatics
      student need it for their projects. One of the students asked their
      professor if they couldn't do their projects in Java. He said 'no' and
      justified his answer by stating that they 'need the performance'.

      And then, during one of their first projects, my girlfriend (who is
      studying Bioinformatics) asked me to help her a bit with her
      project. So I took a look at the assignment. It was about graphs.
      Each vertex had to store a list of incoming edges and list of
      outgoing edges to other vertices. There also was a getter
      function in the Vertex class for those lists. Here comes the point: In the assignment, that getter function returned a vector (not a reference, but a copy!) of vertices (again, not vertex pointers or references, but copies)... Yeah, they "need the performance"...

      The post was edited 1 time, last by Dendra ().

    • Originally posted by Dendra
      Here comes the point: In the assignment, that getter function returned a vector (not a reference, but a copy!) of vertices (again, not vertex pointers or references, but copies)... Yeah, they "need the performance"...


      Poorly written C++ code will be slow, much like any other language. Though the blanket justification from the professor that C++ will be faster is a bit inaccurate.

      James
    • RE: Introduction


      I just happened upon this thread and if the OP is still watching it, they might be interested in Monogame
      and SharpDX

      cheers


      Of course I am still watching; even if I haven't posted something
      in a while, I read pretty much everything that is posted :)
      I'm just a bit more busy atm because of my side-job.

      Thank you very much for those links!
      I knew about Monogame (because I was interested in learning
      XNA Programming, but it is not anymore being maintained, so
      I decided to look at some alternatives), but I didn't know about
      Monogame. It sounds very interesting, particularly because it makes
      programming for XBox One "easy" (at least that's what they say on that side); I didn't even know that was possible.

      If I decide to make games in C# (or for XBox, though that probably won't happen, since I don't own one :( ), I will definitely check these out. But for the time being (and after some very thourough considerations), I decided to go with LibGDX and Java.
      That way, I can save the time for parsing .tmx files (The file format used by the Tiled Map Editor) -which is one of
      the many reasons I choose LibGDX over implementing my
      own engine with LWJGL- and maybe, later on, I will be able to pick up on my work with LibGDX using Clojure (which btw is a fantastic programming language; I use much of my spare time learning it,
      and the more time I spent on it, the more amazing I find it), which
      is my main reason for choosing Java over C#.

      But C# is kind of a more grown up language than Java-
      I personallly find C#'s approach to generic better than Java's,
      and the value types are a huge win, but there are also a lot more of other reasons, like better support for functional programming
      (though that might change with Java8 ) etc. -
      so there is a good chance that I might come back to C#.

      Anyway, thanks a lot!