Archive for the ‘noteworthy’ Category.
C++11?
The C++0x standard has been approved by ISO/IEC. This probably means that we’re going to be calling this iteration of the language C++11.
It amazes me how much of the language and the standard library people don’t use already. And I mean the C++98 stuff that has been around for 13 fracking years! True, there are professional developers that decide to use a specific subset of the language, or in some situations some design decisions are “inherited” by programmers working on an existing body of code… but I’m not bitching about them (much!) I’m talking about programmers and their new projects and sample code. New programmers (usually university or high school students) don’t learn about most of C++ because their teachers don’t know them and that almost all programming books on C++ suck (sometimes, it’s not the author’s fault; C++ is just too vast and complex.) More “experienced” programmers usually learn about a subset of the language and form a “comfort zone” and stay in there; because anything out of that zone will upset them. The bad thing is that this C++ comfort zone is – more often than not – way too small.
It might (or might not) include good polymorphism and class hierarchies (which I don’t like, incidentally) but almost always it does not include any meaningful use of generic programming, higher order and (some vestiges of) functional programming, attention to memory and layout (I believe many non-trivial programs have ran or are running into address-space limitations as we speak,) exception-safe and exception-correct programming, development of domain-specific mini-languages, real scalability and thread-correctness, etc.
Of course, everybody is free to program the way they want or can. I’m not the one to judge. All I’m saying is that even in the single language we use, there is much that we don’t take advantage of (let alone using other languages that might be more suitable for a job.)
Now, enters a new and feature-rich standard of C++ into an already starved expertise pool. There are so many real features and improvements in this iteration of the standard that they could overwhelm at the first glance. There is (just off the top of my head) r-value references and perfect forwarding, lambdas, variadic templates, compile-time constant expressions, user-defined literals, better enumerations, typedefing templates, initializer lists, better control over inherited methods, better control over compiler-generated class methods, finally some semblance of class- and method-specific directives (alignment, etc.,) extern templates, forwarding constructors, initializing class data members upon declaration, auto and decltype keywords for type inference and whatnot, (oh, I almost forgot!) the cool and hip new way of declaring the return type of a function, and much more.
The above features are just the ones that I could recall right now and in the core language only. I need and want to use these features, additions and improvements right now. They all make my code better and my life easier. These are not some obscure features for practitioners of “black magic”. They benefit the likes of you and I, not language lawyers, but people with real applications and real problems.
I guess what I’m saying is that as a C++ programmer, you should not be afraid of experimenting with the new features today. Don’t wait for the books or libraries and frameworks to pick them up. Books will take years and they will be all wrong and useless anyways (of course, with a couple of stellar exceptions.) Again, only with a few exceptions, libraries and frameworks will be burdened with incompetence, corporate politics, backward and forward compatibility and compiler compatibility (with the most brain-dead compilers. Please don’t rely on Qt or wxWidgets or whatever to do your C++ for you. Please don’t wait for Deitel and Deitel to teach you C++.
Start with Wikipedia. Read various texts and tutorials and overviews that uncle Google finds for you. Start experimenting and teaching yourselves the new features of C++11; and any of the old feature-set that you might be rusty about. It’s a great time for C++, as it is now a better language than it ever was. It’s probably the best general purpose programming language out there for people with actual hardware limitations on their applications. And it can do practically everything. (Also, C++ supports the widest range and mixture of programming paradigms of any programming language that I know of.)
Notes: I have three points to add to the above rant.
First is about the advancements in the standard library. They are much more substantial and accessible for the lazy programmer (I don’t use the term “lazy programmer” as a negative phrase!) as most of the additions are already available with the most popular compilers, or even in Boost if your compiler doesn’t have them yet or if you don’t like your compiler vendor’s standard library! I’m much less enthusiastic about the new C++ standard library features simply because most of them have been available as part of Boost for years and therefore are hardly new. Still exciting, though!
Second. No compiler that I work with has support for all or even most of the new core language features, although GCC is close (not to “all”, but it is close to “much”.) The state of support in Microsoft’s Visual C++ is closer to pathetic. Intel C++’s condition is not much better either. A partial table of the state of support for various new features of the language across quite a few compilers can be found here. Right now, I (and probably everyone else) would suggest using GCC. Get your hands on 4.7 if you can, or use 4.6 or even 4.5. Good luck!
It seems that I’ve forgotten my third note! Maybe it’d come to me later.
Garshasp on Steam!
By the prickling of my thumbs
Something wicked this way comes…
Garshasp is up on Steam and Gamers’ Gate, and it will be available for purchase shortly. This is a huge step for us, specially if we are received well.
I am now praying to all the gods I don’t believe in to make it so (witness the vanity and weakness of man!)
Akindled
Well, it’s obvious, is it not? I got a Kindle (latest generation, i.e. three, 6″, graphite and no 3G) and the huge thanks for it goes to my brother Ehsan, because I absolutely love it!
Oh, and I named it “Rand.” What else was I going to name it, “Kevin”?! The reason for this name should be obvious to anyone who has read the first few books of the Wheel of Time. Also, I thought after a few female names for my gadgets and toys (Fenchurch for my iPod, Metis for my phone, Eros for my PSP, Jane for one of my portable disks) it was time for a male character to be in this dramatis personae.
Now to the Kindle itself. It’s clean, cool and chic. It’s very light and thin too. There are some things to be desired, like a more controllable music playback or generic notes, but in my opinion they just distract from this device’s one true raison d’etre: to read books on. And it does that splendidly! The built-in browser is surprisingly capable. It is based on Webkit, but the size and nature of the device and the keyboard make it less usable than one might hope. Did I mention that the display of text is practically like real print?!
By the way, it should be obvious that I’m writing these on Rand.
Garshasp’s Release Day
Tonight at midnight is Garshasp’s official release day. Finally! After many delays, tomorrow people can supposedly buy Garshasp at retail stores all over Iran.
The reason that I say “supposedly” is because that our distributor, a company named Lohe Zarrin e Nikan (I won’t even bother to link to their website) is a bunch of idiots who have done their best to disrupt the release and demean Garshasp. They have postponed the release date with no apparent reason for more than two weeks (not to mention their previous blunders and postpones for a couple of months,) they missed a huge (by Iranian standards) public game show, they rejected our designed retail packaging, they have used their own idiotic artwork for promotional material (which not only have nothing to do with Garshasp, but are also so very hideous.) Oh, and they have printed on the package that all rights of Garshasp are reserved for them! I must add that none of the above is permitted by the terms of the distribution contract we have with them!
Tonight is the culmination of years of our lives, and instead of partying and drinking and stuff, everyone has already gone home. No one even mentioned the release, as if we have all given up hope about this event being of any note and importance.
Tonight Garshasp is released, and not even we care. How’s that for a sad state of affairs?
Sorrrrrrrrrrry State of Video?
I don’t know if I’ve written about the sorry status of digital video (in web sites and other places) before or not (I think I have, but it’s almost 11AM and I haven’t slept yet, so forgive me if I’m misremembering!)
Anyways, the state of things up to a few months back was that we had quite good standards for WORM media distribution (Blurays and whatnot) but who actually uses those anymore?! If you wanted to rip video and archive them, you had a few choices.
You could go with MPEG4 (Xvid) and MP3 or AC3 inside AVI, to get the best compatibility (noob-owned PCs, standalone video players, etc.) but Xvid is not the most advanced technology these days and AVI is plain obsolete; not to mention the fact that support for AVI and said codecs is very limited on handheld and portable devices.
You could pick stupid and unwieldy containers like MP4, which might or might not be playable on this or that device. You could throw all your data down a bottomless well of Microsoft’s (or another corporation’s) fancy sounding but virtually unusable formats (codecs and containers) which I won’t even mention here.
You could go with cool and quite free containers like MKV (or OGG) which are (currently) only playable on PCs (with non-noob owners!) This fact is really sad, because and MKV file with x264 and AC3 is a mighty force to be reckoned with, for storing all kinds of video, from small to UD (Ultra Definition, whenever that in invented and becomes trendy!)
On the web, the situation is quite simpler and more equal. Everybody were being fucked by Adobe Flash (and still are.) With occasional fingers thrust in by Windows Media and Apple Quicktime. All these have their own codecs (or variations of codecs) and all are proprietary. (If I had gods, I would thank them for making RealMedia defunct!)
But HTML5 has its own audio and video support, and HTML5 is being picked up by virtually every browser maker (yes, even Microsoft, but I can’t imagine why anybody still uses their piece of shit, except to download Firefox or Opera or Chrome or SeaMonkey or Safari. The really cool guys don’t even do that and FTP down the usable browsers directly!) The problem with HTML5 standard is that it doesn’t (didn’t?) mandate the container format and codecs (video or audio) that should be used! Obviously, this is not good for anybody. Of course, the situation could have been worse if the standard had specified a patent-laden or proprietary format, but still this under-specification means Morphy’s Law applies and web-developers and web site administrators get fucked even more than usual. Not to mention lusers.
A viable option for free audio and video was (and always is) of course Vorbis and Theora, and I quite like them, but people might argue that they (specially Theora) are not state-of-the-art codecs (not out-dated though, just not quite on the bleeding edge.)
Anyways, a few months back Google bought a company named On2 which held (presumably and hopefully) all the patents for a video codec (format) named VP8. At the time many people (including me) speculated and hoped that Google would put the patents in public domain (or whatever the term is that means make the use of the technology available to everyone, everywhere without charge and limitations for all time.) A couple of months back Google did the exact same thing and the WebM project was born. It’s defines a container format that hosts VP8 video and Vorbis audio, with no applicable patents in private control and liberal opensource-compatible licenses on all the software and libraries. Already most relevant browser makers have declared support for WebM (Mozilla, Opera, Google (obviously) and I think even Microsoft (but these days they just have to do anything the leaders of industry do, because they are not part of them anymore!)) and there are 3rd-party implementations of it. In short, I think the state of video on the web is starting to look good.
(This post has no links and it needs 100. I apologize for the inconvenience of having to copy+paste.)
An ABSOLUTELY Unmissable Talk on Modern Hardware
Iff[sic] you are a programmer, if you don’t do anything else even if you don’t eat and even if you don’t shower, please please please please please watch this presentation.
The presenter is Dr. Cliff Click, and the topic is an in-depth view of modern code execution architecture. The talk is from 2009, and it has been on my to{do} list for almost 6 months. It is the best thing I have seen in the last year (and I played God of War III!) if not in many years. The guy is obviously very knowledgeable and he talks extremely fast, which just means that he packs an incredible amount of invaluable information into this 50+ minute talk.
I can’t stress this enough. Take an hour to watch this. Please! If you are a game developer, or any programmer with a conscience, you have to watch it right now! I’m not kidding here. Watch this through.
On an ego-boosting note, I just watched this talk and I already knew almost all of it (I have to brush up on the newer cache-coherency protocols though; those have also been on my to{do} list for some time now!) It did have some eye-opening “Aha!” moments for me. I may write about them later.
What are you doing still reading my shithead rant?! GO WATCH THIS!Cliff Click’s Crash Course in Modern Hardware (hosted locally.)
A New Blog of Note!
I found this person who was looking for a place to put up a blog. I gave that person space and here is the result. In my opinion, it is definitely worth a read. It contains mostly scraps of fiction with a theme of fantasy, some dark poetry and the like.
You know how the world is for a new blogger! Go and have a look, and leave a comment or two even if it is a one liner. Encourage the blogger if you like it at all.
“3D Modeling for Games” Educational Challenge
Fanafzar Game Studios, the company I work for and the makers of Garshasp with the help of CGArt.ir society and several notable others are orchestrating a 3D modeling competition for aspiring and experienced game artists. You can read every thing about it over here.
The reason’s for holding such an event is at least three-fold. First is to show how many talented artist live and work in Iran. Second is to get them into a challenge that will benefit all of them as they work towards a common goal with each other. The third one is to find a few really talented and driven modelers and persuade them to come and work with us on our upcoming projects!
Oh, I forgot to say that the first prize is a PS3 bundled with Uncharted 2: Among Thieves! (I wish I was a 3D artist! No one gives such prizes to game programmers!)
So, even if you are not interested yourselves, please spread the word around.
A Lesson in “Test” Attitude
Back in the old days of the net, even before I was born, people did implement TCP/IP stacks. And since there weren’t much of a solid and standard specification (not to mentions decades of engineering experience in implementation and maintenance of network stacks,) these implementations tended to be buggy, unstable and non-conforming. To test these various TCP/IP implementations (such as they were,) people used to come together and just test them against each other and compare their functions. These sessions and discussions and reviews were called “TCP and IP bake offs”. It has been said that as a result of these discussions, the specifications were as likely to change as the implementations!
These dudes pretty much built the whole frakking Internet without the bureaucracy and the 3000-page conformance guidelines and the 2-million line test suit or the 12 years worth of committee meetings. Their procedures, and much more importantly their attitudes is quite concisely demonstrated in RFC 1025.
National Computer Games Conference
Sharif University is holding a two-day conference on games and game development. We (the guys at Fanafzar) are going to attend and some of us are going to have presentations and panels. There are also other interesting talks, mostly on the lighter side of technical issues. Here’s the web page for the conference, and here’s the pre-registration page (but I think you need to actually show up there on the first morning to register.)
The conference will be held on Esfand 19th and 20th (March 10th and 11th) somewhere inside SUT campus (yes, that’s tomorrow!)
My talk’s title is “Planning for Debugging Day” and in it I will present some thoughts and topics you should ponder and consider at the beginning of a game project to have less problems later on in the cycle when debugging, adding features, releasing, etc.