Wednesday, May 28, 2008

Quest of Persia (Lotfali Khan)


I have been following the news around the "Lotfali Khan" game for a while now, it has been on the newspapers and magazines a lot. The game seemed very interesting and something that could reduce the gap between the games developed in Iran and the international games. I saw an ad for the game finally today in the newspaper and ordered it through phone right away. Apparently the developers have decided to publish it themselves via direct sales and not through the classical distribution channels, how effective this decision can be needs more research. It was delivered to our office this afternoon and I felt a sudden rush of excitement. The excitement was due to the fact that finally there was an Iranian game that was rather serious and a try at being a AAA title. We've been experiencing the game development road for around a year and half now and this release from Puya Arts means a lot for us. Everything about it satisfies our curiosity and concerns regarding what we are doing. The first aspect was of course how the game was distributed, then the box. I have to admit that I expected a bit more from the packaging and a simple DVD cover package with one sheet of A4 paper in it was just so minimal. I installed it right away, the whole install process was interesting for me, it needed to install PhysX runtime which is the physics engine that we are trying to use for Soshiant. The installation was smooth and then there was a registration procedure, online code generation, which seems something logical and almost one of the best options for fighting against piracy, although having a call center for providing the codes to users would have helped since relying only on the internet might not be very convenient for all users. Anyway, the registration was smooth too and there started the game. The initial screens and UI was nice, a short cinematic style of animation for providing the back story, which was nice and after that the game play kicked in. The whole style of the game is third person action in the style of prince of persia. Artwork is nice. Now comparing the game with titles such as Prince of Persia might not be the best thing to do right now since the game play, combat, controls, scale and camera are not comparable and the overall performance of the game seems to be low since it lags frame-rate even on moderate graphics cards but considering the fact that this game is the first to leap to this stage from almost no other history, the team had a small experience with another game before, and having in mind how small the development team is and that they have finished a game project completely without major funding reveals how courageous this team is and what a big challenge they have overcome. Nothing but pure love can enable a team to showcase such an achievement. Thank you for bringing Iranian game development to this level Puya Arts and hope to see this industry excel everyday with the help of everybody involved in the field.

I encourage you to purchase this game as soon as you can, it will help you with some history facts too.

The C4 game engine has been used for creating this game.

Sunday, May 25, 2008

Finally

So finally I was able to find something more valuable than the mighty Wikipedia, ladies and gentlemen, introducing Whiskipedia !

Saturday, May 24, 2008

Create since you know you will fade ...

I was referred to a talk recorded from one of the sessions of Professor Hashtroodi recently and I was really shocked by the beauty, intensity, power and overall composition of his talk. Its interesting how people reaching a certain level in any field tend to find the whole concepts of this world and usually converge to similar ideas and beliefs.

A highlight from the talk was the idea that human beings are the only animals that are aware of their death and this awareness is the root of all artistic creations. Creations that are manifestations of the will of human beings to overcome death.

Deep.

Thursday, May 15, 2008

I had a bug!

Trying to attach a physically simulated cloth to the clothes that Soshiant is wearing had me puzzled for a few days with some bugs. Well, the bug was the kind that after finding out what it was, you just wished you thought a bit deeper into the layers of code and it was in fact very easy to find out, except you wouldn't see it from the upper layer. Hmm... well, aren't all software bugs like this? Something happens, we call it a bug since we don't get what we expect and the reason it is really happening is because we do not really understand what is going on underneath. We think we know everything and call it a bug, but it is really us that has the bug and the system is working absolutely perfect. It is doing what it has to do, we expect it to do something else, because we do not know!

In order to find out about these issues with software, you would usually need to uncover the code which is being used by your code to really see what it is doing, and then modify your usage and maybe your expectations. If you see a bug in the lower layer, then you might as well be able to peel that and see what is underneath that layer or API which you are using. This is why programmers only trained in high level languages and advanced IDEs usually have problems finding the problems since they can not do this peeling and looking inside. The tools and high level constructs of the programming language abstract everything away from the developer.

What we see here is the danger of abstraction in fact. We need to use abstraction in order to be able to manage the intellectual needs of software development but any abstraction brings with it expectations. Expectations that might not always be correct or at least be dependent on many complex configurations which are not always obvious at that level of abstraction, hence we expect incorrectly and call it a bug. A car is an abstraction of a reality in which I know some details, it has to move and it needs gas.When my car stops moving because of something breaking in the engine, I look at this fact as a problem and somehow blame the car (source of problem being in an abstract part which I can not see through), but when the car stops due to not having gas (source being in the same abstraction level as I can see), I usually do not blame the car but probably myself since I am very well aware about the reason, but in reality these two are not any different.

It seems like if we are able to comprehend all the details and go deeper and deeper in the logical relationships of the code, then we can find the reason for all the bugs. Will any bugs remain? What about hardware bugs?How far can we go? Low level code, assembly instructions, machine code, hardware behavior due to physical properties, molecules, atoms .... are there any real bugs in the world? Can we relate this topic to determinism and indeterminism? If the world is deterministic then can we say there are no real bugs ever? In the story "Beyond" from the Animatrix series, there was a bug in the world, but it really had a reason in another lower level layer.

What about generalizing this concept from computer software to real life, are there any problems in the world? Or do we call some things a problem because we expect something else to happen and it doesn't happen because it should not happen and our assumption was false due to the context of the problem. If you find the reason to a software bug, you fix it and don't call it a bug anymore, can we do this with life? Can we find the reason for things we call problems or troubles and somehow be able to fix them and not call them problems anymore? Do we get really frustrated when we don't get what we expect? What "WE EXPECT!". Maybe we expect wrong. The Cynic philosophy is a bit related to this view and it all falls in the domain of epistemology. In mathematical terms, our operations should not have closure, since we need to be able to understand from a different set (layer) or in fact enter the meta-layer, or deductive closure in logic.

The above discussion can have some psychological conclusions also. People get sad when faced with problems, but knowing about the causes of the problems might be able to eliminate this sadness, either by changing something so that the problem does not happen or by changing our expectations. Can we conclude that knowledge will provide the foundation for a happier man? This is opposite to the belief that more knowledge brings more suffering which I am very much against.

Wishes

I wish people would dream ... I wish people would believe in the impossible ... I wish people would have the courage to try the unorthodox ... I wish people would follow what they feel ... I wish people would see their imaginations first ... I wish people would sense the moment ... I wish people would create ... I wish people would live ... I wish people would shine ... I wish people would fly ... I wish people would dream ...

Wake us up

Richard Linklater is a fantastic director. I was first amazed by "Waking Life" a few years back and then "Tape","Before Sunset", "A scanner darkly" and very recently "Before Sunrise", which is an old movie now actually. There are some serious questions about life discussed in all these movies. They are all very direct by the way with wonderful dialogs.

A director that walks the lines that are seldom touched by this art form usually.

Tuesday, May 13, 2008

Gadget Time


Going to the gym has always been a a fantastic experience except for one aspect, and that is the music played in there. I started by working out at home where I could select my music and everything was great, then there was the era of gyms with only the sound of people exhaling hard and iron hitting iron, then there were gyms with very light and slow music, followed by the gym at USC playing mostly hip hop and rap ( I hate RAP!, actually I used to like some rap in the nineties but nothing now), we would occasionally switch the radio to a local classic rock channel to witness it switched back to rap in less than 15 seconds. After that, the gym close to my work played rhythm and blues mostly :)... back to the old gym these days with lots of techno and trance!... probably brings the groove on for some of the machos around .... Overall these are the type of music that you have to try to not listen and ignore while you're trying to lift the weights, this fact itself is a big exercise and needs more concentration.

I've been able to overcome this problem very recently by purchasing one of these "Superb Design" products from Apple. It being very small, light and minimal is ideal for the place. It has turned out very well and transformed the gym experience into what it has to be. Nothing could help you on the bench more than Tom Araya expressing himself seriously.

By the way these Apple products really take the idea of design to the next level.
Design, this magical word which needs to be explored a lot more. Have a look at this book "The Design of Everyday Things" if you feel you need to explore more.

Friday, May 09, 2008

Multiple Dispatch

Specifying collision detection logic for scenarios in games that have an inheritance hierarchy for game objects will usually lead to a code for handling the collision event. In this case, if the code happens to be polymorphic, then we will encounter code that will look something like "gameObjectA->handleCollision(gameObjectB)". The two game objects are probably just base class pointers to sub class objects and we usually need different handling code for when different object types collide. An arrow hitting an enemy needs different handling than the arrow hitting a tree.

Now in a single dispatch language such as C++, the above code will have trouble finding out how exactly to handle the event since different handlers can not be selected at run time based on the real type of gameObjectB. ( Assuming we have handleCollision(Tree*) and handleCollision(Enemy*) for the Arrow object). Dynamic binding only works using one parameter and in c++ that would mean using virtual methods. At least the double dispatch mechanism is needed for the collision case.

However one technique which can be used for the above scenario and would help out a little is the use of the visitor pattern.

Stroustrup and some of his students are working on an interesting project to add multiple dispatch functionality to the c++ compiler. The paper can be found here. Would be nice to see this feature in standard c++ someday.

On the peak of Power!



We were able to clear God of War 1 with the help of our great tools coder, Faham. The ending reminded me of the ending in the movie "God Father 1". Maybe all movies or games with "God" in them should end like this :).

Kratos is offered to be the actual "God of War" and sits on his throne. Michael Corleone is also offered to be the "God Father" and sits on his chair (throne). They both sit there, alone, with the same gesture and get drowned in deep thinking. I am sure they both have the same thoughts at those moments, thoughts that will be generated in the mind knowing you possess the ultimate power. Well if we observe the results, it is clear that they both engage in the same types of actions after that, God of War 2 and God Father 2. Beautiful.


The next time you saw a man sitting alone on a chair like that, beware of the consequences.

Thursday, May 08, 2008

Ultimate Entertainment

Pro wrestling. People watch pro wrestling... although they know it is mostly a show and there isn't almost any real competition in it. Competition... hmm... which one do people prefer, watching a show or watching a competition? It appears that the activities that are moving in between the lines of being a show or being reality, cause the most interest among people. Pro wrestling is more fun to watch than normal wrestling.. but probably still more fun than a movie about pro wrestling... people do not want to watch real talks between people a lot, and certainly would not enjoy watching a movie about normal affairs between normal people, but look at the audience of the Jerry Springer show ... Jerry .. Jerry... what does that mean??? "Thank you for providing an atmosphere for fooling me... Jerry !!" ... or yet the reality shows in the TV can be compared to normal scripted serials or game shows.... they definitely beat both of them ... something is secretly happening in the borders between reality and pure scripted show.

Maybe when we know something is a pure show... then the conscious part of our brain ignores it every once in a while and the part which enjoys viewing beautiful things can't get all the fun ... but when something pretends to be real, for a few moments the conscious part does not interfere and lets the other part have fun.

Some insights into the above paradox (if it really is a paradox) can be found in this quote from the movie Presige:

"Every great magic trick consists of three parts or acts. The first part is called "The Pledge". The magician shows you something ordinary: a deck of cards, a bird or a man. He shows you this object. Perhaps he asks you to inspect it to see if it is indeed real, unaltered, normal. But of course... it probably isn't. The second act is called "The Turn". The magician takes the ordinary something and makes it do something extraordinary. Now you're looking for the secret... but you won't find it, because of course you're not really looking. You don't really want to know. You want to be fooled. But you wouldn't clap yet. Because making something disappear isn't enough; you have to bring it back. That's why every magic trick has a third act, the hardest part, the part we call "The Prestige""

Monday, May 05, 2008

Do you look at your watch while at work?

People spend more than 50 percent of their lives at the work environment and if you take out the times that people are watching TV out (since that is mesmerized time and doesn't really count), then maybe more than 85 percent of the lives is spent at the work environment. This is huge. How do people feel in this 85 percent? Are they having fun? Are they happy? Can it be fun? Do we plan a lot and decide using enough information for finding the jobs and following the professional careers? Graham has a great essay on the topic?

It would've been great if there were mechanisms in school to find out the type of activities suitable for each individual and also let them experience the flavor for different kind of jobs. We need new techniques in academia related to hooking up people to job types. In fact the world will be a much much better place if the right people are placed in the right places.

Another interesting writing from Graham regarding the differences between working in large sized companies and small companies here.

Thursday, May 01, 2008

Expertise

A few good experts have been around lately and I've witnessed the beauty which lies in expertise quite delightfully. Experts are usually breaking the symmetry in different phenomena and move towards the edges in an axis, oh and this selection of actions from that part of the state space does generate aesthetics. These are the souls that make things happen, the rest are just dancing (or danced by) the waves...