Frozen Bubble is a recreation of an ancient DOS game, played so many times by Guillaume Cottenceau who could use it in his favorite Linux box … so inspired by it he took the challenge and the tools at hand. And guess what : one of these tools is Perl !!!
Before starting, just let me give a big thanks to Guillaume for the time spent to answer the questions in this interview.
Please describe yourself in a few lines
I’m 27 years old, french, and I live in Switzerland because I met a Swiss girl. I am a computer science engineer working on java development for a living. I have worked for Mandrakesoft (wait, Mandriva ;p) during 4 years, and that’s where I learnt Perl. I just love Linux and programming.
What was the motivation to build Frozen Bubble, and why Perl was chosen as the primary development language ?
My interest both for realtime graphics (I used to be part of a “demogroup” when I was younger) and for Perl made me discover Perl-SDL. I was amazed that someone ever consider writing a realtime game in Perl, and I tried to experiment with this mix. I then tried to duplicate a game I played under DOS, which was missing on Linux. Lucky for me, I knew both a very capable graphics artist and a very capable musician… the rest is history now :)
What strengths did you have found in Perl that helped you develop this game ?? And the weaknesses ??
Perl is
- very expressive (you can do in one line what you’d do in 10 lines of C)
- functional-style friendly (you can easily do “map {} grep {} @a'’)
- has implicit type converters and vivification which shorten code
But all these things lead to a very dense program which might be hard to read several months later.
What do you absolutely hate about working with Perl 5? Contrarily, what do you really like? Did that surprise you? Why?
There’s nothing I hate, really. What I could live with would be a better standard library including functional-oriented features (e.g. more stuff like map and grep), but it can be workarounded by using additional modules. Also, objects are not syntactically integrated enough IMHO - that should be better in Perl 6.
What I really like is the versatility and expressiveness of the language. My main surprise was probably the fact that a realtime game (Frozen-Bubble) is no problem to Perl 5, contrary to popular belief that “scripting languages are slow”.
Have you worked in Perl 6 ? What do you love from it ? and hate ?
I have worked a very little bit with Perl 6, but the prototype (pugs) was too early and reported warnings/errors on wrong lines which was simply not acceptable to me anymore :) I don’t know p6 enough to be able to state loves and hates.
If you would choose to start Frozen Bubble again from scratch, what things won’t you repeat ? Some advice for the future designers !! :)
Actually, I originally didn’t think I would support network gaming, and now that I’m trying to add it, I suffer from this, because current code is not modular enough.
Each language, technology or whatever has a place where it fits better : the Macs with arts and hacker people, Linux for the tech savvy and so on. So, what you think is the best place for Perl.
I know that it is good as a language to join different software pieces, that’s why it’s called the “Internet Duct Tape”
Basically, I think that the reputation of Perl is misleading. It’s seen as a tool, something to write “scripts”, not “programs”. So it’s often used for regexp-based string processing, or cgi stuff. It’s a pity since it has very advanced features that many “serious” languages lack: objects with multiple inheritance and destructors, functions as first-class values, true closures (even Python doesn’t have that), to name a few. So, in my opinion it’s suited for most programs - the main problem I see with large programs is the lack of compile-time checks, but that’s the case of all its competitors.
In which parts of Frozen Bubble code you will advice to the novice Perl coder to look at, in order to have a very pleasant learning experience ?
I’d have to say that it’s not a good idea for a novice Perl coder to try to learn from the code. I’ve written it when I already had a good knowledge of the language, and the habit to produce some functional and dense code. It’s very efficient (2000 lines only) but the drawback is that it’s not easy to read for beginners. Also, I am not sure it always features Perl best practices.
What will you add to Frozen Bubble ??
People have been asking for network support for ages, and I have coded it in 2004. Unfortunately, there are still small synchronization bugs which are extremely hard to spot and fix. Usually, when I stop enjoying programming at home, I temporarily stop, because I think the fun is a crucial part. I’m currently working on other projects, and I wait for the motivation to come back and I will eventually finish this off. I also have the problem to force the graphics artist to write new necessary stuff, and he’s had motivation problems too.
Do you plan to add compatibility with Perl-SDL 2.x ?
Yes, next release (but I can’t say when it will be released) will use latest “stable” version of Perl-sdl. It might even be incompatible with Perl-sdl 1.x.
What does your programming environment look like? Emacs? Vim and the Unix tools? Mac OS X?
Yeah, Emacs for most languages including Perl. I learnt Emacs with friends a little less than 10 years ago and I enjoy its power and flexibility. I believe that Vim and Emacs are equally powerful in most areas, I just have never tried to learn Vim beside the first 10 commands. I use Eclipse for Java though because it saves so much more time. I try to use Linux and free software when I can, so I’m definitely not into OS X. After all, I have a rant against proprietary OS’s on the FB website, so I cannot use OS X anymore or I’ll lose the few remainings of karma I still possess :)
If three people reading this interview suddenly said “Hey, I have a couple of spare hours to help out! What can I do?”, what would you suggest?
FB has seen very few contributions. Maybe because it is dense and uses a lot of functional calls, also maybe it’s not so well designed.. or maybe all features are already available :)
If time, money, and resources were no object, would you use your coding powers for good or awesome? What would you do?
Hard to say.. My main concern is that so little people out of Linux/geeks use free software. I would really like if more people would stop using Windows. But I don’t know what is the best to reach this goal. Microsoft really has a lot of money and power and knows how to use them, it’s sometimes very much like David against Goliath.. but with an indestructible Goliath :)
What non-Perl 5 projects are you watching with wise and considered eyes? Why?
I like a lot the Ruby programming language, mainly because of its core object-orientation and its elegant syntax for anonymous closures - though its “real” garbage-collector means we cannot use destructors as I learnt to with C++ and could continue in Perl 5. For this reason, I tend to prefer reference counters in use in Perl 5 (or Python).
Which are your favorites CPAN modules ?
I don’t use CPAN much. I use Mandrake and there are usually all the modules I need packaged. And if they aren’t, I package them.
Dou you plan to build another “next big thing” in Perl ??
Hum, not in the near future. I’m a programming guy and I like to explore different things. I am working on a “medium thing” in Ruby right now, and have been working on another “medium thing” in Java last year. Ideally, I’d like to work on another “medium thing” in OCaml?.
And maybe one day I can try to work on my secret “rule the world” project. It’s basically a mix of Starcraft, Civilization and SimCity?. I have had some ideas but it stopped rather early. Maybe, one day…?
Any experience (funny or not so) that you had while making Frozen Bubble ??
I “debugged” the two-player mode with a colleague, and after a short while beating him over and over he thought the “left” player was favored. The real problem is that he has a lot more muscles than me, and he doesn’t like losing too much…
VĂctor A. Rodriguez (Bit-Man) is member of CaFe.pm (Capital Federal Perl Mongers) and its current leader

