Author Topic: C# AGILE  (Read 91431 times)

0 Members and 1 Guest are viewing this topic.

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #165 on: November 03, 2022, 04:15:42 PM »
I've just pushed the fixed AGILibrary version to the AGILE master branch and have confirmed the game now loads and plays.

Offline Collector

Re: C# AGI Interpreter
« Reply #166 on: November 05, 2022, 05:51:44 PM »
Have you had a chance to look at the NSIS installer script? An MSI seems rather heavy handed for something that really does not need to be installed. Plus, as I mentioned, an NSIS installer can be treated like a simple zip with 7zip. The script also gives the user the option to add the "Run in AGILE" folder shell extension, which can be easily removed by either the uninstaller or from the AGILE options dialog.

All you need is to install NSIS and drop my AddOptions.nsh into the NSIS "Include" folder. You only need to edit the "!define RESOURCE_NAME " path in the script to match the folder with the binaries. For an editor you can use Notepad++, HM NIS EDIT or even my SCI Companion plugin, NSISPublisher.

I used a GPL as the license and the README.md for a readme file, but can be whatever you decide.
KQII Remake Pic

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #167 on: November 06, 2022, 12:19:10 AM »
I installed NSIS, then the Registry plugin, as that didn't come be default. A couple of warnings when it ran, about the language, but it has successfully produced a file called AGILESetup.exe.

When I run it, the installation works fine. I get the option in the windows menu, and on the desktop. Both of those work.

Unfortunately the "Run in AGILE" folder extension isn't working. I'm getting the following message:

Quote
Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item.

which is quite strange, as these are all folders that I've created myself, and copied the files inside, and I'm trying the "Run in AGILE" option with the same user.

I've checked the Security permissions on the folder, and my user has full control, but it still isn't working. Any tips for what might be wrong?

Offline Collector

Re: C# AGI Interpreter
« Reply #168 on: November 06, 2022, 06:30:48 AM »
I have located the problem. A tool that I have used for years to convert exported reg files to NSIS script used to work flawlessly has started to add extra escape characters to the script. I have it fixed and will have it replaced on my repo after I get back from work today.
KQII Remake Pic

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #169 on: November 06, 2022, 08:21:04 PM »
Thanks @Collector. I can confirm that it is now working for me. I really like the ease at which the game can be run using the folder shell exception. Very useful.

Regarding the choice of open source license, I don't really know the difference between the various licenses, so I'll go with whatever the rest of you recommend. You have it as GPL2 at the moment. Is GPL2 a good one? I see that there are various others that appear to be more commonly used, e.g. in the Top 20 list below:

https://www.synopsys.com/blogs/software-security/top-open-source-licenses/

What are the main differences? And what do you think would be appropriate for something like AGILE? The page linked to above discusses the "risk" from a commercial project perspective, so doesn't directly apply here (unless a company wanted to create a commercial product using AGILE).

Another interesting article here:

https://www.mend.io/resources/blog/open-source-licenses-trends-and-predictions/

It shows that GPL licenses are declining in popularity each year, whereas permissive licenses, such as the MIT and Apache one, are in general growing when compared to copy theft license usage.

I guess it doesn't matter much for AGILE, because I doubt that a commercial product is going to use it, and perhaps we wouldn't want it to anyway. I like the idea of anything based on AGILE also being open source.

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #170 on: November 06, 2022, 09:00:16 PM »
Trying SQ2 with the latest build Collector posted on the SHP forums. The sound of the sweeping is still wrong (though it sounds like the truncation problem is solved). I decided to test between AGILE, ScummVM, and DOSBox to see how they all measured up. To my surprise it seems like ScummVM doesn't produce the sound correctly either. So while ScummVM has the best tone emulation (until now) with its volume envelope on the notes, DOSBox has the best noise emulation.

It might take a while for me to work out why the noise emulation is wrong. I can't see the problem at the moment. I tried dropping the dosbox code into AGILE (with obvious conversion from C to C#) and it didn't seem to make much difference that I could hear. AGILE still sounded wrong, and still different from dosbox. The only bit of code from dosbox that I tried though was specifically the bit that shifts the LFSR and taps the feedback bits, as I assumed that that would be where the main difference affecting sound would be. Apparently not though.

The dosbox code for handling the LFSR feedback is certainly different from AGILE, in fact the dosbox source code seems to be different from the comment at the top of the file that describes how the feedback works. At least I couldn't tie back that description to the code. But as I say, despite it being different, using the dosbox feedback approach didn't make a noticeable difference, and AGILE still sounded wrong. So I'm beginning to think that the issue is outside of the shift and feedback part of the code.

Offline MusicallyInspired

Re: C# AGI Interpreter
« Reply #171 on: November 07, 2022, 12:44:29 PM »
It's really authentic already at any rate. If it had to be this way forever and couldn't be fine-tuned it wouldn't be the worst thing.
Brass Lantern Prop Competition

Offline Collector

Re: C# AGI Interpreter
« Reply #172 on: November 07, 2022, 04:39:29 PM »
Thanks @Collector. I can confirm that it is now working for me. I really like the ease at which the game can be run using the folder shell exception. Very useful.

Regarding the choice of open source license, I don't really know the difference between the various licenses, so I'll go with whatever the rest of you recommend. You have it as GPL2 at the moment. Is GPL2 a good one? I see that there are various others that appear to be more commonly used, e.g. in the Top 20 list below:

https://www.synopsys.com/blogs/software-security/top-open-source-licenses/

What are the main differences? And what do you think would be appropriate for something like AGILE? The page linked to above discusses the "risk" from a commercial project perspective, so doesn't directly apply here (unless a company wanted to create a commercial product using AGILE).

Another interesting article here:

https://www.mend.io/resources/blog/open-source-licenses-trends-and-predictions/

It shows that GPL licenses are declining in popularity each year, whereas permissive licenses, such as the MIT and Apache one, are in general growing when compared to copy theft license usage.

I guess it doesn't matter much for AGILE, because I doubt that a commercial product is going to use it, and perhaps we wouldn't want it to anyway. I like the idea of anything based on AGILE also being open source.

I was not really choosing a license, just grabbed one I had to build the installer. I have no preference which one. Just need replace the existing one with whatever chosen license in the NSIS-Installer folder and change the file name in the script accordingly. I have no problem with a permissive license, but would like anyone that uses it for something else keep their project open source, too.

https://choosealicense.com/
KQII Remake Pic

Offline vafada

Re: C# AGI Interpreter
« Reply #173 on: November 09, 2022, 04:48:24 PM »
@lance.ewing

I'm still watching the repo... I've been playing PQ, trying to finish the game using AGILE. PQ is such a pain to play (not fun)

So far, no issue are popping up... so I haven't been posting issue... So its been quiet on my end.. but yeah I'm still lurking behind the scenes.

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #174 on: November 09, 2022, 08:44:34 PM »
@vafada, no more issues is good news. You found a couple in PQ. I guess with each new game tested, we might find additional issues. It seems to be the way so far. I am planning to start playing through another game soon. I'm thinking either SQ1 or GR.

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #175 on: November 12, 2022, 03:59:57 PM »
I decided on playing through SQ1, the version using v2.089 of the AGI interpreter. The one issue I've found so far is that the quit command doesn't have a parameter in that version of AGI, which I had a placeholder TODO comment in the code for already but hadn't got around to implementing. That is now fixed though. I'm getting close to the end of the game. Should finish it later today.

Offline Collector

Re: C# AGI Interpreter
« Reply #176 on: November 12, 2022, 04:29:30 PM »
As expected, AGILE happily ignores CPC since it is tied to the original Sierra interpreter, not the game data.
KQII Remake Pic

Offline lance.ewing

Re: C# AGI Interpreter
« Reply #177 on: November 13, 2022, 12:11:38 AM »
Yeah, obviously no issue with that form of copy protection. I have been thinking about adding a feature to detect the games with questions at the start, e.g. MH1, GR, KQ4, LSL, and automatically skip those checks, as they're quite annoying. Shouldn't be too difficult to implement.

I have finished playing through SQ1. Next on the list for me to play is Gold Rush. vafada finished playing through PQ and found another interesting bug to do with add.to.pics in the final scene that has now been fixed.

Has anyone noticed that the Folder Browser Dialog sometimes doesn't scroll down to the selected folder, even though a folder is preselected? Quite often it does scroll down, but not always. I've found a workaround to make it always scroll down to the selected folder, but it is a bit hacky, so I thought I'd ask if anyone else has noticed this issue before I put the hack in to address this.
« Last Edit: November 13, 2022, 03:34:59 AM by lance.ewing »

Offline Collector

Re: C# AGI Interpreter
« Reply #178 on: November 13, 2022, 08:03:58 AM »
Setting the root folder to RootFolder "MyComputer" is supposed to do that. Since adding that I have not noticed it not scrolling to the selected folder. The only thing that I can think of is that it is not loading its config file or the lastBrowsePath value is null or invalid. When it happens is MyComputer selected? I am curious as to the hack you devised.

I like the idea of skipping the CP questions. Gold Rush v3 (Software Farm version) has no copy check questions, which is why I always use it when I play the game. What about making skipping optional? Skipping the age questions in LSL would be nice as well. I don't remember if LSL1 has different "dirtyness" levels based on how well you do with the age questions the way some later games in the series.

Skip CP and Dirtyness checkboxes could be added to the options form.
KQII Remake Pic

Offline Collector

KQII Remake Pic


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.032 seconds with 23 queries.