CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Apr 2011
    Posts
    18

    What is programmed in C-sharp?

    I just need a little help with a short paper on C#;

    so, I was wondering, specifically, what kind of things are programmed in C# and can you provide

    examples? Thanks

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: What is programmed in C-sharp?

    Applications, Web sites, and Web services - pretty much everything.

  3. #3
    Join Date
    Apr 2011
    Posts
    27

    Re: What is programmed in C-sharp?

    I think it is also one of the most popular languages for video games and physics engines.

  4. #4
    Join Date
    Jun 2008
    Posts
    2,477

    Re: What is programmed in C-sharp?

    Quote Originally Posted by DeepThought View Post
    I think it is also one of the most popular languages for video games and physics engines.
    Yeah that's not true. C++ is far and away the most popular game programming language. C# + XNA is great, but you can hardly say it is one of the "most popular" languages/platforms for game development.

  5. #5
    Join Date
    Aug 2008
    Posts
    902

    Re: What is programmed in C-sharp?

    Quote Originally Posted by DeepThought View Post
    I think it is also one of the most popular languages for video games and physics engines.
    That's the opposite of true. Those are two very good examples of where you should probably not code in C#.

  6. #6
    Join Date
    Apr 2011
    Posts
    27

    Re: What is programmed in C-sharp?

    Quote Originally Posted by BigEd781 View Post
    Yeah that's not true. C++ is far and away the most popular game programming language. C# + XNA is great, but you can hardly say it is one of the "most popular" languages/platforms for game development.
    Oh I see it a lot on requirements for job postings. What are the advantages to C++ I can do int++ in C# as well :P

  7. #7
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: What is programmed in C-sharp?

    Quote Originally Posted by DeepThought View Post
    Oh I see it a lot on requirements for job postings. What are the advantages to C++ I can do int++ in C# as well :P
    You'll need to program in both to understand the differences.

  8. #8
    Join Date
    Jan 2010
    Posts
    1,133

    Re: What is programmed in C-sharp?

    Quote Originally Posted by DeepThought View Post
    I think it is also one of the most popular languages for video games and physics engines.
    Quote Originally Posted by BigEd781 View Post
    Yeah that's not true. C++ is far and away the most popular game programming language. C# + XNA is great, but you can hardly say it is one of the "most popular" languages/platforms for game development.
    Quote Originally Posted by Chris_F View Post
    That's the opposite of true. Those are two very good examples of where you should probably not code in C#.
    Quote Originally Posted by DeepThought View Post
    Oh I see it a lot on requirements for job postings. What are the advantages to C++ I can do int++ in C# as well :P
    Quote Originally Posted by Arjay View Post
    You'll need to program in both to understand the differences.
    As for game development - mainstream games are definitively done in C++ (speed being one of the obvious advantages, a bunch of experienced C++ game programers being the other, standard C++ graphics APIs being another one, and so on...). However, on the indie scene, there's a lot of people experimenting with C#. Besides, I feel that Managed DirectX and XNA are pretty capable. There were even some (though not particularly noticeable) commercial games developed in C# - or so I've read somewhere.
    I think that game programmers can greatly benefit from the C# language, and the way good C# code is written (and designed). As the hardware gets more powerful, the potential for C# to penetrate into the field of the "mainstream" game development will grow I guess.

    Furthermore, there are various kinds of games, and not all of them require raw power above all other things; there are games made in Java, or Flash (ActionScript)... I mean, on one end of the spectrum are fancy 3D-HD-WhatNot-games, and on the other are text-based games.
    It all boils down to what you mean by game.

    But, since we're probably talking about a modern 3D engine based game here, I'm under the impression that C# can be used to create a fairly decent engine. Maybe it's not (yet) suitable for an AAA title, but things change with time. Think of what kind of games you can play on mobile phones now, and compare that to the classic Nokia Snake. Those hardware engineers will eventually come up with something that will make us forget that IL and JIT-compiling are even there.

  9. #9
    Join Date
    May 2007
    Posts
    1,546

    Re: What is programmed in C-sharp?

    Quote Originally Posted by Chris_F View Post
    That's the opposite of true. Those are two very good examples of where you should probably not code in C#.
    That's a very good example of something that is wrong

    While I agree that .NET is not "one of the most popular" platforms for developing 3D games I'd also put it out there that C++ is about 25 years old and .NET is about 10 years old. Of course you're going to see a hell of a lot more code in C++, you can't just throw out everything you've written for previous games overnight so you can use a new fancy productive language However an important factor to note is the adoption of C# over C++ for new projects is going up. The majority of the Sims 3 was done in .NET. SecondLife using .NET as it's primary scripting language. Unity3D use .NET as their primary platform for game logic development. .NET is an adequate replacement for C++ for most aspects of game development and this will only get better as time goes on.

    Five years ago if someone said that a major game publisher would write a significant proportion of their game using .NET they would've been laughed out of the room. Now you can even get SIMD acceleration directly from 100% safe C# code http://tirania.org/blog/archive/2008/Nov-03.html . Did someone say super fast accelerated physics? I think so!
    Last edited by Mutant_Fruit; April 29th, 2011 at 06:53 PM.
    www.monotorrent.com For all your .NET bittorrent needs

    NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.

  10. #10
    Join Date
    Jun 2008
    Posts
    2,477

    Re: What is programmed in C-sharp?

    Yes, the reason C++ is so dominant is not necessarily that it is the only language capable of writing a game with, it is the fact that the *vast* majority of existing code is already written in C++. Also, in regards to console games, a language like C# is just impractical. Have fun running .NET on your PS3. Also, there are many times in which you do need direct access to the hardware, and C# is simply not designed for such things.

    Writing an indie game for a Windows PC? Go ahead and use C# with XNA or DirectX. Anything else is just going to be a huge pain.

  11. #11
    Join Date
    Apr 2011
    Posts
    27

    Re: What is programmed in C-sharp?

    Interesting, so I take it if you write a program in C++ it does not require the framework to run.

    That alone is worth using it for!

  12. #12
    Join Date
    Jun 2008
    Posts
    2,477

    Re: What is programmed in C-sharp?

    Quote Originally Posted by DeepThought View Post
    Interesting, so I take it if you write a program in C++ it does not require the framework to run.

    That alone is worth using it for!
    Well, no, not really. C# is a great language and the .NET framework trivializes many tasks that would be more onerous if done in C++. One language is not "better" than the other, they are different tools for different jobs.

  13. #13
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: What is programmed in C-sharp?

    Quote Originally Posted by DeepThought View Post
    Interesting, so I take it if you write a program in C++ it does not require the framework to run.

    That alone is worth using it for!
    Do you understand the depth of penetration the .Net framework has (i.e the % of Windows systems that has one or more versions of the .Net Framework)?

    In other words, often times there is nothing additional to install to run a .Net program.

  14. #14
    Join Date
    May 2007
    Posts
    1,546

    Re: What is programmed in C-sharp?

    Quote Originally Posted by BigEd781 View Post
    Also, there are many times in which you do need direct access to the hardware, and C# is simply not designed for such things.
    I can say with 99.9% certainty that no game ever directly accesses hardware. That's what device drivers are for Sure, C# is not really designed for device drivers, but that's not what you'll be doing when you're writing a game. If there is some exotic hardware you need access to you'll just access it via it's driver just the same as how you can play sounds and render 3D graphics in C# today.

    Have fun running .NET on your PS3.
    EA had no trouble doing this with The Sims 3 The also managed it on Mac OS too!

    Interesting, so I take it if you write a program in C++ it does not require the framework to run.

    That alone is worth using it for!
    No, not at all. A language with a framework is *far* superior to a language without a framework in every respect. Assuming a 'framework' is defined as 'a set of reusable libraries', every major language has this. What game developer wants to write their own List implementation or their own quicksort. None. They want to write game logic. Therefore the richer your framework and the easier it is to use, the faster you can get your task (writing game logic) done. With that in mind, the language with the largest framework would be the logical choice.

    If by 'framework' you mean a JIT compiled language, avoiding a language simply because it has a JIT makes absolutely zero sense. The existence (or non existence) of a JIT should be completely irrelevant to you unless the platform you're targeting does not allow jitting. All that should matter to you are concrete performance targets (i.e. being able to execute at 60fps on a Core 2 Duo 2ghz with an ATI 4800) and developer productivity. If a jitted language can reach your target with better productivity than a non-jitted language then surely it's worth giving it some serious consideration.
    Last edited by Mutant_Fruit; April 29th, 2011 at 08:17 PM.
    www.monotorrent.com For all your .NET bittorrent needs

    NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.

  15. #15
    Join Date
    Jun 2008
    Posts
    2,477

    Re: What is programmed in C-sharp?

    Quote Originally Posted by Mutant_Fruit View Post
    I can say with 99.9% certainty that no game ever directly accesses hardware. That's what device drivers are for
    Ok, yes, access hardware via the device driver . But still, those interfaces are rarely friendly to access through C#, I do it for a living every day.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured