Last week I got the chance to interview Sam Lantinga, Loki’s lead programmer on the topic of the new SMJPEG project, long hours, and frisbee.
open source IT: Hey there, Sam! Tell me all about SMJPEG.
Loki: It's an audio/video encoding that we use for FMV [full motion
video] on Railroad Tycoon II.
open source IT: Loki President Scott Draeker mentioned earlier that it
wouldn't be any good for encoding Star Wars: Episode I.
Loki: That's right. It uses JPEG, which is a lossy compression, and we reduce the movies to 320x240 to get real-time playback speed. The file spec is only about 50 lines, most of which are implementation comments.
We needed an encoding that could be played frame by frame, and easily skip frames for timesync. We also needed something that had dynamically adjustable compression and wasn't fixed to the 24/30 FPS used by MPEG. The easiest solution seemed to be using Motion JPEG.
open source IT: How long did it take to get it to where it is now?
Loki: A week and a half. I have to give a hand to Vaclav Slavik, who first came up with the idea, and made the necessary changes to the IJG group's JPEG implementation. I just whipped up a file format, essentially. We worked together on the optimizations, and I wrote the encoder and decoder implementation.
open source IT: What are the next few big projects for Loki?
|
The file spec is only about 50 lines, most of which are implementation comments.
|
|
Loki: Well, I can only tell you a few of the things we are working on. Railroad Tycoon II, is, as you know, done. We are just polishing the installer and doing the packaging. Eric's Ultimate Solitaire will be going Beta very soon, and hopefully will ship appropriately. We are working on Heretic II, and Heavy Gear II. And we are starting on two other projects that I cannot disclose at this time.
open source IT: What if I promise not to tell anyone?
Loki: Sorry, I'm not allowed. I'll give you a hint though, one of them is a
turn-based fantasy strategy game.
open source IT: What was the hardest thing about porting Railroad Tycoon II?
Loki: The movies. We spent weeks working on different file formats, including MPEG and AVI, and full-size JPEG. SMJPEG was the only one that had the proper balance of speed and size.
open source IT: How many developers work on each project?
Loki: It depends on the project. Generally one to three programmers per project. There's a lot of artwork and manual stuff that needs to happen for a polished product as well. That is often during the last three weeks before release.
open source IT: Loki is pretty devoted to the Open Source ideology; what's
next after SMJPEG?