SlimDX Status Report

Alright, we’ve talked DirectX and XNA already so let’s move on to the subject of SlimDX.

First off, there’s a release coming any day now. A number of things were screwed up with the September 2011 release, mostly my fault, and I’ve been busy patching them up. So there’s a new December 2011 release around the corner, and 4.0 runtimes will be available right at the start. I do want to point out, though, that the runtimes are strictly for end-users (non-developers) who are consuming SlimDX apps. You don’t need them to develop, and for that matter you probably don’t need them at all if you’re at a game development company. They install the DX runtimes, VC runtimes, and SlimDX itself. Given that both runtimes are now well over a year old, odds are you already have this stuff. While that doesn’t excuse my personal failures in getting this stuff out in a timely fashion, there is almost certainly no need to worry over it for 90% of you.

We’ve been promising a SlimDX 2.0 release for some time now, with substantially revised architecture. The redesign is based around many of the same concepts driving another wrapper library called SharpDX by Alexandre Mutel. Alex was working with us for a while but we split up over some mutual differences and went our separate ways. I’ve decided to withhold any comments on his work one way or the other. As far as our work… we need help. The three of us (Josh Petrie, Mike Popoloski, and myself) have been working on the library for something like five years, and things are pretty stable at this point. Sure there are bug fixes that we’re shipping out, but especially now that the DirectX SDK updates have stopped, the current codebase is largely good to go. The new codebase for 2.0 is really a prototype, and the simple fact is that it needs a lot of work and none of us has the time anymore.

I repeat: We need new people to help develop SlimDX. If that doesn’t happen then we’re likely stuck in place, which might not be that big of a problem except for one thing: Windows 8. SlimDX 2.0 is based on a code generation system that should allow us to target C++/CLI as well as the new C++/CX language. With CX support we get not only .NET but also JavaScript and native code support to interop with Metro apps. Not only that, but it also means ARM support and SlimDX on tablets in the coming years. I think that’s a big deal, if we can pull it off.

When I first wrote SlimDX in 2006, I believed that automated codegen like SWIG was not well suited to creating a simple, usable wrapper. SlimDX was hand written from the ground up to make using DirectX as painless as possible, and also to reshape the DirectX API into something that made sense as a .NET API. That was directly in the footsteps of Managed DirectX which Tom Miller had created, though we took the model a lot farther in that direct path. Alex came to us with an approach for code-gen which we felt really has potential, but there’s still a lot of rough edges and a lot of work in getting it to the standard which we really want it to be at.

So, who can help? You’ll need to have a working familiarity with C++ and C#, and DirectX of course. It is not, contrary to popular belief, necessary to really deeply understand any of these things. Working on SlimDX is an adventure in quirks and details of interop that I can almost guarantee you have not seen. Don’t worry about experience if you’re looking to help out. There will be a lot to learn of course, and you’re going to need a lot of free time to commit to this, but we’ve spent a long time building SlimDX and have a pretty solid handle on what’s going on. The only other requirement is the understanding that what you get out of this is experience, an excellent resume item, and skills that are fairly rare. Money is very unlikely to appear directly unless donations take a serious uptick.

If you’re interested in helping out, please post here, or ping us via Twitter or IRC or e-mail or GameDev or whatever. I really do need one or two people to join as regular developers, otherwise DirectX and Windows may well move forward without a SlimDX to help glue the bits together.

Advocacy Won’t Save the Internet

There’s been a lot of rage across the internet and related companies about a US bill called the Stop Online Piracy Act, abbreviated as SOPA. You can look to Wikipedia for what the whole thing is about and why people are upset. In short, it greatly contracts internet freedom and may inflict damage on the core structure. That is not the part I am writing about. If anything, it’s amazing that things took so long to get to this point. We’re seeing the beginning of a war that was always inevitable, and I fear that if we continue to try to solve it at a policy level, freedom will lose as it always does.

Money and power are and always have been centered around a singular point: control. In order to protect an oppressive government, or an oppressive business model, you must control the basic pathways and communication channels. The methods have changed over the course of centuries but the ideas have not. The Internet and the Web represent largely uncontrolled systems of communication. As a result, it’s been a continued thorn in the side of governments and corporations for many years. From Napster to PirateBay and WikiLeaks, and far more reprehensible things (eg child porn), there’s been a constant struggle between freedom and control. That struggle has been largely random and without direction, because nobody really knew how to police the internet. The system was designed to be resilient, and there are many, many ways in which blocks by oppressive regimes have proven ineffective.

Now we’re seeing the next phase, which is to target the gate-keepers. The internet is resilient, but it is not resilient enough. Search engines and link accumulators were targeted first. Coupled with DMCA provisions, sites are vanished from Google and Bing and once that happens the site may as well not exist. Discovery becomes nearly impossible. This has been done to protect “copyright holders” and “intellectual property”, but that is merely a proxy for ANY information that any party or any government (primarily the US) does not want in the wild. You only need to observe Universal’s assault on the MegaUpload video to understand that. Making somebody invisible, even temporarily, is an enormously powerful ability.

The next target, possibly the crucial one, is the Domain Name System (DNS). DNS is responsible for translating a domain name like “” into an IP like “”. The US Department of Homeland Security has gleefully pursued sites by revoking their domain names without anything resembling due process and without available recourse. And without actual authority, for that matter. The results were predictable: a technical workaround which got the government mad, and a bogus seizure that made the whole program look corrupt, which it is.

The last gatekeeper is the ISP, the guys who hold the actual physical connection between us and the internet. They are under assault too. It’s the same story over and over again, but in the end the ISPs will cave because it will be difficult or illegal for them to hold out.

SOPA might be the greatest ever attack on Internet freedom, but it’s also a dead-on logical expansion of a war that has unfolded continuously over the past decade or more. It’s possible that this particular measure will be defeated. The trouble is that it doesn’t matter. There is far, far too much at stake for the corporations and governments to let this go so easily. They will learn from their mistakes here, tweak and tune the language and the pitch, and come back with armies of lobbyists time and again until the chaotic political winds line up in their favor. That WILL happen, and things will start to crumble for those who value freedom.

Ultimately Hollywood wants the same thing that the government wants: the ability to control and restrict what happens on the Internet and how. They are on the same side, and all the calls in the world to your Representative will only delay what’s coming. It’s useful to buy time, but at the end of it all there is only one choice that will work: the Internet and the World Wide Web must be made entirely immune to censorship at a fundamental technical level. It must be redesigned so that no amount of legal threat is capable of affecting it at all.

From a technical point of view, that means a few things. First, the DNS system must be secured against the whims of any government. There are two options for doing that. One is to secure the DNS system so that every country controls its own TLDs and cannot affect any others. I believe this is doable with a widespread rollout of DNSSEC. The US could still revoke domains, but only those hosted as COM/ORG/NET/US/etc which are ostensibly subject to their legal control anyway. Just pick a country where whatever you’re doing is legal and sign up with them. The other option is rather extreme, and involves replacing the DNS system entirely with a new naming system that is not under anybody’s control at all. There is work along these lines, but it’s difficult to see potential for mainstream adoption. (On the other hand, it could thrive in environments like P2P networks if the tech details are hacked out.)

Then there are the ISPs. There’s no point locking the overall system down if your personal uplink still says “hey, no PirateBay for you no matter how you’re trying to get there.” That requires end-to-end encryption of your sensitive traffic. We have a system for that called Tor, but it’s possibly extreme. The ability to perform encrypted DNS queries locally (this is different from DNSSEC), plus secure HTTPS connections, achieves nearly everything we need. The latter has already become commonplace on major sites, which only leaves us to solve encrypted DNS queries. Luckily we’ve got that too.

That leaves us with the visibility problem in search engines, social networks, and similar services controlled by a single entity. I’m less concerned about this, because the steps I’ve discussed so far open the door for somebody in a more open country to build systems that are not subject to government or corporate whims. There is work on a decentralized search engine that isn’t subject to any control at all, but it’s unclear whether such a system is actually workable. Similar efforts are underway to replace centralized services such as Facebook, Twitter, and even semi-centralized mechanisms like OpenID. There is a core belief here that any system that is centralized is necessarily a threat, and cannot be trusted. I don’t know if that’s the case, but the more research we have in building completely distributed tools the better.

To try and win true freedom for the Internet on political and policy grounds is an eternal battle which we will likely lose. There is too much at stake for the power players to give up what we are asking of them. If we’re lucky, Google and all the other internet companies will remember to sink millions of dollars into R&D into making the Internet unbreakable, instead of simply lobbying the government not to do it. Once we make it indestructible on a technical level, governments and corporations will be forced to adapt to the new order, instead of trying to stop it. That’s our only chance to preserve what we’ve built and earned in the last forty-odd years: a completely free communication system that is equal to everyone.

Moving Away From Godaddy

Just a quick update here: My domains, primarily and but a few others as well, are currently hosted by GoGaddy. Now GoDaddy is a company with a long, messy history of being a third tier sleaze-bag registrar, but I stuck with them because of pricing. However their recent support of SOPA, and their pathetic recant, pushed me over the edge.

Effective immediately, I am shifting all domains away from GoDaddy. Because I’m rather new to this process, I don’t know what will happen to DNS and email during the transition. SlimDX or addresses may become inaccessible for a short period while I sort things out. Please bear with me.

If you are interested in moving your own domains, I found out that NameCheap is running a promotion with code “SOPAsucks”. Their pricing is not quite as aggressive as GoDaddy but it appears that they do offer very competitive pricing ($2 specials) nonetheless. Transfers with the code cost $6.99 per domain, which includes a year renewal of the domain. I am sure there are other anti-SOPA registrars but this one is mine.

DirectX and XNA Follow-up

I wanted to clarify and respond to a few things regarding my previous post about DirectX and XNA. First a quick note: the very long standing DIRECTXDEV mailing list is being shut down. Microsoft is encouraging a move to their forums, but in case you’re fond of the mailing list format there’s a Google Group that everyone is shifting over to. If you’re reading this blog post, you’re probably interested in the subject matter and so I highly encourage everyone to join. MS Connect’s entry for DirectX is being discontinued as well, so I’m not sure how you report bugs now.

Something on the personal front: I got a few comments, directly and indirectly, about being an MS or DirectX “hater”. Good lord no! I adore DirectX, XNA, Windows, and Microsoft. I criticize because I want to see these technologies thrive and succeed. I’ve been doing a lot of iOS/Mac/OpenGL work lately and from a technical standpoint it’s absolutely miserable. I miss the wonderful Microsoft world of development. But a lot of what I’m hearing in public and private worries me. My alarmist approach is designed to bring attention to these things, because oftentimes the development teams live in a bubble separated from their users. (Hell, I can barely get in touch with people using SlimDX.) The XNA team, for example, are terrible at communication. It’s exasperating, because the direction, plans, and schedules are completely opaque — even to those of us who have signed an MS NDA and are ostensibly supposed to see this information early. (We don’t see jack shit, by the way. Exasperating.)

Second, no I do not think DirectX is dead. No I do not think everybody should switch to OpenGL. From a platform and technical standpoint, we’re probably as much or even more of a commitment than in the past. What’s bothering me is the pathetic way that community, documentation, etc is being handled. Look: Where is the DirectX SDK? I don’t know when that was published, but it appears that nobody noticed it until very recently. How would we? I don’t wander MSDN online at random. And it’s been placed right next to this comically worthless page. This is the kind of developer support I’m complaining about. Nobody outside MS understands what is going on in Bellevue, and I’m getting this worrisome feeling that nobody inside understands either. The DirectX SDK wasn’t just a diverged way to deliver support for a core platform technology, which is what seems to be driving the current decision making process. It represented half a gigabyte of commitment to the developers who arguably make the entire Windows ecosystem compelling to a consumer. “Developers developers developers!” “Yeah, what’s up?” “Uhhh, hi?” That’s what it feels like. MS wants developers around, but they forgot to put any thought into why. (Here’s a hint guys, ask DevDiv. They seem to still have a clue, C++ team aside.)

And in the other corner, we’ve got XNA. Whoo boy. There’s no point to sugarcoating this, although I’ll probably ruffle some feathers: XNA 4.0 is garbage. It exists to support two things: XBLIG and WP7. XBLIG is a joke, so really the only productive arena remaining is WP7. It’s sad because XNA 3.x was actually an excellent way to do managed development on PC. 4.0 introduces a profiles mechanism that is focused specifically around the Xbox and WP7, and produces a stunningly foolish situation on PC where DX10+ hardware is required but none of the new features are supported. Worse still, that was a few years ago. Now we’ve got DirectX 11 with Metro coming down the pipeline and XNA staring blankly back like the whole thing is a complete surprise. It tends to raise some questions like, is XNA 5 coming? Will there be DX11 or Metro or Windows 8 support? Is anybody even listening? And the answer we got was, and I quote: “We’re definitely sensitive to this uncertainty, but unfortunately have nothing we can announce at this time.”

My judgement on that message is that XNA does not exist on PC. I’ll say the same thing I said in 2006 when XNA was first revealed. Treat it as an API that happens to run on Windows as a development convenience, not as something it’s actually meant to do. The computing world has moved on, and if Microsoft can’t be bothered to bring XNA along then that’s just something we have to work with. If and when XNA 5 is announced, then we can go back and take a look at the new landscape.