Community

AGI Programming => AGI Development Tools => Topic started by: AGKorson on December 02, 2020, 02:48:20 AM

Title: WinAGI Version 2.1.4 Is Available
Post by: AGKorson on December 02, 2020, 02:48:20 AM
Here it is - the latest update to WinAGI. This version fixes a TON of bugs, a lot of enhancements, and some new features that I've heard folks asking about. I spent a lot of time testing, re-testing and testing again, so hopefully there aren't too many bugs left! :)

Link to the install file is here: http://agiwiki.sierrahelp.com/images/3/37/WinAGI_2_1_4.zip

Here's a partial list of the new features:

I was also able to do some testing with Linux. WinAGI actually runs virtually bug-free when run in the WINE environment. It does require a configuration fix in WineTricks (due to a bug in WINE's implementation of riched.dll), but once that's done, it runs just fine. So Linux users have access to WinAGI too.

Things seem to have really quieted down around here, especially in the AGI forums. I fear that the golden age of fan games may be at an end. I'm hoping that tools like WinAGI will help people who might be interested in creating their own games, but didn't know where to start.

So if there is anybody out there who still has interest in AGI, please take a look at this latest release. I think you'll be pleased with how much it helps in creating your next AGI masterpiece.
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: AGKorson on December 02, 2020, 03:34:46 AM
To demonstrate just how useful and easy WinAGI is to use, here is a set of project files and logic source code files for a fully decompiled version of Gold Rush! I did this decompilation as a way to 'stress test' WinAGI to make sure I fixed as many bugs and glitches as possible. It also helped me identify additional enhancements and improvements.

To use this file, extract its contents, including the src directory, into a folder that has the original Gold Rush AGI files (you have to have your own copy of the game- I can't post that here). Then open the WinAGI project file, GR.wag in WinAGI version 2.1.1. You can then browse through all the logics, observe how the game used global defines throughout the game, and explore the game's room arrangement in the Layout file.

It was really very interesting to go through the entire game's logic code and see how the original programmers were able to make everything work so well in the game. It helped me a lot in understanding AGI programming concepts. Not surprisingly, I also found a few bugs in their code (it's a very large game, so no surprise that a few bugs slipped past their quality checks). There was also a a number of places where you could see how the game changed during development- fragments of code that pointed to different story lines that ended up being abandoned.

The source code logics in this project will generate an exact, byte-for-byte copy of the original compiled logics. The only thing I added were the comments and define names. Keep in mind that all the variable/flag define names and comments are my own- nothing in this project is meant to suggest this is the actual source code used by the original developers.

Anyway, if you are interested in studying the programming techniques used in a full size commercial game, this should be of great help. If you have any questions about the comments that I included in the source files, feel free to ask!

Title: Re: WinAGI Version 2.1.2 Is Available
Post by: AGKorson on December 02, 2020, 10:59:47 PM
Ugh. No matter how much testing I do, it seems like something always crops up as soon as I release a version. v2.1.1 won't handle saving and opening layout files correctly. The last step when releasing a new version is to update internal version checks- but somehow I missed the layout functions this time.  :-[

So ignore version 2.1.1. I updated the wiki, and the link in the first post to point to version 2.1.2 which fixes the issue.

If anybody notices any other problems, please let me know and I'll try to get them addressed too.
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: MusicallyInspired on December 03, 2020, 01:44:43 AM
Appreciate your hard work!
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: cosmicr on December 03, 2020, 11:23:30 PM
Really great stuff.

I recently migrated my game development from AGI to SCI, but now I'm considering going back again just so I can make use of the features.
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: Collector on December 04, 2020, 09:46:57 AM
I'll have to try it. Since moving on to Win10 the OCX for the logic editor won't register on install.
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: ZvikaZ on December 05, 2020, 03:03:02 PM
That's great. Thanks for all the work!

Furthermore, the Goldrush! project of yours deserves more attention, IMO.
It'd be great to have it in GitHub, or something.

Maybe join forces with @EricOakford, and add it to his https://github.com/EricOakford/SCI-Decompilation-Archive ?
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: Collector on December 05, 2020, 07:30:28 PM
It would be great to have an AGI branch of Eric's GitHub.
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: EricOakford on December 06, 2020, 05:37:36 PM
I probably could make a new repository for WinAGI decompilations, but AGI is a totally different beast than SCI. Besides, WinAGI refuses to work right for me, giving "Invalid procedure call" when attempting to close a game, and an error with "RichEdAGI.ocx or one of its dependencies not correctly registered: a file is missing for invalid" when attempting to open a logic.
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: AGKorson on December 06, 2020, 09:52:38 PM
Hmm, that's not good. Have you tried to register it manually using regsvr32? Maybe that will work. Also, can you check that the two Type Libraries, 'olelib.tlb' and 'olelib2.tlb' are installed in your system directory (I believe it's actually c:\windows\syswow64)? If they are not, that might be part of the problem. It looks like around version 1.2.9, richedagi.ocx stopped registering normally in some situations. I will do what I can to track it down.

Can you give more specifics on the 'Invalid procedure call' when closing a game? I have never seen that error before. If I can duplicate it, then I should be able to track it down and correct it.


Is anybody else having trouble with logic editor and RichEdAGI.ocx failing to register? Has anybody gotten it to install and work correctly? Feedback would be extremely helpful here.

thx,
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: Collector on December 07, 2020, 08:34:52 AM
How is your C# development going? A new AGI IDE in C# would be a good break from your OCX dependencies.
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: Kawa on December 07, 2020, 09:56:28 AM
As a former VB Classic developer who found his old stuff won't run on Windows 7 or later because of OCX dependencies and has switched to C# and looked back only once to see how bad it's actually gotten, I agree wholeheartedly.
Title: Re: WinAGI Version 2.1.2 Is Available
Post by: Charles on December 07, 2020, 11:24:48 AM
Or VB.Net.  I used to be a big VB6 guy back in the day but I switched to VB.Net 10 years ago (more?) and now I physically shudder whenever I need to touch legacy VB6 programs at work.  C# and VB.Net compile to the exact same thing 99.999% of the time anyway; I just personally find the VB syntax easier to use than the C# syntax.
Title: Re: WinAGI Version 2.1.3 Is Available
Post by: AGKorson on December 07, 2020, 02:43:02 PM
OK, OK, OK!!!

I know I need to switch. But I'm an old curmudgeon, and frankly it scares me a bit that I have such a steep learning curve awaiting. I have Visual Studio (and have had it for years) installed, but every time I open it up, I just get discouraged at how complicated even simple tasks seem. I know it's just a matter of buckling down and learning it, but like I said, I'm old and stuck in my ways. It's not rational, but I can't help it. Some day...

Regarding the problem with the text editor - it's not Windows; it was me. Again. Stupid versioning- the installer had version 3.0.30 of the OCX, but it was supposed to be 3.0.31. So I was installing the wrong one (When I tweaked the OCX, I forgot to copy the new version to the install folder). I fixed the installer, and tested it on a clean Windows 10 system, and it works great - no errors.

You may notice that the first post changed a bit - after getting a special request, I added support for Apple IIgs sound. More fun stuff!

Thx for your support (and for your 'gentle' ;) nudging toward a modern dev platform...)

Title: Re: WinAGI Version 2.1.3 Is Available
Post by: EricOakford on December 07, 2020, 07:01:24 PM
Thanks, it seems to work fine now! Maybe I can do a decompilation of the 1986 Christmas Card - it's the right time for that one!
Title: Re: WinAGI Version 2.1.3 Is Available
Post by: EricOakford on December 08, 2020, 06:08:25 PM
Here's the decompilation for the Christmas Card.
Title: Re: WinAGI Version 2.1.3 Is Available
Post by: EricOakford on December 10, 2020, 06:33:35 PM
And here are decompilations for two of the demo packs. Yeah, AGI is not my thing.
Title: Re: WinAGI Version 2.1.3 Is Available
Post by: HeyItsKyo on January 27, 2021, 08:09:53 AM
I was fiddling with this a bit, and I noticed that in the Picture Editor, the button for Absolute Line does not function properly. You can click it and it will show Absolute Line selected but the tool will continue to be whatever it was previously. I'm on Windows 7, for what it's worth.
Title: Re: WinAGI Version 2.1.3 Is Available
Post by: AGKorson on January 27, 2021, 10:47:58 AM
I was fiddling with this a bit, and I noticed that in the Picture Editor, the button for Absolute Line does not function properly. You can click it and it will show Absolute Line selected but the tool will continue to be whatever it was previously. I'm on Windows 7, for what it's worth.

Buggers. The toolbar handler uses the Key property of the pressed button to set the draw mode; I don't know how, but the Key for the absolute line button got deleted, so the button just gets ignored now. I have no idea what I did that caused that, because I haven't worked on that code in a very long time. It's an easy fix. I will try to post an update shortly, since the picture editor is not very functional without it. While it's not very efficient, you could use the trapezoid option to draw a temporary set of lines, then edit the coordinates to be the line you actually want. (use Ctrl+Ins to add new coordinates as needed).

 If you find any other major bugs like this, please let me know.

FWIW, I'm working in C# now, so other than fixes for things that are severely broken, there won't be any more updates to version 2. Maybe by some time this summer, I'll be ready to release a more modern version... with a lot of new bugs... :)

thx,
Title: Re: WinAGI Version 2.1.3 Is Available
Post by: OmerMor on January 27, 2021, 06:12:21 PM
Maybe by some time this summer, I'll be ready to release a more modern version... with a lot of new bugs... :)

You mean modern bugs...  8)
Title: Re: WinAGI Version 2.1.3 Is Available
Post by: HeyItsKyo on January 27, 2021, 10:03:22 PM
Buggers. The toolbar handler uses the Key property of the pressed button to set the draw mode; I don't know how, but the Key for the absolute line button got deleted, so the button just gets ignored now. I have no idea what I did that caused that, because I haven't worked on that code in a very long time. It's an easy fix. I will try to post an update shortly, since the picture editor is not very functional without it. While it's not very efficient, you could use the trapezoid option to draw a temporary set of lines, then edit the coordinates to be the line you actually want. (use Ctrl+Ins to add new coordinates as needed).

 If you find any other major bugs like this, please let me know.

FWIW, I'm working in C# now, so other than fixes for things that are severely broken, there won't be any more updates to version 2. Maybe by some time this summer, I'll be ready to release a more modern version... with a lot of new bugs... :)

thx,

No problem! I'll be sure to share if I find anything else like that in my fiddlings. I'll be looking forward to both the Pic Editor fix and whatever more you got in store later down the line, makes me happy to see this program still being maintained after so long.  :D
Title: Re: WinAGI Version 2.1.3 Is Available
Post by: pierrelapin on February 01, 2021, 04:38:44 PM
I am a brand new member.
I have just installed the last version of WINAGI and have got some problems with it.
I have to say I am not a user of WIN AGI, I prefer the old AGI STUDIO (138b).
Why ?
I am not a creator of new AGI adventure, but I am using these tools to localize famous AGI adventure in French.
In fact not a direct translation, I rewrite the script in a point&click way: Action, Look, Swim, Jump, Use.
I have finished Black Cauldron and King Quest 1 in 2017, started King Quest 2... in stand by since 2017.

And I always had problems with WINAGI to import and compile existent game: ressources not all recognized, many warnings and error, etc.
AGI STUDIO was fastest and more reliable for this purpose.
But I need WIN AGI to export all the logic script with AGI message object in the form mxx for print function instead of plain text. AGI STUDIO generates only plain text.
It was possible to generate scripts with message variables instead of plain text for print function in my old WINAGI version (1.1.22).
But with this new one, I obtain only plain text messages in print function... so bad for translation and logic approach of AGI script !!!
No option for changing this behavior.
Another problem is the management of comments: where is the classic /* ... */ comment... so useful in a rewrite purpose (and in general). The new block of comment is a very strange choice.

And I continue to have many problems for loading some old AGI original games (DOS version only): some script not recognized, or view, or sound...

So bad, because the new WINAGI seems to be far better... with international extended character recognized directly (it works for SCUMM and i have modified NAGI to recognize it), and so many useful features.
But how can I use variable messages (mxx) into print function ? Can we expect the back of classic comments ? And maybe some correction of bugs for a 100% full original games import ?

It is so exciting to see an AGI application alive with a 2021 new version.

My plan: adapt KQ2, KQ3, GoldRush  (maybe other ones) in a french point&click version (I can adapt for english version if somebody are interested by these, and with help of true english fan).
Title: Re: WinAGI Version 2.1.4 Is Available
Post by: AGKorson on February 02, 2021, 01:11:06 AM
Buggers. The toolbar handler uses the Key property of the pressed button to set the draw mode; I don't know how, but the Key for the absolute line button got deleted, so the button just gets ignored now. I have no idea what I did that caused that, because I haven't worked on that code in a very long time. It's an easy fix. I will try to post an update shortly, since the picture editor is not very functional without it. While it's not very efficient, you could use the trapezoid option to draw a temporary set of lines, then edit the coordinates to be the line you actually want. (use Ctrl+Ins to add new coordinates as needed).

 If you find any other major bugs like this, please let me know.

FWIW, I'm working in C# now, so other than fixes for things that are severely broken, there won't be any more updates to version 2. Maybe by some time this summer, I'll be ready to release a more modern version... with a lot of new bugs... :)

thx,

No problem! I'll be sure to share if I find anything else like that in my fiddlings. I'll be looking forward to both the Pic Editor fix and whatever more you got in store later down the line, makes me happy to see this program still being maintained after so long.  :D
I posted an updated install file. Link here: http://agiwiki.sierrahelp.com/images/3/37/WinAGI_2_1_4.zip

This takes care of the picture editor bug. Thanks for your help in finding this.
Title: Re: WinAGI Version 2.1.3 Is Available
Post by: AGKorson on February 02, 2021, 03:11:12 AM
Hello Pierre,

Welcome to our AGI community. It's a great place to discuss AGI related issues, and you can always count on the users here to help answer any questions you might have.

I'm sorry to hear you are having problems with WinAGI. All I can say is that I've done extensive testing on it over the last ten years or so, and I have successfully decompiled and recompiled every original Sierra DOS game with no errors. But there were a lot of different versions of each game released, and it's possible you have a version that I don't have that does cause errors when loaded in WinAGI. I don't think that's too likely though.

And yes, you do see a  lot of warnings when you decompile/recompile original Sierra games, but those are all there because of bugs or bad coding practices used in the original games. WinAGI is able to do deep analysis of the resources and logic code and exposes those flaws that other AGI tools gloss over or ignore. If you don't like the warnings, you can disable them by setting the error detection level to low. But you miss out on one of the best features of WinAGI (in my opinion) because it will help you find those subtle errors and bugs that are otherwise really hard to detect.

Regarding unrecognized resources, many of the original Sierra games had bits of old code, old resources and invalid directory pointers that got left in the game, even though they are never accessed. WinAGI is able to identify those 'orphaned' invalid resources so they can be corrected if doing a recompile. The errors are not caused by WinAGI- on the contrary, WinAGI points out what other tools miss.

I am not sure I understand your comment about message variables. The terms 'message' and 'variable' have distinct meaning in AGI syntax, so 'message variables' isn't a thing (translation error I assume?) I *think* you are referring to a decompiling option to hide inline display of messages as text strings; so when decompiled, you want to see this:
Code: [Select]
  if (said("look"))
    {
    print(m1);
    }
instead of this:
Code: [Select]
  if (said("look"))
    {
    print("You see nothing of interest.");
    }
If that's the case, then you are correct; WinAGI currently doesn't offer that as a decompile option. But it took me less than 10 minutes to add it. Unfortunately, I saw this post literally one minute AFTER I just posted a new version (2.1.4)!!! So I'll have to make another version, including installer, assuming this is the fix you want. If so, I can get that out in the next couple days.

 Support for delimited comments (/* ... */) was removed intentionally from WinAGI several years ago. There were two reasons for this. First, the original syntax used by Sierra did not have this feature; keeping the syntax as close to the original for nostalgia purposes is something that many in the AGI fan community feel very strongly about. Secondly, removing them greatly simplified the logic coding functions, and also provided huge performance gains when using syntax highlighting in large source files.  It's possible that support for them will be added back in when I move to C#, but most likely not. Time will tell...

Your comment about logics, views and sounds not being recognized, if true, certainly is a concern. But as I said, I have never had any issues like that in years of testing with original DOS versions of AGI games.

I encourage you to start another thread that includes the specific issues you are seeing. If you give me details, I may be able to tell you if it really is a bug that needs addressing, or if you are perhaps not using WinAGI correctly.
Title: Re: WinAGI Version 2.1.3 Is Available
Post by: pierrelapin on February 03, 2021, 03:36:06 AM
And yes, you do see a  lot of warnings when you decompile/recompile original Sierra games, but those are all there because of bugs or bad coding practices used in the original games. WinAGI is able to do deep analysis of the resources and logic code and exposes those flaws that other AGI tools gloss over or ignore. If you don't like the warnings, you can disable them by setting the error detection level to low. But you miss out on one of the best features of WinAGI (in my opinion) because it will help you find those subtle errors and bugs that are otherwise really hard to detect.

I understand that but I can obtain errors when compiling original games... but certainly cause of bad game version as you explained after in your answer.

I am not sure I understand your comment about message variables. The terms 'message' and 'variable' have distinct meaning in AGI syntax, so 'message variables' isn't a thing (translation error I assume?) I *think* you are referring to a decompiling option to hide inline display of messages as text strings; so when decompiled, you want to see this:
Code: [Select]
  if (said("look"))
    {
    print(m1);
    }
instead of this:
Code: [Select]
  if (said("look"))
    {
    print("You see nothing of interest.");
    }
If that's the case, then you are correct; WinAGI currently doesn't offer that as a decompile option. But it took me less than 10 minutes to add it. Unfortunately, I saw this post literally one minute AFTER I just posted a new version (2.1.4)!!! So I'll have to make another version, including installer, assuming this is the fix you want. If so, I can get that out in the next couple days.

You understand very well... it is exactly that, but badly explained, sorry !
It will be a giant step for the world if you can add again this option... thanks !

Support for delimited comments (/* ... */) was removed intentionally from WinAGI several years ago. There were two reasons for this. First, the original syntax used by Sierra did not have this feature; keeping the syntax as close to the original for nostalgia purposes is something that many in the AGI fan community feel very strongly about. Secondly, removing them greatly simplified the logic coding functions, and also provided huge performance gains when using syntax highlighting in large source files.  It's possible that support for them will be added back in when I move to C#, but most likely not. Time will tell...
So bad you cannot enable this feature as an option (even if this disables the syntax highlighting).
For example my BC and KQ1 remake contain a lot of this kind of comments in source code... not easy to recompile them with WINAGI to correct some bugs.

Your comment about logics, views and sounds not being recognized, if true, certainly is a concern. But as I said, I have never had any issues like that in years of testing with original DOS versions of AGI games.

I encourage you to start another thread that includes the specific issues you are seeing. If you give me details, I may be able to tell you if it really is a bug that needs addressing, or if you are perhaps not using WinAGI correctly.
I will do more tests and send you all the details about problems with target game version.
It seems that many version of the same game exist because I had no errors with another download of Space Quest 1 version for example (!)

Thanks for your work and your passion for old things!

Links for my both Point&Clicks Remakes (in French):
Kinq Quest 1 and The Black Cauldron (https://www.obsolete-tears.com/forum/viewtopic.php?f=22&t=8726&p=147741#p147741) (somewhere in the list)
I will put this link in the right section after that, but here it make sense in the discussion.


PS: I made point&Click remakes with a specific goal in mind => my son, six year old, was not very excited by reading and I decided to use sierra adventures as a tool for learning purpose. It has worked. And now I will redo the same with his sister in some years. But old games are very good without the text input, so I will continue because I have always lovee Sierra Games.