Archive for June, 2008
Yes, the Windows XP OS is dead. Today is the last day the OS will be officially shipped by Microsoft and I can’t help but feel a tad bit sad that the OS has been finally put down. I have used the OS for a long time, too long I must say and it did the job pretty well. I hate to see it go like this, especially when it is at the top of the table and probably giving it’s younger flashier brother a run for it’s money. But like all things good, this too must come to an end and balance must be restored. It’s a pity the way things panned out and though there have been rumors that the OS might have one last gasp of breath left and somehow the “cruel” echelons of power at Microsoft will indeed put the aging OS on a ventilator, those are just that, rumors.
While the OS will remain an integral part of my desktop for some more time, it seems the time has come near to say a·dieu to XP after all. Lets see what really ends up taking it’s place, for the time Xubuntu seems to be the most likely contender, but you never can tell.
There are some flawed assumptions about Windows vs Linux debate and one of them is, “It’s easier to install applications on Windows than it is on a Linux distro”. A few weeks back I was attending a seminar on some rather uninteresting technical presentations. That’s besides the point, what really is the point is, in one presentations the speaker actually stresses on the fact that Linux is difficult for mass adoption because it is very awkward for a new user to install applications on Linux. That’s laughable, because it’s clear the speaker has not done his homework nor has he any experience with any modern Liunx distro. This archaic argument has it’s roots at the time when you had to compile almost everything under Linux to get it to work. Although *NIX veterans may still do the same, for most of us times have changed. On the contrary I have to argue otherwise. Installation on Linux is slowly becoming easier, in fact in some cases it’s almost trivial. Unfortunately the presentation did not offer a Q&A session (strange I know), else I had some “really good questions” for that particular speaker. Anyways, I have my blog to rant about them .
After using Ubuntu for about 9 months now, I have grown to be extremely fond of the Synaptic package manager. While there are other package managers under other distros, (and I don’t want to belittle any of those) what would really be interesting to see is something similar on other operating systems, maybe Windows too. For those who have little clue as to what Synaptic does, and for the windows (only) users; Synaptic is Add/Remove Windows feature on steroids. It takes a step further in installation features and combines some very crucial functionality that is not present in the normal Add/Remove. Contrary to what was said and is popularly believed, Synaptic is so much more than a simple add/remove. It manages download, setup and a full install of an application including the automatic setting up of dependencies of an application or a library with a click of a button. It’s almost a no brainer. All available applications are listed and categorized on distro servers and you can use synaptic to query and search them as required.
One of the greatest strength of Synaptic is probably the categories and filters it allows on installed and installable packages. It allows the user to browse through all packages in a particular category, thus enabling him to see a variety of similar or related packages, before he decides to install or remove a particular application or library. To a veteran debian and/or Ubuntu user this may seem trivial, but it is not. When you consider other platforms like windows where such facility is unavailable, hunting down applications often means a trip to Google. Now there is nothing wrong with that. However very rarely does Google results throw up exactly what is required, unless of course you are an “absolute nerd” at search-engine queries or, you are extremely lucky. Often times it’s through a lot of query refinement do you get down to results you require. Queries like “comparison of paint applications”, “best photo editing software”, “list of best mp3 players” are all to common. This however doesn’t always give you what you are looking for and may not provide you with the best possible alternative out there. For example, a query “best photo editing software” returns link to reviews, and it’s only after some refinement do you really get to software download. Under Synaptic, it’s just a matter of simple search. I did a “C++ IDE” search under synaptic and it returned me a list of IDEs available in a snap. Everything from Code::Blocks, Eclipse, Anjuta were listed. All I had to do was right-click install on the one I wanted and Synaptic took care of all the dependencies and every other headache.
Synaptic is interesting but like most problems with Linux, it is distro specific. You will find Synaptic on most Debian based distros. Ubuntu takes it a step further and also features an interactive separate Add/Remove feature where the user can browse entire categories of applications with a brief explanation on each of them. (I am not too sure if other distros support Synaptic or how far it will work with other packaging systems like yum and others). However there is an interesting project in the works called PackageKit. While it looks very much like Ubuntu’s Add/Remove feature it also works on other distros, and infact works towards “providing a common set of abstractions that can be used by standard GUI and text mode package managers”.
There are a lot of software applications out there. So many in fact that you would probably miss out on most of them. You would never know they existed because you never go out and look for them and even if you did, you would probably miss out on most. Which is exactly why applications like Synaptic and PakageKit go a long way in advertising these apps. I would say that such functionality is probably an feather in the cap of distros like Ubuntu and Debian. It actually expands the distros by giving them a reach beyond a normal CD/DVD install and frees the user from the shackles of “using only what the OS provides”.
Ah for the last 4 days I have been using Opera, and that’s after a pretty long time. I must admit, for the past 5 years I have been been a loyal Firefox fan. There was a time when Opera used to be my browser of choice, but somehow Firefox managed to squeeze it for the number one position. However the recent hype of Opera 9.5 was just enough to pep my interest in the browser once again. I decided to give the browser a try and found Opera to be surprisingly good. The interface is more streamlined and the browser gives a lot of screen real-estate to work with. No doubt other people have also mentioned the very same points.
Firefox 3 was also released about 2 days back so one can’t help but compare the two. Actually I have been using Firefox 3 betas for the past couple of months so the final release did very little to add to what I was already using. True to it’s tradition Firefox 3 has been an excellent release, at least for me. Firefox 3 also boasted of considerable features that were added in this release, and I must say it does deliver on them. Oh yes, and if not less, there was an equally amount of hype surrounding Firefox 3 release.
So what’s the truth? Which browser is better? There are things both browsers have and don’t have. I would have loved to have a seed dial for Firefox by default. I know there is a plug-in for that, but it’s such a nice feature to have. On it’s part, Opera should have something like NoScript (by default). That thing has saved me countless times before. Then again Opera’s Dragon Fly is equally impressive. Firefox also has a lot more plug-ins and using Opera just makes me miss all of them. I am not too big on themes, so it doesn’t bother me one way or the other. Apart for these and other small things, most of the hype created around the release of both browsers is largely unwarranted. None of the two browsers bring in revolutionary changes, and none of the browsers are deficient in any particular area.
For me the most important point for adopting any application and particularly applications that I tend to use on a daily basis, is “productivity”. It’s “how fast can I adapt” or “how fast I can get things done”. It’s more about “how much do they nag” and “how annoying things are while using them”. That’s why I generally take a considerable amount of time in deciding whether an application is worth the effort to switch to and/or adapt to. Browsers absolutely fall in that category.
I guess most of the people who surf the net, of-course myself including, are similarly fanatical about the choice of browsers. While Opera is going to stay on my box for some more time, Firefox retains the numero uno position as far as I am concerned. Not because it is revolutionary or because it is the best. It’s because, well, I am simply used to it!
OK I have been silent on the blog for some time know. I know I know, but there were some pressing issues that needed 200% involvement both on the game and on some other issues as well. So it has been an unusually quite two weeks. Actually I have a list of posts that I am through half-way and haven’t been able to finish them and/or polish them up for final release. I hope the next few weeks won’t be this quite since I see an easing up of the work from now on. Also the game is mostly there. Even though beta testing continues, no breaking bugs have been reported thus far.
It’s a fact that C++ has been the most successful and probably the most widely used programming language till date in the gaming industry. Even if you were to look at the software industry as a whole, a near countless software projects owe their existence to the language and probably many more will eventually be made using C++. Universities around the world still churn out thousands of CS grads with C++ knowledge and there will be no shortage of programmers who know C++, at least for some time to come. So why is C++ so popular? The reasons may be many (, I am sure there are other near infinite blogs which touch on this,) but at the end of the day it just boils down to the simple fact, “it gets the job done”! While it made good business sense to employ C++ (some years ago), it doesn’t make all that much sense when we consider scalability looking into the future. C++ in it’s current form is — well, simply inadequate. Most people will agree with me that C++ has probably outlived it’s time, and it was time the programming community as a whole moved away from the language. Easier said than done though, but the question to ask is, what real options do we have which provide radical new changes to the way C++ operates? Very few approaches I would say. Before you raise your hand and give out the name of <insert your favourite language here>, let’s look at some of the challenges facing future game development and/or rather future software development as a whole.
Lets first look at the C++ language itself. It’s well known that C++ has it’s faults. It’s not an easy language to learn and an even more difficult language to master (, compared to other languages). It takes a substantial amount of time and experience to understand the intricacies of the language and takes even more time and effort to fully grasp the quirks and subtleties involved in software creation using C++. Typically it takes quite a lot of time before an average programmer can become truly productive with C++. The learning curve for the language is high and not for the faint hearted. Besides this the language has increasing come under flak for allowing seemingly undefined behavior without complaining too much. The language does very little to deter flawed assumptions regarding some (very) basic constructs that contradict how things actually work. Even with proper planning, strict development cycles and stringent coding practises, software development using C++ is difficult. Memory management is a bane and can cause unexpected and unwarranted catastrophes which are known all too well in the industry.
There are a growing number of languages that address the shortcomings of C++. Be it Java, C#, Python or most new(er) languages, all try to fill in the gaps left out in C++. As a matter of fact most languages do a good job at it. However with all it’s faults, C++ still stands out as a viable game development choice. That’s because of 2 primary reasons; a) it has vastly more libraries, code dumps (, I am talking about game development only), engines, examples and everything really, that it simply wins over the argument right there. True many libraries have bindings to other languages, but most of them seem rather inadequate or poorly maintained. Besides there are a lot more examples on cutting edge technologies (,especially graphics) written in C++ than there are in all other languages put together. and b) It’s easier to get programmers for C++ than any other programming language, Java being the exception. Things are changing though and there are some concerted efforts being made to promote other languages and platforms (XNA, PyGame) as viable game development alternatives. However all those remain some distance away from challenging C++ for the number one position.
The above mentioned points in support of C++ are non trivial. They go a long way in weighing out the demerits of building a game using the language. So the question really is, do we really have any viable options beyond C++? The answer is somewhere in between a complete YES and a total NO. As we stand today the best scenario is probably building the core engine using C++ and then having a scripting system on top of it. Be it Lua, Squirrel, Python, or whatever. That way you can always find a middle ground between having to reuse existing code and at the same time allow rapid development and prototyping capabilities. Many engines/games take this route and there is little doubt that such a process proves to be advantageous in the game building process. There are already a lot of games out there that use scripting language for rapid prototyping and in some cases building large sections of the game. Having a scripting language on top of the engine core is clearly a step in the right direction.
Scripting languages solve but some of the problems. They do a part of the job and they do it pretty well. However, there are issues related to game development which require newer and more radical approaches. The challenge facing game development in the future is building an engine which can effectively and efficiently use parallel programming/computing techniques (Invasion of the multi-core machines). Current generation programming techniques fall short of addressing the issue effectively. More importantly most newer approaches to effectively address multi-core problem are just way too complicated to be implemented effectively in C++. Efforts are on to find radical new solutions (C++ STM), but thus far they look good only on paper and still seem too cryptic to be put in production use. The issue of effectively using multiple cores of a CPU will probably be the biggest challenge for the next generation engine designer. The more natural choice for addressing the multi-core and parallel programming issue is the the use of functional programming languages. Since functional programming approaches are typically side effects free, parallelizing functional programming code is easier than imperative programming. However mixing functional and imperative styles can be an equally daunting task. As my argument in the above paragraphs suggest, there will still be a lot of code in C++ that will need, someway, of interacting with any functional language that may be used.
It’s debatable if going “strictly functional” will solve all the challenges the future will throw at us. A more plausible scenario would be to have specific portions of the engine/game parallelized either by using a functional language or by having a subsystem level parallelism. This obviously would allow existing (C/C++) code to be reused, however there are still challenges to overcome even with such approaches. Sub-system parallelism means having each subsystem (physics, renderer, logic, AI, sound, network…) run in a separate thread/s. This however is a very optimistic approach since sub-systems tend to overlap and in some cases critically depend on each other. Such a system could be achived with existing code also, however I remain very skeptical whether such an approach will actually work on the ground. Another approach is to have job based parallelism. Divide your most CPU intensive tasks into jobs and then have a kernel system to marshal them based on priority. This is something similar to what an OS does and seems the best way to shoot for parallelism with existing mechanisms. This approach however requires you to split your design into a job based approach and that could prove challenging. Having a functional language as a script system (on top of a C/C++ based engine) is another idea to think about. I am not really sure how helpful this would be and can’t really comment on this (, since I myself haven’t tried such a radical approach, maybe I ought to give it a shot). But it seems very much possible to have a functional language as a scripting system, and could in theory be used to parallelize sections of the game/engine.
So it would seem C++ might just survive in the game engine of tomorrow, although in a less prominent form compared to it’s position today. It may happen that over the years C++ may eventually fade out, however it’s part can’t be total ruled out. Transition from C++ to any other language will be slow and may be tumultuous, with teams opting for a hybrid approach than just downright building existing functionality from scratch. As new technologies progress and CPUs with 100s of cores start being commonplace, we sould see the popularity of C++ waning and been replaced by some other (maybe functional) language. As time progresses C++ might well become increasingly irrelevant as more and more libraries get promoted to newer and more modern languages or newer more efficient ones take their place.