Coding again for a while now, but yesterday (that means half a year ago, since this post had been sitting in my drafts section that long) I managed to tick another ancient to-do on my list. Time for me to give back a few things that I learned the hard way.

    The brief of it: I wrote a little effect intro containing a number of objects rendering with 2 passes, one shadow map and percentage closer filtering (single light source) and one that has a spotlight lit normal map using hardware. It’s using render to texture and alpha testing. Nothing truly incredible and earth shocking, but I’m quite proud of it because I feel I finally crossed a line. Actually 2 lines: the technical challenge, and the fact that I finally bulldozed through my own ignorance.

    The vertex buffer trickery earlier in this blog is still totally there, so I guess that works well.

    Here’s my list:

    • The creation of vertex buffers creates and destroys a separate worker thread in DirectX9. It is best to minimize the creation of buffers per frame by caching / reusing them. The performance gain in debug mode is dramatic.
    • FVF can not be mapped to something meaningful if we use tangent, normal, bi-normal formats. Use D3DVERTEXELEMENT9 instead for declarations.
    • A small issue I learned is that if you apply the template construction for for tangent space coordinates (normal map), the order in the vertex definition matters and you must make sure the tangent template is mentioned after all the fixed pipeline definitions (position, normal, color,  texcoord).
    • I used a D3DFMT_R32F type surface for the depth buffer / shadow map. It took me a while to realize I could only read the red component. It also supports alpha. D3DFMT_A32B32G32R32F works equally well, but I could not manage to store/read from the channels g and b (like e.g. w)
    • Unless I oversaw the obvious, it seems you can’t use the POSITION input in a pixel shader since the GPU will have consumed them. If you need them, you have to pass them 2ce, once as input and once as a TEXCOORD (which will interpolate them). That’s quite ridiculous.
    • HLSL matrices are column major by default. It usually means a transpose of your matrices.
    • There are 2 ways to upload the TBN values. A smooth surface (curves, spheres) needs a new tangent each fragment, whereas a non-smooth surface (polygonal) needs a tangent per tri. In the latter case, because since we interpolate between vertices, we still have to duplicate them in each vertex + you can’t share the vertices because they may belong to neighboring non-smooth tri’s with different normals. In the first case, computation happens in the vertex shader (re-normalize at fragment!), whereas the latter case can use pre-computed normals.
    • Normal maps behave badly in typical cases like e.g. spheres that converge in zenith points. Use appropriate topologies to get around this (e.g. geosphere)
    • Arrays are only supported locally in shaders? Passing them values from outside did not seem to work. I came across this issue when setting multiple light sources for a fragment shader.
    • It seems bind / render / unbind is mandatory, even if you render multiple objects with the shame shaders. I guess one possible way to optimize draw-call performance is to bundle objects together using vertex list tunnels.
    • I wasted a bit of time trying to combine the depth output of my shaders with forward rendered lines with z-test clipping. I solved it by using a vertex shader for the lines as well. For now I was a bit too focused on getting the shadows to work to really dig into this, but I’m pretty sure this isn’t necessary.
    • The tex2DProj function only works from profiles ps_4_0 onwards :/. Implementing PCS on ps_3_0 hw results in cutting back the filter to 9 samples instead of 16 with noticeable loss of quality.
    • Filtering a 4×4 kernel in 2 for loops did not work for me on ps_3_0. Not quite sure why it does not work, maybe compiler is out of registers? Unrolling the loops worked fine.

    If you have any remarks, ideas questions or answers, I’d be glad to hear about them!

    That said, this achievement has only kicked my enthusiasm up a few more notches and kept my coding skills brimming with new ideas. Here’s what happened in the second half of the year: After this little PC shadow mapping try-out I added another couple of other tricks to my proverbial bag:

    • I redid the whole DirectX but now with OpenGL shader model!
    • I built my own little demo rendering environment.
    • I gave a crash course on C++ AMP, yay!
    • I have Oculus Rift working on OpenGL, also yay. Might post some code although it’s pretty easy to port from the tutorial /SDK code.
    • I literally went all-out and turned my knowledge of GPGPU computing upside-down writing all sorts of stuff in Cuda and OpenCL , including direct integration with DirectX and OpenGL respectively. Cuda is blazingly fast and rather well designed, while OpenCL is just as clean as you would expect from OpenGL’s cousin, and actually a little more friendly. I’m curious where that leaves us with AMD’s new Mantle spec. My experiences with C++AMP were also OK. I quite liked the fact that it’s totally integrated in your compilation, but debugging this shit remains a drag.
    • I now have this ‘R’ language on my radar for some reason.
    • Implemented a full testing bench for thousands of tests (including the publicly available bg, doa, sc1, wc3 etc.. maps) and ran it on various kinds of path finding algorithms. Lots of data to read and lots of tweaking ahead. I also did work on path-finding and path smoothing, and I’m totally digging this almost theoretical shit! I should be able to publish something out of this soon.
    • The whole testing bench is also working for 3D models (PLY), includes a voxelizer and path finder and ray-caster. All of this is working pretty fast, but there’s still room for improvement. The indexing scheme and octile storage structures are blazingly fast.
    • For DragonCommander, after refactoring the hell out of some parts, I finally got around to finish the path-re-use scheme and add orientation-based position selection, which works remarkably well.  I’m anxious to see how close I can get to good group behavior, but I’m rather short on time. Kept a full diary of my progress, so I should be able to write something on this too.
    • Devised a little tracking routine to track the motion of n unrelated and unsorted objects in k-space, by estimating frame coherence based on path direction, velocity and acceleration. This routine was used in an IPEM project and is probably published soon.

    I might start posting code fragments or at least some nifty demo material here, if there’s a need for it, but at the moment I’m knee deep in project work and paper publish deadlining, and I’ll stay in that zone for a little while longer.

    My wish list for next year: something with robotics? Drones perhaps?

    Anyway, I wish you all a warm and safe X-mas, or at least a happy new year! Cheers!

    South of here


    In July we got ourselves a well deserved holiday. Well, I was forced to take it at work, to be more precise, but you don’t hear me complaining. I actually enjoy it fully with my wife and kid, since we’re currently in the one single spot in Europe that has amazing sun, blue sky + water and supportable heat, combined with a great outdoors, good food and friendly people. I guess if you belong to my ‘friends’ category, the envy types are already going ballistic over this, since it’s all rain and downpour in the north. :)

    Some thoughts about the time passed. Last year, after headaches and financial worry, we wrestled ourselves through our house-reconstruction. That went extremely well, actually. I’m now praying that the financial woes that are raging in the south of Europe are not going to affect our situation, but deep down, I can’t believe that won’t be the case. I’ve read far too much of ZeroHedge to keep an ignorant stance on the matter. Time will tell how this will develop.

    In may of this year (2012) we got ourselves a lovely son, Arthur, who is 2 months old at the time of writing. He’s “growing like cabbage” – a valid Dutch expression which I’m hoping translates into correct English – and we are very lucky that he eats and sleeps like a pro. Even in this fairly hot summer at the Cote d’ Azur, he’s managing unbelievably well, laughs a lot, and apart from not exposing him too much to the burning sun around to 4pm, we don’t have to do anything special to keep him happy. A totally adorable darling he is. The women we encounter – without exception – all fell victim to his charms, overloading us with compliments. The kid’s more fad than a space rock star!

    Having such a happy little child really changed a few things in my life. It puts more focus on my relationship, makes me work harder to get things ready and happening, and there is of course the feeding routine, the nappies and diapers, the bathing ritual, singing songs and acting like and allround idiot. Some of these things are easier to do than others.. I used to be convinced that breaking into my sacred 8 hours of sleep would wreck me, and while some nights can definately be rough, this proves to be untrue for the most part. Isabelle takes a lot of the work out of my hands, so of course that skews the picture a bit, but the gist of it is still true. She often tells me of her admiration of single mothers who have to cope on their own, and I can totally relate to that. The total net effect of the 3 of us surviving through all of the days and nights – and this totally surprised me – is the realization that a human is much stronger than he thinks he is, and can bare much more than he thought possible. I generalized the statement because I can’t believe I’m that special at all.

    Let me explain: up until recently, I’d been having a pretty minimalistic view on my personal capacities. I’m quite a sensitive person, and when people repeatedly tell me how hellish it would be to care for a small baby, well, you start to accept a mantra if people repeat it to you enough. I sympathized and nodded, smiling politely as they told their stories, and reserved an ever diminishing amount of hope that just maybe things would be different for me if I ever became fortunate enough to have kids. This was tough. And I mean really tough. For more than 10 years on end, people have been giving me lectures on what it means to have kids. I hold no grudge against them of course, but it eats at your confidence, and when you are looking forward to the experience of fatherhood, it also eats part of your idealistic world view. After a certain amount of time, the sincere hopes and longings I started out with gradually were buried under layers of fearful goo, leaving me a mechanical hunch to pursue a faint shadow of what once were pristine motives, only adding to the doubts. Add to this a few biological fertility problems, and you may start to ‘get’ the overall picture of what we went through.

    And then Isabelle did get pregnant, and Arthur did get born, and all of sudden, you get to experience everything first-hand. This was nothing short of an emotional wall that collapsed. Suddenly the hopes and yearnings that were buried in our deepest caves and canyons resonated firmly through our fibers. All the reasons and ideas literary came back to life, and one by one I started to revisit all the things people told us about. And one by one, those absolute truths crumbled to pieces. Yes, it’s an added responsibility, and yes, you have to adjust your daily life and give up things, and yes, things smell bad sometimes, but it is by no means hard. Maybe it’s because I’ve heard everything that there is to hear about having babies for the last 15 years – I had plenty of time imagining what that would be like. Or maybe it’s because I’m older than most parents are when they get kids and can, to some extend, let go of my favorite occupations more easily. (It still stings sometimes.) Or maybe it is because enduring all the psychological hardship is finally paying dividends. Or maybe it’s simply because Arthur is just a super kid. Whatever the reason, what I can say is that I tremendously enjoy being a father. It has made me stronger and a bit more confident. I’m giving it my very best and I know it’s working out when I hear the little guy laugh out, content, like he does every day. That’s in fact really all the feedback I need to regain my composure. It wipes out all that effort to store my hopes away in that private place full of dusty cobwebs. It slowly dissolves the feeling of driving with a handbrake that I’ve lived with for the last few years.

    In the process of all this, and next to my increased interest in following the financial developments around the world, I also discovered that I grew fond of writing things down. For a lot of people (including me) structuring thoughts into strings of words realigns our minds to whatever meaning speaks from them. For those people, writing can be a means to grow, to build on top of what is already written. Mind you, there is absolutely no importance tied to the amount of people reading what I write here, nor do I care if people ‘like’ what I’ve written. It’s nice to hear that, of course. But if that expels me from the facebook generation, so be it. The important thing for me has already happened. I wrote down this text. And realizing the metaphysical importance of that process is another leap. As you write, you tend to reform sentences, replace words, restructure the content, elaborate or cut out parts that have no added value. But the operations on the text also reflect a mental transformation. If you practice this a lot, you automatically evolve your brain patterns, too. It’s totally unsharable, but probably the most important aspect. I guess you could compare it to sitting at a bar. The first few times, you feel a bit uneasy starting conversations, but as you tend to repeat the act, you grow more proficient at talking to people. I just never was the type to sit in a bar much, and with writing, there’s the added benefit that no one has to go through the various drafts of your musings. At university, besides “nerding” around in the demo-scene and playing chess on-line, the poetry mailing list was one of my favorite time-sinks. If people would read the contents of it now – I secretly hope that nothing of it survived the test of time, though in this digital era you never know – they would probably have a good laugh. I suspect the unbridled creative nature of that occupation helped me to develop a taste for writing.

    So yeah. Confidence. Not an easy topic to write about. It’s now been 2 months since I wrote the previous parts, and I’m still gathering bits and pieces every day, and at the same time I learn to blend in into this city of surrealism with increasing success. The process teaches me that protective environments have to be temporary, or they do more harm than good. I know I still have a lot of work to do, but I’m out there pushing for it. So here it is. My honest account shared and published. I win this war. All that remains are the battles to survive, and I know these. Here I come again.

    More good news reached us today. One of my best friends had a new baby born! A little girl that already has a big sister and 2 great parents, whom we don’t get to see often these days, which is a shame. Me and Isabelle wish the whole family all the best!

    Vertex format templates

    While my pregnant girlfriend is counting the weeks until D-day, I managed to code a bit again. I may be more of an all-round game coder, but I know quite a bit about the math involved in lighting models and post processing techniques. Still I have to admit, I’m old-school. The last lighting function I wrote was in software in an unrolled loop of a triangle span-pooled sub-texel renderer (in assembly). Hardware shaders – not to mention the various kinds of languages and hardware specifics – always seemed a bit of a drag to get into. Over the years, the field has matured quite a bit, and tapping into the huge amount of fancy papers on shading made the itch to try this myself only stronger. So I bit the bullet and dived into the NVidia shader tutorials.

    I immediately ran into a quite obvious fact: the vertex format is pretty much a defining factor as to what you can do in your shader. The first shader stage – called vertex shader – obviously works on the vertex format. The second stage – called fragment shader – is directly based on the first one; it samples/interpolates from that stage. This may be less of an issue if you have an editor + compiler – which we happen to have in development at Larian a.t.m. But for the sake of learning the trade, I’m sticking to hand-coding them at home for now.

    So why do I bring this up? Well, if you’re setting up a scene to render, then obviously you need to fill an object with data. The vertex format that you need to use for this is usually fixed. But as you go through the shader tutorials and the shaders become gradually more complex, the vertex format starts to change too. One can just start over in a new project and go from there. That’s fine, it works. However I want to keep all my little scenes in the same app, so that I could just browse through all the shader samples without hassle. The difficulty rises in that every sample may need a unique vertex format composition to feed its associated shaders. So how to specify those formats? I didn’t like the idea of putting #ifdef guards, I didn’t like the idea of having a gazillion typedefs, so after a bit of googling I stumbled upon this.

    The idea is to use type lists, such that each vertex part (position, normal, color, tex coord., etc.. ) is included in a type list. Here’s some code:

        template <vertex_use use, typename Next = void>
        struct vertex_info
            struct Vertex
                : public vertex_part<use>
                , public Next::Vertex
                typedef vertex_info <use, Next> Type;
                void Lerp(Vertex& from, Vertex& to, float t)
                    Next::Vertex::Lerp(from, to, t);
                    vertex_part<use>::Lerp(from, to, t);
            static const DWORD GetFlags()
                return vertex_part<use>::GetFlag() | Next::GetFlags();
            static void build_format(vertex_format & fmt)
                Vertex v;
                vertex_node n;
                n.usage = use;
                n.offset = reinterpret_cast<byte *>(
                    static_cast<Next::Vertex *>(&v))
                    - reinterpret_cast<byte *>(&v);
        template <vertex_use use>
        struct vertex_info <use, void>
            struct Vertex : public vertex_part<use>
                typedef vertex_info <use, void> Type;
                void Lerp(Vertex& from, Vertex& to, float t)
                    vertex_part<use>::Lerp(from, to, t);
            static const DWORD GetFlags()
                return vertex_part<use>::GetFlag();
            static void build_format(vertex_format & fmt)
                Vertex v;
                vertex_node n;
                n.usage = use;

    For a detailed explanation on how to apply a type list to a vertex declaration, please visit the previous web-link. The neath thing is – it can also be used to return the correct stride of your Vertex format, and even the DirectX9 flags used to communicate with the shader api. Nothing but goodies!

    But that is not all. If you implement something like lerp for all your parts, you can instantly lerp between any sort of Vertex, like so:

        template <vertex_use use>
        struct vertex_part
            const vertex_part<use> Lerp(const vertex_part<use>& a, const vertex_part<use>& b, float t) { return *this; }
        template < >
        struct vertex_part<v_position>
            float3 position;
            static DWORD GetFlag() { return D3DFVF_XYZ; }
            const vertex_part<v_position> Lerp(const vertex_part<v_position>& a,
                                               const vertex_part<v_position>& b,
                                               float t)
                position = a.position + (b.position-a.position)*t;
                return *this;
        template < >
        struct vertex_part<v_normal>
            float3 normal;
            static DWORD GetFlag() { return D3DFVF_NORMAL; }
            const vertex_part<v_normal> Lerp(const vertex_part<v_normal>& a,
                                             const vertex_part<v_normal>& b,
                                             float t)
                 normal = a.normal + (b.normal-a.normal)*t;
                 D3DXVec3Normalize(&normal, &normal);
                 return *this;
        template < >
        struct vertex_part<v_color>
            DWORD color;
            static DWORD GetFlag() { return D3DFVF_DIFFUSE; }
            const vertex_part<v_color> Lerp(const vertex_part<v_color>& a,
                                            const vertex_part<v_color>& b,
                                            float t)
                float a_alpha = float((a.color & 0xFF000000) >> 24);
                float a_red   = float((a.color & 0x00FF0000) >> 16);
                float a_green = float((a.color & 0x0000FF00) >> 8);
                float a_blue  = float((a.color & 0x000000FF));
                float b_alpha = float((b.color & 0xFF000000) >> 24);
                float b_red   = float((b.color & 0x00FF0000) >> 16);
                float b_green = float((b.color & 0x0000FF00) >> 8);
                float b_blue  = float((b.color & 0x000000FF));
                float alpha = a_alpha + (b_alpha-a_alpha) * t;
                float red   = a_red   + (b_red-a_red)     * t;
                float green = a_green + (b_green-a_green) * t;
                float blue  = a_blue  + (b_blue-a_blue)   * t;
                color =    (((int)alpha << 24) & 0xFF000000) +
                           (((int)red << 16)   & 0x00FF0000) +
                           (((int)green << 8)  & 0x0000FF00) +
                           (((int)blue)        & 0x000000FF);
                return *this;

    Isn’t template specialization cute? Obviously you can do the same for slerp and other interpolation schemes.

    I’m still toying around with this, but I haven’t ran into any sort of problems yet. This setup particularly shines when I wanted to subdivide a model (any model), using any sort of vertex format, just by telling them how to split up, as long as the splitter function calls onto the vertex format for specific vertex operations (such as the lerp mentioned above).

    Another thing it sped up doing is setting up a ‘universal’ TetraHedra structure, which is constructed using an initializer type. The initializer supplies the rough vertex locations and the face mapping based on tetraHedra formulas (more or less as if it were read from a data file), and the object is constructed using whatever vertex format is required in the shader example. Ah, sweet instant gratification. Nice. :)

    Well, nothing to get extremely excited about but I thought it was worth mentioning.

    Hope you like it and see you next time!

    A word from our sponsor

    If you’re lucky, you live in a part of this world where news is ubiquitous, where information flows abundantly, and where you have something to eat 3 times a day and more if you should wish to. It is in that same part f that same world, curiously, that headlines are screaming bad news into our face from whichever angle you take it, day after day, relentlessly: massive job-losses, tax-increases, child molestation, uprisings, failing healthcare, traffic disasters, government corruption, credit default swaps..

    I’m sure it is a sign of the times, but right now the perception lives that everything we know, all the food we need, the water we use to wash ourselves, and the warmth we need to protect our kids and family has increasingly become part of a cataclysmic function, a dependency on an obscure technical stock-market index of sorts. That’s very natural, you say, because we live in a capitalistic world after all. The free market drives profit and loss, demand and supply, all by it’s own rules of greed and happiness. So yes, that’s actually a natural thing. Why, then, is the world seemingly going up in flames about this? What has changed? Why is natural food either dirt cheap and therefore worthless to produce, and at the same time increasingly expensive when it needs processing? Why why why..

    Big banker names in the financial world are crumbling, but it is not them who are to blame. Yes, their attitudes have changed, and they bring out facts that turn out to be not true at all, and they promise things that they can’t possibly promise. But the real driver of mass psychology are the media. Their global mantra of one financial disaster after another, minutely analyzed and tastefully illustrated with thousands of economist doctoral thesis models and estimates, is building us a self-fulfilling prophecy in 16.4 million colors, a fearful world vision that is out to debase whatever value there should have been in any investment ever made, and by no matter who. The only winner in this epic tale seems to be a guy called Warren Buffet. No, sorry, that was just a joke.

    The media claim their self-proclaimed moral duty to inform Warren and Joe Sixpack about his stock and bet. To keep doing that profitably, news outlets and networks collectively turned themselves into fiction publishers. It is no longer in their primary interest to bring real news or tell stale truths. One look at the dynamic headlines and today seems like so different then yesterday, and yet.. doesn’t everyone agree that most days will still very much be like their yesterdays? It´s in news agencies first interest to sell believable stories that have a profitable ‘wowie’ factor. They’re weeeee close to selling action figures to go with that. The war on terror taught them how to wage fear in a populace by twisting stories to whatever extend was needed to drive a message home. And everything else, as they say, is just history.

    If you take another step back, beyond the increased media attention and coverage of these domino events, you also see something else: The once communist china has turned into a giant rat-race pony on steroids. The once communist Soviet Russia discovered the money game and is simply torturing neighboring states with oil and gas cuts as they wish. The once honorable gentlemen of the British islands have all signed up to play Onslow in a series called Keeping Up Appearances in The Common Wealth (how ironic a name). The once, well, New Yorkers are still dreaming of an America where everything is possible, and they all act just as selfish as the next guy. The old continent is slowly grinding to a rusty halt while feeling incredibly intelligent and important. The third world is struggling to get into -but firmly kept out of- class. And the Middle Eastern countries are sitting on their oil and more or less watch the rest of the world play tag, you’re it!

    Ok. Stop. Let’s not believe all of that for a minute. Look at the real capital in this world again: hi, yes, I mean you. We can’t have the financials run our society the way it does today, we can’t have mass psychology dictate how valuable we are. In that sense, I agree with the protesters in Wall Street. What I hate is their destructive nature, because they provide no alternatives.

    And yet, here is a very simplistic idea: Make all intended trade actions globally public and accessible at least 3 days before they are allowed to proceed. Remember, yesterday will be a whole different day. No more death marches, no more ralleys, no more volume trading spikes. It would take a lot of fuel out of the psychosis that is currently in the markets, wipe out rumors on rumors of murmurs, and bring back common sense and square off speculation against a currency, let alone a country. The trading would become a lot more strategic, and less impulse driven, and I think that is exactly what this world needs today.

    So, 2 cents from me, all reactions welcome.

    Premature optimization myth debunked

    Anyone that ever got slammed with the phrase “Hey, don’t go optimizing this prematurely! It’s the root of all evil! Knuth wrote it in his book! You idiot!” by some lunatic manager of sorts should follow their gut-feeling and pick up the following to fight back the idiomatic dogmas:

    It basically says: Knuth was an old fart who made love to inner loops. We’re way beyond that now. Either don’t give a fuck about optimization at all, or start caring from day 1. Something that is well known in the gaming industry, since here even the slightest difference in approach or implementation can bring a system to it’s knees if you’re not carefully considering all the details, and preferably, test them out (i.e. try all the options and compare).

    Note to our future

    No big statements here, I just wanted to keep a quote at hand for future reference, something I just read in a book I keep getting back into. I started reading before the unfortunate events occurred in peaceful Norway. Though the events described in the book were totally different, it was like what I just read in that book was happening live on TV at the same time. The parallels were making me dizzy. I’m still reading this book today. I have a tendency to read the books I like very slowly.

    “If you lose your ego, you lose the thread of that narrative you call your Self. Humans, however, can’t live very long without some sense of a continuing story. Such stories go beyond the limited rational system (or the systematic rationality) with which you surround yourself; they are crucial keys to sharing time-experience with others.”

    “Now a narrative is a story, not logic, nor ethics, nor philosophy. It is a dream you keep having, whether you realize it or not. Just as surely as you breathe, you go on ceaselessly dreaming your story. And in these stories you wear two faces. You are simultaneously subject and object. You are the whole and you are a part. You are real and you are shadow. “Storyteller” and at the same time “character”. It is through such multilayering of roles in our stories that we heal the loneliness of being an isolated individual in the world.”


    “Because it seems to me that these discrepancies and contradictions [in stories told by people that experienced the very same scene, ed] say something in themselves. Sometimes, in this multifaceted world of ours, inconsistency can be more eloquent than consistency.”

    - H. Murakami, Underground

    The old new thing

    Hi everyone,

    This week has been marked in history as the week when someone thought it necessary to kill 80 people, most of them teenagers and youngsters, on an island in a fjord in Norway. I’m tempted to give this character no forum whatsoever – I deem it inhuman to consider any idea to be a valid reason enough to carry out his actions. Nonetheless I feel it is important to refute his so called ‘logical framework of reasoning’, simply because he’s dragging a good deal of common sense with him into the abyss of non-ethical and dehumanized mass-murder.

    This may sound strange, but I feel it is important to regard the ‘accused’ (no sentence is proclaimed as of yet, though at this time of writing, he admitted to having committed these horrible acts) as ‘one of us’, because his weaknesses (solitude, antisocial behavior, a struggling sense of justice that is tested over and over again in the current society) do not sound all that uncommon at all!

    So, instead of portraying this man as a mythical (religious?) anti-good figure (demon, devil, monster) is it not more interesting and a lot more healthy for our society to find out how things went so terribly wrong for him, and how our social model must evolve in order to prevent such a thing in the future? Is it a good idea to be able to file everyone in the same box? Is it a good idea to kill those who differ in opinion and mindset? Is it even a good idea to believe in perfection and purity? If one idea exists, isn’t that precisely because the inverse idea also exists? In other words: it’s not constructive to eradicate your intellectual opponents, because in essence it is suicide.

    Less shocking, hopefully, it is also a week where the whole house (the one we started rebuilding since last year) has sort of come together. It’s amazing how much time frees up now that we can do the dishes, clean the floor, cook dinner properly, send an email on this old computer, wash our clothes properly – even though the weather has been miserable and nothing seems to dry. We don’t have heating yet, but all in all the house feels nice and comfy, lots of stuff brimming and at the same time bringing a sense of relaxation. A big thank you must go out to Jessy & Ludo for letting us rent their place for a year and take a peak at all their fantastic pictures they made on their truly epic biking trip. I also have to pay tribute to my fantastic architect and all of the construction workers for pulling off an amazing job in a little over one year timespan. The amount of stress, sweat, tears, blood and phone calls that went into this project is undoubtedly high, but it also teaches us a thing or two about people, and perseverance. There’s still plenty of little ends and odds to fix, but we’re under roof and we’ll manage just fine from here.

    Lastly, I would like to end with a note to everyone who feels deserted in their feelings. You’re not alone. There’s a huge amount of human experience out there that can lend an ear and bring comfort. Life is totally indifferent to justice or human longings, but with every misfortune come other opportunities. When Darwin lost his treasured Annie at a young age due to the same illness he himself suffered from, it triggered his already questioning mind to dive deeper into ‘why’ things are the way they are, regardless of his beliefs and emotions. His theory throws us right in the middle of the very human question ‘why?’, and though the answer turned our to be very technical and not very ‘warm’ or comforting, it reminds us of the kind of determination and courage that the man had throughout his whole life. And with him, his wife and friends.

    Take care.

    Lighter wearing socks

    Time for a bit of an update rant on life.

    I’m currently running on some sort of autopilot. Project E complexity is increasing fast and needs more attention. In may we’re going to try to put together the Japanese version of DKS, and there’s a myriad of other things left and right that need to be fixed both in projects D and E. The company is still a bit understaffed but overall the vibe is quite good. I’ll miss Ava when he’s leaving, and will probably end up assuming some of his responsibilities. B and Eddy are doing great on project E, and it is sometimes frustrating to be tied up into my current personal situation.

    Our house is slowly starting to look like a house again. Still a few months to go and a number of headaches to fix but the progress has been amazing! Delays happen, of course. Frustrating. Biting nails helps some. But we’ve come a long way since a full 3 tons heavy crane wheeled through the facade of our ‘pan-cake-house’ as Isabelle calls it. Hopefully we can move in soon. We’ve done some cool things with light, and with a streak of mad luck I may find some time to upload some pictures.

    Relation-wise, our child-wish has pulled us a lot closer together over the years, but at this point it is still pretty much a wish. We count ourselves lucky to have the best medical care in the world. The trajectory has been a rough emotional ride for both of us. It’s difficult to explain everything to everyone, and my hope is that someday, either way, we’ll be able to join friends and relatives again and lift the invisible cloud that poisons every conversation with some sort of pity feeling, induced or donned, be it consciously or not. We”ll be going for all our options, but first, the house..

    Well it’s off to bed early again, tomorrow’s going to be a busy weekend again!

    Cheers all,

    Mental notes on growth

    Courage in vision

    Potent strategic choices – market / target audience / platform / cross-over / biz model
    Design often, throw away more – dare to fail until you get it right / writer’s procedure
    Producer / Publisher commitment – long term financial support based on proven people’s track records
    Plan ahead, but re-plan as fast as you can keep up.

    Courage in execution

    Experiment and validate latest greatest over x amount of time, rinse, repeat
    Continuous education
    Embrace change, scrum when needed, pragmatic programming, agile manifesto
    80/20 google rule, 90/10 sweat rule
    Build code that does not resist change, don’t build code that inhibits prohibitions
    Document & share knowledge explicitly – avoid re-inventing the wheel unless it’s a better wheel and it’s crucial

    No Love For Gamebryo

    First, The News

    It’s not really hot news anymore. About a month ago, Emergent Technologies gave a press release that GameBryo and all it’s assets is up for sale. That’s what we already knew.

    Blam! As hot as it gets, this mysterious news came to me as a bit of a surprise!

    GameBryo is the middle-ware cross-platform engine that is used in an impressive number of games:

    2001 – The Dark Age of Camelot
    2002 – The Elder Scrolls III: Morrowind
    2004 – Sid Meier’s Pirates!
    2005 – Sid Meier’s Civilization IV
    2006 – The Elder Scrolls IV: Oblivion
    2008 – Warhammer Online: Age of Reckoning
    2008 – Bully: Scholarship Edition
    2008 – Fallout III
    2010 – Fallout: New Vegas
    2010 – Epic Mickey
    2010 – Divinity II: Ego Draconis
    2011 – Divinity II: The Dragon Knight Saga

    .. and also..

    Defense Grid, Civilization: Revolution, Wheel of Fortune, Shadow Harvest, Black Shot, RedView, Space Chimps, WorldShift, Freaky Creatures, Blood Bowl, Speed Racer, Empire Earth II, Freedom Force, Axis & Allies, Futurama, Open Kart, Jeopardy, Loki: Heroes of Mythology, Wildlife Park 2, Prison Tycoon, Making History: The calm & the storm, Kohan II: Kings of War, Playboy: The Mansion, Zoo Tycoon 2, Knights Apprentice, Stacked, Riding Star, Kick-off 2002, IHRA Drag Racing, Hospital Tycoon, Wizard 101, Dungeon Runners and many more..

    The GameBryo technology was used by over 65 Emergent clients, small and big studios alike. Games ran on PS3, Xbox360 and Nvidia/ATI PC’s. The engine boasted plug-in libraries from a slew of other software partners, most of them also used in Unreal III and CryEngine 2, and all of them integrated into a number of big name games.

    An Analysis

    So, reading all that good news, how is it possible that Emergent failed to sustain a sound business? Clearly there has to be something wrong with either the model, the technology or the management. The truth is that the model already existed, and that the technology is more or less a copy-paste gone sour.

    The Collapse

    GameBryo was licensed by a number of companies, but also depended heavily on partnerships with other development houses. Emergent’s latest deal with Krome studios apparently sought to bring a mid-sized developer into the Emergent stack of development power to keep GameBryo support alive. After the deal and despite Krome CEO interviews telling otherwise, Krome’s financial status turned deep red in a matter of days, and after it closed, Emergent put everything up for sale. Bad technology? Just bad luck in terms of management? Or were both companies in financial trouble and hoping one could lift up the other one just by lying their way out of it? A bit of everything? It’s probably too early to tell, but surprising nonetheless.

    The Biz Model

    Vancouver based Numerical Design Limited branched into the game industry from a military background, long before the notion of ‘serious gaming’ was invented. Their first line of products was called NetImmerse, and even today, all GameBryo source files still carry the ‘Ni’ prefix. NetImmerse was not a huge success but some games were built with it. When NDL was absorbed by Germany based Emergent Game Technologies in 2005, NDL revamped NetImmerse into GameBryo.

    Meanwhile, from 1996 to 2001, a company called Criterion was cruising into the limelight with it’s highly successful Burnout series. But Criterion was not just about games. It was selling the whole development suite it used to build Burnout. The Burnout games were demonstrations to show the world just how flexible and great it’s “RenderWare” technology was. It demonstrated speed, cool graphics, technical awesomeness and platform flexibility. It was the door for many developers to the hard-to-get-right PS2 development. And it also assured a healthy feedback cycle from the game team to the middle-ware team. A lot of killer games were made after Burnout by licensees, proving their model worked. In fact, the technology looked so promising that no less but Electronic Arts itself – largest game company at the time – simply bought it out of the market, stopped all licensee support, and merged RenderWare technology with their own tech. Technology wise, RenderWare was as good as any other game engine, but pipeline wise, RenderWare was bringing a flexibility to development teams that few other engines could boast, cross platform. It did a lot of things right, right out of the box.

    This must somehow have intrigued EA in a period when they were struggling to shed their image of an uninspired dull static behemoth developer, living off a yearly fix of yet the same soccer and NBA sports titles, and using wide variety of not-very-compatible technology in a spread of studios. They wanted to rival Epic with their Unreal Engine, and RenderWare was to be their new jack of cards. Later, EA COO William “Bing” Gordon reports in Gamasutra that “RenderWare didn’t get the next-gen parts that we needed. We actually underestimated Epic early on.”

    It explains part of the reasoning that must have driven Emergent to a fire-sale of GameBryo. Emergent believes that sufficient value interest from other parties that rival EA exists to buy such overarching tech, because it can cut off smaller developers from exotic systems like the PS3, Wii,.. Will it be Vivendi, Ubisoft, ActiBliz? Who’s gonna bite first?

    The Technology

    RenderWare was glorious when it first showed off their editor demo where content was produced on PC and instantly uploaded to both Xbox and PS2. Must have been 2005 or 2006. Today, almost 2011, GameBryo Lightspeed, the latest technology rendition by Emergent, is built solely to support exactly that. On-the fly editing and gaming, shortening artist production cycles, bringing huge amount of flexible property sheets to every game object instantiated. Including life cycle management. The whole pipeline architecture is pretty much based on the kind of technology that RenderWare was using at the time of the Criterion acquisition. Hence my claim of tech copy paste. Not a real copy-paste obviously, but the same ideas were re-implemented. In fact, counting all architectural changes, that would have been the 3rd attempt.

    While NDL and Emergent embraced the RenderWare philosophy and mimicked it rather closely, the console war led to a platform turnaround cycle, which meant a lot of work to be redone, and a lot of things to be rethought. NDL had a whole legacy licensee inheritance that crippled them from moving forward fast. There was a physical ocean of headroom between both companies. Unlike RenderWare, they tried to sustain version compatibility. Unlike RenderWare, GameBryo had a much smaller support team, had no sister games division bringing invaluable feedback, and had a smaller development team that for a large part was dealing with integration of 3rd party technology, similar to the efforts Epic was doing with their Unreal Engine. Unreal just moved a lot quicker, and to make matters worse, Epic threw the UDK in the public domain. It was clear that GameBryo was pushed in a corner and had to make choices. They chose technology partnerships over refactoring.

    No Love For GameBryo?

    If you browse many a game forum, you may occasionally pick up hard words towards Emergent’s technological achievements. Dancing on graves never gave way to huge civil progression, but I thought it appropriate to pull things into context again nonetheless. NDL and later Emergent really worked hard to deserve more, re-invented themselves when times were hard, and then things got even harder. But I want you to think of this: If GameBryo disappears, the gap between AAA and Indie will become larger. (Torque is dead, Unity still going..) Developers will have to spend money on re-inventing what has already been invented 2ce. Game developer money that could have supported creative souls, game play, concepts and content.

    Gamers only see the end result in the form of an actual game they are playing. They may see bad lighting, missing polygons, strange animations, jerky frame rate or just altogether strange bugs. And then they yell at the GameBryo ‘engine’, which is not actually conceptually what a ‘real’ engine (Unreal, CryEngine,Source,IdTech5..) is. It’s fully understandable that they complain. After all a game experience must be worth their money, and seeing bugs on your HD screen is never sexy or something to boast about. But the point of the post is – fully realizing that only a few gamers may actually have read this far – that GameBryo, while being a bit overweight, was never a bad platform, bad tech or bad middle-ware. It was just ill-supported and ill-documented, and possibly also ill-timed. With a little more love, developers using it may not have caused so many bad feelings. The ‘bugs’ in your game? You probably should blame the developer, not the middle-ware it is based on.

    Of course NDL and Emergent management are to blame too. They never had a creative vision of how things ought to be, something that Criterion was pretty good at. To their credit, they saw and created the market opportunity and just steered into the open tracks before them, and then just kept on going. Trying to ‘pull a Criterion’ off, and it seems it worked out for them in the end. It’s hard to say what choices would have made more sense, but I hope it is clear that GameBryo’s software side was certainly not the only issue Emergent faced. At least one single largest bidder understood the importance of GameBryo in todays market.

    Now let’s find out who picked up GameBryo, and what will happen with it.

    Love to hear opinions..