Managed World

Techno-babble from yet another babbler RSS 2.0
# Thursday, July 28, 2005

This one comes from a conversation I was having with a co-worker about starting to play First Person Shooters during lunch and/or after work to spice this place up a bit.

------------------

Jason Olson says:

I found another FPS that we can play on our breaks: America's Army, since it is OFFICIALLY free and we wouldn't be braking any laws by doing so.

Loren Guthrie says:

sounds good... but aren't you worried we might start a game and then be stuck for years with no exit strategy?

Posted in Personal
 #       Comments [2]

As Mykre has already pointed out, it appears that the August 2005 SDK has been released. I'm not sure how "official" it is since it isn't reflected on the DirectX community site, or the latest SDK page yet (although that may change by the time you actually read this post).

Enjoy!

 #       Comments [0]

I have one piece of advice for all of you game developers out there: learn shaders now!!!! Go out and pick up Sebby's book and do it now.

Let's look at some trends in the industry and see if we can't put some clues together (with freely available public information) to justify this decision.

1) The fixed function pipeline is emulated in shaders on a lot of newer graphics cards (meaning the "true" fixed function pipeline is almost no longer)

2) There is an entire Effects Framework in the SDK to make hooking into Shaders a heck of a lot easier and it is actively being developed on.

3) As my prior post shows, Microsoft is definitely NOT afraid of trimming the fat and is starting to prove just that.

4) In a good number of newer games, the fixed function pipeline is simply used as a "fallback" when some piece of functionality is missing.

As a game developer, I would want to start learning about shaders now (just like how I wouldn't waste the time learning DirectDraw).

 #       Comments [1]

Well, I wasn't going to blog about this because I thought it was under NDA. But considering the following information is available in the publicly available slides that you can download from the DirectX MSDN site, I figure that I can blog about it just fine since it's available for the public.

If you look for the slide called "Deprecated Components" in the "DirectX SDK Roadmap" talk, you will notice that most of the components will become deprecated (including DirectInput and DirectSound). In fact, it looks like the only major component of DirectX left is Direct3D, everything else will soon officially become deprecated. Interesting, I must say.

I can't share the other nugget with you though because it's not in the slides posted on the site. Oh well, perhaps it won't be too long before I can share the information....

 #       Comments [2]
# Wednesday, July 27, 2005
I've gotten a good number of emails lately about the game development articles on GWB lately, so here is a rundown of the current status of them.
 
The current series on the GWB site is basically dead. HOWEVER, there are DEFINITE plans to finish the series under a different name and with a different perspective here on Managed World. All the posts about "BooM" have to do with progress of the game/engine that the articles will be written on.
 
I have decided to get the game/engine to a complete prototype stage first before writing the articles. Once that is finished, I will write ALL the articles and release them all together. This way, the end reader won't be frustrated by investing time into an unfinished game. The game by the end of the articles will technically be "done" but will be all programmer art but still fully functional. If you go to Managed World, you will notice that BooM is basically finished. The only thing I have left before starting seriously on all the articles are the game screens (the menu, game configuration, etc.). This shouldn't take too long as it will also be very programmer-art-centric.
 
Look for updates in the coming weeks.
 #       Comments [2]
# Tuesday, July 26, 2005

While I found this talk interesting, it was a little off base. What it should have been titled was "New Debugging Features in Visual Studio 2005 for Managed Languages." What makes this especially funny for me is that a couple of things happened:

1) The talk started 10 minutes late

2) At the beginning of the talk, he asked how many C# developers there were and only six or seven of us raised our hands (there are maybe 40-50 developers in the room).

3) Knowing that only 10% of us are Managed developers, he then goes on to talk about writing new visualizers and the like (which is NOT available for native C++ developers (as I understand it)). That seemed a bit weird to me. If you're not going to use the information at all, why ask the question (especially when it can negate the purpose of your whole talk)?

Anyways, yeah, I've seen all this stuff at Tech Ed so nothing new here for me. I was hoping it would be a lot lower level since this is largely a development-oriented conference and most of the developers (at least it seems) are C++ developers. Oh well, c'est la vie!

 #       Comments [1]
Damn it!!! I had a whole long post ready to go that I composed throughout the talk. And I just lost it. Damn it, damn it, damn, it, damn it. Oh well. The gist of it was "GO CHECK OUT PIX NOW!!!!!!!" You have to. I just can't explain how incredibly cool it is. Just check it out.
 #       Comments [0]

Interesting. All power point reading, but interesting nonetheless. I just hope there is some "meat" to some of these talks rather than just power point, power point, and more power point. I must take this opportunity to say that after seeing Scott Hanselman talk so many times, I'm an absolute spoiled brat when it comes to presentations. I find that I'm very picky about good presentations and certain things (like power point reading) annoy me greatly. At least there's some content here though.

One thing I find especially interesting is how specialized DirectX is becoming. What I mean by that is how many DirectX elements are becoming deprecated. From the sounds of it, DirectX is basically being wittled down to Direct3D and DirectSound. Here are the state of the other APIs that I know of:

1) DirectDraw - Deprecated

2) DirectMusic - Deprecated

3) DirectPlay - Deprecated

4) DirectShow - Not recommended for game development

5) DirectInput - Although it is not officially deprecated, it is highly recommended to simply use the Windows hooks instead of DirectInput.

I have a feeling there will be many interesting issues I will see in the next day or two regarding the direction that DirectX is heading.

 #       Comments [4]

Well, um, yeah, the keynote.... What can I say? Hrm. It was by Mike Morhaime who is a co-founder of Blizzard. And, I may be crazy here, but I would think that if you are a co-founder of Blizzard you would have SOME sort of public speaking skill. I guess I was wrong. Funny how that works. He read to us about the lessons learned (by his employees evidently) during the global launch of World of Warcraft.

However, I did walk away with two distinct impressions from the keynote:

1) He did not write the speech himself

2) It was most likely the first time he ever read the speech.

And I thought some of the talks at Tech Ed were bad. I suppose in hindsight, they weren't *that* bad. At least they were "power point" readings instead of "index card" readings.

And what's up with a computer guy not knowing about laptops? He was quite confused because when he closed the lid, the computer would go in to Stand By mode and the powerpoint slides would disappear. Well, yeah, what would you expect to happen?

I'm strongly hoping that it isn't a sign to how the rest of the talks are going to go. But judging by the names giving the talks, I have a good feeling that the talks will be reasonably high quality.

 #       Comments [0]
# Monday, July 25, 2005

Well, tonight was the pre-Meltdown hang. Before the hang actually started, Andy Dunn called me up and we decided to walk over and check out the Seattle Public Library whose architecture is talked about widely, evidently. All I could think of was "what a funny looking building." However, it really is incredible. Starting on like the 4th floor, all the books are on a "spiral" where there really isn't any "floors" per se. It's basically one continuous spiral up many floors. Pretty trippy to see that. Anyways, after that we hiked back to the hotel.

The hang was fun. Free drinks and food. Had a good time with Andy, Chris, Jessica, and Todd. It was great after a couple of beers to get Andy talking about us speaking "American" and him actually talking English, and about the fact that *WE* are the ones with the accents (after all, *THEY* are English and it is their language). And then I knew something that would REALLY get him started. So I bated him by saying that what is really messed up is how Football is not Football. OHHHHHHH, good times.

He said something at one point that was pretty darn crazy. I mentioned I was going to blog about it and everyone started laughing. Luckily for Andy, I have a REALLY bad memory and can't even remember what it was (if you're reading this Chris and can remember what it was, make sure to leave a comment).

OH, and Chris was recognized by the ladies heading up the door to the bar. Pretty crazy. He's all famous and crap because of the stuff he went through to get here. JEALOUS.

I'm really excited about Meltdown starting tomorrow. Here is the rundown of the sessions I will be attending over the next two days:

Tuesday

- Best Practices for Windows Development

- Optimizing Windows Games

- The Effects Framework for DirectX 9: Best Practices & Optimizations

- Performance Investigator for Windows (PIX)

- Debugging Tips and Techniques for C#/C++ Developers

- Peer to Peer Connectivity and Communications

- Flight Simulator: Preparing for DirectX 10

Wednesday

- Advanced Lighting Techniques

- Managed and Native Code for Tools Development

- Application Compatibility Testing and Automation using PIX for Windows

- Next-Gen Graphics on Longhorn Revealed, Part 1 (yes, I know it's now "Vista")

- Next-Gen Graphics on Longhorn Revealed, Part 2

- Next-Gen Effects on DirectX

- Direct3D Futures

I can't wait. Well, goodnight!! 

 #       Comments [0]
Well, I'm here at Meltdown. If any of you happen to be here and want to meet up, I'm in room 1618. Ciao!
 #       Comments [1]
# Sunday, July 24, 2005
If you were at the Portland Code Camp and attended some of the Game Development tracks, I would love to hear your feedback. You can either post about it and tell us where it is, or simply add a comment with your thoughts. There are already several pieces of feedback that I think are great (and I want more). This will help us improve v2.0 and make it better for all of you, the ones actually attending the camp.
 #       Comments [5]
# Friday, July 22, 2005

You know, either I have been waking up on the wrong side of the bed a lot more lately, or I'm simply starting to become an grump ol' codger. I'm sure by now, everyone AND their pharmaceutical assistants have heard about "Windows Vista". Well, if everyone AND their long-living, paraphernalia-selling, psychotropic drug-addict alter egos have heard of the Windows Vista news, why do we have to keep on repeating it?

I think this is why I do not like link blogs. I want to see content, or personality, or what have you. I don't want to simply see a link to a news story that I've already seen linked five million other places (let alone five million times by other bloggers on the SAME SITE). If you are going to post about Windows Vista, you better damn well be contributing something to the plate (even if it is simply a stupid, pet writeup like I'm doing here (not to toot my own horn (which I often do in private but not much in public (although I've thought about it from time to time)))). It seems like the more people that start blogging, the extraneous noise I'm having to filter through. My issue with the noise is that it's not PERSONAL noise.

If you are blogging simply to post links time and time again (without any personality or insight), than I think you are missing the WHOLE point of blogs. Of course, to each his own I suppose. But I can't imagine you can't find a better way to appease your vicious, patting-on-the-back nature. I mean, throw me a friggin' bone here. Give me some kind of clue that you're human. WAIT A MINUTE! Maybe that's the problem! Maybe most sites are actually populated by touring-test compatible cyborgs (also known as "blogging bots"). Yes, that's it. That HAS to be it. Well, at least that's how it LOOKS. And, like my mom always told me, if it looks like an apple, smells like an apple, and tastes like an apple, than it MUST be an apple (unless it's a turnip of course).

Believe it or not, I'm actually not all that disturbed about this, I simply thought it might be a good opportunity to flex my "personality muscles" for all of you to show off my entirely NON-Greek, NON-chiseled physique. C'est la vie.

Posted in Rants
 #       Comments [8]
# Thursday, July 21, 2005
I just came across this article earlier this evening. It is an article about improving Managed DirectX performance. It is written by Tom Miller and is published in the latest MSDN magazine. Enjoy!
 #       Comments [0]

Chris Williams and I were interviewed on the latest show of the GWB Podcast about various things like Microsoft Meltdown, Code Camp, and game development in general. It was a blast to be a part of (thanks Jeff!!). It definitely got me more psyched for this weekend's code camp. I felt like a total doofus while recording this but I suppose that's normal. The one thing I can say definitively after listening to the podcast is that I wish I had a more manly voice. Oh well, c'est la vie.

Enjoy!

Posted in Personal
 #       Comments [3]
# Wednesday, July 20, 2005

Well, the early, unfinished, programmer-art, bare-bones prototype is finished for Tanks! I'm starting to get real psyched about this architecture. Anyone reading this that haven't read the book Game Coding Complete by Mike McShaffry, go buy it and read it now!!! (the source and binaries are posted below)

Through this whole series of first steps, I have come to learn a couple of things. First, when writing any game that has a physics element too it, it becomes really important to separate out your concerns. What do I mean by this? Well, most game objects should have at least two different models associated with them. First, there is a graphics model that describes how the game object should look (this is only important when presenting the game object to the user (the computer AI could care less how it looks)). Second, there is a physics model that describes how the object behaves in the world. By separating out these two responsibilities, it becomes easier to manage the development of your game objects.

One of the other things that was reinforced for me is the importance of baby steps, namely when refactoring. When I wanted to separate out the behavior of my objects into separate physics models, I initially tried to do it all at once. After it breaking, I rolled back all my changes (you ARE using Source Control, right?!?!?!?). Then I did about a three hour session of refactoring where I literally did small steps like "extract method" and "extract class" and what have you. After each step, I would test to make sure nothing was broken. After three hours, I realized I had arrived at my new architecture and I never once had to step into the debugger. What a GREAT feeling!!!

So, if this is just a prototype, what is missing? There is no UI while playing the game, which means the amount of life the tanks have left is not displayed and neither is the overall score. Currently, to kill the enemy tank, you need to hit it ten times. Once you kill it three times, the game is over. Another component that is still non-existent is enemy AI. Currently, the enemy tank simply sits there and waits to be killed.

There are some bugs to be aware of (actually, one major one that I can think of). Occasionally, the tank will stop responding to steering and thrust messages. When this happens, you can do a combination of pressing all the movement directions (the up, down, left, and right arrows) and firing the tank (the spacebar) and it will eventually kick in again. I'll probably wait to fix this bug until we are later in into the game.

I have added a readme file to the source zip file that describes what steps need to be taken in order to compile the code.

With all this said, I would like to provide you with the source and binaries for this version of Tanks! The architecture has changed quite a bit in the details since last release so feel free to download and play around with the latest release.

Enjoy!

 #       Comments [1]
# Tuesday, July 19, 2005

Following Chris's cue, I am going to post what I'm looking forward to attending at Microsoft Meltdown also (ME TOO, ME TOO, ME TOO!!!). Here's a handful of sessions I'm looking forward to (assuming they don't conflict with eachother (which they probably will)):

Best Practices for Windows Development
Speaker: Chuck Walbourn

Developing games for the Windows platform means more than just using a few DirectX APIs.  This talk covers a broad range of topics that game developers should take into account during design and implementation to ensure their titles work well on current and future versions of Windows

Optimizing Windows Games
Speaker: Kev Gee

Make your game the best it can be.  Learn about common performance concerns on the Windows platform from graphics to file I/O and the best practices for designing high-performance titles.

Managed and Native Code for Tools Development
Speaker: Brandon Bray

This talk will cover the advantages of using both managed and native code for developing tools. The talk will cover the fundamental features Visual C++ provides for using features of managed code and deep integration with native code, both new and existing.

Debugging Tips and Techniques for C#/C++ Developers
Speaker: Habib Heydarian

Learn about tips and techniques for debugging applications using the Visual Studio 2005 debugger. This presentation covers new features in the Visual Studio 2005 debugger as well as true and tried techniques for debugging Visual C# and Visual C++ applications.

The Effects Framework for DirectX 9: Best Practices & Optimizations
Speaker: Kutta Srinivasan & Relja Markovic

The Effects framework is a material and state management layer that enables developers to leverage the full shading potential of HLSL and DirectX9 in a data-driven manner.  Efficient material and state management also happen to be some of the largest performance issues in modern graphics development.  Learn how to get the most out of the Effects system in your title and how to avoid common performance pitfalls.  Find out about the new performance features and optimizations we have developed since the last Meltdown.  Attendees will benefit the most by having previous experience with HLSL and the Effects system.

 #       Comments [0]
This news comes from David Weller. It looks like the Windows Gaming and Graphics Technologies group is finally moving from Usenet to a fully-functional forum environment (RSS-enabled too!!). Check it out.
 #       Comments [3]
# Saturday, July 09, 2005

Personally, I think logging is something that is often overlooked by hobbyist developers. I personally have found good logging at work to help tremendously. So, whenever I get a chance, I like to try to do "The Right Thing" on my home projects.

When developing games, I think it is especially important to be able to get insight into the application while it's running. Sometimes you need to poke under the hood and see how the ole' girl is running, right? Well, in that vein, I hooked up my logging system for the game engine a couple of days ago (I should say, I hooked up my *viewer* a couple of days ago because I've been logging since day one (then again, what good is a log if it's never used, eh?)).

First of all, I had to make a few decisions when building my logging framework. Whenever possible, I like to avoid rolling my own. Call me old or pr3t3nd3r or whatever you young kids do these days, but I happen to enjoy spending my time doing the important things, rather than re-inventing the wheel. With that in mind, I decided to piggy-back on the existing framework that's already in place for Trace. All I had to do was write a custom Trace listener (and the only reason I did that is I wanted some custom formatting) and add it to Trace. Then throughout my application when I want to log messages, I simply write them to Trace. The code doesn't know anything about a logging framework whatsoever (well, sort of, it does introduce a dependency on Trace which I'm using *as* a logging framework; so I suppose you could semantically argue that it does know about the logging framework).

By hooking onto Trace, I can also reuse all the functionality that is already in place. For instance, if I want to log to both a log file, and an in-game log viewer, no problem, just add two listeners. I'm rather proud of this (I don't know why, perhaps the simple things are the things that make me happy), so I figure I'd share what it looks like. As you will notice, my log file is color-coded. That is achieved by using an application called BareTail (it's absolutely free of charge and no install necessary). I was exposed to this at work and have been using it since in my personal projects. You can change the coloring of different lines based on "keywords" that exist within the line.

And a close up of what a snippet of the log actually says:

Any of you hobbyist game developers out there, I HIGHLY suggest you hook in a logging system if you haven't already. Trust me (or don't if you wish (although I would have a few choice words for you in THAT situation)), it will really help you gain an insight into what's happening when (although you should largely know this already). It's almost a form of "eXtreme Debugging" for game developer (a term I believe originally coined by Andre Le Mothe in the game development sense).

 #       Comments [4]
# Friday, July 08, 2005

Well, it looks like the Game Development track that I'm heading up for Portland's Code Camp (you registered yet?). Here is the tentative lineup (it might still change, but I'm hoping that it won't too much).

- Introduction To Managed DirectX, David Weller

- Message-Oriented Game Development, Jason Olson

- Warplanner - Post Mortem of a Managed DirectX Game, Chris Goldfarb

- Implementing Creature AI, Chris Williams

- Behold My Bouncing Balls, Jason Mauer

- The Power of Scripting - Tribes RPG - Robert Under

- Introduction to Shaders - Andy "Zman" Dunn

It looks like a real fun line up for a Code Camp (especially the first one). I'm just hoping that it turns out to be a hit. SOOOOO, if you aren't coming (or you know people that aren't coming), tell them to get their tookis into gear and register already!!! (and if you're feeling especially well, go buy some of Rory's crap punk (I will too soon Rory, it's just too bad you don't have Size Lard Bucket))

 #       Comments [8]
# Thursday, July 07, 2005

For some reason, the maintenance downtime message for bloglines absolutely made me laugh. Perhaps I'm just in a stupid mood:

Posted in Personal
 #       Comments [2]
# Wednesday, July 06, 2005

[Update: I added the assets directory to the source zip and re-uploaded so y'all should have everything you need to actually compile and run the code.]

Well, the rudimentary scene graph is done and hooked into Tanks! Below is a quick and dirty screenshot (remember this is still programmer art).

I was asked the other day if I was going to release source code and I figure, what the hell. Just keep in mind that this is FAR from being a finished product (hell, it's even FAR from being any kind of product at all). So, if you are interested in seeing the source code (albeit totally undocumented source code), you can download it from here. SOOOO, don't even try to ask for documentation because there's no way you're getting it until the articles are written :).

 #       Comments [3]
# Tuesday, July 05, 2005
Mykre recently sent out a reminder that there is an IRC channel for Managed DirectX on EFNet. So, if you want to come around some time, feel free to (it seems like it is pretty quiet (hopefully we can change that)). I'm on there, Mykre is on there, Tom Miller hangs out there (although I hear he's pretty silent), and ZMan says that he'll start checking it out. So, grab an IRC client and head on over anytime (I personally use ChatZilla for FireFox).
 #       Comments [0]
# Monday, July 04, 2005

When an exception occurs while running the sample framework, even if it is handled in a global exception try-catch block, the sample framework will throw an unhandled exception on Dispose. To replicate this issue, simply open up the empty project template and change line 238 in EmptyProject.cs from:

effect.SetValue("appTime", (float)appTime);

to (in order to force an exception):

effect.SetValue("appTm", (float)appTime);

Although it perhaps is not the best fix, the quick and dirty fix for this is to change lines 3948-3957 in the Dispose method in Common\dxmut.cs from:

if (Window != null)
{
// If we have a window, use BeginInvoke to start shutdown
Window.BeginInvoke(new DisposeDelegate(this.Shutdown));
}
else
{
// Otherwise, call it directly
Shutdown();
}

to just:

Shutdown();

Happy Programming!

 #       Comments [2]

I'm posting this as a reminder (for me and for others who were curious about this issue). If you are getting an exception when trying to retrieve transforms from your device (like "Matrix view = Device.Transform.View"), it might very well be because you are using a pure device. Pure devices do not support the getting of these matrices (and this is documented in the docs too evidently).

Happy Programming!

 #       Comments [0]

There is a bug in the sample framework ResourceCache where if you create more than a single font using the method call ResourceCache.GetInstance().CreateFont(), even if they are different fonts, the call will fail the majority of the time. It appears this happens because the key for the Hashtable used in the ResourceCache is the FontDescription structure itself and the FontDescription does not override the GetHashCode() method from object (resulting in differing FontDescription instances actually returning the same hashcode).

So, because of how the method determines whether the font has already been added (it doesn't use .ContainsKey()), the call will fail when the attempt is made to actually add the second font to the hashtable because the key already exists.

If you wish to replicate this, simply use the empty project template and add another line of code after the setting of statsFont to re-initialize statsFont again to a different font.

There is a quick workaround for this. Since the sample framework is just source code, you can actually just calculate the hashcode for the structure yourself and use your calculated hashcode for the key (and don't go through GetHashCode). At least it's a workaround until it is fixed in the framework (which is probably a pretty darn low priority since it is just the sample framework).

 #       Comments [0]
# Sunday, July 03, 2005

Well, I was able to almost finish the core of the new game engine for BooM. Starting tomorrow, I start hard core work on the scene management system, and then on to the game. Here’s a screenshot of the latest version of the engine up and running. This screenshot captures the default look of the game engine. All the components you see are built into the engine. To create a BooM game, you just need to inherit from a couple of classes and do your thing. Theoretically, it should be possible to write any type of game on this engine, whether it be 3d, 2d, text-based, or what have you. However, I guess we’ll see soon how well it goes.

 #       Comments [2]
# Friday, July 01, 2005

Andy "Zman" Dunn has started a personal blog. He announced some big news recently about his career, and for us Managed DirectX people, it looks like things are going to be getting exciting around here. So, stay tuned (RSS feed here) and see the excitement grow :).

Good luck Andy!!! I hope the best for you (and I can't wait to meet you :D).

 #       Comments [0]

Contact

Email Me Send mail to the author(s)

Calendar

<July 2008>
SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

About this site

Jason Olson's thoughts on Programming, Games, Music and Life in General

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Jason Olson

Sign In
All Content © 2008, Jason Olson
Theme based on 'Business' created by Christoph De Baene (delarou)