Visual Basic vs Visual C++

This is a question that has long lingered about my mind - Which language is better for DirectX, Visual Basic or Visual C++

I have been using Visual Basic for a long time now so that is the language that I am used to. I have dabbled some in Visual C++, but it was Version 3.1, so in all fairness, I haven't really learned Visual C++. As far as Visual Basic is concerned, I'm running version 6.0 Professional.

The problem is that there aren't many resources that I can find for Visual Basic and DirectX. I even checked out a book at the library and it has the same flow as the rest of the resources I had to scour for. It goes something like this: The resources teach you how to declare the DirectX objects and create a device from the DirectX object. The books also show you a few things you can do, but then all of a sudden, they're jumping straight into declaring matrixes, and rendering 3D space and whatnot.

Even though I've been using Visual Basic for a long time, it seems as though my resources leave me with a blank, deer-in-the-headlights look wondering who tore out the 5 chapters that I missed because I certainly wasn't ready to make the leap they were throwing out.

So I'm left wondering, should I make that switch over to Visual C++ if I'm planning on designing 3D Games From what I've seen and read, Visual Basic is only supported under DirectX 7 and 8. I guess what I need to know at this point, is what are the advantages of using Visual C++ over Visual Basic, and should I make that switch If nothing else, should I make the switch so that I have more resources available to me

After browsing around the Microsoft website, I now realize that there are two different platforms - C# and C++ Which one would be better to use of those two if I were to switch



Answer this question

Visual Basic vs Visual C++

  • Community Builder

    Being an experienced C/C++,VB, C# and VB .NET programer, I must say that between C++ or VB, just forget that VB exists.

    As for C++ vs VB.NET vs C#, I can't say much about, because I haven't tried yet managed Directx with .NET.
    One thing I'm sure, between VB or VB.NET go for VB.NET.

    If you're thinking seriously about game programming u have to go to C++. Everything runs much faster, and u have total control about what's going on.


  • Sarosh_Alamgir

    VB6 or C++

    use C++ :)

    This question has been asked many times on this forum, but my oppinion will allways be the same. native code is faster as managed code ... so i prefer c++ over C# or VB.NET

    As for VB6 ... u will have bad performance, so start learning c++.

    I used DX8 on VB6 ... bad performance

    DX9 on .NET Great performance

    DX9 on C++ Greater performance :) :) :)

    U dont really have to be an c++ expert for this ... i started learning c++ for gamedev and still dont know how to make windowed application, just know how to use the SDK


  • Steve Collins

    I would just like to thank everyone for your input regarding this.

    I also want to let everyone know that I dived into C#, and decided to go with the Managed DirectX. Because of the ease that C# and the .NET framework offers, I'm already able to do almost everything in C# that I was in Visual Basic. I've already understood the C# D3D approach far more easily than I ever had using Visual Basic and I must say that I'm absolutely pleased with how easy it is.

    If anyone else has this same type of question and gets a chance to read all of this, I would definitely recommend making that switch over from Visual Basic. Not only does the DirectX code seem to fit better with the C language, it's a lot easier to find resources available to help you determine how things are done in C.

    On top of that, .NET makes life wonderfully easy!


  • riwan

    No matter what language you pick, you MUST learn how to read/comprehend DirectX samples in C++, since that's where the majority of samples exist (and also where you will find the largest base of community help).

    One other bit of advice: Never try to learn new concepts using highly outdated languages like VB6. You're just asking for miles of heartbreak.



  • Marco Casamento

    Hi Richard,

    Could you please give us your email address, so that we can get in touch with you! Or you send me an email to a-bhanun@microsoft.com

    Thank you,
    Bhanu.



  • CHC1

    David Weller wrote:

    No matter what language you pick, you MUST learn how to read/comprehend DirectX samples in C++

    i have been doing that for long time, try converting c++ samples into vb code .... after while i could read the c++ code and rewrite it in vb code ....

    Been converting entire c++ dx samples in vb.net and notices the FPS on c++ samples was higher. So i could read c++, tought writing c++ had to be possible to, so i started learning it :)


  • mloskot

    swdeveloper wrote:

    This is a question that has long lingered about my mind - Which language is better for DirectX, Visual Basic or Visual C++

    The answer, as always, is "it depends."

    I have been using Visual Basic for a long time now so that is the language that I am used to.
    ...definitely a point in favour of VB...

    I have dabbled some in Visual C++, but it was Version 3.1, so in all fairness, I haven't really learned Visual C++.
    C++ is C++ is C++. It's not changed much from version to version.

    As far as Visual Basic is concerned, I'm running version 6.0 Professional.
    Oh. RUN AWAY! RUN AWAY! RUN TO VISUAL C++!

    :-)

    Seriously, VB6 is /not/ a platform you want to use for performant DirectX applications.

    The books also show you a few things you can do, but then all of a sudden, they're jumping straight into declaring matrixes, and rendering 3D space and whatnot.
    Yes, because an explanation of matrix mathematics doesn't belong in a book that's about Visual Basic and Direct3D - it belongs in a book about linear algebra and 3D geometric modelling, which is where you'll find it.

    In any 3D system, be it Direct3D, OpenGL, or something else, there are certain common mathematical concepts that you really need to know before you start. Trying to do 3D work without a decent working knowledge of what matrices are and how to work with them is like trying to be an accountant without knowing how to calculate percentages.

    After browsing around the Microsoft website, I now realize that there are two different platforms - C# and C++ Which one would be better to use of those two if I were to switch
    Those are not your two choices. Your two choices are /actually/ unmanaged DirectX versus Managed DirectX (or, DirectX a la .NET). If you go with unmanaged DirectX then you're pretty much restricted to only using C++, but if you go with managed DirectX then you can use any .NET language, including both C# and VB.NET. The latter might be the easiest option for you if you're used to using VB6.



  • kadir43244

    Forgot to mention another advantage with C++. You can always move to another platform and still be able to make games.
    Well, almost, u will still have to learn the graphics library...

  • 2020

    totally agree with u torpedo :)

    VB.NET is indead much faster as vb6 but still i guess c++ is one of the fastest codes u can have for game development ... unless u want to do it in pure assembly ;)

    Don't really have to try managed dx, just look at the samples of the sdk ... on my pc the managed samples are 100-200 fps lower as native samples


  • Visual Basic vs Visual C++