Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

C# or C++ or VB ?

Juan_LuxaxeJuan_Luxaxe Posts: 1Member
I want to start create games, but, anyway, if I know C#, which programs or games can I create?

Comments

  • GenjuroGenjuro Posts: 913Member
    : I want to start create games, but, anyway, if I know C#, which programs or games can I create?
    :

    Well... if C# would not only compile to .NET, I would have picked this one.
    But it doesn't.

    It's probably easier in C++ than in VB, as VB is an easier language until you come to graphics... moreover it's slow, due to COM marshaling and all...
  • elway23elway23 Posts: 57Member
    I read in a book I'm reading on C# that yes, it only compiles on .NET platform, but that when you compile for distribution, you can include the CRL to the install file. Then, when your user installs the program you wrote, if they don't have the .NET CRL, it will be installed automatically for them so they can make use of the program. The book said it added about 14MB of extra data in the file.

    It also went on to say that (obviously) newer versions of Windows and Updates will come standard with the CRL to be able to run .NET applications.

    Now, I've never used the MFC in C++, but I've read a book/tutorial on it and I'd MUCH rather do the same stuff in C# vs. using MFC.


    : : I want to start create games, but, anyway, if I know C#, which programs or games can I create?
    : :
    :
    : Well... if C# would not only compile to .NET, I would have picked this one.
    : But it doesn't.
    :
    : It's probably easier in C++ than in VB, as VB is an easier language until you come to graphics... moreover it's slow, due to COM marshaling and all...
    :

  • GenjuroGenjuro Posts: 913Member
    What I meant is, the added overhead created from the .NET platform, albeit small, is there. Games won't run "fast" enough in plain C for Windows without good optimization, and won't ever do better under .NET.

    The book *could say* it's only 14 MB, and in fact it could be true, but still, you need IE6 (which is not small - if I'm not wrong, 80 MB), or Windows 2000 SP-can't-really-remember-the-number, yet this one is about 150 MB in size. Anyways, who cares. It's not an issue - more or less.
    And, yes, Windows .NET (and later) will come with the .NET framework "built-in" (I don't know why, but I'm not surprised *LOL*).

    IMO, it would be worth the overhead if .NET would have been ported to Linux, so that once you program a game, it's automatically ported. It's one of the reasons for C# and .NET exist - ease of porting. Let's say you have to spend one and half time optimizing it (it's harder to optimize programs under .NET), you still have one version that will work fine on any OS as long as it supports .NET.
    Since this is still in a "dream" state, I'd not waste my time, and write it in plain C++, faster AND easier to port (well, not that easy anyway, but it's better than *not* be portable).

    That's why I suggested C++ *for games* (mind that) - avoiding .NET will result in faster code, and games *need* speed.

    I agree with you on .NET classes and MFC (and you're lucky if you never had to tinker with the Platfom SDK and raw APIs). .NET classes are far easier to use and understand.

    Moreover, I suggested C++, not MFC. MFC can be even slower than VB. Classes are great C++ features, though. And C++ has backwards compatibility with C. So, I'd use (I do use, actually) C++, with APIs for Windows programming, and *my own classes* for anything else.

    I love C#. It would be my favorite programming language, if it wouldn't compile for Windows only.




    : I read in a book I'm reading on C# that yes, it only compiles on .NET platform, but that when you compile for distribution, you can include the CRL to the install file. Then, when your user installs the program you wrote, if they don't have the .NET CRL, it will be installed automatically for them so they can make use of the program. The book said it added about 14MB of extra data in the file.
    :
    : It also went on to say that (obviously) newer versions of Windows and Updates will come standard with the CRL to be able to run .NET applications.
    :
    : Now, I've never used the MFC in C++, but I've read a book/tutorial on it and I'd MUCH rather do the same stuff in C# vs. using MFC.
    :
    :
    : : : I want to start create games, but, anyway, if I know C#, which programs or games can I create?
    : : :
    : :
    : : Well... if C# would not only compile to .NET, I would have picked this one.
    : : But it doesn't.
    : :
    : : It's probably easier in C++ than in VB, as VB is an easier language until you come to graphics... moreover it's slow, due to COM marshaling and all...
    : :
    :
    :

  • elway23elway23 Posts: 57Member
    Ok, I gotcha now!

    BTW...it's Windows 2000 SP2. I just had to download it for my desktop computer to install the .NET framework. Also, according to the .NET Framework download site @ microsoft.com, they say they have the framework only downloads for every one of ther OSs WIN98 and up. Given, I didn't try to use it on any of them but 2000 Professional, and I imagine it runs HORRIBLY on the older platforms, but at least they are up there for those desperate enough to want to run .NET applications even though VS.NET only runs on XP and 2000.
Sign In or Register to comment.