AGS 4.0 - Alpha 21 for public test

Started by Crimson Wizard, Thu 01/06/2023 14:00:59

Previous topic - Next topic

boycalledjames

Thanks @eri0o ! That was it! ;)

So just for the sake of clarity/reporting; my user.config file had a game listed without a path as suspected. The specific text within the config file that was causing the error read;

Code: ags
<RecentGame>
<Name>Game1</Name>
</RecentGame>

Whereas all other projects had the "<Path></Path>", this one did not. Once I removed the above text from the config, the AGSEditor.exe worked as expected.

Many thanks!

eri0o

Well, nothing like real usage to find bugs, thanks @boycalledjames , turns out I didn't test for the case where (for whatever reason) the Path tag disappears. I put a PR for a fix for it that should be in future versions. I am curious how it happened in the first place so I will still play a bit with project upgrade here to see if I can figure it out.

Anyway, happy you managed to find and fix in the file as a workaround. :)

Crimson Wizard

#122
Updated to Alpha 13
(Please use download links in the first post)

This is suddenly an update with multiple new functionalities. Some of those are going to be exclusive to AGS 4, while few may be a part of the next minor 3.6.* update later.

Contains fixes from 3.6.1 Patches 5 and 6 (except ones related to backwards compatibility).

Other changes:

Common:
- Support true 32-bit colors in GUI, text messages and drawing commands in script. Color number properties now correspond to the encoded 32-bit RGB (R8G8B8 format). Older projects will have all Color properties upgraded by the Editor (but not colors in script!).
- Removed support for 16-bit games. Any older 16-bit project will be converted to 32-bit on import by the Editor.
SPECIAL NOTE: 8-bit games are still supported.

Editor:
- Editor will now remember certain window states: "Sprite selector" window and splitter position, splitter position in "Sprite manager".
- Copy, paste and delete commands now apply to all the selected GUI controls in GUI editor.
- Support editing group properties for selected GUI controls.
- When importing room backgrounds of a different size Editor will now let user decide whether to reset, keep or rescale room masks.
- Ensure that Editor exports room backgrounds in their actual color depth.
- Removed obsolete "Copy walkable area mask to regions" command from the Room editor.
- Merged all "***Color" and "***ColorNumber" paired properties into a single "***Color" property. This property is internally saved as a number, but is viewed and edited as RGB combination for 32-bit games, and as a palette index for 8-bit games.
- Added Custom Properties for: Audio Clips, Dialogs, GUI, GUI Controls, Regions, Walkable Areas.
- Textual GUI controls can now select "Null Font" as their font: this will prevent any text to be drawn even if one is assigned, and make it have zero size (when it matters).
- Added "/maketemplate" command-line option that tells Editor to run, make template out of the said game, and quit.
- Fixed "Flood Fill" operation on mask in the room editor for masks of sizes which are not multiples of 4.
- Fixed "Recent games" menu could throw a error if a saved Editor's config contained empty paths for any reason.
- Fixed "Make template" operation was not adding Rooms subfolder to a template.

Compiler:
- Compiler no longer requires explicit pointer declaration for imported global variables of managed types. Now they are always assumed to be pointers by default, and non-pointer imports of builtin managed types are not permitted, unless a backwards compatibility option is set.
- Fixed compiler could cause memory corruption while compiling certain expressions.
- Fixed parsing of bracketed expressions inside ternary operation ( ? : ).
- Fixed a error message reported in case of undefined symbol, now it correctly states that the symbol is undefined, instead of making a vague statement of "unexpected expression".

Script API:
- All ***Color properties and function arguments now require a 32-bit RGB number. Where Game.GetColorFromRGB() is used to create a color number, there the script should continue to work as before, but if a literal number was used in script, these must be updated by hand or wrong colors will be displayed at runtime.
- Added eNullFont constant that lets assign or pass a "null font" to any property or function parameter which expects a font's ID. This "null font" will simply make any text not drawn and have no actual measurements (size, spacing, etc).
- Added global events: eEventDialogStart, eEventDialogStop, eEventDialogRun, eEventDialogOptionsOpen, eEventDialogOptionsClose (these are handled in "on_event").
- Added Custom Properties interface to types: AudioClip, Dialog, GUI, GUIControl, Region, WalkableArea. This includes functions: GetProperty(), GetTextProperty(), SetProperty() and SetTextProperty().
- Added static Dialog.CurrentDialog property and non-static ExecutedOption and AreOptionsDisplayed properties.
- Added RenderLayer enum, and optional "layers" parameter to DynamicSprite.CreateFromScreenShot(), that tells which of the game's render layers to capture when making a screenshot.
- Added Overlay.SetPosition() and SetSize() functions for convenience.
- Added Overlay.Tint(), SetLightLevel() and RemoveTint() functions, Overlay.HasTint, HasLightLevel, LightLevel, TintBlue, TintGreen, TintRed, TintSaturation, TintLuminance properties, matching Character and Object tinting functionality.
- Expanded String.IndexOf() with new parameters: "StringCompareStyle", "index" and "count".
- Added optional "sprite" parameter to SaveGameSlot(), that lets to pass a number of an arbitrary sprite to write into this save instead of a standard "screenshot".
- Added new game-wide option OPT_SAVEGAMESCREENSHOTLAYER that lets to define which of the game's render layers will be captured when making a standard screenshot for the save game.

Engine:
- Do not alter or clamp palette for 8-bit sprites loaded into a 16/32-bit game at runtime.
- Assigning InventoryItem.Graphic will no longer reassign CursorGraphic too even if they were identical previously.
- Added new accessibility config settings in "access" section: "speechskip" and "textskip". These let player to override game's skipping style for character speech and text messages respectively.
- Fix transformed (scaled or rotated) overlays could look wrong in Software renderer.

WinSetup:
- Redesigned winsetup into a tabbed dialog.
- Added "Accessibility" settings for skipping speech and text messages.

ThreeOhFour

May I quietly add my enthusiastic praise for adding support for different blending modes in game. One of my most wanted features, I am delighted that 4.0 will support this.

Pax Animo

Heya,

Copying and pasting of labels on a GUI seems to be not working correctly, not sure what else this extends too but will update if any other problems.
Misunderstood

Crimson Wizard

Quote from: Pax Animo on Tue 24/09/2024 18:29:01Copying and pasting of labels on a GUI seems to be not working correctly, not sure what else this extends too but will update if any other problems.

Yes, copy/pasting gui controls appears broken in ags4 (it works in all other versions).

Crimson Wizard


Pax Animo

Heya, adding a new text line via *[* in strings no longer seems to work.
Misunderstood

Crimson Wizard

Quote from: Pax Animo on Sat 28/09/2024 18:44:30Heya, adding a new text line via *[* in strings no longer seems to work.

We no longer support "[" for newlines, now you should be using standard escaped sequence "\n" for this.

Crimson Wizard

#129
Updated to Alpha 14
(Please use download links in the first post)

Contains all the new features from 3.6.2 Betas 1 and 2.

Other changes:

Common:
- Fonts are split into Font Files and Fonts, where multiple Fonts may use same Font File, or not have any Font File assigned at all (for instance, if they are meant to act as placeholders and get replaced by fonts from plugin).

Editor:
- "Fonts" node in the Project Explorer now contains separate "Font Files" and "Fonts" sublists.
- Actual font files on disk are now stored in "Fonts" subfolder in the project when imported, and keep their original names (no longer renamed to "agsfntN.*").
- In General Settings replaced "Use Extended Compiler" option with "Script Compiler" option that acts as a dropdown list, with compiler names to choose from.
- Added "Source FontFile" property to Fonts, this property lets assign a Font File to the Font.
- Fixed GUI controls failing to copy/paste via Clipboard (regression in previous Alpha versions).

Engine:
- Allow to run the game even if it has no fonts (log a warning).
- Allow to continue running the game if any font failed to load on startup. Such font will simply not get drawn, unless replaced by a plugin, for example.



Fonts...

Inside the project Fonts are now split into Fonts and Font Files. They may be added and deleted separately from each other.
Font Files retain their actual names when imported, they are no longer renamed into "agsfntN" (unless you rename these files yourself, or upgrade older project where they've been called like that).




When you open a Font's properties, you may select one of the imported Font Files as this font's "Source FontFile". Multiple Fonts may select same FontFile as their source, and at the same time use different properties (size, outline, linespacing and so forth).



For extra convenience, Fonts that use same FontFile are referenced under the FontFile as well:





EDIT: I just realized that these screenshots were made before we added new icons for FontFiles... so things look a bit better in the Editor now.

ThreeOhFour

Great stuff!

Reading through some of the changes to recent versions of the editor, I notice a lot of room editing shortcuts have been added that makes it work much like image editors. Things like space + click & drag to pan, ctrl + mousewheel to zoom in and out based on cursor position. I love this! Another shortcut I use all the time in image editing programs is alt + click to colour select with the eyedropper tool. Seeing as alt + click doesn't seem to be used for anything else in here, might I add that as a feature request? It would make picking between hotspots, regions and such very quick and familiar to people used to Photoshop, Aseprite, Clip Studio Paint, etc.

Crimson Wizard

#131
There's unfortunately an annoying bug found in the latest Alpha 14 release, following an addition of "Script Module" selection for events in AGS 4.

Room scripts are stored in a different place in AGS 4, but the script module setting was not adjusted for AGS 4 situation in this feature, so ScriptModule for rooms points to a non existing file.

As a result, when you hit "..." button wanting to add a new event function, the function's name is filled into the property field, but the script is not opened and new function is not added there.

The workaround is to add such function in script by hand.

I'm currently investigating this to make a fix, and will have to release a new update soon.

EDIT: here's a temporary build with just this fix:
https://cirrus-ci.com/task/5366978280423424



Quote from: ThreeOhFour on Wed 23/10/2024 16:48:47nother shortcut I use all the time in image editing programs is alt + click to colour select with the eyedropper tool. Seeing as alt + click doesn't seem to be used for anything else in here, might I add that as a feature request? It would make picking between hotspots, regions and such very quick and familiar to people used to Photoshop, Aseprite, Clip Studio Paint, etc.

So, - make "Alt + LMB" to trigger a area selection when in corresponding mode. I suppose this may be done.

ThreeOhFour

Quote from: Crimson Wizard on Fri 01/11/2024 12:34:19So, - make "Alt + LMB" to trigger a area selection when in corresponding mode. I suppose this may be done.

Yep, if you hold down Alt while in most image editing programs the cursor will change to the eyedropper tool while the Alt key is held down, then change back to your previously selected drawing tool when you release it. This is fairly universal - from memory GIMP uses Ctrl by default instead, but everything else I know uses Alt.

Crimson Wizard

#133
Quote from: ThreeOhFour on Sat 02/11/2024 05:32:26Yep, if you hold down Alt while in most image editing programs the cursor will change to the eyedropper tool while the Alt key is held down, then change back to your previously selected drawing tool when you release it. This is fairly universal - from memory GIMP uses Ctrl by default instead, but everything else I know uses Alt.

So, I did this, but there's a silly issue I met. Whenever Alt key is released, the focus goes to the menu, as that's a standard thing in windows.
I can prevent this by marking the key event as "handled" if it's done in "Area editing" mode, but I was not sure if that would be expected, as that would on contrary prevent user from calling a menu using Alt while in certain room editing modes.

How do applications deal with this usually?

EDIT: don't know why, but appears it goes to system menu, and not to the main menu. Maybe that has to be coded separately.
Also AGS seems to have a separate glitch on its own, because as soon as you open a system menu after pressing Alt, it's moved down, causing graphical artifacts on the window panel...
EDIT2: apparently something got broken in that regard too. In 3.2.1 pressing Alt would focus the main menu, but starting with the first open source version 3.3.0 it focuses the system menu and causes the above glitch. Perhaps this got broken when AGS interface was redone with docking panels.


EDIT3: Maybe I should change this feature to using Ctrl instead. Ctrl is usually associated with selection (ctrl + click can mean "add to selection" in editors).

ThreeOhFour

I think Ctrl+click would work well too, yes! I will use this in image editors to select a layer (as opposed to a colour) which probably makes just as much sense, thematically.

Snarky

Just out of curiosity, what if anything is holding AGS 4 back from becoming the official AGS release (or at least the next RC)?

eri0o

#136
Note: what I mention below is my own opinion

At minimum we need to document everything we made. I would say the biggest thing in my mind is documentation. And updating the templates.

Perhaps there are small details since because no one tested.

Spoiler
Other than this there are small known issues that I think it's mostly about people being ok with current state of things. I think the blend modes may not work on the web due to limitations of WebGL because they would need to somehow be reimplemented using shaders (I conceptually don't know how, like how I would sample what is there to calculate the blending, it seems I need for each 2d pixel all pixels "vertically" of the things on top and bottom), I don't remember if rotation had all the click handling done but this was a thing at some point. If we ever do touch there are some issues that needs to be redone on the backend of GUIs but perhaps this can be changed without affecting things. There is also the Joystick/Gamepad stuff for skipping things, the preconfigured skippings of AGS, how one would set a button - currently you need to manually use Skip for joysticks if you want a custom config. We need to add Length to the autocomplete of arrays - this is now an issue in 3.6.2. But maybe these don't matter for a release, they sound like things that can be postponed, it all depends from people testing and giving their feedback.
[close]

Overall my feeling is more about the process of things, ags3 is magically backwards compatible to everything before, both in project and binary (the engine runtime). In ags4 the idea is to drop this, or at least drop this for things in the land before time. This impacts things, for me documentation is the hard one since so far we simply always added stuff and now suddenly I need to delete stuff, what does it means, would it be maintaining two documentation repositories for some time and forward?

Crimson Wizard

#137
Quote from: Snarky on Tue 19/11/2024 15:06:34Just out of curiosity, what if anything is holding AGS 4 back from becoming the official AGS release (or at least the next RC)?

1. My lack of confidence in planning.

2. Documentation must be updated, and before that we need to have a proper support for 2 branches of the manual (3.* and 4.* at least).

3. At least couple of planned new features, like Touch input API (joystick/gamepad api is already implemented, and touch api is the only api remaining to let users script their own controls on all types of platforms).

4. Each new major feature has to be reviewed for completeness, tested, and finished if it's not complete, like the "blend modes" that eri0o mentioned.



In regards to testing: I am fairly certain that at least several people have been using AGS 4 for a while now to make games. But I know that mostly because of the occasional conversations on Discord. If it were possible to bring more people to just experiment with the new version, or chosen features at least (if not making actual games with it), and give feedback, that might speed things up too.

WiseFrog

Are you planning to add the possibility to update games without losing saved files in this version of ags?

Crimson Wizard

#139
Quote from: WiseFrog on Tue 19/11/2024 23:06:13Are you planning to add the possibility to update games without losing saved files in this version of ags?

I'm adding this in 3.6.2 first, because I wanted to have this in a backwards compatible version as well. (Of course AGS 4 will receive it too)
The basic functionality is already done*, and currently I am working on a additional "save prescanning" feature that lets to test a save without actually loading it.

This is thoroughly explained in this thread, and links to test builds are available in posts:
https://www.adventuregamestudio.co.uk/forums/engine-development/load-older-game-saves-into-updated-game-attempt-2/

* - when I say "done", i refer to the minimal functionality. It may be expanded further (although there's a limit of what may be achieved with the existing save format). This feature still awaits its users to provide potential use cases and feedback.

SMF spam blocked by CleanTalk