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.

Ah! Finally a small vacation!

I have been away this weekend, on what was a much needed time away from my daily activities. It’s been some time before I took a break from my daily routine work and this weekend presented the perfect opportunity to have some quality RnR. The beginning of the winter season here has been exceptionally hot this year with temperatures touching a scorching 32 deg celcius, almost mid summer temperatures (, talk about global warming!). A nice beach house facing the open ocean seemed too enticing an opportunity to pass by.

Here are some snaps. I haven’t had time to get all the snaps in, I will probably upload them on the main site soon.

Pic 1.

Pic 2.

Pic 3.

Violence and Videogames.

As you know I recently had a run in with the Crysis game and I am awed at the amount of graphic detail that the games manages to push through. If pushed to it’s max settings on a high enough resolution, you would be forgiven for calling it a movie instead of a computer game (, well almost). As I mentioned in my earlier post, the graphics and especially the violence can be nauseatingly real. Crysis has definitely raised the bar in video game realism. If people called Doom (1993) to be too violent, this game has like, multiplied the violence by a factor of 10. It’s not just limited to the Crysis game but most of todays games, mostly in the FPS genre, are pretty much known for extreme violence.

There is a strange thing I have observed, as a player you often don’t realize how gory the violence really is. As a computer game player you generally tend to focus more on your character. Your brain tries to rapidly compute permutations-combinations in the gameplay and is actively trying to keep your character alive. As a player you miss out on the gore the game delivers. Well not entirely, but you don’t tend to focus on it. It is the third person, observing the game who actually sees the gore in the game. As a player your priorities are different. You are more focused on achieving your intermediate goal at the same time trying to keep your character alive. It’s somewhat like a soldier in the heat of a battle, you don’t see all the pain around you. It’s like your mind tends to switch off of all the gore and concentrates it’s attention of keeping the character alive.

I generally tend to disagree strongly with people that say video games promote violence. I have always been an FPS fan until very recently, that doesn’t mean I am prone to violence. Then again, that’s not something new, it is probably the same sentiment shared by most FPS fans. It’s not like you go “Ooh! I love the blood spatter caused by the bullet when it hits”. OK, maybe some weirdos do, but majority of FPS junkies play the game because it is fast paced, and yes because “it is a game”. Believe me while playing a game you (, and even those weirdos) are very much aware that your in a middle of a game and not in the real world. That doesn’t mean you are going to enact similar actions in the real world.

Violence and violent tendencies in general maybe because of different reasons but not due to video games. I have seen people blatantly blame video games for all the violence in the world, but consider this fact, maximum violence and the most heinous of acts are carried out by people who don’t even have a clue as to what a video game is, much less played one. I am not a physiologist (, not by any stretch of imagination) but the root cause of violence is seated somewhere else and not in any computer game you can find. It is a dark nature of humans to lust for violence. In th past the Romans used Gladiatorial combat. What could be more violent that that? Yet the Romans were known as the most civilized people of their time. Some say they even ushered the modern age. Isn’t Boxing a violent game too? I could say the same thing with many others, but lets just leave it at that.

So why do some people have this uneasiness with video games that have violent content. It’s not like the game itself is physically harming someone. Not in the least. So what is the real reason behind this outcry over banning video games? I am surprised that in this day and age, people still feel the need to ban something, “something like a video game”! My personal feeling is, because a computer game is a fairly new and misunderstood entertainment medium, at least by some. The usual argument is violent video games will promote violence. With whom? With kids? They shouldn’t be playing such violent games in the first place! That’s what ratings are there for. As far as ratings for violent video games go, I am very much for that. Just like adult movie content should not fall into the hands of minors much less kids, so shouldn’t violent video games. I have seen adults fail to realize this but violence is adult content, anywhere, in any entertainment medium! And, it is the responsibility of an adult to see to that. Violence is often treated as “OK” with regards to minors and kids, and that can be dangerous. Talking about movies, what about violent movies? Should we ban those too? That’s just crazy.

In the end a game is just that “A Game”. It is an highly interactive entertainment medium that is here to stay. Games allow for more immersion than traditional entertainment mediums like theater and movies. Some people (, and their numbers are declining rapidly) haven’t fully understood it, mostly because it is new. Like with all new things, at first they are seen as a threat to society, which games are not. In the end, that too shall pass and attitudes will change.

Sneak peek at the looming “Crysis”.

Well it looks like its time to go and get the 8800 GT after all. I just had a run-in with the recently released Crysis demo and the only real thing I can say is “Superb”, about the graphics that is. The game has ultra realistic graphics, “mind-boggling” and “jaw-dropping” would be a better words. I haven’t played the demo myself but observed someone else playing it for a short while. He had pretty much maxed out Crysis settings with a resolution of 1920×1200 on a 19″ monitor and still the game was running pretty smoothly.

The first thing that caught my eye were the shadows. The game features impressive real-time soft shadows probably done using shadow maps. Other real-time techniques just seem unlikely given the complexity of geometry in the scene. I am not too sure how the team solved antialiasing issues or maybe it was the very high resolution and the setting, but there were no visible aliasing artifacts that commonly occur when using shadow maps.

When you look at the surroundings, you can help but wonder how the game manages to push so much foliage and trees per scene. I haven’t quite figured that out myself. Maybe it’s some clever instancing tricks coupled with the obvious raw power of the 8800 that allows for such incredible amount of vegetation to be simulated correctly. You can even shoot down trees and shrubs with your gun. Shooting at leaves will even leave bullet holes in them. Amazing, truly amazing.

The rest of the graphics stuff from the game is equally impressive. The atmosphere and sounds compliment the game effects nicely and the movement of the sun allows for a very diverse experience with a dynamic environment because of varied lighting. Another thing that impressed me from a game engine developer point of view were the destructible terrain environments. I had heard about the Crysis team using a voxel based terrain system which allows for exactly such type of terrains, but the results in the game are even more impressive. I remember Ken Silverman working on something like this in his Voxlap engine, interesting!

The AI seems to be good, but I haven’t played the game myself so couldn’t really tell. Post-processing effects, explosion, all look incredibly real. One thing that is really cool gameplay feature is where you can hold a guy by his throat and use him as a shield against enemy bullets, yeah, something out of a schwarzenegger movie. I am sure FPS junkies are going to get a kick out of this one.

It’s all about the graphics then. The graphics the game delivers can be nauseatingly real at times. I am usually not the one who falls over a game just because of graphics, but the Crysis game will probably be an exception. Maybe it’s just the programmer inside of me talking, maybe things will change when I play the game for myself. But I just kept thinking about (, and googling to find an answer as to) how some of those game effects were achieved. More… later!

How Linux ended up saving the day.

Sometimes in life catastrophes happen, and when they do you are generally least prepared. OK, as you recall I had a little bit of a misadventure with a failing hard-drive last month. Yes, I consider a failing hard drive a huge calamity, especially if it is on a machine that houses all my RnD projects, and that is exactly what happened. It all started one September morning when I could distinctly hear, “swwwiiing….. click.. click.. click…” sound coming out from the hard-drive.

For the people who don’t know, that sound is the hard-drive’s death chant. It’s like an angina that occurs before a heart attack. And, that is pretty much what happened. The hard-drive did fail very soon and even though I could get most of important data out on a new drive, majority of my RnD data was left on the disk. I do have regular backups of my systems, but there is a limit to how much one can backup, especially if the data on the disk is like 100 GB.

Last week I decided to try and retrieve some of my RnD projects from the failed drive. Windows refused to start, and I was left wondering what it was that I could do. Only a part of the disk had gone bad, if  some way I could access the remaining partitions I could get most of the data out. That is when I decided to try Linux to get at the partitions on the drive. I threw in a Ubuntu live CD ROM and after some tweaks to fstab, woila mounted readable NTFS partitions! I recovered 100% of my previously lost data!

Moral of the story: Always always keep a latest version of Linux Live CD ROM with you. Like an inflatable air bag, you may not use it most of the times, but if it saves you from a crash it’s well worth it.

Response to a rant: Is OpenGL being abandoned?

It is no secret that the gaming industry is dominated by Windows platforms and the API of choice is DirectX. There are some staunch followers of the OpenGL way of life, but their numbers seem to be dwindling rather rapidly. I have read a lot of blogs claiming that OpenGL is better than DirectX or vice-versa. I even got a mail (, or two) from an unknown person recently claiming that my War of the graphic APIs was rather biased towards DirectX. Let me assure anyone and everyone that it is certainly not the case. I am supporting both APIs in my engine and let me say this again, “Both APIs are functionally equivalent. It is not the API that determines the performance of a game, but rather the underlying hardware.”

The email further went on to show some in game screen-shots to claim that OpenGL based games looked better than DirectX games. Now, anybody who has worked on a game that uses either APIs knows how much of a folly this is. “It is not the API that determines how a game looks, it is the artist that creates the content and the engine programmers that provide the technology (, like Shaders/Level Builder/Script support) to the artists which determines how the game looks.” Game design also plays an important role. In any case it’s not the API. The mail didn’t have a valid sender so I could not mail him/her with my response. In any case, Dude, you could have just posted a comment and I would have been glad to respond.

No OpenGL is not dying out. However I am sorry to say, OpenGL is falling behind. It is being increasingly abandoned in favor of DirectX. Don’t believe me? OK read this, at least you believe him. I think I made it pretty clear why that was the case in my earlier post. I am not going to outline the same points again.