January 2008

My Time to Dream

I Stand Alone” by Godsmack is here. Used on the ending credits of the “Scorpion King”, and most importantly, in “Prince of Persia: Warrior Within“. This latter would have been the best game I’ve ever played, if I hadn’t been hit with the hammer of Kratos, the God of War!

music

Comments (0)

Permalink

Movie List Update

More than 150 titles added, among them a few really good ones. I’ve decided to put the list somewhere fixed. I don’t know why I posted it to the blog like idiots in the first place. My movie collection contains more than 1150 titles and its size is close to 900GiB!
Oh! Here’s the link.

I postponed the update for so long because I was developing a new set of tools to generate a better database of my movie collection. The code is half finished still, and other commitments have come up in my life. I hope I can get back to it soon.

movie-list

Comments (0)

Permalink

Testing the Syntax High-Lighter

Just installed the WP-Syntax plugin. Let’s see how it works…

 
template <bool Expr>
struct StaticAssert
{
    enum {value = Expr};
};
 
template <>
struct StaticAssert<true>
{
    enum {value = true};
};
 
1
2
3
4
5
6
7
8
9
10
11
12
// Line numbers!
template <bool Expr>
struct StaticAssert
{
    enum {value = Expr};
};
 
template <>
struct StaticAssert<true>
{
    enum {value = true};
};

For future reference, I used the following HTML to put code in a post or comment. You can (and are encouraged to) too!

<pre lang="cpp|html|python|..." line="0|1">
</pre>

Or more aesthetically pleasing:

<pre lang="cpp|html|python|..." line="0|1">
&lt;/pre> <!-- The replace the "&lt;" here with "<". Do you know a way to put a "pre" closing tag inside a "pre"? -->

The supported language names are:
abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp-qt, cpp, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, per, perl, php-brief, php, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80

ignore

Comments (21)

Permalink

عصر ناجوانمردي

Moving essay and true too, over here at Fallosafah.

noteworthy

Comments (0)

Permalink

Sun Microsystems Bought MySQL AB!

I just saw it on slashdot! here’s the announcement. That’s the biggest acquisition news since AMD bought ATI!
Man, what is the world coming to? At least Sun is tolerable. What if Oracle had bought them out?! What would have happened to my favorite DBMS?

noteworthy
sci-tech

Comments (3)

Permalink

Malice or Stupidity

Hanlon’s razor states:

Never attribute to malice that which can be adequately explained by stupidity.

And I agree with this. You see, most of the people I interact with everyday believe that everyone is against them. If the president is out to lunch instead of running the country (all the similarities to real people are coincidental!) or if the pencil-pusher behind the desk in a government office or bank don’t do their job well, or if the taxi driver in the adjacent lane suddenly decides to cut off their path, all of them assume that the said 4th parties are being intentionally and brutally malignant. But in my experience, the answer is probably a lot simpler: it’s stupidity! The main drive of people in their day to day life is not personal gain or evil schemes; it’s stupidity and laziness.
It’s a depressing notion, to think that the world is turning because someone is not thinking or not doing something, but that’s basically true. On a higher level, it’s frightening. But more than fear, it leads to sadness. You cannot do anything for this world. It is doomed. We are doomed. There’s no utopia at the end of the road, except when you take the blue pill.
Maybe that’s why all of the sane people in the world can stay sane; because they know that they have a escape. They can take the blue pill to end the story, to wake up in their bed the following day and live out their lives like nothing is wrong. Most of them can’t however. But there’s an escape for them too: the Reaper’s scythe.
How cruel would it be if there was a life after death, whether it was the day of reckoning, the afterlife, reincarnation, Cylon downloading, anything. Is one lifetime not enough torture and punishment for any sane and sentient being? What if there is? What if we are mere puppets to satisfy the need of a god for cruelty? Would it be worse than being god’s unwanted children? Worse than being stupid mistakes, left unnoticed on a pebble in the sky, results of a random cosmic event? Of course not!
Look where I started and where I was lead to.

  اگر غم را چو آتش دود بودي  
جهان تاريک بودي جاودانه
در اين گيتي سراسر گر بگردي
خردمندي نيابي شادمانه

rants

Comments (2)

Permalink

It’s a Cold and It’s a Broken Hallelujah!

And that’s it. No, wait. This is it.
(NOTE: Updated the URL and removed spaces. If anybody had problems, could you please verify that they are solved?)

music

Comments (4)

Permalink

Coolness in Fiction

(I have three posts to make tonight, so here it goes… I hope none steals attention from the rest.)
I was watching the an episode of the TV series House M.D. tonight. It was the final episode of the second season (”No Reason”.) And it was delicious. Fast, uncompromising (I like this word!) and cruel with an intelligent script. I like it a lot.
Now, I’ve come to like Dr. Greg House’s “character”, because he is so messed up in many ways and yet he has his own world of rules and reason. I’m not here to describe his character or the story. I’m just here to say that his character is cool.
And now, I’m opening this thread for myself (and anyone else interested) to list all the cool characters I see in any work of fiction, movies, books, anything. And the only criteria is “coolness”. That means, Darth Vader gets in, but not Obiwan Kenobi from the prequels (Ben Kenobi from the original trilogy was cool.) It means Rincewind wouldn’t be qualified on the list, because, let’s face it, “I run away, therefore I am!” is not a cool philosophy!

Anyway, I start the list with:

The above is just to start the list going. I can think of at least a dozen more off the top of my head.

entertainment

Comments (8)

Permalink

The Good, the OOXML and the OOXML!

I hate Microsoft. No, let me rephrase that. I hate everything that insults my intelligence, and Microsoft is very high on the list of them. Another thing that I hate is a bad standard. Put these two together, like the case of Microsoft pushing for ISO standardization of OOXML, and I’ll be entering a “Two Minute Hate” period!
I could bore you with all the reasons that I think OOXML is bad, but you can find all those and a few more over here. Specially interesting and possibly beneficial is a petition they’re seeking to prevent the standardization of OOXML.

You can also get these cool banners there!



(Sorry for the GIF. Still waiting for MNG adoption!)

noteworthy
sci-tech

Comments (3)

Permalink

Snowed In

It seems that I’m trapped in Tehran. My flight got canceled today. Good thing that my exams are postponed for a week, or I would have been forced to consider skiing back or at least finding a snowmobile or something!

life

Comments (0)

Permalink

Magic of Snow

How magical is snowfall? Specially in the hands of the playful wind!
How many particles are in that particle system? How detailed is the noise function that generates such coherent, yet chaotic behavior? How fast is the memory bus that allows so much geometry to be processed per frame! And since there are many observers, it can’t be implemented as an image-based effect. All the polygons must be generated, and you can’t reuse the index buffers. Also, alpha rejection is not used, because I saw no jagged edges. And the textures were so detailed. How is it that they don’t run into memory bandwidth issues? And every single billboard is lit and shaded correctly! How many shader pipelines do they have?

rants

Comments (16)

Permalink

Games, Games and Games

Games are interesting, and game programming is even more interesting.

  • No one understands it, in a traditional context. You can tell your family that you are writing navigation software for spy satellites, but not games. If you have moving graphics on your screen, then you are playing games and wasting your time. Note that it’s even a level harder than just playing games which you can (in theory) explain as just passing time (which is quite unsuccessful in practice,) but actually trying to create a game is the most foolish thing anyone can do. Why can’t one stick to more reputable jobs like robbing graves or more successful ones like becoming an alchemist?
  • It’s exciting. Not only you get to create something, but you get to play it too, and other people get to play it. It’s the most complex and advanced form of performing arts: theater, cinema, puppet shows. And it’s interactive, like a stand-up comedy act, but with cooler characters. The most comparable medium is cinema, but computer games put emphasis on technology mostly, while in cinema it’s supposed to be on art.
  • It’s the most misunderstood of the media. No one but a semi-serious gamer understands the lure and pull of games, absolutely no one. It’s not a sport. It’s not education (it’s not, trust me!) It’s not even just for fun, most of the times. It’s not a professional job. It’s not serious. It’s nothing. It’s too complicated most of the time for an outsider (and sometimes for an insider!) to pick up gaming so everyone who’s not played video games as pre-teens or young teenagers is pretty much already out of the loop. There are so many bad games that even if one wants to understand what’s what in games, (s)he may get a totally wrong image.
  • There’s money in it, but not where everybody can see it. I don’t have any numbers now, but I think it was in 2005 or 2006 that the world game industry became bigger than the world movie industry, in terms of financial investments and revenues. The growth of the game industry have always been faster than the movie industry so the distance will become even more drastic over the next years. But people see rock stars and movie stars who live the high life, but no one notices a bunch of game designers, programmers and game-company managers with lots of money.
  • A lot of people want to make games. Every half-decent programmer writes a game at one point or another in her life. Every programmer thinks about writing games. Every 3D artist thinks about it. Every programming company owner thinks about it. Every university student wants to do it.
  • A lot of people fail to make games. We’ve all heard stories of defeat and failures and deadlines that were never met and bankrupt companies or just a group of fiends who tried to make games. If we are lucky enough, we don’t get to experience that first hand.
  • Games require many different people to work with each other in harmony. Managers, graphists, environment designers, writers, 3D modelers, animators, 2D painters, level designers, game designers, mechanical engineers, programmers of many different creeds, directors, actors, sound engineers, producers, and many more have to work together on a project that almost none of them understand fully to make it through. It’s like a movie production, a modern movie with lots of special effects, but with a lot more programmers and a lot less actors. This is a bad thing. Remind me to talk about actors and programmers more later!
  • Games need many different branches of programming to work. A simple database driven program requires database programming, and UI programming, and software engineering. Games require software engineering on steroids (you have to deal with all the artifacts and workflows and dataflows for the rest of the team (artists, designers, etc.) too, to say the least!) database, network, UI, real-time graphics, simulation, math, AI, computing theory, geometry, low-level system programming, sound, concurrent programming on many levels, etc. etc! Almost everything a programmer can think about programming of is either already used in games or will be. Very few programmers can master all this. In fact, very few programmers can master one of these fields.
  • Add to the above the fact that games need to do all of this really fast! Frame-rate and user experience is everything. You can’t afford to get lousy and put some routine in your game engine without understanding its trade-offs and performance and resource usage patterns. In an office application, no one will notice if the performance of your application drops down 50%. But everyone will notice if their game is running at 10 fps instead of 20, or at least they will get headaches if they don’t notice otherwise. High-throughput (bytes per second, frames per second, triangles per frame, texels per frame, instructions per second, cache misses per memory accesses, etc.) and low latency are the keywords. There’s always something per something else that needs to be maximized or minimized or even kept even over time. It’s a hard business. Trust me.
  • All the factors above make games hard, really hard. And they also make them challenging.
  • Academics hate games. They look at them as the useless byproduct of juvenile stupidity. You can’t catch a respectable university professor working on games. Even academic papers that are directly related to games (rendering, network, complexity management, etc.) are all written under an excuse, for another field (image processing, physical simulation, load-balancing servers, etc.) This trend is changing however. It’s becoming better for game programmers in the academic sector.
  • Idiot politicians (or generic idiots) want to use games for education! This is one of the more ridiculous notions a gamer encounters in her life. Who plays games for education? Absolutely no one. Pay attention to my lips people: NO ONE PLAYS GAMES TO BE EDUCATED. If you aim to make educational games, you will make crap that no one will play except yourself, and you will kill your own brain cells in the process. Even the most controversial games have educational messages, but no one plays games to get educated. Why is it so hard for people to really, deeply understand that entertaining people is worthy on its own. And that if you want to educate people, first there must be someone listening to or looking at you in order for you to educate them.
  • There’s no game industry in Iran. We don’t have the supporting sub-industries like motion capture or FMV creation shops, the professional game publishers and the like. We don’t teach game programming in our engineering schools, and we don’t teach game art or game writing in our art and literature schools. We don’t have game companies to train newcomers into professionals for the next generation. And most importantly, we don’t have the legal foundation to support corporate media and software industry, and games are a sub-class of both.
  • Games have the worst possible kind of user-base. They are in every age. They have every imaginable level of computer skill (but they are mostly total lusers.) They have absolutely no training, and there can be none. No one reads game manuals and no one expects to have to. You can’t hold training seminars and classes for games. Users have every kind of hardware imaginable. If you refuse to run on their machine, they won’t upgrade their machine for your software, they will just by another game (unless you are “id Software” or “Epic Games” or “Crytek”.) They will push every button in every possible place during the lifetime of your game. They won’t have any patience with your software. They won’t read the message boxes on screen before clicking on “OK”. They will become frustrated and lose interest after the second glitch.
  • Competition is pretty fierce in among game titles. Games not only have to compete with other games, they also have to compete with other forms of entertainment. Also, other software only have to compete with their own kind. Word processors compete with word processors and disk defragmenters with disk defragmenters. But games compete with all other games almost regardless of their genres. Even platform is sometimes irrelevant to competition.
  • Games always live on the bleeding edge of technology. They have to. Many of the advancements in technology are driven by entertainment money and games are the prevalent form of entertainment. Games have to be on the edge because other games are, and they can’t afford to look “out-dated”. Also, there are always new ideas the designers or programmers or artists want to try that absolutely requires that state-of-the-are CPU or GPU or whatnot.

Those are some the reasons that make game programming interesting.

entertainment
programming
rants

Comments (11)

Permalink