AGS Editor Source Code Release

Started by Pumaman, Tue 26/10/2010 19:30:56

Previous topic - Next topic

Pumaman

Following discussions in this previous thread, I have decided to go ahead and open up the source code for the AGS Editor.

It is released under the Artistic License 2.0; please read and understand the license before downloading the source code.

Some important points about this release:
* The AGS Editor source code is C#, built with Visual Studio 2008 and targetted to .NET 2.0. You should be able to compile it with the free Visual C# Express edition, but I haven't tried this.
* This source release does not include the source code to the AGS.Native DLL. This assembly is a mixed-mode managed and native C++ assembly, which has dependencies on various other libraries such as Allegro, ALFONT and Scintilla, which makes it relatively complex to compile. I will consider releasing the source code for this in the future.
* The editor uses irrKlang for audio previews, you may need to download this separately if you can't build the editor.
* The AGS.CScript.Compiler assembly has a half-finished re-write of the script compiler. Only the Preprocessor part of this assembly actually currently used; the rest of it is only half finished.
* This release is completely unsupported. Additionally, I will not provide support for any bugs or problems you have with a version of the AGS Editor that you built yourself, or problems with any games that you create with such a version.

Contributing changes:
* The "Standard Version" of the AGS Editor will still be controlled by me. This will be the version available for download on the website. However, I am looking forward to receiving fixes and improvements to incorporate into it.
* I may set up some sort of CVS at some point. For now, if you make any bug fixes or add any cool new features, please post your updated source code in this thread so that we can discuss adding it to the Standard version of AGS.
* I would prefer for the Plugin API to be enhanced so that minimal changes are actually required to the Core AGS Code, and that more functionality can be implemented by plugins.

Source code download:
http://www.adventuregamestudio.co.uk/AGSEditor-Source-3.2.0.103.zip

Have fun! Let me know how you get on, or if you have any problems compiling the code.

Denzil Quixode

I did need the irrKlang.NET2.0.dll, and this Post-Build event caused me a problem:

E:\Code\ags\netedit\UpdateCPPVersion\bin\Release\UpdateCPPVersion.exe $(TargetPath)

...as I don't even have an E: drive ;D - is UpdateCPPVersion important? - but after I removed that, VC#2008 Express compiled it no problem:


Sslaxx

This is main website news, Pumaman. When is the main site going to reflect this?
Stuart "Sslaxx" Moore.

xenogia

What would be the easiest way to compile this for Mono on Linux? Anything I should take into consideration?

Calin Leafshade

as far as I'm aware mono projects are pretty much identical to .NET ones with the exception of some very specific technologies.

I dont see why it shouldnt work out of the box.

Sslaxx

Windows.System.Forms for one, I do believe, possible issues regarding the Native DLL too.
Stuart "Sslaxx" Moore.

xenogia


DoorKnobHandle

#7
Has anybody gotten it to work with 2010 Express Edition yet? I loaded the project up, it converted it for 2010, said it worked fine. If I run it immediately, it builds fine but then crashes because it is said to target .NET 4.0 - if I change it to target .NET 2.0 instead, close and re-load the solution it doesn't build anymore. Throws me ~950 errors of the kind: "The type or namespace name 'Types' does not exist in the namespace 'AGS' (are you missing an assembly reference?)".

Since I'm 100% new to C# and this IDE, I don't quite know what's going on and - especially - how changing the target framework can cause these kind of errors. I do have the irrklang.net.2.0.dll downloaded and referenced as well.

And I noticed there were no pre- or post-build actions in the solution. Maybe the got dropped during the conversion?

EDIT: Oh, just found some additional warnings: "The primary reference "C:\AGS Source 3.2.0.103\AGS.Types\bin\Debug\AGS.Types.dll" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework" - is it possible to change that version for the resource? Can't find any way to do that so far. Or do I have to use an older version of the IDE such as 2008 Express Edition?

Shane 'ProgZmax' Stevens

#8
I got it to compile and run with Visual Studio 2010 express just fine.  First I had to add the irrklang dll, then remove the command Denzil mentioned, at which point it compiled and ran, telling me I'd need to make changes to 'update' it to Net 4.0.  Since I didn't want to bother with that, I just right-clicked on each of the 4 projects (AGS.Controls, AGS.CScript.Compiler, AGS.Types, and AGS.Editor) and changed the platform to Net 2.0, restarting after each one.  Then it compiled and ran without a hitch.

Now that I've got it loaded up I'll probably play with it in a day or two.


DoorKnobHandle

Oh, I only did it for one project accidentally. Awesome, thanks, ProgZ!

xenogia

I would be willing to pay money if someone could port it in Mono.  And I'm deadly serious too.

deadsuperhero

#11
An attempt to build in MonoDevelop brought up the following error.

QuoteThe private field 'AGSTypes.DialogOption._entryPointOffSet' is assigned but its value is never used.

Fun fact, though, the .sln file for the entire project opens up just fine in MonoDevelop. It's kind of neat scrolling through all the little files that put together the very app I've played with the most over the years.

My two main interests out of this:

1. See if it will even compile on a non-Windows system.
2. See if the Win.Forms stuff can be swapped out with GTK# or even Qt#
The fediverse needs great indie game developers! Find me there!

smiley

It at least starts in openSUSE:


Components that need to be modified:
* Debugger (uses PInvokes for named pipes, which are supported in .NET 3.5, not sure about Mono)
* Audio (Irrklang is a mixed-mode assembly)
* SourceControl
plus all the other stuff that relies on native methods.

xenogia

Could you link me your compiled build smiley?

Sslaxx

#14
Quote from: smiley on Wed 27/10/2010 05:06:57Components that need to be modified:
* Debugger (uses PInvokes for named pipes, which are supported in .NET 3.5, not sure about Mono)
* Audio (Irrklang is a mixed-mode assembly)
* SourceControl
plus all the other stuff that relies on native methods.
http://stackoverflow.com/questions/35853/p-invoke-in-mono - if this is to be believed, then PInvoke has been in Mono for a while now. IrrKlang - could something else replace this if necessary?
Stuart "Sslaxx" Moore.

Endres

Chris got totally crazy. ;D
I want a ScummVM Interface that let me play AGS-Games on other different systems (PSP, NDS,...), but I think it's still a good begin to release the Editor-Code. :)

Monsieur OUXX

Damn I wish I weren't at work and had more time, I've been SO curious about the script grammar tree and garbage collection for so long!
 

deadsuperhero

Quote from: smiley on Wed 27/10/2010 05:06:57
It at least starts in openSUSE.

That is epic. I wonder how trivial it is to just switch toolkits?
The fediverse needs great indie game developers! Find me there!

Sslaxx

Quote from: DeadSuperHero on Wed 27/10/2010 16:05:11
Quote from: smiley on Wed 27/10/2010 05:06:57
It at least starts in openSUSE.

That is epic. I wonder how trivial it is to just switch toolkits?
Unless a third-party interface is used, how about "not all all trivial"?
Stuart "Sslaxx" Moore.

lefticus

Quote from: Sslaxx on Wed 27/10/2010 11:20:46
Quote from: smiley on Wed 27/10/2010 05:06:57Components that need to be modified:
* Debugger (uses PInvokes for named pipes, which are supported in .NET 3.5, not sure about Mono)
* Audio (Irrklang is a mixed-mode assembly)
* SourceControl
plus all the other stuff that relies on native methods.
http://stackoverflow.com/questions/35853/p-invoke-in-mono - if this is to be believed, then PInvoke has been in Mono for a while now. IrrKlang - could something else replace this if necessary?

pInvoke is well supported in mono too, it's used by any library that exposes an existing C or C++ library to mono (ie, sdl, wxwidgets and more). Named pipes exist on unix too, the main problem would just be porting between the unix/windows methods for using named pipes.

Also, it seems irrklang has support for linux too:
http://www.ambiera.com/irrklang/features.html

I haven't been involved in the AGS community (although I've played many of the games), but I spend most of my professional time working on crossplatform (Mac/Unix/Windows) C++ apps. If no one else manages to solve these problems with the Linux build, I might spend some time working on it this weekend.

-Jason

SMF spam blocked by CleanTalk