How do I Setup Visual C++.net 2003 Standard for Direct X Games Programming

Hello!
How do I Set up Visual C++.net 2003 for DirectX Games programming.
I have  just up graded from Visual C++ 6, I know how to do this in Visual C++ 6, with linker and # includes,  is it the same with Visual C++.net 2003 standard. If so a step by step would be helpful.
Thanks.


Answer this question

How do I Setup Visual C++.net 2003 Standard for Direct X Games Programming

  • NL07428

    Thanks everybody for the replays,
     
     
     Ok I went to all the links on managed Direct X. I was very hopeful that this was they way forward, till I noticed all the tutorials are in C# or VB, all the books in C#, I'm using Visual C++.net 2003 standard, as I'm new to Visual C++.net 2003 standard using Direct X.
    could someone point me to a good book or tutorials for Direct X 2D Games programming in C++. using my Visual C++.net 2003 standard, and not Visual C++ 6, I don't Intend to write any 3D blockbusters, I just dabble in programming for my own entertainment.
     
    Just a thought, but can I use my old code written in Visual C++ 6 By leaving out the #Include calls to ddraw as this has been dropped in the SDK 9, or do I have to recode everything that uses ddraw. does this make my books on game programming in C++ obsolete I hope that these questions will also help other beginner's.

  • Yui_Ikari

    If you are planning on using Managed Directx you can just add a reference to Microsoft.DirectX, Microsoft.DirectX.Direct3D and so on, depending on what you gonna use.

    If you are planning on using C++, go to Project Properties. There you see a folder Linker, in that folder you can find Input.
    Add to Additional Dependencies: d3dx9d.lib, d3d9.lib and so on, depending on what libraries you gonna use. Also use #include <d3d9.h> on top of your page for including the header file.

    Hope I dont miss anything, I'm also just starting with directx.

    But all this info is also found in the SDK.



  • alexlowe

    Thanks for the Reply Peter,

    What is Managed Direct X, never heard of it.
    is this better than the way we use to Link and #Include in Visual C++ 6.
    I'am some what surprised that in this forum for beginners, setting up your compiler for Direct X is not a preferment thread, as this is where the most problems happen.


  • MSJaggi

    You can find more information, tutorials, resources and so on at www.thezbuffer.com. Made possible by The ZMan  :)



  • mike6669

    I dont know where to start explaining managed code, there are whole books written about it. But I found this information in the sdk, which is clear enough:

    ---------------------
    Managed code is code written in one of over twenty high-level programming languages that are available for use with the Microsoft .NET Framework, including C#, J#, Microsoft Visual Basic .NET, Microsoft JScript .NET, and C++. All of these languages share a unified set of class libraries and can be encoded into an Intermediate Language (IL). A runtime-aware compiler compiles the IL into native executable code within a managed execution environment that ensures type safety, array bound and index checking, exception handling, and garbage collection.

    By using managed code and compiling in this managed execution environment, you can avoid many typical programming mistakes that lead to security holes and unstable applications. Also, many unproductive programming tasks are automatically taken care of, such as type safety checking, memory management, and destruction of unneeded objects. You can therefore focus on the business logic of your applications and write them using fewer lines of code. The result is shorter development time and more secure and stable applications.
    ---------------------

    This means you have too write far less code then with unmanaged code. So it's easier too learn. I also started Managed Directx with Visual Basic.NET, since I'm a vb developer. I hear that unmanaged directx is faster though, but couldn't find any figures about it :( Maybe someone @ MS here has some. Love too see them



  • Bassam Adil

    Is Managed DirectX slower
    Yes - it has to be - its a layer of interop between managed code and the directX unmanaged libraries.

    How much slower
    Not very much - the SDK samples run around 98% of the speed. There is a little more start up time but its not huge.

    Anything else
    Watch your algorithms - the top games are not fast just because of native code. They use smart culling and occluding algorithms to only draw what they need, they use level of detail to cut down on the triangles etc. You can take advantage of all of these to speed up managed code.

    What CAN'T I do
    Without digging into unsafe code you can't read/write fast into bulk memory such as textures. However the unsafe code you need isn't much and is fairly safe :-)
    You can't control memory layout - the very top performing games will control memory such that you get processor cache efficiency. Generally done with custom memory allocators. If you are at this stage then you probably don't need to ask the question about using managed code or not :-)

  • How do I Setup Visual C++.net 2003 Standard for Direct X Games Programming