SourceMod – What’s the Deal? (Part 2 of 2)

If you read the previous article, you now understand why SourceMod was a huge disaster. We learned a lot from those mistakes, and our goals have changed drastically over the past two years. As we announced a few months ago, we are no longer interested in providing a full AMX Mod X port to Source. Among other things, it is simply not possible given the nature of Valve and the Source engine.

In April 2006, three members of the original SourceMod team (Faluco, DS, and I) decided to restart the project. Our new goals were:

  • Optimize the Pawn language as much as possible
  • Create our own new language platform for maintaining and extending
  • Solve the “Unloadability” problem of dependencies
  • Create a highly extensible, flexible, and well documented API for embedded applications

As you can probably tell, the words “Half-Life 2″ don’t appear in this list. As such, we began rewriting SourceMod from the bottom up, using none of the original code, or even writing HL2 specific code. We completed various phases in roughly this order (dates are all 2006):

  • March to August: Complete rewrite of the Pawn JIT optimizer, which is almost 120KB of raw x86 assembly.
  • August to September: Complete C++ rewrite of the Pawn Virtual Machine and its associated helper functions, as well as a rewrite of the stored file format.
  • October: Added a myriad of features to the compiler, such as dynamic arrays, function pointers, and native strings.
  • November-December: Implemented the “Five Essentials” to the SourceMod Core — the HL2 independent pieces which make the language embeddable, functional, and extensible.

So, Where are We Going from Here?
Our original plan was to have SourceMod’s Core basically wrapped up and internally ready by December, so we could announce a very, very limited demonstration package before the new year. As a bunch of things came up in December which I’d rather not get into, that didn’t happen. But our progress on SourceMod has been very good over the past two months, enough such that for the first time in a while, I have the confidence to write this news post.

Our current goal is to deploy SourceMod “as soon as possible” as something with capabilities similar to Admin-Mod for Half-Life 1. As it gets more popular and more testers, we will build it up to something comparable to AMX Mod X. Minimally, the first initial public release of SourceMod will probably occur sometime in late January to mid February. Don’t hold me to this, it is simply a rough guess. It will feature, roughly:

  • Loading of C++ extensions
  • C++ API: Group based administrative permissions to clients
  • C++ API: Modular extensibility to scripting (adding functions/events)
  • C++ API: Access to most of SourceMod’s internals
  • Scripting: Basic string manipulation
  • Scripting: Basic client events and natives
  • Scripting: Basic floating point/vector manipulation
  • Scripting: Creating commands/cvars
  • Scripting: Creating timers

As we are not focusing on the actual “admin” plugins right now, I cannot say what they will contain. We’re trying to get SourceMod usable by third party developers before we start going too far into the feature list, to avoid the mistake we made last time.

In conclusion, I’m very pleased to say that we have made a lot of real progress on SourceMod lately. We’re very pleased with the solidity, extensibility, and organization of the code, and Faluco and I have been working hard over the past few months to churn out as much as possible.

If you’re interested in SourceMod, make sure to stay tuned to the devlog over the next few weeks. I will be posting and explaining API and scripts to the devlog directly from SourceMod. We’re at the point where documentation is matching what will be in the final product, so I will also be writing articles for the AlliedModders Wiki and discussing them here.

Leave a Reply

You must be logged in to post a comment.