Friday, March 20, 2009

To API or not to API... THAT is the question....

I was reading an old post on a form from Tim Sweeney about how all graphics cards will go the way of the dodo, and how no one will be able to write an engine and they'll all have to buy his. He was claiming (back in 2007) that the GPU will become extict abd we'll just be left with massively parallel CPU's that do everything, and that API's like DirectX or OpenGL won't be needed because everyone will simply code their own engine.....

wow.... while a pile of crap. While things are heading towards being able to do more and more with a GPU - or many CPU's like intel's larrabee, the API won't ever become extinct and theres a damn fine reason for that. Developers simply dont have the time to make the huge number of features that directX (or openGL) already has. Who really wants to write full perspective correct, tri-linear, multi-texture stage texture mappers? Not to mention that it'll probably only work on a single platform and you'll have to do it all again. Nope, its total rubbish. Whith will probably happen, is that DX/OGL will continue to deal with new graphics cards and tech and allow game developers to carry on writing games without having to worry about all the low level crap, while a (very) few middleware folk decide to implement their own custom code. It may well even be that normal developers use DX23 for most of the normal stuff, but then implement a really cool voxel rendering system to do some special features.

This makes sense, of course it does. DirectX/OpenGL aren't just about drawing triangle, they're about taking some of the development cost away from developers and allowing their code to run on almost any hardware without any real code change. For those that remember the good-old-days where you had to write versions for every card out there, you'll shudder at the thought that it'll return. I did my fair share of software/DirectX/Glide/PowerVR/S3 ports and it was horrible. True I prefered Glide as it was about 3 times the speed of DirectX, but graphics cards are fast today, and it doesn't take a coding god to make a pretty looking game. In fact most games these days are written by what I'd call normal programmers. Folk that don't really know what the hardwares doing, but its going fast enough so why should I care - that time. And thats fine, it means the games industry grows, you can let normal coders in, its easier to find people and the world is a happier place.

I also find it ammusing that Tim seems to thing API's like DX will go away. The only platform in the world without an API are old systems like the SNES/Megadrive etc. (and older). Everything else you have an underlying OS with...wait for it... an API!!

Theres always gonna be an API, and interfaces like DX and open GL will simply evolve to meet the demands of the programmer - whatever that is. It'll implement common features so we don't have to, and only if your really interested (and think you can do better) will you have to write you own VERY low level bit of code.

I can't wait for larrabee, not from a graphics point of view, but for the ability to run normal code on it. I really don't want to have to write another 100 triangle rasterisers for a single game because I can make each a cycle per pixel faster.... machines are fast enough to not worry too much about that, and if the Wii has proved anything, its pretty graphics isn't what makes a great game - Mr Sweeney should really buy one have have a look.

5 comments:

gb said...

Wow, that was some very interesting reading. Really tasty. But i can't get how Wii involved in all that API-talk. Is Wii have something special, what differs from common understanding of game\graphics creation on consoles like xbox of ps3? Sorry for lame question, but i'm just curious :P

Mike said...

Well, folk like Tom Sweeny try to convince people that graphics make a great game, and that to do that you need to buy his amazing engine. In particular he says that if Larabee pulls it off, then its going to be very hard to write an amazing graphics engine, so you'll have no choice but to buy it from him.

However, as the Wii has shown, you don't need amazing graphice to make an amazing game. This kind of shoots his agrument in the foot with respect to having to buy an engine from him.

The Wii in general has proved that great games succeed no matter what they look like, so even if you're not very good and need to write your own render on every system you go to, as long as the games fun (and it plays well), it probably won't matter.

Graphics improve games, not define them. Thats all I meant. Tim on the other had seems to think that without shiny pixels, you cant have a good game - FAIL :)

Vladimir Janković said...

Someone will probably port stuff like PovRay or some other renderer on it... :)

It's true thou... Games are so much more than graphics...

gb said...

Just googled up "Tom Sweeney" name. Is that's all about Unreal Engine 4?

gb said...

Well, my mistake i didn't noticed "back in 2007". It's defenetly not about Unreal Engine 4.