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 »
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 »
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 »
“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 »
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 »
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 »
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 »
Today I had a flashback about an old movie with Michael Keaton, “Gung Ho” (1986). A chinese title for a movie about a Japanese carmaker takeover of an American small-town factory.
The movie, a comedy with drama, highlighted the differences between the Japanese worker and the American one. Or at least between the attitude towards work.
One scene in particular that I remember, when a Japanese employee working in the middle of the night, is given the news of his wife having given birth, but he can’t reach her as he’ silently forced to stay in the office.
That was clearly an exaggeration.. however, from time to time it may happen to have to be working late, and to have to give up on social life. Specifically, today, (now yesterday), Sunday 25th, was my birthday, and, incidentally also the day I worked to the latest hour in recent times.
I’m not into birthday celebrations and I’m aware of the need to meet milestones (that’s the nature of the business). However, when one doesn’t have the freedom to decide wether or not to celebrate a birthday, or take a vacation, when it becomes a constriction, the effect is different. One feels like he’s missed a chance. On the other hand, it’s perhaps it’s also a good way to appreciate things. For example, the fact that this summer I didn’t have a chance to take a vacation, made me somewhat want to take one when I can (and not just to go to Italy to visit relatives and to rest).
Friday was also holiday, but I went to work. From 1PM till 9/10PM. So, basically, now I’m heading into a new week of work, without having taken any real rest… and I’ll probably be working again till 10/11PM every day. That’s got to be somewhat heavy 8)
A real issue with that, is that doing simple things such as laundry and getting an haircut, or buying groceries, becomes a bit complicated if not impossible.
Some groceries can be bought at the convenience stores, while getting an haircut is really mostly out of question.
My mealtonin pill is starting to make effect and I think I’ll head to bed… zzzzzzzzz
Posted by Davide Pasca as Uncategorized at 2:28 AM EDT
10 Comments »
Monday I dashed out of the apartment, almost sure to get to work late, only to find out that it was a national holiday 8)
It has happened before, although at one point I learned to check the calendar looking forward to vacations. However, given the current situation, I’m not sure I’m really looking forward to much vacations (need to get work done !), so I let that one slip.
It was for the best anyway.. 50 meters into the way, I see the usual two neighbors that bring out the Japanese flag for the holiday.. a call the office to make sure nobody is there.. and then, straight to Shibuya, where I bought a couple of books (one on kanji, the other with exercises, aimed at some standard language test which I may take one day).
Bought the books, I went to a cafe nearby, the famous Segafredo of Shibuya. Cafes are actually nice, something that is almost unheard of in the Italian culture, where people mostly take they coffee standing up and chatting about soccer. Funny how Segafredo and Lavazza, possibly the largest coffee brands in Italy, have their cafe chains in Japan, but not in Italy.. where even Starbucks is unknown.
For once was nice to be out early in the morning, actually outside, not inside the office. I worked a bit around the math in the Penrose book (onto complex numbers now), then started looking at the kanji book (Decoding Kanji). I’m still only at page 27, but I’ve appreciated what I read so far. The book actually tries to make sense of the radicals composing kanji characters, and gives hints to have a good idea of how a kanji can possibly be read (the single biggest problem with kanji, really !).
I don’t expect this book to be the final and only source for kanji learning, but, as usual, it will have some contribution.
Speaking of contributions, a while ago I bought Who is Fourier?:A Mathematical Adventure and What Is Quantum Mechanics?: A Physics Adventure. I think I may have finished the first one, but I definitely could not finish the second one. They are rather big books, which dwell a bit too much on cheap fiction, while trying to entertain and shamelessly plug their original language teaching business. nevertheless, I’ve learned some interesting things from those books. I liked the fact that quite a bit of math is proposed to the reader, while making it sound like child play.
For example, I liked the explanation of the constant e in one of those two books. While the Penrose book has introduced it by page 80, and still hasn’t introduced derivatives nor has said that e is actually special as its a derivative of itself. ..but there is still a long way to go for me into the book, so I’ll have to wait and see if he’ll spend more time on that.
Damn it’s almost 3AM.. zzzzzz
poof
Posted by Davide Pasca as Uncategorized at 2:55 AM EDT
No Comments »
What I haven’t been saying for the past two weeks, is that, thanks to a friend of mine, I found a bookstore that has a lot of interesting books in English.
Two weeks ago, I went and looked at Imperfect C++ (what an inspiring title !) and Effective C++. I was also looking for another book, but the store was closing and eventually bought GPU Gems 2 (a long overdue buy !).
Last week, I went back, all pumped, ready to buy some C++ books. But I just couldn’t force myself to buy any of them. Forget the the Stroustrup’s. Last thing I want to do is to give even more money to the father of C++.. for such a boring book. Effective C++ and Imperfect C++ also don’t seem very interesting: the do’s and don’ts of modern C++ (whatever that means). More indoctrination from the wealthy daddies of C++.. buffoons !
Eventually I moved onto the physics section where I finally found the book I meant to buy the week before: The Road to Reality: A Complete Guide to the Laws of the Universe (alternative Wikipedia link) by Roger Penrose. It’s a heavy, 1099 pages book and, apparently, the first 350 pages are dedicated to form a background in mathematics and geometry, needed for the remaining 2/3 of the book.
I’m still only around page 50. It’s a book that is best read sitting down with pen and paper, and I find myself a bit frustrated by the lack of time. At work I’m definitely not doing any “rocket science”, TV can be interesting, going to the gym is certainly useful, but also takes a lot of time, plus it’s filled with smelly people !
In any case, I’m very happy so far with the book. So early into the book and I already went through and introduction to hyperbolic geometry.. which I was eager to read about, because it has some applications to 3D graphics (rendering a hemisphere in one pass, instead of using an hemicube (5 passes).. needed for radiosity calculation).
I plan on speeding up the reading.. although today I left work at 10:30 pm. Lot’s of things to do in the office… I’m almost starting to hate my job.
Game programming can involve some cool technology in the best cases, but on average, it’s really not that stimulating. Sure beats things like data-base programming.. but recently, I feel like it’s become too much of a job. It’s too much about doing things fast, hack together what you can for a deadline so that the business goes well.
Money is nice, but my ultimate goal will always be knowledge.. (also knowledge, is in turn power and then money 8)
I guess that the important thing with work is to find an avenue to improve rather than be milked for the current knowledge and eventually become obsolete. It’s nice when the workplace offers that.. but when it doesn’t, one is on his/her own. I saw the summer coming and going, without even one day of vacation. I’m wondering what’s the point to keep trying to make someone work when the morale obviously can’t be that good.
Lastly, I’ve had two mouth sores for several days now !! The dreaded mouth sores are back. Stresss, stressss.. a real torture, to have to feel pain as one eats. A pleasure turning into a constant pain !
Posted by Davide Pasca as Uncategorized at 1:43 AM EDT
13 Comments »