Skip to main content.
October 30th, 2005

Italian Pyshco

Recently I watched the movie American Pyscho. I liked it among other things, because it was set in the 80s. Very nice soundtrack 8) although the setting was not too convincing. It didn’t look naturally 80ish. Everything was so neat and clean, which reflects the main character, but doesn’t give the 80s feeling, with its pink-candy look. Still, who cares, it’s not a documentary.
I mention the movie only now, because today I had my 5 minutes of “psycho”. One works every single day, comes back home at night, struggles to find the time to even do the laundry, works on his birthday, always say yes, yes (hai !). Then works 40 hours towards the end.. only to be awaken the next day “where are you ?”, “what what I’m.. was I supposed to work ?”, “no but there is a bug, come at 1PM”.
Then I pick up and go to work, to see what’s this bug about, only to find out there is no single real bug, but rather a need to apport several consistent changes. I get into the office hoping to get out soon but I realize that I’m going to work into the night, again !
I tried my best, but eventually I snapped, walked off some sort of meeting and went to cope with a sudden attack of rage !
I very much prefer the Japanese work environment, because everyone is so kind to each other, but at the same time, one can only take so much, and eventually snaps losing control. It’s something that scares me. When a person regrets to the animal stage anything could happen.
Ten minutes later I was at my desk silently working on the code (hai, hai !).

Of course, as usual, not all bad things come to do bad. All this hard work has reminded me that there is still quite a bit of personal work that I have to do to gain my freedom. Also reminded me that I do need to work towards this freedom.. by freedom, I mean to reach the point where I don’t need to find myself in very limiting conditions where I’m constantly told what and how to do it.

Woo !!

P.S.
 ”A signo’, io me vado a fa du orette de sonno !”
 ”Sto lavoro non e’ n’lavoro, e na galera !!”

 From the movie Bianco Rosso e Verdone. Where a truck driver (the magnificent Mario Brega) says that his job is like a jail and he’s going for a two hours nap 8)

Posted by Davide Pasca as Uncategorized at 2:37 AM EST

No Comments »

October 29th, 2005

The longest stretch

Thursday morning I left my apartment late for work. I got in the office by 11:20 AM. Trying to be well rested because I knew that I was going to have a night of last minute fixes.. as it was the last major milestone for the project.
It turned out to be a bit more tiring than expected. The team basically worked 40 hours straight. Pretty painful to stitch together pieces of horrible code with duct tape.. cheap cheap tricks, globals everywhere, special cases, hopeful guesses.
At one point I had a problem with the playback of the background music.. a new track, deep into some complex level of the game, would not play.. but only on the actual burned DVD, not on the debug-station (which only emulates the DVD).
The XDK doesn’t really give a good example on how to do asynchronous load, I fiddled quite a bit with it and eventually got it going (thanks also to the on-line help of Mr.Rince !). And still, somehow I’d get into a bump between finishing to load and playing back the just loaded track. Eventually my boss tried to put the audio files on the fast portion of the DVD (the sectors towards the border of the DVD) and that apparently solved the playback problem 8)

Amazing how complicated also the XBox Live thing is.. it kept us trying to fit the game into the complicated subtleties of the server: ranked matches, standard matches, stats to write, voice chat to support. Microsoft definitely did quite a work with Live (which I only discovered with the 360, but I think it’s not too different from the one on the first XBox). A lot of effort for MS, which requires a lot of effort for the developers.. even just to understand how the system is meant to work. Not necessarily technical matters.. for example, how are standard match and a ranked match different ? How does a game lobby work in ranked matches ? What happens to the players in one console where another local player joined some game session on-line ?
And then the rankings, writing the stats, reading the stats, querying the database to find players that match one’s skills. A lot of asynchronous operations, a lot of added complexity to a game.

Time to really sleep now. This weekend I don’t have to work.. wow !!

zzzzzzzz

Posted by Davide Pasca as Uncategorized at 3:28 AM EDT

No Comments »

October 25th, 2005

My state machine

The current state of things hasn’t changed much. For the past two weekends I haven’t gone out at all.. as I’m working on weekends too.. till midnight.
The crunch is about to finish in a few days and I’m not feeling particularly tired. In fact, I’m generally pretty active. The fear of the super-final milestone is keeping me relatively excited.
I’m sleeping 6 hours per night or less, getting home at about 12:50 AM, reading the physics book on the train, morning and night as I go back home.
I got close to page 200 of the book, skipping the always challenging exercises while still trying to make sense of what the book says. Fourier came and went, but this time the explanation was more complicated than usual, as the book is really trying to make a point of complex number holomorphic functions (!), Riemann manifolds, Riemann surfaces and now partial differential equations.. in complex space.
I can’t really follow in detail all that stuff from one single source, reading a book sleepy or tired on a short train commute.. yet.. the book is keeping me company. I’m happy enough to at least get an overview of the most complex mathematical concepts out there, especially as they will later be used in the physics part of the book (100 more pages to get a taste of physics).
In the meantime, during compiling times at work (which I recently cut by starting to use precompiled headers for sources that include the XDK (XBox 360’s SDK) headers (very large !)), I’ve been refreshing things at the pre-calculus level with a very gentle introduction in the William Mueller’s Exploring Precalculus site.

Time is over, going towards 3 AM time to get my 6 good hours of sleep 8)

Posted by Davide Pasca as Uncategorized at 2:53 AM EDT

4 Comments »

October 19th, 2005

The Infernal State Machine and the Coroutines

Not long ago I complained on how painful it is to deal with state machines.
With video-games more than some other kind of software, there is a need to run concurrent threads. Multiple tasks that progressively do things over a larger amount of time.
Normally one programs thinking of one routine at the time. The flow of the code is meant to start in the routine and end with it.
I don’t have much time to make a decent example.. I’ll just say that generally one ends up with big switch statements;

Something like:

    switch ( state )
    {
    case IDLE:
         break;
    case CREATE_CONNECTION:
         // …
         if ( done )
             state = CONNECTING;
         break;
    case CONNECTING:
         // …
         if ( done )
             state = TRANSMIT;
         break;
    case TRANSMIT:
         // …
         if ( done )
             state = DISCONNECT;
         break;
    case DISCONNECT:
         // ………
         if ( done )
             state = IDLE;
         break;
     }}


Which looks tidy in this example, until one gets into a practical application, with the state machine jumping from one state to another… it can get pretty messy !!!

So, how to simplify all this ? Given the limitation of the language (C/C++).
The solution is pretty simple.. and it comes from the plain old C hacking with the freedom that the language gives, and with the preprocessor. A very low tech solution, far from what one would think.. in this day of age with all those fancy C++ template code.
This hack has a name, it’s called coroutines. A proper explanation can be read at the link provided.

I’m pretty excited about this, but I haven’t had time to really test the usability on relatively complex cases yet.

Almost time to zzzzz !

Posted by Davide Pasca as Uncategorized at 2:52 AM EDT

4 Comments »

October 16th, 2005

I want to make great games !

“I want to make great games !”
The upcoming generation of console hardware is definitely exciting. It has plenty of power. It’s never enough power, but there is still plenty that could be done.
However, we are talking about very raw power. Raw power that allows to bring to a TV screen what has to be created by dozens of expert developers for one, two, three years.
As a programmer that got into this business as a way to build my own worlds, I find myself very limited. I can’t really do much more than generating fractal mountains. To do the cool stuff one needs lots of expert modelers, animators, motion actors (whose motions need to be sampled in expensive motion capture studios).
As I see the titles of those next gen games, I feel more and more out of place in the game industry. Sure, one can still possibly do fun games that can entertain a great deal. But, I’ve always seen games as a way to simulate realistic worlds, and now that the simulation is becoming convincing, I feel like, at best, I could be a tiny piece in a large mosaic (provided that a company can put me to work together with a hundred people for one game).

There is always going to be a place for a programmer, possibly now more than before, but at the same time, one truly doesn’t have much individuality. It’s hard to sensibly make a difference… when you have to rely so much on people that have a much more creative impact, although artists themselves have to use software to realize their creations ;)

It’s not all hopeless for us programmers. Some will eventually scavenge for 10 years old papers and will start to put in practice real-time techniques to shift routine artists’ work into feasible mathematical solutions. There are already some softwares out there that will let you build human faces from a few parameters.. some even build bodies with muscles.. however, it’s still too early. As usual with technology, it takes time to become mainstream.. methods to put things in practice with a relatively low effort need to be devised.

Some day.. ehh.. bha !

Posted by Davide Pasca as Uncategorized at 2:20 AM EDT

6 Comments »

October 10th, 2005

Wooooo アキバ系 ! (Akibakei = an anime/manga nerd)

Wednesday I worked from 10AM to 7AM (21 hours straight). I was in bed by 8AM, slept till 10, back in the office by 11:30.
I had some bugs to fix, but it wasn’t the best time to take such a stretch, because then I went on to work till 13:30 of the next day ! Which makes about 2 days with 2 hours of sleep.
Friday I rested all day, onto Saturday night, when I went out to have some distractions.

A Japanese girl, friend of a friend of mine. Came to my apt for dinner (as my my other friend was already here visiting). As usual, a specific poster that I have hanging in my room, brought out some concern to the eyes of yet another woman. It’s a poster that another friend of mine gave me.. depicting a manga style hand-drawn curvy girl naked and bonded with some rope and clearly aroused. Definitely a geeky thing.
I’m not really into those things, but I found it cool.. I mean, it doesn’t really make such a big impression on me. However, the word is that, I should get rid of it ..unless I want to leave a bad impression on other girls !
I suppose that I should try to look at the poster with female eyes. Women tend to be more impressed about certain things. Oh my gosh ! A man that has a sexy drawing in his bedroom, I bet that he gets horny every time he sees that !
I really don’t see what’s the big deal. In fact, I think that this only comes to show how sexuality is normal for men, but for women it’s taken a lot more like a duty.
People get married and put their passions to sleep… what a great thing that marriage is !

woo
zzzzzzz

Posted by Davide Pasca as Uncategorized at 3:09 AM EDT

7 Comments »

October 5th, 2005

Crunch, crunch, crunch

Still working 10 to 24 every day (13 to 24 on weekends). I don’t feel incredibly tired. If anything, because I don’t do much else and I dont have many problems sleeping (Melatonin came to the rescue !).
I’m into the 7th chapter of the Penrose book. Went quickly thought real numbers calculus. Now onto complex number calculus.
I mostly read it while I’m on the train, or waiting it (at night they come less often). I’m not satisfied however, because I don’t have the time even to try solve the basic exercises that the book proposes. In fact, I think that I will eventually need to buy another book, just to refresh the calculus part.. including a good dose of exercises. Exercises are very important, it’s what makes you realize that you actually understood something.
Plain explanations don’t generally seem to work too well, I prefer to put myself through practical exercises, waiting for my brain to eventually make the connections; to come up with a satisfactory vision that makes me feel like I grasped the concept and that I can potentially use it.

Still no study of Japanese, although my level of communication is steadily increasing at the workplace.. which is more out of necessity than as a result of any improbable outstanding improvement.

At work I’m in a stage in which everything is put down quickly, with little regard for code cleanliness. Plus I’ve been optimizing (= trying to insert bugs) for bandwidth transmission. I’m working with VDP (XBox 360’s UDP-like packet transmission) and that means that one has to cope with potential packet loss, therefore, for real-time performance, one has to implement some sort of redundancy.. which is also nice to have to fix eventual design issues that can potentially arise in these situations. It’s a bit like doing organ transplant, throwing in a bunch of anti-rejection drugs to do the patching.
Sometimes I change something and a cascade of issues rolls down. Then I have to juggle the issues trying to stay calm and believe that in the end it will all work !
The important thing is to never run out of imagination on possible workarounds.. one can do wonders with just glue and duct-tape 8)

zzzzzzzzzz

Posted by Davide Pasca as Uncategorized at 2:35 AM EDT

3 Comments »

October 1st, 2005

All work and some frustrations

Since the last time that I complained, I’ve been stood up two more times 8)
I lost track of the times this has happened now and also lost track of the excuses. I don’t mean to make it a racial thing, but it’s in the Japanese culture to try to be kind and not hurt people. For that reason, a lot of excuses are normally made: I have a cold, I’m so busy with work, I fell asleep, my father got trapped in the car wash (last one is from an Italian song dedicated to men that are slave of females’ whims 8). Knowing that, I always try not to force anything, yet, I get flipped around and find myself feeling guilty for having tried to force something !
“Please wait for me ! I’m coming ! I’m com, I’m co.. opssss
I think that over a certain limit, it stops being unwillingness and starts being some sort of chronical illness. It expresses the need to try force someone into being dependent of the other. To do what’s not nice, but possible and always go one step further.
It’s a complex game, because one has to try to be understanding and not show much care, but at the same time can’t afford for the other to take advantage and let the situation degenerate. When a situation degenerates, one can end up in situations that are at least very uncomfortable, like a girl that goes around being all sweet to you and showing the pictures of her real bf, or showing up at your apt paying a visit of courtesy and coming up with “I found a new boyfriend ! I’m so happy ! We had sex yesterday ! Look, here is a picture of him in his underwear !” …Good for you !!
Then there is no limit to what things can come to. ..if one had to avoid the bullshit at the root, he’d have to ignore a great deal of people. My policy, however, is just to let things pass by, because they can be somewhat funny as they happen or, at least, they can become funny when time passes by and memories aren’t so bitter anymore. Plus, they make for good stories to tell ! 8)
Eventually, what really matters is just to let things come and go, because in a world governed by statistics, it doesn’t make sense to try to make an individual out of a pretty girl: the current one is as wrong as the previous one and as wrong as the next one. People make couples when they find similarities, but, sadly, most similarities are found in the most common people. One is like what one likes.

Posted by Davide Pasca as Uncategorized at 4:24 AM EDT

4 Comments »