Compiling AGS

From Adventure Game Studio | Wiki
Revision as of 10:12, 29 September 2015 by Monsieur'ouxx (talk | contribs)
Jump to navigation Jump to search

Please note that the discussion about this topic is constantly updated on the AGS forums : How to compile AGS (forums discussion)

Introduction

If you're a game designer, you should never have to "build" AGS. All you want is to use the Editor to make the game, then use the Engine to play it. If you have some very specific needs, you might want to program an Editor plugin, but you can just build it on its own, without rebuilding the entire AGS source code (that's precisely why plugins were invented).


You'll want to rebuild AGS (either the Editor or the Engine) only for two potential reasons:

  • You want to know very accurately how it works inside (e.g. because the plugin you're currently developing is rather complex and you don't know very well how to make it work with AGS built-in features)

OR

  • You want to implement new features into AGS itself, as a contributor to AGS, which is an open-sourced project. For example, you've decided to fix a bug from the tracker, or you're one of those coding wizards who are able to port the entire engine to a new platform.

Now that you know all that, here is how you get the AGS source code (Editor or Engine), and how you compile it.


AGS is actually several projects

Once upon a time, there was a free piece of software called AGS, which was created and then maintained by only one man: Chris Jones, a.k.a. Pumaman on the AGS forums. This lasted for over 15 years. The source code was not open. Then, in 2012, AGS got open-sourced. Anyone could contribute. Even though the code was pretty damn good considering it had been maintained by only one guy for a decade and had lived through many technologies (DOS, Windows, complete refactoring of the Editor, etc.), some parts of it had become what one could call "spaghetti code".

In particular, some parts of the project, the "Native" parts, that were in charge of some low-level tasks (written in C++), were tighly linked to the VisualC9 libraries (the ones shipped with Visual Studio 2008, if you want to know). That bond was too intricate to be removed easily. The new support team is currently keeping that in a separate DLL, called "Native.dll".


Therefore, if you get the AGS sources and go to the /Solutions/ subfolder, you'll find the following solutions:

  • AGS.Editor.Full.sln - That's the full Editor project, including Native.dll.
What you need to know :
* The "Native" project can be built only with exactly Visual Studio 2008 SP1
* You cannot use the free ("Express") versions because you'll need to change the "General" -> "Platform Toolset" setting


  • AGS.Editor.NoNative.sln - That's only the high-level, C# part of the Editor, which does most of the work.
What you need to know :
* It can be built with any Visual Studio higher than 2008 (For example: visual Studio 2013).
* You can use the free versions (for example: Visual C# Express edition)
* You'll need to get the Native.dll file, already compiled (you can take it from the regular Editor, that you can download from the AGS page)
  • AGS.Engine.sln - That's the AGS game engine (the one that actually plays the game).
What you need to know :
(No additional information yet. Read further below)

Getting the sources

AGS source code is currently hosted on a git repository, on github : http://github.com/adventuregamestudio/ags You need to be familiar with git concepts to get the code, and then commit it back if you want to share your changes.

In a nutshell:

  • Install any kind of git client onto your machine. For example, if you use Visual Studio, there are some extensions that allow you to connect to a git repository directly from within the IDE. Otherwise, you can use any client you wish : https://git-scm.com/downloads/guis
  • Use this client to clone the ags repository onto your machine. You can get the connection string from the github website, on the right-hand side of the screen, under "HTTPS clone URL" : https://github.com/adventuregamestudio/ags.git
  • Wait for the cloning (download) to complete and then open one of the solution files mentionned in the previous section. For a start, I recommend the easier one : AGS.Editor.NoNative.sln

Building instructions for each system

How to build AGS on windows

  • AGS.Editor.NoNative.sln - That's only the high-level, C# part of the Editor, which does most of the work.
* Get the source code, as described in the previous section.
* Download and install any Visual Studio higher than 2008 (For example: visual Studio 2013). You can use the free versions (for example: Visual C# Express edition)
* Download your regular AGS from the official website, either here : http://www.adventuregamestudio.co.uk/site/ags/ or on the forums in any of the threads dedicated to development builds.
* Unzip AGS to a temporary folder and get the file "Native.dll". Copy it to any location you want. It's the only file you need to continue.
* Open the .sln file with Visual Studio. Expand the "AGSEditor" project, then expand "References". Remove the reference to "Native.dll", then add it again (right-click-->Add Reference...) and use the "browse" button to point to your Native.dll file.
* Rebuild the solution. It should work out of the box (tested with Visual Studio 2013 ultimate)


  • AGS.Editor.Full.sln - That's the full Editor solution, including the project that generates Native.dll.
* The "Native" project can be built only with exactly Visual Studio 2008 SP1
* You cannot use the free ("Express") versions because you'll need to change the "General" -> "Platform Toolset" setting
* for more information, please read further here :
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48009.msg636451101#msg636451101
http://www.adventuregamestudio.co.uk/forums/index.php?topic=49159.0


  • AGS.Engine.sln - That's the AGS game engine (the one that actually plays the game).
There is no further information yet. Please note that the engine might be migrated from Allegro 4 to Allegro 5. Read here : http://www.adventuregamestudio.co.uk/forums/index.php?topic=51751.0

How to build AGS on Linux

You will find a lot of information in the Readme file in the git repository: http://github.com/adventuregamestudio/ags


  • AGS Editor
No additional information.
  • AGS Engine
No additional information. Please consult the links below.
http://www.adventuregamestudio.co.uk/forums/index.php?topic=46152.0
https://github.com/adventuregamestudio/ags/blob/master/debian/README.md