Now that 3.2.1 has been released, AGS seems to be in a stable enough state to release the source code.
So, to that end I've added it to the SVN repository here:https://svn.bigbluecup.com:7743/svn/ags/trunk
you will need the Common, NativeLibs and Engine folders within this.
I know there's been a lot of interest in this, so if you're a C++ programmer then the code is now available for your perusal. It's released under the Artistic License 2.0, as with the editor code.
You will need Visual C++ Express 2008 (this is a free download from MS). Do NOT use the 2010 version, this will probably not work and let's not complicate things at this stage by trying to use it.
In the VC++ Options, you'll need to add the /Common and /Common/libinclude folders to the VC++ Include Directories list.
You will also need to install the DirectX SDK from Microsoft if you don't already have it.DO NOT
use this source code as a learning resource or a guide on best practice.
The state of the source code is VERY BAD
and should in fact be considered an example of BAD PRACTICE
Unlike the AGS Editor code which is relatively modern and a generally good standard, the engine code dates back 12 years to 1999, and has a severe case of the another-bit-being-bolted-onto-the-side disease. It also retains compatibility with old versions which means that some of the old and particularly dire code paths cannot yet be removed.
So just to be clear, YES I KNOW
that the code is in a bad state. You don't need to tell me that.
I also know that AGS is used by thousands of games with thousands of combinations of game settings and script functions, and that any attempt to refactor the code into a better state is likely to inadvertently break something in someone's game, which is why I haven't attempted to do it yet.
The first important question is, does it compile for you? I'm not 100% sure that I've uploaded everything it needs into SVN, so let me know.
If you're thinking about making a change to the engine, make sure you always consider:
* How does the change affect existing games? Will it break any backwards compatibility?
* Does the change work with all colour modes (8-bit, 16-bit, 32-bit)?
* Does it work with both "low-res" (320x200/320x240) and "hi-res" (640x400 upwards) co-ordinate systems?
* Does it work with both the DirectDraw and Direct3D graphics drivers?
* Is it cross-platform (ie. is there anything platform-specific that would break the Mac and Linux ports?)
If you're thinking about adding third-party libraries, remember that AGS must not
use GPL libraries as the GPL license is too strict. Libraries licensed under the Lesser GPL (LGPL) are ok, however.
Always carefully read the license of any third-party libraries before proposing to use them in AGS.