Nintendo with an interesting Operating System.

Nintendo has released an Operating System named ES (read translated version, original Japaneses version ) under an Open Source License. What the whole idea is behind having an OS is still unclear to me. If they were planning on having an OS for their consoles, there are other more attractive alternatives like Linux. Sony has done something on these lines by having Yellow Dog Linux run on their PS3 consoles.

The website is pretty vague and doesn’t delve too deeply into what the OS is intended for, but it’s clearly something too keep and eye on. Maybe it is just some research project. Maybe the company is still toying with the idea and wants to see what the response from the community will be, who knows.

The OS itself seems pretty interesting. The kernel seems to be written in C++ and it runs natively on x86 and QEMU. They have a port of SmallTalk programming language called Squeak. I am not sure what the intension is really, will it be used for game development on that platform? I guess there must be some way to do C++ programming as well, considering it’s x86 compatible.

A helmet that can read thoughts?

First a vest that lets you feel the game and now a helmet that reads minds! Holy c**p! What’s next? Really interesting indeed, though I am a little bit skeptical it would be that easy. Even the article mentions the fact that it would be really difficult to isolate specific brain signals required for flawless character movement inside a game.

Let’s say the report is based on fact, does such a helmet really enhance a game overall? It does brings up some rather interesting questions. Would such a helmet really add to a player overall game experience? For example, my thoughts are a jargled mess when I am playing a FPS game. If a helmet would translate that into player actions, the character would behave really weired indeed 😀 .

Then again I like to get sweaty palms during fast paced action. Just sitting idle and thinking about hacking and slashing opponents is not something that sounds too appealing. Hey, I think such thoughts about people I hate all the time 😉 , that’s not something new, neither does it sound interesting. OK maybe I am kidding, but really, would such helmet allow for greater player immersion? It might, maybe, or it might not. Then there are other issues as well; like response and reactions times which are integral to overall game mechanics. On the whole, I remain a skeptic about such a “mind reading” helmet.

Visual Studio Express 2008 – First thoughts.

It’s been about a week since I downloaded Visual Studio Express Editions and I have done some fair (not too much) bit of coding using VC++ Express and not so much with Visual Web Developer. Didn’t touch any other editions as yet, so I am going to be very C++ centric with this one. Generally, the UI in new Visual Studio Express has become more responsive. Now don’t get me wrong, I am not saying 2005 was unresponsive but sometimes it took judicious amounts of time to open Dialog boxes. For example the Configuration dialog box took some time to come up initially, I mean the first time it was brought up, so did the search dialog. No such problems with this version, cool, that was a nag!

The compiler speed has increased, not by too much but it has. I must say I do use the /MP option a lot, but I still generally feel the speed of compilation is a little bit faster. Maybe on a faster machine the compiler could be a magnitude faster, but I still run a 3GHz 2 core machine that is 2 years old now. It’s always nice to have a faster compiler, especially if your project takes about 15 min to compile from scratch and is heavily templatized!

On the other side I have had crashes with the express editions, 4 times to be exact. Considering it’s been only a week, that’s just too many times I must say. Not much has changed since 2005, even then, I must say the express edition is pretty good. It does a lot of things not easily attainable in other IDEs and C++ compilers. People have complained about not having a resource editor; it’s not too much of a hindrance to a game developer like me who pretty much has no need for a resource editor. In any case there are a lot of free resource editors around that you could easily use to edit your resources, or just use wxWidgets!

On the whole the express edition of C++ is good. Hey and best of all, the express editions are free, should we even be complaining!

GP meets the GPU.

Things have been hotting up in the area of GPGPU lately and I am kinda feeling left out of the crowd especially since a couple of people I know have been seriously working on GPGPU projects in their spare time. Interestingly I have never had the inclination towards learning more about GPGPU until now that is. I have had only a passing glimpse at CUDA but never laid a hand on that technology. Partly because I don’t have any GPU that is GPGPU friendly and partly because I have been involved so much in developing the game and setting up the business along with it.

While GPGPU has been around for quite sometime, the advent of CUDA and some recent events make me believe we could be seeing a significant progress in this area soon. I was just reading up on Intel’s acquisition of Neoptica for their hush hush Larrabee project and it just makes me wonder if we could see a significant trend and a general upsurge in GPGPU related technologies in the near future. ATI has been close on the heels as well, just recently talking about their GPUs being used for all sorts of general purpose computations.

My experiments with GPUs have not yet gone beyond shaders until now and I think I should be looking at GPGPU very seriously from now on.

gPower!

OK before you think this is some kinda spice girl blog entry, by gPower I mean Google generating power. I read this very interesting article yesterday and was almost surprised. Well almost, I guess when it’s Google you can’t be too surprised with anything really.

Search giant Google on Tuesday pledged to spend hundreds of millions of dollars to make renewable energy cheaper than coal.

Though I admire them for their efforts, what Google has set out to do is a tall order. Even with it’s millions in research, to generate 1Gigawatt of power and that too cheaper than coal will be very difficult indeed. Using coal to generate power is pretty inefficient way to generate power not to mention the huge pollutants coal spews out. However coal is so darn cheap, the power produced still turns out to be cheaper than most other methods of power generation.

What is interesting is the fact that Google is looking at a possible way to get power from geothermal energy along with other traditional ways of renewable power generation like solar and wind. Power from the belly of the earth itself! Cool! However to achieve this could involve considerable research, which obviously Google is prepared for.

With geothermal energy, or “heat mining,” electricity is generated from hot rocks thousands of feet beneath the Earth’s surface. Water is flowed into drilled wells, creating a heat exchanger that can produce hot water or steam to run electrical generators on the surface. — MIT

They say necessity is the mother of invention and it’s time someone really cut through the red-tape and hypocritical b.s. of politicians and power generation companies and really looked at power generation from a totally different angle. Google is probably doing it right. How the whole thing turns out is a different story, they may succeed or they may fail, but at least they are trying, which is more than what some governments and politicians are willing to do.

Go Google!

What were they thinking?

It’s now called the top 10 worst product of all time. Oh, I am talking about Windows Vista, and just recently there have been a flurry of articles (another one here) stating what was rather obvious to anyone taking only a single look at this retarded OS. After all this criticism one cant help but wonder what Microsoft was thinking when it released this OS. In contrast XP was a welcome change to the then ailing 2000 and the OS is still going strong today. I thought Microsoft had learned from past mistakes on Me and 98, yet we see the same thing with Vista.

While some criticism is unduly harsh and unwarranted, Vista seems to be myriad of small mistakes rolled into one. Not entirely from a technical point of view, but with other issues as well. The biggest put off and the most costly mistake as far as Microsoft is concerned is the fact that the OS is a resource hog. The OS requires a stupendous amount of memory to run efficiently. Now some might argue that about 4 GB worth of memory is not so much these days. But that is not entirely accurate. I would put the question the other way round, “Why on earth does an OS that does nothing special in particular require such huge amount of memory?” Why do I tax my memory budget so that a improperly designed OS can run?

There is also another more serious problem which I bet is biting into Vista sales, and that is, Vista runs extremely crappy on older machines with less RAM. Enterprises generally don’t want to upgraded their hardware to support an OS that very clearly doesn’t offer anything special. They see no addition in their value chain in upgrading to Vista and rightly so. You really can’t blame them. I have experienced this first hand on my friend’s machine. He ended up switching back to XP after a rather unpleasant run with Vista. I was reading this inquirer article and it made me smile, what is written seems to be spot on.

The features that were advertised with Vista don’t do justice for it’s price tag. The secure OS crap that was dished out looks nothing more than a nagging nanny. The warnings and messages boxes can get really annoying and I found them too much of a hindrance while working. That’s not going to be too popular with developers and programmers; it’s besides the point that those can be turned off, and programmers have always learned to adapt, what are they there for? The warnings just make you feel retarded. Also, the other feeling I get is somehow Microsoft wants to unload some of it’s responsibility off of themselves on to the end user. It’s like, “Oh we told you this program could damage your system (via a message box). Sorry what happened is your problem not our’s. Don’t say we didn’t warn you!” And what exactly are they securing us from? Can I run the OS without an antivirus or anti-spyware program?

Then there is the DirectX 10 story. As you probably know there is no DirectX 10 for XP ,only for Vista. The driver reason given is utter b.s. That’s just some arm twisting by Microsoft and it has resulted in DirectX 10 not being adopted as widely as it should have been. I have seen a lot of people criticizing DirectX 10, but it’s not DirectX 10 that is preventing more DirectX 10 games but Vista. It seems there are a very few people that have the required hardware + Vista to run DirectX 10. Talking about drivers, the OS has fair share of hardware and driver related problems. Incompatibilities with hardware still continue even after a year of releasing the OS.

I had done a fair bit of brain bashing with the OS just recently to get the game Vista compatible (read here) and I came out with a feeling of being let down by the OS. I use XP for all my PCs and I had high expectations from Vista after having a good time with the XP OS. I however continue to face problems with Vista. Compared to that, XP seems to be a very friendly OS. I spent a good 2 weeks on Vista and was pretty disappointed.

Some additions to yesterday’s update.

  • I was browsing through Visual Studio express page when my interest was drawn towards a toolkit called Game Creators GDK. The interesting thing is, it integrates with the express edition of Visual C++ and thats a little bit surprising. Or maybe not; many indie and aspiring game developers do tend to use express a lot. Just out of curiosity I did download it and the package seems to be a solid beginner level package especially since it is free. If you are a budding game developer you have to check this out. It also comes with a bunch of tutorials and extensive documentation. Yes, it’s a C++ SDK but, I didn’t delve in too deep so can’t say too much about it really.
  • I missed this one yesterday; but XNA Game Studio Beta 2.0 has been released. I tried a hand at XNA a long time back, when it was first released but never really got fully into it. It still remains a mystery why MDX was discontinued in favor of XNA. Maybe XNA is more of a complete game creation toolkit rather than a wrapper over DirectX.

Some recent news updates.

I generally have such an entry every 2-3 months so here goes.

  • Visual Studio 2008 is here!
    Microsoft recently released Visual Studio 2008 along with the Express editions. If you are like me then head on down there and start downloading the express editions, like now!
  • Delayed but good news from AMD/ATI:
    AMD (and ATI) has/have announced the availability of the HD 3870 and 3850 range of graphics cards, widely believed to be an answer to NVIDIA’s 8800 GT and GTS range of GPUs. They are based on ATI’s new RV670 graphics chip. Just how much of a challenge will they be to the 8800 has yet too be seen, but I am guessing we could be seeing stiff competition here. Read details of the spec here and here.

    In other news, very recently AMD also released the Phenom Quad core processor, X4 and the 7940FX chipset. Again to early to say how things pan out. More details here and here.

  • Updates from NVIDIA:
    As you know NVIDIA released Cg 2.0 Beta recently. Along with that two other releases from NVIDIA just rencently; 1) PerfHUD 5.1 and, 2) though I am not working on Cuda, I know some of you are, you can grab the Cuda 1.1 beta.
  • Disappointment in the OpenGL camp.
    As announced recently OpenGL 3.0 specification is delayed due to…. oh well, lets start that again; It seems OpenGL 3.0 has had some last minute changes and the specification release was put on hold. Let me not say anything further, I don’t like getting hate mails.

Selecting a scripting engine – Part 3.

Some more RnD on scripting languages. This is the 3rd part of the series, the first 2 parts [1] and [2]. I generally do all the RnD on this when I take time away from working on the current game or I am generally bored or stuck on a bug somewhere. This time I focused on Python again and also tried something with Squirrel. Both are very different languages and each one has different challenges to overcome. I also took a dig at something I haven’t touch before and that is C#, yes, as a scripting language.

Python:
Python is general is very good as an extension language. You could bind all your code with python and then use only python to code your entire game. Python is clearly designed as heavy duty application development language and embedding it is not what is recommended. While you could very well do so, I found it to be rater clunky and non-intuitive, that’s not to say it can’t be done. So I focused primarily on “extending” and not “embedding” while working with python. There is no real advantage or disadvantage to either method, but I rather want to carry the O2 engine in the direction of “extending” too keep the engine accessible to people who have no, or limited knowledge of C++.

This time I focused on Boost.Python more than SWIG. I haven’t benchmarked anything as yet, but I guess any overhead via bindings would mean a small (, or minuscule) decrease in speed. That doesn’t really bother me since most of the heavy duty calculation stuff will be done in the C++ libraries anyways. However what bothers me is the maintenance and scalability of the binding code. Any binding code is difficult and uninteresting work. It is something that I know programmers will hate to do and it is something that will have to be done time and again as and when the engine scales. Another thing is time. It takes ridiculously large amount of time to write large portions of binding code. That is where I think Boost.Python edges out slightly over SWIG, hello to the Py++ bindings code generator!

Apparently the code generator parses C++ code to GCC-XML and then uses the XML to generate the bindings. It seems too good to be true, but that is what it does. To be fair I have only tried a very small program with it and I have no clue about larger programs. I might try something larger with Py++ this weekend, again, maybe. However, larger projects like PythonOgre already successfully use it so I don’t think it will be too much of a problem with the O2Engine. Check out the next in the series for that.

Squirrel:
Squirrel is a lightweight language, much lighter than Python and supports all modern programming features. “Squirrel is a high level imperative/OO programming language, designed to be a powerful scripting tool that fits in the size, memory bandwidth, and real-time requirements of applications like games.” I experimented a lot with squirrel for the past couple of weeks. The language is cool, there are no two opinions to that. It is all what they say it is and more. It tastes like an embeddable language but I am sure it will do an equally good job at extension. In someways it is a lot better than python. For one it is designed to be embeddable while python is not. It has a much smaller memory footprint and, even though I have no numbers to prove, it must be faster than, or at least equal in speed to python.

The big negative part of this language is it’s bindings. Seeing the binding code will make you cringe! It is hopelessly complicated, almost impossible to understand at times. Binding even a small piece of code with about 5 classes took me over and hour, and those classes were not even extensive. I hate to think what will happen while integrating a heavily templatized game engine! For some reason the bindings have to be integrated into classes themselves and even if you did bypass that, it is not clean at all. A lot of glue code needs to be put in, too much I think. While there are binding systems like SQPlus and jkBind, bindings in Squirrel are non trivial. jkBind is particularly interesting and easier than SQPlus, but even then it misses out on functionality that is critical to extending any language. Scaling any such binding system on a large live project having multiple developers will be a nightmare.

If the binding systems were improved, Squirrel would have been my choice hands down. Having said that, I am currently not discounting any language outright. Choosing a scripting language can be tricky and my choice could very have a significant consequence in the future.

C#: (& Mono)
Ah! So I finally got around to having a go at this language. I have only tried a couple of things thus far but I am already impressed. First, C# is by no means a scripting language. OK to be clear I have never used C# before, just had some fleeting glimpses at it, but never worked on any project involving C#. It is a full fledge high level language and is very very powerful, but I bet you already knew that. Extending C++ code using the Microsoft compiler is easy, maybe not as trivial as Py++. One thing I can say for certain is C# is faster than Python. I am not so sure about Squirrel but I bet it must be a little bit faster to that as well. I won’t go into too many details just as yet because I still want to do some more testing and extending before I make some claims. So more on C# later.

In my next part of this series I will try and post some timing values. Timing values will allow for better comparisons of languages and binding systems. I will also try and post some binding code. That will just give a better overview of the task and effort required to have a binding for a language.

Cg 2.0 Beta.

NVIDIA has released Cg 2.0 beta a few days back. I downloaded the new version including the docs and was browsing through them. What particularly interested me was the sentence “New OpenGL profiles (gp4vp, gp4gp, and gp4fp) for GeForce 8 extensions” in the features list. It’s a little bit confusing though, because the docs don’t go into how exactly to do that, or is it just some extensions. One another thing that seems a miss is how exactly to access new DirectX 10 features from Cg, or am I missing something? I don’t have a DirectX 10 compatible card so can’t test anything really, but I checked out the examples provided with the SDK and there seems to be no examples for DirectX 10.

The docs mention 2.0 is compatible with 1.5 so  I tried out some of my older test shaders written with previous versions (1.5) and they worked OK. But then again those weren’t pretty extensive.