Wednesday, August 5, 2009

Jack of all features

And now for something completely different...
I've put the shader compiler on the side and started implementing another complicated feature: network distributed rendering !

Compared to writing a compiler, it's substantially easier.. but not easy 8)
I've done quite a bit of network programmign before, but it's never easy. With BSD sockets and TCP/IP one has to assume that there is going to be a certain amount of latency, and tends to write non-blocking multi-threaded code.. which sensibly complicates things.

I spent the last weekend writing some basic sockets code.. and then mostly rewriting it.
The first time around I tried to get everything done from Friday night into Saturday morning, and it was pretty dreadful.. conceptually very broken.

I don't get a good feeling when writing network code. I lack the confidence, and I'm pretty sure I'm missing that fundamental understanding of how things are meant to be.. a feeling that I get elsewhere writing other types of code.
Some day I'll get it for network code as well.. if anything, I'd like to reach a point where I can nicely abstract things at different levels, without ending up with ugly large loops.
Because my goal is LAN network, I could probably do away with a lot of the multi-threading stuff and perhaps just pretend that the latency in the communication is really minimal.

So, why all of a sudden into this, where so many more basic features are missing ?
My main focus is to experiment with different things rather than do one or two "right". Experimenting is very important in getting a good estimate of things. It's good to get a broad view of what is possible, without spending years refining the art of writing compilers or implementing some advanced texture sampling.. or any form of global illumination !

..many try to predict the future of real-time graphics.. but the problem is that those that have a voice are usually too busy with meetings and have long left the actual code development activities.

There is this eternal concept of theory vs practice (very much the story of my troubled school education), where the hacker types are not well received. Writing code is seen on par of getting hands dirty with engine grease.. ..in fact, the rich and successful people are usualy those with lots of charisma and nothing else.. the visionaries, the exploiters.. that's important too, but it's against my principles: "talk is cheap, show me the code".

Additionally.. I've been setting up a page dedicated to the project. As usual, using Google Sites, which is fairly nice, if only the editing wasn't such a painful experience 8)
I usually end up retouching the HTML.. which is chock full of ugliness.. like a dozen nested div tags with no purpose !!

Anyhow...