The ZBuffer - Managed DirectX resources

\Managed DirectX and XNA Framework news


Search ZBuffer
Links


 
The ZBuffer
News, Information and resources for Managed DirectX and XNA Framework.
Archive of posts for May, 2006. For other months check out the archive

5/31/06: Shader WebCast **TODAY** 10am PST. Added link to download source if you want to follow along.

ZMan goes primetime... Tomorrow, May 31st 10am-11am PST. Introduction to Shaders with Managed DirectX. Downloads: Source

On demand webcasts:

2006: 3d game programming

Benjamin Nitschke presents a series of 3 webcasts Rocket Commander webcasts. Supporting material is avaiable on his blog.

  • Part 1 - 9am PST, Tuesday May 16th
  • Part 2 - 9am PST, Wednesday May 17th
  • Part 3 - 9am PST, Friday May 19th

Following on from the 2D series last year we now have a 3D series. The class is presented by Doug Heimer a senior at Digipen who has been involved in a couple of games that you can download and check out - Geo Warfare and Resonation.The bio says he's taught game development and C#. Several people asked about C# and Digipen at the first webcast and Doug said that though there is a C# class taught it's not used extensively in other classes and C++ is what almost all projects are done in.

Supporting material is available on the digipen webcast page.

2005: 2d game programming

This MSDN webcast is presented by an instructor from Digipen. They are building a 2D top down shooter using sprites.

The source code and PDF documentation can be found on the digipen companion site

 

Updated 5/31/2006 9:00:00 AM by Zman

The Geeks with Blogs guys have announced a game programming and blogging (yes you have to do both!) competition. There's nothing stopping you using your managed DirectX skills to win the competition, but its not mandatory so you can stick with GDI if you prefer. There are few rules but using Visual Studio Express and blogging about it on 'Geeks with Blogs' are the main ones.

Some of the early entrants are already strutting their stuff for the ladies with little effect. Check out Jason, Chris and George.

Updated 5/22/2006 9:30:00 AM by Zman

Added link to UI book (thanks Phil) & note about the SetDialogBoxesEnabled flag (thanks Matthieu)

You have 2 basic choices:

  1. Use regular windows controls

    Its possible to overlay windows controls over a form or other control that uses Managed DirectX, however depending on your rendering method and the control flags set you may see flickering. In addition when you switch to a full screen device windows forms controls will not render unless you have set the SetDialogBoxesEnabled (native doc has more details). Alternatively you can fake full screen by drawing a full screen window with all of the borders removed.

    Generally this method is best used for level editors etc, where the rendering output is in a panel and the forms controls surround it.

  2. Render your own controls on the DirectX device

    This is not a trivial exercise and there are no form designers available as there are with Windows Forms. There are several already written code bases that you can use, extend or just study:

    • Managed DirectX SDK sample framework: This code comes with the DirectX SDK and is written in C# (Unofficial VB.Net conversion). The source code is provided with little to no restrictions on use. Windows Forms programmers will find it subtly different but fairly easy to use. Documentation is non existent (C++ docs!) and support is through the MSDN forums. The UI us used by all of the SDK samples and the best example of usage is the CustomUI sample. Vorn has written a quickstart guide which may help some.
    • CEGUI is the managed port of Crazy Eddie's GUI system and is released under the GNU or LGPL licenses. The source is available from the Realmforge/Axiom source locations. The source is in C# and support is available in the Realmforge forums. I was unable to find any documentation of the managed port however there is native documentation.
    • C-Unit tutorials: Chad has a set of tutorials about building your own UI widgets using managed DirectX. Parts 1, 2, 3, 4. The code is in C#, and I see no license information in the source or on the site. Documentation is in the code and tutorials and support is through email to Chad.
    • The Brume Engine has its own UI engine which can be seen in this screen shot. As I mentioned the source has to be extracted from CVS if you want to look and is released under the LGPL license. There is no documentation or sample code for the UI elements and support is through the sourceforge forums.
    • There is a book about using DirectX to create UIs available. I've not read it myself but it might be worth checking out. No managed code unfortunately. DirectX9 User Interfaces

Updates and other suggestions regarding this FAQ entry should be emailed to ZMan

Updated 5/22/2006 8:00:00 AM by Zman

5/19/06: Caught up on SDKs, added the 9.0b for VB link (thanks Mykre), GDC06, PDC05


Microsoft - the people who create and support DirectX and Managed DirectX. If you need to download the SDK or the runtimes then head on over to the download page. If you need technical developer information then look in MSDN

SDKs (see also What are the managed DirectX versions?)

Conference Presentations: MSDN Articles

Updated 5/19/2006 8:00:00 PM by Zman

I don't actually own a copy of this book so I can't give you an opinion other than I have seen it recommended several times and Frank is a very active author who maintains and answers questions about the book on his website. I wish all authors cared this much about the people who buy their books

David Goben did a port of this book for an early version of Managed DirectX and I recently updated this source so that it compiles against the newer versions. As always, if the source is useful to you please consider buying the book.

 

Updated 5/18/2006 8:00:00 AM by Zman

According to the books website the latest version of the book source code includes a managed port.

The download requires a password from the book and the original source code from the CD, totally reasonable in my opinion, which means I've not had a chance to look at it yet. However the book is on its way to me as I type this so I will have an update for you soon.

Thanks Greg and Mykre

 

Updated 5/17/2006 8:00:00 AM by Zman

Update thumbnail and progress

Sidereal Fury is a multiplayer sci-fi racing game currently under development. There is no public download yet, but the group has posted screen shots of their current state.

Progress on Sidereal Fury has been consistent - it's good to see an indie MDX game that has regular updates. Isaac has artists and developers on board which is a great sign. I'm not sure if he is still recruiting but you can contact him through the website if you are interested in contributing.

 

Updated 5/15/2006 8:00:00 PM by Zman

5/3/06: Added error message to help search engines find the article

Error Message:

LoaderLock was detected
Message: DLL '.......\Microsoft.DirectX.Direct3D.dll' is attempting 
managed execution inside OS Loader lock. Do not attempt to run 
managed code inside a DllMain or image initialization function since
doing so can cause the application to hang.

A Loader lock is one of the Managed Debugging Assistants (MDAs) that were added to VS2005 to help find hard to debug runtime issues. There is code in all Managed DirectX 1.1 assemblies that causes this MDA to fire. Microsoft have confirmed they are aware of the problem. However I do not expect to see a fix for MDX 1.1 since current efforts are focused on MDX2.0/XNA Framework, it ONLY affects code run under the debugger (i.e. it won't happen when users run your EXE) and there is a trivial workaround. I'm not sure of exact reproduction steps - it appears to fire on some projects and not on others.

To work around the problem you have several choices:

  1. Go back to using VS2003 and .Net 1.1
  2. Use MDX 2.0. Note that MDX 2.0 will never actually ship as it is being transformed into the XNA framework.
  3. Disable the loader lock MDA. Debug/Exceptions (ctrl-D, E), Open the Managed Debugging Assistants tree node and uncheck Loader Lock. This setting is per solution so it will only affect this solution.

Versions affected:All .Net 1.1 Managed DirectX assemblies when used with Visual Studio 2005 and .Net 2.0.


Updates and other suggestions regarding this FAQ entry should be emailed to ZMan

Updated 5/3/2006 1:00:00 PM by Zman

April was another great month for The ZBuffer. The first month with >50k page views and I broke 500k total page views since launch. Now I'm sure this is nothing for some of you folk, but I think its a pretty good deal for a one (Z)man show in his spare time.

So thanks to all of you who visit regularly and I'm looking forward to the rest of the year. Maybe I will hit a million by Christmas!

NOTE: I filter referrer spam, bot visits, RSS fetches etc. IIS says more like 180k page views this month but >100k of those were to the rss feed. How often do you people check if I have updated the feed?

Updated 5/1/2006 12:30:00 PM by Zman