Alexis Bauchu - On est pas des machines

Coders are also human beings

samedi, septembre 26 2009

Booting my old computer (Ubuntu 9.04 Live CD, I love you!)

I'm stuck at my parents with the flu right now. So I don't have nothing to do all day but to repair my old computer here. When I moved to Paris I took everything with me: cables, peripherals, CDs, speakers, everything. So there's not much here. Yet I HAVE to make that computer work because I still have unfinished business with my school, reports and stuff.

So I explore the house in search of stuff I could plug in to make it usable. The internals are ok, but I need a keyboard and a mouse at least. I find an old keyboard from the Windows ME era, I find an old PS2 mouse in the back of my cabinet. The plastic is yellow-ish now and it has a ball, but luckily is has a wheel, so yay! I start the computer after I gathered a few cables to give the machine some juice. Ow... I didn't remember that I had made it a server. No graphical environnement. I still can install stuff with the command line (Thank you Aptitude!!) but downloading the last Ubuntu CD and burning it is gonna be a nightmare. That's the time my brother chooses to enter and say that this is stupid and that I should just ask someone to download it for me.

- Can YOU download it for me?
- ...
- Please?
- OK.

I like the Live CDs from Ubuntu. They made me switch to Gnu / Linux. This one is really good: even though my machine is really old, it loads really quickly, the system is very responsive. I steal the RJ-45 cable from another device at home, plug it in, and BAM! I'm on the internet. I start the install and then I go answer some e-mails and stay in touch with friends on Facebook. By the time I've done all that, the install is over! It's quite fast and your not even blocked during the procedure. What else can you ask for?

Because I always organize my Hard Drives in distinct partitions, one for the system and one for data, all my old stuff is right there when I reboot the computer! The icons on the desktop, my wallpapers, my pictures, my home page in Firefox, my hotkeys, e-ve-ry-thing.

Seriously, it's THAT good!

ubuntu9.04cover

vendredi, septembre 25 2009

Incoming! New TF2 update!

The TF2 team at Valve posted a curious message on their blog today. I think they are teasing us in the funniest way about the next update, which could more than probably be the engineer's: a Cannon-appended canine unit? Wait Wait Wait... So there will be "pets" in TF2??

EDIT: In fact I've been horribly fooled. This is not teasing for an incoming update, this is Valve's way to acknolewdge the quality and the humor of this fake update giving access to a 10th class. This is great work, the website looks like an official one and the class is described with its strengths and weaknesses, the achievements you can unlock, etc. Good prank!

jeudi, septembre 3 2009

Update of the 'Share on reader' command for Ubiquity

I've finally updated that command that allows to share content on your Google Reader Shared Items page (providing you've got one!). The new version allows you to type the name without the hyphens (no more share-on-reader), you can also type share using reader, or note using reader, or note with reader.For those of you who don't know Ubiquity, head up to the project page.

You can install the "Share on reader" command by going there and clicking subscribe in the popup above the page.

CmdUtils.CreateCommand({
  names: [ "share on Reader", "note with Reader", "share using Reader", "note using reader" ],
  homepage: "http://abauchu.net/",
  icon: "http://www.google.com/reader/ui/favicon.ico",
  author: { name: "Alexis Bauchu", email: "alexis.bauchu@gmail.com" },
  license: "MPL",
  description: "Shares content Google Reader's shared stuff page and allow you to add a note.",
  help: "This uses Google Reader, so you need a Google account to use this command.",

 
  arguments: [ 
    { role: 'object', nountype: noun_arb_text, label: 'extract' }
  ],

 
  execute: function (args) {
   var cmd = "var b=document.body;var GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}";
   var doc = Application.activeWindow.activeTab.document;
   var body = doc.body;
   void (cript = doc.createElement('script'));
   void (code = doc.createTextNode(cmd));
   void (cript.appendChild(code));
   void (body.appendChild(cript));
  }

});

mercredi, septembre 2 2009

Working on Gray Matter

A while back I said that I'd talk about what I do during my internship at Wizarbox. It was in April, so it's been 5 months. Ok ok, I'm late, but when I post, I like to be REALLY sure! Seriously, if I haven't talked much about it, it's simply because there's not much I'm allowed to say. Game developers (and even more the publishers) like secrets.

What I'm allowed to say for the moment is that I'm scripter on Gray Matter, the new and greatly expected game by Jane Jensen. If you don't know her, she's the one behind the classical Point-and-click game series Gabriel Knight. I'm in charge of integrating the backgrounds of the scenes, the dialogs, but mainly to create the script of the game, which means the interactions with the world, between the characters, with your inventory, and to create the animated cut-scenes.

Here's the official trailer (in german) presented at Gamescom 2009:

lundi, août 24 2009

Bug Tracking and screenshots

I couldn't resist but to share this hilarious moment with you. At work, I've been assigned a bug. There's a screenshot joined with the description which is as follows:

In chapter 2, after the first mini-game, the screen became all black.
See screenshot.

And follows a picture of a window filled with black. Fantastic!

mardi, août 18 2009

The Quest for the Holy Tools

I like tools. I think it's what I want my job to be about: making better tools. Tools are what stands in between of people and their work, and the better the tools are, the better the work can be. Good tools make your life easier, thus making you happier, thus making you more efficient. So it's good to invest in tools: everybody needs them, they always need to be improved, and people are grateful to you for making them.

Lire la suite...

lundi, août 10 2009

And Perforce failed me yet again...

I guess that software can smell when you're afraid of them. So they get nervous and do nasty stuff to you. I don't see any other explanation! I'm not in good terms with Perforce, and it knows it...

At work we had a bug, a big crash, and there was no way to find out what was wrong. It wasn't a problem in the game executable, so it had to be something with the data, but data change faster than the executable do. In order to locate the bug, I started to test older revisions of the whole data set. Re-synching, reconstructing, testing, getting a less old revision, re-test, and so on. I was resynching using the date and time. But noticed I would be able to go faster by resynching on changelists rather than dates. Boy was I wrong.

Don't try to get a specific changelist, EVER! Perforce started to delete the content of my workspace! And it goes pretty fast, believe me. By the time I noticed I was wrong, like 30 seconds, it had deleted so much, that resynching and reconstructing the lost data took about an hour. A 30 seconds error cost me an hour of work! And I still didn't know where the bug was!

Thank You for Nothing Perforce! I'll have you!

mercredi, août 5 2009

Braid's creator Jonathan Blow to announce his next game

Jonathan Blow revealed a bit more about his next game. And when I say a bit, it's a really little bit. Check-it out (you need only 12 seconds): The Witness

Pretty cool huh? Well that's really not much, but if this is as great as braid was, well, this is gonna be a master piece (don't be fooled by the cheesy teaser, the game is AWESOME! I'll talk about it again). All we know for the moment is that the game will be An exploration-puzzle game on an uninhabited island in full 3D and that it won't ship before 2011. Blow hired 2 visual artists to assist him on the job (Job Offer 1 and job offer 2)

mardi, juin 30 2009

A minute for Music

I discovered this guy called Jack Conte a while back by following a link to a his Chopin / RadioHead mashup. I really liked it and began to watch his other video songs. This guy is really talented! He plays some kind of indie rock, composes his songs, and record everything and edit the video himself. Here are two of his recent works that I already love. Check it out and tell me what you think in the comments!

Ok here is a third one, because this is all too good...

lundi, juin 29 2009

Google surfs on the Wave

Checkout the incredible Google Wave project. This is gonna change everything. If you don't wanna go through the whole video, go visit the Google Wave Preview Page.

I'm really putting a lot of hopes in this, since I think Wave is a solution to so many issues with today's communication tools.

  • You just received an e-mail with no subject. What previous e-mail is it answering? Where's that e-mail?
  • If you start a "conversation" in an e-mail, and have several people join after a while, how can then know about the beginning of the conversation?
  • When you follow a newsgroups, forums, or worse, a mailing list using a web interface, what's the order in which people answered? What exact question are they answering?
  • Forums: which topics have I read, which have I not?
  • Instant messaging: how can store what has been said? How can I access it anywhere in the world? Why can't I see what the other is typing? What protocol should I use?
  • Blogs: why can't I post a comment by "answering" to the RSS feed?
  • What standard tool can you use to organize an event? Simply trying to know who's coming and who's not can be a nightmare unless you use some social network apps, but not everybody is in Facebook
  • Why can' t I follow my e-mail, forums, blogs, newsgroup in a single interface? (actually you can with Thunderbird!) From any computer in the world? (ok that you can't)
  • I've put a lot of efforts to sort my e-mails and my RSS feeds using tags. How can it benefit my friends?
Magically, this is all solved and unified in a Wave conversation. Sharing of files is also maid very easy, everything seems elegant and smooth. I just can't wait!

vendredi, juin 26 2009

Breaking News

Today, for the first time, I HAD to reboot my computer just a few minutes after I switched it on, because I couldn't Copy/Paste anymore! The police says they have no clue about why this happened. Case closed.

Edit: it seems that the problem could come Taekwindow which is a bit buggy. Feww. I was THAT close to start a rant about Windows! (again)

lundi, juin 22 2009

Bash Optimisation

Lately at work, I've been working on optimizing a bash script that was used to build the data of a game. Its role is to parse the game directory and for each file, match it with a building rule. If there's no rule for a file, well, then nothing happens. If there's a rule, then dates of the source file and the built file are compared, and if the source file is more recent, then the file is rebuilt. Yes, that's pretty much the basics of a configuration manager, but in this precise case Make wasn't an option.

What really bothered me in that tool, was its extreme slowness. Rebuilding modified data lacked a bit of punch, but more importantly, parsing data that hadn't been modified was slow to death. Even when a single value was modified in a file, it was taking at least 15 seconds to rebuild the script. I know this isn't too bad, but let's put this into perspective: doing nothing on about 300 files with a quad-core processor at 2Ghz was taking 15 seconds. This was already pretty frustrating as it was. Now, consider that the game contains at least 7400 files, which means when someone changes a file, you can't always know which one, so you have to rebuild the whole directory. Do the math: this blocks your machine for at least 6 minutes, just to do nothing. And that's a minimum! Because many files are rebuilt anyway. And you do this many many times a day. Fast iterating is key to success in game development, and that was nothing like it. Here is a chart with approximative time I benchmarked:

Chart: Time to build x files

At first, I thought that the problem was Bash. Browsing every file in the directory recursively was maybe slow in shell script. But it wasn't. So I thought maybe comparing the dates was long. But it wasn't. And then I saw function that was matching file extensions with rules. It was looking up extension files in an array, but had to do string manipulations because each element was of the form "extension ruleName". And it was checking the whole array for every single file you had to build! So I made improvements there.

The array looked like this:

ACTIONS=( 
"txt DoStuffForTxt"
"avi EncodeVideo"
"lua PreCompileLua"
"etc"
)

It didn't go has I expected because the building time got longer. My solution was to replace the "extension rule" array with an associative array. But associative arrays are not supported in Bash! (even though the manual says so). So I did some hacking to circumvent that (I'll talk about it in another post). I finally understood that my solution was using to much "echo"s, and removing them improved the building time. But not much. I couln't think of anything else slowing the thing, because the rest was pretty trivial, so started a hunt for "echo"s. And there it was.

In each build rule, the second line was:

echo "Extension: $ext" >> log.txt

This seems harmless of course, nevertheless, this can eat a lot of time if log.txt is actually a big file. My intuition was right and I discovered that the file was about 8Mo big. After all this investigation, the real solution to the problem was to add

echo "" > log.txt

somewhere at the beginning of the script. Then the building time improved a lot:

In fact now, trying to rebuild even a 1000 files with no changes takes less than 5 seconds. So mark my words: when you do optimisation of code, any type of code, first get a real good overview of the performances and track the lines creating bottlenecks. Unlike me, you'll end up saving a lot of time! Plus, if you're doing some bash scripting, remember that echo is quite greedy and avoid it as much as you can!

vendredi, juin 12 2009

NTFS directory junctions

Funny stuff, we had this problem at work:

The publisher needed to have the game tested, but for pratical reasons, they needed to be able to rebuild the game at any time. Fine. We send them our builder and the data. Unfortunately, we were working in a W: drive that they were already using for something else, and they had not enough disk space, and it was a network drive... The solution would be to just install the game on another drive, but all our file paths were hard coded...

So I figured: OK, we can do this quick and dirty thing: I think there is a way on NTFS disks to create symbolic links between two folders. That means that we can create an empty folder on their drive and then mount the right folder on it, wherever we are on the disk. That way we don't have to change anything.

Cool, let's do that.

Yes but... as I should have expected it, this doesn't work. Linkd.exe, the program that allows this procedure is only distributed in the Windows 2000 pack or whatever. That we don't have. So we're screwed. There's a fsutil.exe in winXP, but they only provide hardlinks from files to files, not from folder to folder. And I didn't even get it to work from files to files. Classic...

Even though this episode proved me once again that the things that are so easy and powerful under GNU/linux are just plain non doable on Windows, my colleagues laughed me for preferring Linux, saying that Linux is shit. They obviously meant that the combo Cygwin/Windows can be a pain in the ass, and it's really weird that Windows is the only OS that doesn't follow the standards that EVERY other OS follow. Yeah, that's what they meant... (sigh)

vendredi, avril 10 2009

The problem is... you have no problems

I've just been prompted with a funny dialog window from Perforce. Here it is

Even less conflicts

I accepted to "merge" and then clicked "revert if unchanged". And of course it did revert. Can someone tell me WHY this is even happening??

vendredi, avril 3 2009

Coming back for the second time

Hey there, I didn't write in a while, because I like to do my blog posts just right and also because I had a lot of work to do lately / haven't an internet connection in Paris (yeah I moved) / a plane crashed on my shoes / I've been abducted by aliens / that kind of stuff

So, soon to come:

  • A kind of postmortem for our second year project at ENJMIN and for my time at ENMIN in general
  • My new internship at Wizarbox, Paris
  • Stuff about indie games (Braid, World Of Goo, etc)

To make you wait, here are some Youtube videos!

dimanche, mars 1 2009

Resident Evil 5 demo

re5_logo

Recently I've tried the Resident Evil 5 (RE 5) demo. I'm a fan of the previous episodes. Not a HUGE fan, but I know the subject: I played to RE 1, 2, Code Veronica, Rebirth, 0, and RE 4. And I have to say that this 5th episode doesn't quite convince me...

What I like in the games prior to the 4th episode are the atmosphere, the strong feeling of vulnerability and the puzzles. Your avatar only had 4 health points and ammunitions were rare so you really had to avoid fighting, your inventory was quite small so you had to choose carefully what stuff you'd take with you (more health kits or more ammo?), your sense of orientation was challenged, that kind of stuff. Those ingredients created a new genre that can legitimely be called survival / horror. This all disappeared in RE 4 which flushed the frustrating camera and inventory away, but with it, many of the things that made the Resident Evil series what it was: out the evil company Umbrella, out the puzzles, out the zombies (the enemies are infected by a horrible parasite) and so on. To me, RE 4 was an excellent action game, but a terrible Resident Evil. Capcom certainly hoped to capitalize on the brand, but the idea is a bit weird: the gap with the first games is so important that old fans were disappointed and I guess that old haters were still repeled by the only sound of the name.

pointing_to_the_left.jpg

RE 5 is the direct descendant of RE 4: fast pace, hordes of infected, ammo and money popping out of dead bodies, camera located above the shoulder of the avatar. The new thing is that the hero is now followed in his mission by a sexy partner. And I think that there was many other places for improvement, but the devs blew it. The controls are horrible: while the game is loading, the key mapping is displayed on screen, but before you've read everything (or anything) the game starts. And it fails to tell you that you can use the cross to quickly switch weapons. Suddenly, your gun runs out of ammo, and you swear, trying to switch to your shotgun using the menu while the infected kiss you in the neck. You reload the level, this time you manage to keep the enemy at distance but eventually some big guy breaks in the house you were hinding in and smash your partner with a giant axe. Game over. AAArr!

big_sick_guy_with_a_big_axe.jpg

Every time you restart, you come to a new sad realization: this big-manly-sweating character you control is obviously motor impaired because he can't fire a gun or reload or use his arm-long knife without his two feet stongly anchored in the ground. The two partners can't exchange a couple clips of ammo, instead they have to pass the whole stock, leaving the other one defenseless. The big guy with the big axe seems invincible and the mission ends only if you survive long enough, meaning you can run around the level and still win. In fact that the best way to stay alive. Doors can be kicked, but you can't close them (they automatically close after some time), you can't jump off a roof or even run (RUN!) without pressing a button... At this point, you're so frustrated that the coop mode is not able to save the experience. I remember thinking "this makes me wanna play Left 4 Dead right now".

big_knife.jpg

To conclude, it took me at least 7 times to finish the first level of the demo. The true spirit of Resident Evil died with RE4, and now RE 5 is probably gonna kill a decent action gameplay with silly usability issues. The game is not out yet, but I'm not hopeful.

samedi, février 21 2009

Team Fortress 2 total immersion

A couple nights ago, I played a game of TF2. Our team lost the round. Whenever a round is over, the losing team loses their weapons and the winning team only fire critical shots. So losing players tend to run all over the place, waving their arms in the air and screaming for mercy, or they try to hide. This is usually a very hard time for them.

I found myself a nice little spot in a very dark corner. No way anybody could find me there. But suddenly, I felt that I wasn't alone there. I saw the smoke of a spy's cigarette, so I whispered over the mic:
- "Man, we can see the smoke of your cigar..."
- "SHHHHHHHHHHH!"

The thing is, the other team can't hear you, so...

Spy!

vendredi, février 20 2009

Les Ateliers du Jeu Vidéo / The Video Games Workshop, The end

Hi there, it's been a while. I got many things cooking lately and it made me procastinate a lot writing on that blog. I had started a series of articles about the video games workshop happening here at Enjmin, Angoulême, and I have a few notes about it, but I'm gonna sum it up.

Casual gaming was the major concern this year. It's important to note that there's no definitive separation between "casual" and "hardcode", it's more a state of mind regarding a certain game. Some people can spend hundred of hours playing Bejewled and then wander in Liberty City for half an hour. So maybe instead of calling them "casual games", it would be more appropriate to call them "mass games" because they're aimed to a wide audience and to people of any age. So these days, it seems that mass games are the only games selling, which isn't exactly true. On the contrary, what is true is that you do WAY more money with mass games than traditional games. They are easy and cheap to produce, they fit a load of business models, and their players are easy.

What bothered me is that it felt like quite some mass-games developers don't respect their customers, in the sense that they think of them as sheep. They are so easily satisfied than you can make them buy anything at any price. It's sad to realize that they get hooked to a game with very poor content or interactivity thanks to massive subterfuges (have you ever played a game on Facebook?). Digital Chocolate released 24 games in 2008! And many won awards and made excellent sales. My hope is: someday, people will realize that they are treated like idiots and that they're just wasting their time. They'll get tired of these empty games and ask for more.

'Johnny Crash Does Texas' from Digital Chocolate

Don't worry, this wasn't all bad. Other talks focused more on understanding why games like Wii Sports, Wii Fit or Mario Kart Wii worked so well. "Games are physical and social". Kids make up games by just imagining they are cops and thieves and cops and run after each other. Sports are based on really simple rules but get you exhausted and provide really important interactions with your team-mates or opponents. People also like to mimic gestures: the wiimote allow the player to hit, swing, steer, a plastic guitar can make the player feel like a rocker, etc. That was very interesting and we even experienced a nice game of Massively Multiplayer Rock Paper and Scissors! The next step is ubiquitous gaming, with interactions in the game and in real life. I'm curious to see that.

'People playing Wii Sports

jeudi, janvier 8 2009

Ubiquity command: share-on-reader and share-on-reader-secure

The share-on-reader command is the first ubiquity command I've ever coded. I made it just to try ubiquity's command editor, but I wouldn't expect people to use it. It's basically a wrapper of Google Reader's bookmarklet that allows you to select (or not) text from a web page, and share it with a note on your Google Reader Shared Stuff Page (providing you've got a Google Account and activated Google Reader). It's that simple. You can subscribe to that command on that page. Here is the code:

CmdUtils.CreateCommand({
  name: "share-on-reader",
  homepage: "http://abauchu.net/",
  icon: "http://www.google.com/reader/ui/favicon.ico",
  author: { name: "Alexis Bauchu", email: "alexis.bauchu@gmail.com"},
  license: "MPL",
  description: "Shares content Google Reader's shared stuff page and allow you to add a note.",
  help: "This uses Google Reader, so you need a Google account to use this command.",
 
  takes: {"your selection": noun_arb_text},
  preview: function( pblock, selection ) {
    pblock.innerHTML = "Shares \"" + selection.html + "\" with Google Reader and allows to add a note";
  },
  execute: function(selection) {
   var cmd = "var b=document.body;var GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}";
   var doc = Application.activeWindow.activeTab.document;
   var body = doc.body;
   void (cript = doc.createElement('script'));
   void (code = doc.createTextNode(cmd));
   void (cript.appendChild(code));
   void (body.appendChild(cript));
  }
});

The code is rather long, because at the time there wasn't any command like CmdUtils.makeBookmarkletCommant(). I could have updated it, but I like it like that. You know, it's my first one.

But this command doesn't work with the https version of Google Reader (I should say the bookmarklet doesn't work, because I virtually didn't code anything). Someone commented about it in this blog: he uses the customizegoogle extension which automatically redirects the normal url to the secured one (https). And it breaks the command. So I tried some stuff, and came with a solution: in fact, on the https version of the website, Google provides ANOTHER bookmarklet, working this time. Simple! You can subscribe here. Here's the code:

CmdUtils.makeBookmarkletCommand({
  name: "share-on-reader-secure",
  url: "javascript:var%20b=document.body;var%20GR________bookmarklet_domain='https://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='https://www.google.com/reader/ui/link-bookmarklet.js');void(b.appendChild(z));}else{}"
});

Reminder: makeBookmarkletCommand

This is just a reminder: how to make a command out of a bookmarklet. For example, a command that embed a Flickr photo (the example is taken from Aza Raskin's blog).

CmdUtils.makeBookmarkletCommand({
name: "Embed Flickr Photo",
url: "javascript:(function(){if(window.page_p)window.open('http://www.elsewhere.org/mbedr/?p='+window.page_p.id);%20else%20alert('No%20Flickr%20photo%20found.');})()"
});

Replace the url by your bookmarklet code.

- page 2 de 3 -