A rush of blood to the Sphere project

tung's picture

This is me, on the Sphere forums, January 31 2009:

[Sphere is] basically a software engineer's nightmare.

I wish I could share your bright-eyed optimism, but with the amount of effort required to understand, modernise and lead the project in new directions, it'd be much easier to start from scratch and make a new project with similar goals, which would have the added benefit of using up-to-date technologies and simpler project management.

This is me, on the same forums, February 25 2009:

I'll try the compilation fixes that kamatsu was doing myself. When I get it working, I'll put it in CVS right away.

What changed?

Nothing. I've always had the same policy towards the Sphere project I've always had: I'm a maintainer. I make sure Sphere compiles, especially under Linux. I smite show-stopping bugs. The steady, loyalist dog of the Sphere regime.

Why?

So if I'm not adding new features to Sphere, why am I still with it after all these years?

First off, wise guy, I'm not doing nothing, I'm maintaining the code base. In the past, I added zooming and a sensible default config to the Linux version. I weeded out problems with the networking subsystem, and cooperated with others to make the source compile under recent compilers, which has made all the new features possible.

Secondly, I'm still here because I've been here for so long. There's inertia. The major languages in my hobbyist coding go roughly: Klik & Play (now Multimedia Fusion), C, QuickBASIC, C with Allegro, Game Maker and BlitzBasic are in there somewhere, and then Sphere. At that point, things sped up dramatically with high school and university, so I stuck with Sphere since I didn't have much time to look at the alternatives.

But it's not like I'd just leave if I hadn't been here so long. My years are valuable to the community. I know the major bits of the system and how they play together. I know how finicky Sphere is with compilers and how to assuage its complaints. I know the site, the wiki and forums, and the people. I support the real contributors, whom I consider the true heroes of the Sphere story.

My help and the help of others have not only kept Sphere alive, it kept it growing.

Sphere, the bug pile

Despite this, Sphere is a pile of bugs. Lots of bugs. It's like an overgrown tree: there's stuff everywhere, and you know you have to prune something. But everything is so fragile, if you cut off the wrong piece...

I don't think Chad Austin thought that Sphere was going to grow as large as it did. It's not really his fault that Sphere has all the bugs it has, but his leaving left the project with a steadily fading vision.

Without a vision, software becomes a feature free-for-all. The dreaded feature creep takes over, and eventually, the bugs outnumber the features. The developers like me are the only thing standing between it and some kind of implosion.

If Chad had thought that testing was integral to Sphere's development, he'd have done it. Flik, the guy who took over after Chad let the project go and the one who gave me SourceForge.net CVS access to the source, had talked about making tests, but I think he knew it was too late. A zero defects policy like at Microsoft would have helped immensely. You live, you learn.

Extending Sphere: Inspiration or Insanity?

With all those bugs, you'd have to be nuts to want to add features to Sphere, right?

Apparently such people exist. Kyuu, FutureBoyNil and others, beyond all reason, have dared not only to understand the Sphere source, but grow it. Are they crazy? Maybe.

But there's something more basic at play here. I think Sphere represents an ideal that hasn't manifested itself very strongly anywhere else:

2D games development should be easier than C and C++

That is really is a vision, an idea, and obviously it's stronger than the deterrent of an awful code base.

After all, ideas never die.

The CVS problem

Sphere has been around for a decade. That means decade-old technologies. Decade-old project hosting. Decade-old tools. Tools like CVS.

The problem with the use of CVS to manage Sphere is that there is a blessed circle of contributors that are allowed to commit changes to the Sphere source. When all the blessed contributors leave, the project freezes. This freeze happens even if others want to put in patches or add stuff.

That very nearly happened with Sphere. Chad Austin was long gone, Flik had stopped committing, and I was lucky that he responded on his recorded email. For a very short while, Sphere almost died. And I blame CVS for that.

Of course, me asking for CVS commit access was the driving force for getting the Sphere source to compile under modern compilers, to enable new features and fix old bugs. I worked very hard with a few people to make that happen.

One day, Sphere the project may flicker out and die, but Sphere's ideas will live on. That programming games should be fun is something I'll always carry with me, and so will others.

Sphere and the future

Sphere is in its twilight years right now, and sooner or later it will be gone. In the meantime, I'll take a note from Jeff Atwood and Joel Spolsky on the Stack Overflow podcast #42, and maybe use Sphere as an experimental test bed. If the project is going nowhere, it may as well go there the fun way.

One idea for Sphere is SQLite, the lightweight database system. Sphere is intended for RPGs, and RPGs tend to have lots of data that belongs in some sort of lightweight database. Things like enemies and items are perfect examples of things that should be in a database, and SQLite handles the job admirably.

Another is Box2D, a 2D physics engine. Sphere is the basis of many unusual games, so a physics engine might add more to mix. A 2D physics engine fits the ethos of the type of games Sphere is used for.

For the time being, I'll still be a maintainer for Sphere, maintainer-ing away. Long live the Sphere project.