Author Topic: WinAGI Version 3.0.0 Progress Updates  (Read 1827 times)

0 Members and 1 Guest are viewing this topic.

Offline AGKorson

WinAGI Version 3.0.0 Progress Updates
« on: January 02, 2025, 08:51:40 PM »
Happy New Year everyone!

My resolution this year is to finish a production version of WinAGI in C#/Visual Studio. To that end, here is the latest pre-production release:
https://github.com/AGKorson/WinAGI-GDS/releases/tag/v3.0.0-alpha11.1

The progress point I'm currently working on is the Defines Editor. In WinAGI VB this is used to manage defines that are considered global in scope. WinAGI VB's compiler automatically loads these defines (as well as defines for reserved variables/flags and resource ID labels) without needing to explicitly define them in logic source code or in a text file (like defines.txt) I thought that was a good idea twenty years ago, but since then I've come to realize it's not ideal. So I'm making a major design change to WinAGI C# that no longer assumes values for IDs, reserved and global defines.

In this release, I've completed that change. Now all define names must be declared and included either in the source file itself, or in a separate file to be accessed via an #include directive. WinAGI still provides automatic management of these features, but the code output will always look more complete because nothing is assumed inside the compiler regardless of how you configure your game for defines support.

There are now three new game properties, IncludeIDs, IncludeReserved and IncludeGlobals that you can use to tailor the coding experience to your own preference. Each is associated with pre-defined text file  (resourceIDs.txt, reserved.txt and globals.txt) that WinAGI will automatically create and update as you make changes to your game (by adding, removing, renumbering, renaming resources, renaming reserved defines, adding, removing or renaming game-specific global defines). Logic source code is also automatically updated based on these properties to add the appropriate #include directive to every source file.

My goal is to create an experience similar to the 'using' directive in Visual Studio. It gives users the option to take advantage of WinAGI's powerful features to automatically manage naming and usage of defines (which is what WinAGI VB did) but also makes it extremely simple for those who would rather manage all game defines manually.

An added benefit of this approach is that it makes the source files much more portable. You could for example use the source code and defines files in AGI Studio without needing any modifications.

I am very interested in any opinions out there regarding this change. So please take a look at this version, and play around a bit with the auto-Include features and let me know what you think.


« Last Edit: January 23, 2025, 09:36:44 PM by AGKorson »



Offline AGKorson

Re: WinAGI Version 3.0.0-alpha11.1
« Reply #1 on: January 16, 2025, 03:48:37 PM »

Offline AGKorson

Re: WinAGI Version 3.0.0 Progress Updates
« Reply #2 on: January 23, 2025, 09:50:27 PM »
Progress Point 12.0:
https://github.com/AGKorson/WinAGI-GDS/releases/tag/v3.0.0-alpha12.0

Reserved defines editor is done.

Offline lskovlun

Re: WinAGI Version 3.0.0 Progress Updates
« Reply #3 on: January 24, 2025, 04:47:28 AM »
I've made an improvement to NewRisingSun's GAL decompiler to allow sysdefs like:
Code: [Select]
%var menaceIsHere       103     ALL
%var witchGrabbed       103     21
This means that menaceIsHere is generally the name of variable 103, except in room 21, where it is called witchGrabbed. This is useful because of the crowded variable space in both GAL and AGI. Something to consider?
(I don't think menaceIsHere is a good general name anymore, btw - its uses are far too varied)

Offline AGKorson

Re: WinAGI Version 3.0.0 Progress Updates
« Reply #4 on: January 24, 2025, 01:36:29 PM »
I've made an improvement to NewRisingSun's GAL decompiler to allow sysdefs like:
Code: [Select]
%var menaceIsHere       103     ALL
%var witchGrabbed       103     21
This means that menaceIsHere is generally the name of variable 103, except in room 21, where it is called witchGrabbed. This is useful because of the crowded variable space in both GAL and AGI. Something to consider?
(I don't think menaceIsHere is a good general name anymore, btw - its uses are far too varied)

Interesting idea - I've been thinking about ways to improve how defines are handled but haven't decided for sure what improvements to make.

When decompiling, WinAGI doesn't attempt to name variables and flags unless they are one of the reserved items. Are you saying that when decompiling, you want to assign defines that the decompiler should use for non-reserved variables? That seems like it would rarely be useful- how often would you really know what the purpose of variables are unless you already have source code, or unless you've previously decompiled and then figured out what they do?

As for creating new source code, WinAGI will already handle the situation you describe - use #define menaceIsHere   v103 in globals.txt and then use #define witchGrabbed   v103 in logic 21 source code. The local define will override the global define. (The hierarchy that WinAGI uses when duplicate define names are encountered is local > global > resourceIDs > reserved).

The %var keyword is currently not recognized in AGI Fan Syntax (AGI-FS) - it's only used is Sierra Syntax (AGI-SS). Adding additional functionality to it in AGI-SS isn't something I want to do- WinAGI currently supports AGI-SS to allow for compilation of Sierra source code. I want it to remain 100% compatible. But I suppose I could add %var as an additional keyword for AGI-FS in addition to #define. I'll give it some thought, but probably won't do anything with it right now- my focus is on finishing up all other editors and release an updated version that can do what the VB version does.


Offline AGKorson

Re: WinAGI Version 3.0.0 Progress Updates
« Reply #5 on: February 01, 2025, 03:28:38 PM »


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

Page created in 0.039 seconds with 23 queries.