Author Topic: AGS Editor Source Code Release  (Read 23158 times)

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens Monarch
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
AGS Editor Source Code Release
« on: 26 Oct 2010, 19:30 »
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.

Re: AGS Editor Source Code Release
« Reply #1 on: 26 Oct 2010, 21:48 »
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:


Re: AGS Editor Source Code Release
« Reply #2 on: 26 Oct 2010, 23:11 »
This is main website news, Pumaman. When is the main site going to reflect this?
Stuart "Sslaxx" Moore.

Re: AGS Editor Source Code Release
« Reply #3 on: 27 Oct 2010, 00:19 »
What would be the easiest way to compile this for Mono on Linux? Anything I should take into consideration?

Calin Leafshade

  • AGS Project Tracker Admins
  • Long live King Cat!
    • I can help with making music
    •  
    • I can help with voice acting
    •  
    • Calin Leafshade worked on a game that was nominated for an AGS Award!
      Calin Leafshade worked on a game that won an AGS Award!
Re: AGS Editor Source Code Release
« Reply #4 on: 27 Oct 2010, 00:24 »
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.

Re: AGS Editor Source Code Release
« Reply #5 on: 27 Oct 2010, 00:24 »
Windows.System.Forms for one, I do believe, possible issues regarding the Native DLL too.
Stuart "Sslaxx" Moore.

Re: AGS Editor Source Code Release
« Reply #6 on: 27 Oct 2010, 00:35 »
All I can say is :(

DoorKnobHandle

  • Mittens Serf
    • DoorKnobHandle worked on a game that was nominated for an AGS Award!
      DoorKnobHandle worked on a game that won an AGS Award!
Re: AGS Editor Source Code Release
« Reply #7 on: 27 Oct 2010, 01:26 »
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?
« Last Edit: 27 Oct 2010, 01:29 by dkh »

Shane 'ProgZmax' Stevens

  • Mittens Serf
  • AGS Project Tracker Admins
  • GARBAAAAAGE DAAAAAAY!
    • I can help with animation
    •  
    • I can help with characters
    •  
    • Lifetime Achievement Award Winner
    •  
    • I can help with making music
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • Shane 'ProgZmax' Stevens worked on a game that was nominated for an AGS Award!
      Shane 'ProgZmax' Stevens worked on a game that won an AGS Award!
Re: AGS Editor Source Code Release
« Reply #8 on: 27 Oct 2010, 01:42 »
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.

« Last Edit: 27 Oct 2010, 01:43 by ProgZmax »

DoorKnobHandle

  • Mittens Serf
    • DoorKnobHandle worked on a game that was nominated for an AGS Award!
      DoorKnobHandle worked on a game that won an AGS Award!
Re: AGS Editor Source Code Release
« Reply #9 on: 27 Oct 2010, 01:47 »
Oh, I only did it for one project accidentally. Awesome, thanks, ProgZ!

Re: AGS Editor Source Code Release
« Reply #10 on: 27 Oct 2010, 02:42 »
I would be willing to pay money if someone could port it in Mono.  And I'm deadly serious too.

DeadSuperHero

  • There's no sense crying over spilled tears.
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with making music
    •  
    • I can help with PR
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: AGS Editor Source Code Release
« Reply #11 on: 27 Oct 2010, 04:08 »
An attempt to build in MonoDevelop brought up the following error.

Quote
The 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#
« Last Edit: 27 Oct 2010, 04:16 by DeadSuperHero »
"There are three side effects of acid: enhanced long-term memory, decreased short-term memory, and I forget the third." - Timothy Leary

Check out my
art

Re: AGS Editor Source Code Release
« Reply #12 on: 27 Oct 2010, 05:06 »
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.

Re: AGS Editor Source Code Release
« Reply #13 on: 27 Oct 2010, 05:08 »
Could you link me your compiled build smiley?

Re: AGS Editor Source Code Release
« Reply #14 on: 27 Oct 2010, 11:20 »
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.
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?
« Last Edit: 27 Oct 2010, 11:30 by Sslaxx »
Stuart "Sslaxx" Moore.

Endres

    • I can help with scripting
    •  
    • I can help with translating
    •  
    • I can help with web design
    •  
Re: AGS Editor Source Code Release
« Reply #15 on: 27 Oct 2010, 15:01 »
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

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
Re: AGS Editor Source Code Release
« Reply #16 on: 27 Oct 2010, 15:59 »
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

  • There's no sense crying over spilled tears.
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with making music
    •  
    • I can help with PR
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: AGS Editor Source Code Release
« Reply #17 on: 27 Oct 2010, 16:05 »
It at least starts in openSUSE.

That is epic. I wonder how trivial it is to just switch toolkits?
"There are three side effects of acid: enhanced long-term memory, decreased short-term memory, and I forget the third." - Timothy Leary

Check out my
art

Re: AGS Editor Source Code Release
« Reply #18 on: 27 Oct 2010, 16:10 »
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.

Re: AGS Editor Source Code Release
« Reply #19 on: 27 Oct 2010, 18:10 »
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.
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