Programming

Maybe you remember the Multicore-Demo from INTEL using OGRE3D which used 8 hardware threads ( 4 hyperthreaded cores). The "threaded task" framework for doing the distribution etc is called SMOKE and there's now an article about it on Gamasutra entitled:  "Performance Scaling With Cores: Introducing The SMOKE Framework". On the last page there is a link to the downloads of the demo binaries and the framework sourcecodes.

Here is a screenshot from the demo running on my Intel Quad Core Q9450 @ 2.67 Mhz under Vista

Smoke demo on my quad core

25 FPS with 4 threads – one per core. With one thread I have 7 FPS and with two threads 16 FPS (using the same perspective).

When I started to experiment a bit with Unity3D, I used JavaScript. Unity3D uses Dot.Net as "scripting" environment and supports C#, boo and JavaScript. JavaScript is the one I already used in the past thus it's what I went for.

But something that really put me off after a while was how inefficient coding was without a good editor with solid syntax highlighting and Intellisense. In Visual Studio C++ I am using Visual Assist now for many years and don't want to do any  coding with out it!

There is a webdeveloper edition of Visual Studio 2008 Express which has intellisense support for JS, but if you want good performance in Unity3D you better use the strong typing language modification Unity Technologies added. Which btw. looks like this

var myFloat : float = 1.23f;

JavaScript itself is a dynamic language with dynamic typing. In the past developing with such a type of languages was a bit old school (execute and observe: "print, print, print .. ah something wrong here"), because you didn't have an environment with syntax highlighting and debugging.  So I guess that web-developer VS Express release probably gives a nice boost there. 

Dynamic languages have their strong points! I like being able to open the maxscript console (F11) in 3ds max, type in some lines, select them and press Shift+Enter. It executes the code with instant results – fantastic for prototyping. When done, you simply drag'n drop the code onto your toolbar (as example) and dang, new button that calls your code. A very fast way to extend a tool.

Microsoft seems to be aware of this as in a video with the 4.0 C# design team, they talk about use-case. Looks like C# might become a choice for embedded "scripting" language in applications.

An alternative is thus to use Visual Studio C# Express 2008 which is a great C# editor for free. And so far it seems to have very good intellisense and refactoring tools built-in. Another benefit is, that you can compile in VS as a verification step. On the G4 it took nearly up to 10 seconds until Unity3D recognized the recently saved script file and finished the recompilation. Compared to Virtools where VSL compilation is a matter of a second, it felt pretty annoying. On the other hand VSL is a less complex and complete language. VSL code tends to be in most cases short and without many dependencies (at least for me).

As my G4 macbook doesn't have Parallels, I finally rigged up a home-network with Synergy – like many people on the Unity3D forum do suggest and it's really good as now I can use the PC for coding in C#. This brings not only the benefit of using a good Editor – which is the main point – but also the benefit of using familiar Keyboard-Layout. 😉
That G4 keyboard and the unfamiliar way of selecting words or rows in one via the keyboard was a real slow.

Although now I need to learn C#, it's worth in order to use a good development environment. Moreover it might be very interesting for other tasks too. Actually I will start with some C# stuff outside Unity3D first. So Unity3D will have to wait even some more …

Recently I did a little log-analyzer tool in MFC and it really feels old. Luckily due many available resources online, it's still ok to use and especially it doesn't need the dot.Net run-time, which was my major decision point: easy deployment. Just one .exe and go. But I am interested in WinForms.

I played a little bit with WPF and XAML but it adds an additional layer, so I will stick to WinForms first.

If you read Beyond3D or Tomf's blog then you probably already heard of INTEL's project 'larrabee'. If not: the basic idea is to mix CPU and GPU functionality into one 'multi mini-core' system. One could call that "CGPU". The target for 2009 is up to 16 cores (maybe less) with each capable of 4 hardware threads.

The source article ends with: 

Now do you understand why AMD had to buy ATI to survive? 

In the context of the mixed architecture that might be more flexible to to program, raytracing (as alternatives to rasterasation) for real-time rendering is discussed. Another citation from the above article is

Now do you see why Nvidia is dead?

Maybe you know about Mental Images, the creator of the famous MentalRay offline renderer that ships with 3dsMax, Maya and XSI … … they have been bought by NVIDIA! Nvidia does provide with Gelato another rendering product for the DCC market but maybe their acquisition was also interesting for them in regards to the Intel's Larrabee project where raytracing for real-time (RTRT) is researched.

So what will the future bring us? Maybe instead of 2 pairs of separate competitors 'AMD<->INTEL and NVIDIA<->ATI' we will have a triangle 'INTEL<->NVIDIA<->AMD/ATI' ?

( P.s. Actually, as I am right now discovering, Larrabeee details are already public since April 2006 )

I have the honor to announce that Flavio Rodriguez has now a blog, too !

Those that are active in the Virtools online community already know him from his famous Multi-Resolution/DetailTexture Shader, his Heat Distortion Shader, and his DoF Shader.

Maybe you also know about the WW2D prototype he did with Frederic Markus from eRelevant using Virtools. 

WW2D screenshot Another WW2D screenshot A Platform Toolkit for Virtools from eRelevant

You can read more about him (including his resume) on this site. Don't forget to subscribe to his Blog RSS feed (bottom of the page), because he already told me the topics of his next articles and it sounds very interesting !

Smile

Maybe you read about the EASTL (EA-STL) – modifications to the STL that helps to deal better with game development issues. Greggman is asking EA in an open letter to open source their modified STL under BSD license.

Another argument, besides those he mentions, could be that when they hire new people, these might already be familiar with that library which might reduce education/training costs in the long term. 

Last year I was looking for an unit testing framework. I wanted something easy to setup and easy to use. I found UnitTest++. Checkout the overview for details how to set it up and use it.
I haven't used it much yet (going to change that now Wink) but so far I am very happy with it. Today realized that I was testing my (DLL) code in a test application, instead of using the unit test framework I have already in place. Using UnitTest++ is much better than creating testing code within your (test) application, because you keep the code you write to develop and debug your classes and they will be executed after each build automatically. 

I am following an interesting blog called 'Game Ai for Developers '. It's quite new and has frequently interesting updates. It's especially interesting for people thinking a bit about architectural aspects like the behavioral approach Virtools uses for schematic scripting via their BuildingBlocks. I already mentioned it a couple of times that the approach of creating reusable scripts that you attach on entities has it's benefits but in many cases it's better to go data driven. Virtools supports data-driven implementations even since 1.0.1 but unfortunately they didn't use that approach often enough. This also lead to many people choosing the wrong design where data-driven was the better choice.

Moreover with the multi-core problematic, all this might change when trying to do processing like a GPU.

I don't know how Virtools does approach this challenge in their Next-Gen MP product. We see that they have something called Task and Task groups – common terms in this context. So maybe you will schematically script tasks that act on data – or if we consider 'task-groups', on data-context/isle/zone. I don't know.

That's also where we can come back to the Game Ai For Developers blog. It's related to this topic! Very interesting! Smile

Like usual I am a bit late with this …

Wink

I updated my blog-system and normally you should now be able to comment without beeing forced to register. Before I used registration to protect comments from spam but now there are extensions doing it – we will see how solid they are …

Last week, a co-worker brought his Wii with him and that was my first chance to try it for myself. I like it – like everybody else! We had some fun with tennis, bowling and boxing. Though boxing seems not to react that fast to one's movements. Great toy!

Let me end this first post of 2007 with a little tip for programmers like me that do not dream binary: a flow-chart that helps to find a fitting STL container. It's from www.linuxsoftware.co.nz and it's linked from the Game Programming Wiki.

Aide for choosing containers