Results 1 to 17 of 17

Thread: Why use c#?

  1. #1

    Thread Starter
    Lively Member H-Zence's Avatar
    Join Date
    Jul 2002
    Posts
    94

    Post Why use c#?

    Hey everyone, I have a few questions.

    VB was my first language, and it suited me pretty well for a while. However, I'm looking to make games (powerful ones) and I need a language that is capable of doing what I want to do.

    I was considering C++, but then I heard about C# from a friend. He tells me that C#, using the .NET platform, will be more compatible with newer versions of windows.

    But my question is, is C# good for 3D game programming? I'd really like some more information on it. Thanks!
    www.mindset1.com
    Religious Debate Forums

  2. #2
    Addicted Member
    Join Date
    Jul 1999
    Posts
    207
    C# and VB are pretty much the same in the following areas:
    1) About the same speed
    2) Have pretty much the same functionality
    3) Have the same compatibitly because the use the .net framework

    I main diference in the applications is the syntax.

    Jeremy

  3. #3
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    For what you want, you are going to want to go with C++. Don't get me wrong, C# is pretty powerful, but it isn't the language of choice for 3D programming.

    You would be hard pressed to find many 3D games written in C#. There will be some, but not a lot. If your determined to use C# though, here is a link to get you started:
    http://www.c-sharpcorner.com/Directx.asp

  4. #4
    Member
    Join Date
    Sep 2002
    Location
    England
    Posts
    50
    I program in VB too. I am learning C# (not for games) becasue I thought C++ was too hard. C# is half way between VB and C++. If I master C# then I can do Java or C++.
    regards,
    vb_slam

  5. #5

    Thread Starter
    Lively Member H-Zence's Avatar
    Join Date
    Jul 2002
    Posts
    94
    So it's not very easy to create games with C#?

    And vb slam, are you saying that I should learn C# and C++ because it would be easier? Thanks.

    Also, I assumed little to no games have been made with C# yet, considering it is a sort of young language. Just wondering it it's possible.
    www.mindset1.com
    Religious Debate Forums

  6. #6
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    C# is faster than vb...vb6 is a interpreted language and C# is a compiled language

  7. #7
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Originally posted by PT Exorcist
    C# is faster than vb...vb6 is a interpreted language and C# is a compiled language
    Got your facts a little twisted...

    VB6 can be compiled to native code. The default is p-code, but you can switch the options to native code, which creates a completely compiled app. When running an app compiled into p-code, it uses the runtime as interpreter. When running an app compiled into native code, it uses the runtime as a true dll (for the forms, buttons, etc).

    C# on the other hand is not compiled to native code at first. It is compiled to MSIL. It isn't until the first time it is ran will the JIT compile the MSIL to machine code. After the JIT is ran, then the C# app will be running with machine code.

  8. #8
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    hmm lol ok

  9. #9
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    The .NET languages are very new, and because of that, your not going to find very many games written with .net just yet!

    However, DirectX 9 is being written specifically for the .NET platform! This makes it safe to assume that you'll be seeing more and more 3d games written with .NET! Benchmarks I've seen also show that .NET is up to 15x faster than VB6, though I havn't tested that out for myself yet.

    Lastly, the previous posts seem to imply that VB6 and VB.NET are pretty similar, and that C# is just a .NET version of C++. (at least this is what I see). However, C# and VB.NET, since they both use only the .NET framework, share exactly the same speed and functionality. (C++.NET, however, is a lower-level language, and is capable of creating non-.net programs. However, for 100% .net applications, I hear that C++.NET offers little or no benefit over C# and vb.net).

  10. #10
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394
    C/C++ and Assembler are the langauges of choice for game programming so far.

    C++ is not hard. Just a sharp learning curve.

    I reckon so far games suffer heavily because of runtimes C# puts on itself.

    Same story with VB6

    Faster Langauge = Faster Game

    I also heard that there was a C# game engine written somewhere but I dont know much about it.

    VB.NET 15 times faster than VB6? This is something new... So far judging by the benchmarks I've seen it's at least 2 times slower!

    Use the right tool for the right job
    VS.NET 2003

    Need to email me?

  11. #11
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    vb.net isnt 15x faster than vb6! and yea..becuz the JIT compiler it lags a lot in my comp at the first time =\

  12. #12
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    Originally posted by made_of_asp
    I also heard that there was a C# game engine written somewhere but I dont know much about it.
    yep, there was a link posted here a while ago to it, can't find it though, but it's called exoengine if you want to have a look (source code included).

  13. #13
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Just a note, you can write unmanaged code in C#. This means you can do 'unsafe' things such as pointers and such. I am sure you will get a little speed increase when doing so. Of course, even if you do, I don't know how it compares to the speed of C++ doing the same thing.

  14. #14
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    well i never really understood the real power of pointers...maybe only to big loops?
    \m/\m/

  15. #15
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394
    Points are useful

    Example

    {
    int z[20];

    for(int i = 0; i < 20; i++)
    {
    int* p = &z[i];

    //now instead of writing 'z[i]', you can just write 'p'
    //points can pass variables by references, make your program smaller and more
    }

    }
    VS.NET 2003

    Need to email me?

  16. #16
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    ah lol
    \m/\m/

  17. #17
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    ...but you were right PT. You will only see the impact of this in big loops and / or large arrays. Essentially, you are removing the array limit checking that C# normally does for you.
    -scott
    he he he

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