Tuesday, December 30, 2003

IndexBuffer Direct3D Tutorial Available

Looking back, I can see it's been over two months since my last Direct3D tutorial publication. D'oh! Well, it was a busy two months, but don't worry - I haven't given up. My latest installment is finally ready. It covers IndexBuffers, an important part of the basics of Direct3D.


Hopefully I'll be a bit quicker about getting the next one out. As usual, feel free to email me with comments, corrections, complaints, and suggestions about the series.

Monday, December 29, 2003

Privacy Laws Drastically Changed

BitWorking has this piece. Regardless of which side of the issue you're on, US citizens should be aware of this, if for no other reason than to be able to debate it with those that don't share your views.




How Do You Build a Police State?


The same way you eat an elephant. Is it even worth asking where the "professional" media is on this story?



On December 13, when U.S. forces captured Saddam Hussein, President George W. Bush not only celebrated with his national security team, but also pulled out his pen and signed into law a bill that grants the FBI sweeping new powers. A White House spokesperson explained the curious timing of the signing - on a Saturday - as "the President signs bills seven days a week." But the last time Bush signed a bill into law on a Saturday happened more than a year ago - on a spending bill that the President needed to sign, to prevent shuttng down the federal government the following Monday. [San Antonio Current]

WikidPad

My recent entry about my desire for a Wiki that thinks in XML instead of text/html led me to an interesting application. David Pickett pointed me at WikidPad. I've been trying it out, and I have to say I really like it. It's a desktop application that lets you build a series of linked documents in much the same way that a Wiki does on the web. To me, it's sort of like OneNote, except instead of pages and tabs and sections, you get hyperlinks, which is fundamentally more powerful.


I'm definitely going to be shelling out for this one. I mean, it's only $12, and the last release was just last month, so I know it's still in active development). Of course there are things about it that I don't like. For example, while the keyboard shortcuts are plentiful, there are a few more I'd like to have. But I imagine the devs will be hearing from me about all the little nits I don't like. :) And the app is easily powerful enough to tackle the particular task I have in mind for it, which is to organize the hundred or so pages of notes I have for a role playing game I'm running. (Vampire, if you must know.)


At any rate, while it's nice that I have a tool that's good enough (and good), I still haven't found what I was originally looking for, which is the fusion of typed information (i.e. XML), the Wiki build-by-accretion model, and a desktop (not web) application. WikiPad has two of those three, but it's still a collection of untyped (i.e. text) information. Fortunately, the storage format - while not XML - is simple and textual, so if I need to parse it into something else, I can.


By the way, if anyone out there is interested in building something like an XMLWiki, give me a shout. While I don't have time to write the darn thing myself, I do have time to share my vision and to provide guidance to anyone that would like to tackle it as a side project. I think it's a fascinating subject, if for no other reason than that it involves figuring out the right balance between too little and too much structure.

Wednesday, December 24, 2003

XML + Wiki = ??


Dear PWSTM (People Way Smarter Than Me), 


As I've gotten used to using my blog over the last year, I've been thinking more about managing my personal information. Lately, I've been pondering Wikis, a topic about which I know little more than the basics. 


On the one hand, I like the idea of a Wiki for storing notes and ideas. In theory, it makes it easy to maintain relationships amongst various nuggets of information. 


But in practice (the other hand), all the Wiki software I've seen has two drawbacks: 



  1. It's presented as a set of web pages, which means (for me) using it sucks compared to something with a rich user interface, accelerator keys, etc.
  2. The native storage mechanism is HTML. Meaning that there's no way to have typed information, in the sense that it would be difficult for a machine to determine that one page describes a C# class, and another page describes a Weblog entry.

It seems to me that there's a sweet spot somewhere at the intersection of Wikis and XML. What I envision is an app that lets me specify a mapping between some piece of UI editing code (a form, generally), and an XML type. What I'd want is an app that lets me create new instances of those XML types, editing each one with the appropriate UI and then somehow linking them together, in the same way that a Wiki lets you link together HTML documents. If I could somehow get the version control that many Wikis offer, that would be really nice, too.


The advantage of this XML/Wiki hybrid is that it would lend itself very nicely to use for many purposes. Because of the reliance on XML rather than HTML as the fundamental thing that you're storing and editing, it would be fairly easy to have both a web and a rich interface for editing. Or a rich interface for editing, and a transform to produce static HTML read-only copies. And - done right - the mapping between XML types and UI that knows how to edit that type could make the whole thing pretty darn extensible.


As I've been running this idea through my head, I'm wondering if there's already something that does exactly what I want. A few things on my list of stuff that I don’t know enough about, but that might help or solve the problem, and that I really ought to look into:


1)      There's already some Wiki software out there that does exactly this.


2)      InfoPath already does exactly this.


3)      Some other app already does exactly this.


4)      Somehow some app that uses RDF solves this problem.


5)      One of the above comes close, and could be made to do what I want with some tweaks to existing software.


6)      I write my own when days finally have 26 hours. 


I'm planning to look into InfoPath at some point in the near future (as soon as I install it again). But I'm hoping that one of you will be able to shed some light on this for me.

Sunday, December 21, 2003

SequoiaView


Years ago, I saw a neat application that would show you your disk drive usage as a series of nested rectangles. This makes it very easy to identify which folder, which subfolders, and even which particular files are eating your harddrive. I completely forgot the name of the original application, but today I ran across one that does the same thing: SequoiaView. It’s free, and it makes cool pictures like this:


 


I like it.

Saturday, December 20, 2003

Holiday Surprise

So we went to my biggest client's holiday party last night. First of all, I thought it was pretty cool that they even invite consultants. Second, the food was excellent (steak and lobster, if you must know ;)). But I was a bit surprised to find that the entertainment was the band Chicago - a far cry from the usual company band playing covers of old 50s dance tunes!

Thursday, December 18, 2003

Shadow Copies

Daniel Sinclair, fellow DM instructor, turned me on to this very cool feature yesterday. Under Windows 2003 (and possibly other OSes – I haven’t checked), if you go to the properties for one of your local drives, you will see a tab labeled “Shadow Copies”.  

If you enable the feature, clicking on the Settings button will bring you to a dialog where you can set up a schedule. The basic idea here is that every day/week/month/whatever period you select, the operating system will take a snapshot of your hard drive. Only it’s a smart snapshot – it only records the deltas, making for a much smaller image than if I had simply copied the drive somewhere, and it lets you specify how much space the backups should be allowed to take up.

The way you access the drive is via the network redirector. So you simply open up (say) \\localhost\c$, right-click on any file, and pull up the properties. There’s a “Previous Versions” tab where you can view the state of the file or folder you’re interested in at that point in time.

Obviously, this doesn’t take the place of regular backups, but it sure is a nice safety net, especially when I’m on the road and don’t have access to backup.

One caveat: Dan warned me that there might be a performance penalty associated with enabling this feature. I’m not sure if I’ve noticed anything yet – my hard drive is a bit busy this morning, but I haven’t tracked down what the source of this is yet. It could be something else. At any rate, subjective performance certainly hasn’t suffered that much, if at all.

Thanks Dan!

Monday, December 15, 2003

So You Want to Work at the NSA?

Bruce Schneier's latest Crypto-Gram Newsletter (highly recommended), has a link to an amusing and interesting account of one interviewee's experience applying for a job at the National Security Agency (NSA).

Sunday, December 14, 2003

Swiss DevDays Slides and Demos Uploaded

I’ve posted the slides and demos for my presentations at DevDays last week. You can find them here.  Here are the descriptions:

Multithreaded Programming in the CLR: The CLR provides full multithreading capabilities to programmers of all languages. This includes the ability to start threads, to stop them, and to safely communicate with them. In this session, we discussed both how to begin asynchronous processing, and how to safely share data between threads.

Introduction to Managed DirectX:  The DirectX library has for years provided C++ developers with the ability to closely interact with sound, video, input, and networking devices. The advent of Managed DirectX brings these same technologies to the C#/VB.NET/other managed language developer. In this session, we looked specifically at the basics of Managed Direct3D, Managed DirectSound, Managed DirectInput, and Managed DirectPlay, with an emphasis on how these technologies could be used in non-game applications.

If you’ve been reading my Direct3D Tutorial, you’ll probably find the latter set of demos particularly interesting, especially the Collider series of demos. It develops a simple but fairly realistic non-game application that models particle interaction. Through a series of demos, it evolves to use 3D graphics for display, 3D sound to report collisions, joystick input for navigation, and finally DirectPlay for distributed rendering.

 

Saturday, December 13, 2003

Excellent Game Programming Book



I’ve lately been reading 3D
Game Engine Design : A Practical Approach to Real-Time Computer Graphics
. It is
excellent. It’s exactly the book I’ve been looking for on my quest to
understand Direct3D better – it starts with talking about how a generic render
pipeline works and from there moves into things like collision detection, terrain
generation, and all sorts of good stuff.



But before you run out and buy it, a few caveats:



·        The
book is extremely thorough. In graphics, this means there are scads of equations.
While I think it’s important to understand vector and matrix operations if you
want to do 3D game work, I’ve been able to read the book without actually going
through most of the proofs and derivations. “OK, there’s a formula for
intersecting a triangle and a sphere. I’ll come back to the details if I ever
need them. Knowing where the formula is suffices for now.”



·        It
is not DirectX-specific. It’s fairly technology-agnostic, in fact. So if you’re
looking for something to teach you the API, don’t look here.



If you want some good theory and a big pile of pseudocode, I recommend it.


Friday, December 12, 2003

Site Upgrade Completed



Well, it was sort of painful, but I got the site up and running on dasBlog. Which,
I have to say, is a fairly big improvement on BlogX. If I can convince the powers-that-be
to somehow install CDO on the web server I run the site on, it’ll be even better,
since dasBlog has some nice email-related features.



Sorry if your aggregator blew a bunch of recent entries in your face as being new
– not much I could do about that. At any rate, it shouldn’t happen again
any time soon.



If you have any problems with the site or the feed, let me know by leaving a comment
here or by sending me an email, and I’ll get it fixed.  


Site Maintainence Today




I’m going to be cutting over to dasBlog today, so you may see intermittent availability
of this site. Further, your aggregator may show you a whole bunch of old posts
as being new ones. Apologies on both counts!



At any rate, no change of URL for either HTML or RSS content is expected – I’m
doing a bunch of work to ensure that nothing moves around on you from a URI standpoint.



Thursday, December 11, 2003

Unexpected Repercussions




Here’s a little something I wrote last week that somehow never made it onto
this blog:



I’m here at DevDays in
Zurich, Switzerland. My talks start in about two hours, and I find myself with a few
spare minutes.



I just got done listening to an interesting presentation by Rafal
Lukawiecki
on IPv6. It was interesting not only because Rafal is a good speaker
and the topic a relevant one, but because of a comment he made that resonated with
me, particularly so since I was (probably) the only American in a European crowd of
300 or so.



Rafal observed that the current version of IP (IPv4) has an incredibly uneven distribution
of addresses. In particular, he noted that some US universities have more addresses
assigned to them than the entire continent of Asia. While I found that surprising
enough, what really caught me was the implicit sense that having a global Internet
infrastructure that depends disproportionately on the US is a bad thing. This makes
logical sense for purely technical reasons, of course, but Rafal’s comments
made it clear that from a social standpoint, the appeal of IPv6 would not be
hurt by the current political climate.



I find the idea that the adoption of IPv6 might be due in part to the current US administration’s
global policies [1] amusing, troubling, and an excellent example of the Law
of Unintended Consequences.



[1] Policies with which I largely disagree, but I’ll leave it at that in this
forum.



Tuesday, December 9, 2003

A Bit of an Earthquake




You may have seen on the news that there was a small earthquake near Richmond, Virginia.
I live near Washington, D.C., about 100 miles from the epicenter. Here’s how
it went for me:



Wife: Did you hear something?

Me: No.

Wife: I’m from the Pacific Rim. That felt like an earthquake.

Me: I didn’t feel anything.



She was right, of course. She usually is.



Sunday, December 7, 2003

New Articles Added

Frederic just shipped me the latest Direct3D translation, so you can click here to read “Rendering Basics” in Danish.

I’ve also started a new article, Craig’s Random Link List. For now, it’s just a few things I’ve thrown together, but I’m hoping to build on it over time to keep track of things I’ve found useful and/or interesting.

You might also have noticed that I’ve moved pretty much all the writing over from my old site. With luck, I can shake some time free this week to get redirects in place so I can have a single source of truth, which will allow me to maintain everything in one place without breaking any existing links.

Back from Switzerland




Well, we made it back from Switzerland. West is the easy direction in terms of jet
lag, but I’m starting to droop pretty badly at the moment. Hopefully that means
I’ll get a solid night’s sleep tonight – I woke up at midnight Zurich-local
time last night, and couldn’t get back to sleep before the alarm went off at
3:15AM so we could catch our flight.



At any rate, the conference was great. Most of the sessions were in German, but there
were a few in English. Based on the ones I did catch, I think the attendees got a
really great deal. And I had a great time delivering my talks on threading and on
Managed DirectX. The Managed DirectX one in particular went quite well – I managed
to cover the absolute basics of Direct3D, DirectSound, DirectInput, and DirectPlay
(including nine demos that all worked!) in 80 minutes. The slides and demos should
be up on the conference website either now or in the near future, but since I can’t
read German, it’s pretty hard for me to figure out which link it is, so I’ll
be posting the content here as well. Just give me a few days to dig through my email
and recover mentally.



The conference was also enjoyable in that I got to see some old friends as well as
make some new ones. I’ll refrain from doing the Great Blog Name Drop and listing
them, but I have to thank Sascha Corti in
particular for acting the perfect host. My wife and I both felt extremely welcome
and well taken care of.



Now that I’m back and no longer have conference talk prep work to do, I can
devote some time to a few projects that I’ve had on hold. In particular, I want
to get my blog ported to dasBlog 1.5 (just
released
), to write the next article or articles in my Direct3D series (I’ve
done a bunch of reading and understand some things better now) and to finally get
a start on one or two games that I’ve been wanting to write. We’ll see
how it all goes what with the holidays and all the other, normal things that need
doing.