Tech Off Thread

119 posts

Discuss the Beginning Game Development series on Coding 4 Fun

Back to Forum: Tech Off
  • User profile image
    Kal_Torak

    Thanks for supplying the VB code with it Big Smile:D

  • User profile image
    Kal_Torak

    I just downloaded, installed, and tried the Lesson 6 project.
    I got 98 errors. Sad Perplexed

    I am using the October update, the same one Derek is using for that lesson.
    I have the 2.0 Framework installed, and the RTM version of VB Express 2005.

    So, what is up?

    I'm getting very frusterated with this.Perplexed

    Error screenshot

    HALP!

  • User profile image
    Mykre

    I have posted a reply on the MSDN Forums, the errors for the above are because you have both the 1.1 and the beta 2.0 assemblies referenced for the Managed DirectX systems. Make sure that you have only got the assemblies referenced with a version number starting with 1.x.

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=203954&SiteID=1&mode=1

    The reason for this is that the new beta assemblies have all of the name spaces included for the managed directx systems. In the future this will assist with distributing your applications.

  • User profile image
    Kal_Torak

    Yes, that fixed the problem. Thanks a bunch.
     The only little question I have now is, what is this error about?It's easy enough to fix, but I don't understand why it is a problem.

  • User profile image
    Minh

    Kal_Torak wrote:
    Yes, that fixed the problem. Thanks a bunch.
     The only little question I have now is, what is this error about?It's easy enough to fix, but I don't understand why it is a problem.



    It means that you're using the shared method (Multiply) of the class Microsoft.DirectX.Matrix. You probably have an Imports statement to the Microsoft.DirectX namespace, and since VB is not case-sensitive, the compiler sees "matrix.Multiply(...)" as "Microsoft.DirectX.Matrix.Multiply(...)" -- which it should, but since you also has a variable named "matrix" -- the compiler is warning you that you should explicitly use the long form.

  • User profile image
    Kal_Torak

    Thanks MinH.


    Does Derek read this thread?  Or should we email our feedback/suggestions to him?

  • User profile image
    GandalfLe​Blanc

    Kal_Torak wrote:
    Thanks MinH.


    Does Derek read this thread?  Or should we email our feedback/suggestions to him?



    Thanks for that question!!

    I would like to make a suggestion, and maybe this suggestion would interest anyone that publish articles on the web.  About the only time I have to read such articles is on the move with my old iPaq, it would be nice to provide a PDF version of the article, I had to scroll left-right, up and down for the whole first part of it...

    PDF documents can be optimised for pocket pc but I'm  sure you know that.

    Thank you for those articles, I have already read books on DirectX using C++, now I'm reading 2 tutorials on DirectX.Net and I am starting to be confused... I hope you will help get clearer ideas on all those concepts.

    Have a nice day,
    GLB

  • User profile image
    brog

    Hi,
    I thought the article started off really well. Went at a good pace by explaining what each addition of code meant and letting me add it so i understood each section. Great!
    and then i get to section 3 (the direct input section) and ahhh whats going on?! the article suddenly states that it has added and refactored a whole load of code! so now i'm completely lost because i thought the whole point of the tutorial was to go through how do design a game well step-by-step.
    So, i decide that it is easiest just to download the code and continue anyway. Then i keep on reading and the article has changed to techno bable. Now, i'm joking a little really because i have done some OpenGL and discrete math in which i did matrix transformations so i did actually understand what was going on. but, if i was new to computer graphics i would have been completely lost because it in no way attempts to explain what some of the things are e.g. an Identity matrix.
    The reason why i'm doing this tutorial is because i'd like to get a grasp of DirectX after using OpenGL a little bit and also understand how to program a game well. Unfortuanately i really feel like its started to miss the point in later sections.
    Good effort but it started sprinting too soon.
    brog

  • User profile image
    Xiaoth

    I just started reading this series. I saw the following comment in the "Beginning Game Development" article (first article), and I want to comment about this statement...

    As we add more functionally to the game we will continuously do small design sessions to formulate our ideas. This iterative approach to developing software is the best way to create good software, and is more fun at the same time.

    I've been a software developer for a long time, albeit not for games. At one point in my career I quit my job and spent three years writing and re-writing a desktop blogging application that I had intended to sell. I "knew" what I wanted to build, but approached the project with the same philosophy as quoted above.

    In the end, I had a buggy, kludged-up application that I kept having to release patches for every week, and my app that was supposed to take one month to build and sell to the world for $20 a pop turned out taking me three years, having half of the intended features, and for a price of $10 before I ended up making it freeware.

    Windows 95 followed the exact same philosophy, too, and we all know how that went. The Windows 95/98/ME series was a hodgepodge of bubblegum, rubber bands, and duct tape, wrapped in a colorful marketing package. It took Microsoft years of carefully planning out a proper system at the drawing board to reengineer Windows for the new (at the time) NT platform. NT was only successful, though, because of proper advanced planning.

    Certainly, evolving a program as you build it is "fun" as such. But it is NOT "the best way to create good software," it is actually the absolute worst way when it is not the only way. Sometimes it's necessary as a discovery process. But it will rarely output "good software". Without a disciplined, thorough, even boring Phase One (functional requirements gathering phase) and Phase Two (software design and engineering requirements phase), you will see your ever-elusive release date constantly fading into the unforeseeable future, and your end product will be a mushy mess of compromises, bugs, and half-baked ideas.

    No, do the dirty work of thorough early engineering before writing too much code. It isn't fun during that phase, but it's worth it. Believe me, my current job is with a business software company that makes me spend weeks doing "software development" in Microsoft Word by documenting a design specification. During these phases I experience such depression that I go home wondering if I should abandon my career altogether. But when the phase is over and I see how easily the design spec can be carried out by simply following the business rules I wrote in software speak, and everything works like a charm with no fundamental flaws, holes, or foundational bugs, I realize how important the whole process really is.

    When it comes to games, certainly creativity is important, as well as evolution of the game. I think it's inevitable that a great game will require some evolution along the way, particularly as new major technologies come out for PC software every couple months. However, the statement "This iterative approach to developing software is the best way to create good software"could not bother me so much if it wasn't so untrue, from a technical point of view. It is an ideal statement, but it is simply not reality.

    Sincerely,
    Jon Davis

  • User profile image
    Xiaoth

    Incidentally, this article series is invalid as it references DXMUTMisc.cs. The DX Utility Toolkit in the Samples directory is broken as it is out-of-date due to breaking changes in the SDK.

    Correct me if I'm wrong. DXMUTMisc.cs simply does not compile, regardless of what Microsoft.DirectX.* assemblies are referenced.

    Jon

    ________________

    UPDATE:

    OK, I've realized that I need to include *all* of the sample Utility Toolkit framework files, or Samples\Managed\Common\dxmut*.cs. However, it only worked if I used the .NET v1.1 DX assemblies. Using the single .NET v2 assembly, I still get compiler errors. Apparently the v2 version is either half-baked (beta) or is intended for specialized usage.
  • User profile image
    okieDokie

    AndyC wrote:
    The latest DirectX comes with two versions of managed DirectX the old 1.1 version and a 2.0 beta (which doesn't seem to play nice with 2.0RTM)

    If, when you add the DirectX references, you avoid adding the v2.0 Microsoft.DirectX library and instead only add the older versions (marked v1.1.4322) then everything seems to work okay.

    There do seem to have been a few breaking changes between versions though so if the code was written against the 2.0 beta you might have to amend it slighty or use the beta 2.0 runtime (at least until a new DirectX SDK comes out, which will hopefully not be too long!)


    I'm running VS 2005 Pro, WinXP Pro, DirectX v 1.0.2902.0 and I get a run-time exception: System.TypeInitializationException at this line of code...

    int adapterOrdinal = Manager.Adapters.Default.Adapter;

    What information do I need to provide to get some help with this problem?  I tried using the 2.0 version and that failed as well with a conflict between DLL versions.

  • User profile image
    agwan

    Hello my name is daniel I'm 16 and started to write a game using the articels. Now I have a demo although not finnish it has passed the stage that the articles are currently covering. You can veiw my progresss at www.extremesolutions.co.nr hope you enjoy!

       Agwan

  • User profile image
    cyager

    jon....

    Chill.

    Ask yourself 1 question.  Did you learn anything?

    You are going to look back at these posts someday and think -"Man, what an A-Hole I was!"

    - a concerned fellow trainer geek

  • User profile image
    arendell

    After pulling my hair out trying to figure out why I'm not intelligent enough to get this tutorial to build I finally figured out that I was working with the 2.0 version of DirectX managed.  The only change I had to make to get the tutorial code to build was in the CreateCrossHairVertexArrayTop and Bottom methods.  Instead of returning a PositionColored[] it needs to return a GraphicsBuffer to the DrawUserPrimitives method.  Not an earthbreaking change but maybe someone else can benefit from not wasting valuable hair strands on this simple issue.  The code I used is:

    private GraphicsBuffer<PositionColored> CreateCrossHairVertexArrayTop ( )
    {
       GraphicsBuffer<PositionColored> crossHair = new GraphicsBuffer<PositionColored>(7);
       float zval = 0f;
       Color col = Color.Green;

       crossHair.Write(new PositionColored(-1f, 1f, zval, col));
       crossHair.Write(new PositionColored(-1f, 2f, zval, col));
       crossHair.Write(new PositionColored(0f, 2f, zval, col));
       crossHair.Write(new PositionColored(0f, 3f, zval, col));
       crossHair.Write(new PositionColored(0f, 2f, zval, col));
       crossHair.Write(new PositionColored(1f, 2f, zval, col));
       crossHair.Write(new PositionColored(1f, 1f, zval, col));

       return crossHair;
    }

    Hope this helps someone out.  Not sure the performance implications of using Generics instead of arrays, but I don't see any framerate difference in the tutorial application using DX 2 or DX 1.4 on my admitedly subpar gaming machine. 

    Scott

  • User profile image
    Labris

    I had an extremely low frame rate too. But I've added the following line to the presentParameters. I hope it just disables the Vertical Sync:

    presentParams.PresentationInterval = PresentInterval.Immediate;

    It boosted my framerate from 40 to 300 fps. So for me it helps.

    Great article, btw.

    Labris


  • User profile image
    zman

    Xiaoth wrote:

    OK, I've realized that I need to include *all* of the sample Utility Toolkit framework files, or Samples\Managed\Common\dxmut*.cs. However, it only worked if I used the .NET v1.1 DX assemblies. Using the single .NET v2 assembly, I still get compiler errors. Apparently the v2 version is either half-baked (beta) or is intended for specialized usage.



    Its quite clearly a beta, it has breaking changes and it is not yet complete (and never will be see Tom's blog). If the code in the article wasn't designed to run on MDX2.0 then don't try it unless you want to fix it yourself.

  • User profile image
    Tiptup300

    First off I love the INFO THANK YOU!!!!!

    but before the "3D Graphics Terminology" part I keep getting a build error

    "error CS0246: The type or namespace name 'Device' could not be found (are you missing a using directive or an assembly reference?)"

    why?

    EDIT: Well I found out I had it in the wrong place and I double checked everything but I'm getting

    "
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(32,25): error CS0246: The type or namespace name 'Manager' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(38,4): error CS0246: The type or namespace name 'Caps' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(40,4): error CS0246: The type or namespace name 'CreateFlags' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(48,8): error CS0246: The type or namespace name 'caps' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(52,5): error CS0103: The name 'createFlags' does not exist in the class or namespace 'Battletank2005.Form1'
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(60,5): error CS0103: The name 'createFlags' does not exist in the class or namespace 'Battletank2005.Form1'
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(70,8): error CS0246: The type or namespace name 'caps' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(74,5): error CS0103: The name 'createFlags' does not exist in the class or namespace 'Battletank2005.Form1'
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(80,4): error CS0246: The type or namespace name 'PresentParameters' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(82,4): error CS0246: The type or namespace name 'presentParams' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(94,4): error CS0103: The name 'device' does not exist in the class or namespace 'Battletank2005.Form1'
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(116,4): error CS1525: Invalid expression term 'private'
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(116,12): error CS1002: ; expected
    "
    a tiny amount of errors....please help....

  • User profile image
    Nasai

    Tiptup300 wrote:
    First off I love the INFO THANK YOU!!!!!

    but before the "3D Graphics Terminology" part I keep getting a build error

    "error CS0246: The type or namespace name 'Device' could not be found (are you missing a using directive or an assembly reference?)"

    why?

    EDIT: Well I found out I had it in the wrong place and I double checked everything but I'm getting

    "
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(32,25): error CS0246: The type or namespace name 'Manager' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(38,4): error CS0246: The type or namespace name 'Caps' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(40,4): error CS0246: The type or namespace name 'CreateFlags' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(48,8): error CS0246: The type or namespace name 'caps' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(52,5): error CS0103: The name 'createFlags' does not exist in the class or namespace 'Battletank2005.Form1'
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(60,5): error CS0103: The name 'createFlags' does not exist in the class or namespace 'Battletank2005.Form1'
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(70,8): error CS0246: The type or namespace name 'caps' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(74,5): error CS0103: The name 'createFlags' does not exist in the class or namespace 'Battletank2005.Form1'
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(80,4): error CS0246: The type or namespace name 'PresentParameters' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(82,4): error CS0246: The type or namespace name 'presentParams' could not be found (are you missing a using directive or an assembly reference?)
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(94,4): error CS0103: The name 'device' does not exist in the class or namespace 'Battletank2005.Form1'
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(116,4): error CS1525: Invalid expression term 'private'
    c:\documents and settings\owner\my documents\visual studio projects\battletank2005\gameengine.cs(116,12): error CS1002: ; expected
    "
    a tiny amount of errors....please help....


    This is because Derek forgot to tell us what we need to include at the top of our classes with "using" and when we  need to do it. i ran into the same problem as you and made a solution for myself. add the following code after all the "using System" lines:

    using Microsoft;
    using Microsoft.Samples.DirectX.UtilityToolkit;
    using Microsoft.DirectX;
    using Microsoft.DirectX.Direct3D;

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.