Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Crimson Wizard

#621
It should be:
Code: ags
if (acPropaganda != null) 

As you can use this pointer only if it's NOT null.

You should probably check the same in the room leave event as well:
Code: ags
if (acPropaganda != null && acPropaganda.IsPlaying) {
    acPropaganda.Stop();
 }
#623
Engine Development / Re: AGS engine Web port
Thu 19/01/2023 15:51:56
OGV should work anywhere, so that's a question of whether a file is found or not.

If I remember right, web port does not support subfolders yet, so you need to place everything in the same dir. The PlayVideo command of course also should not have subfolders in filename.

Alternatively, you may place the video files in the project root folder and compile the game, then the Editor will package them inside the *.ags file automatically.
#624
Something that I mentioned above, and which is a main issue for comparing IDs: different types of game objects do not share same ID sequence. Characters, Room Objects, Walk-behinds, GUIs, Overlays: all of them have their own sequence of IDs. Sure, it's possible to make Characters with the same z-order compare IDs among themselves, but what if Character and RoomObject have equal z-order? Or RoomObject and Overlay? Or Overlay and GUI? Which one goes first then? Then we need to either hardcode the priority based on a object type, or find some other solution.

Besides that, Overlays in particular right now don't have same kind of explicit ID as other objects, their IDs are internal handles arranged in a specific way, they have "special values" among them (for overlays autogenerated by the engine), and overall afaik do not always correspond to the order of creation. Hence the result of their comparison will not be "expected" at all times either.

These are at least two problems that need to be resolved.
#625
Quote from: jumpjack on Thu 19/01/2023 07:51:29Sorry if it's a silly question, but why also in 3.6.0 there is no "New" button/menu to create a new game without exiting the editor?

It never existed in AGS Editor (at least since 3.0). This is one of those problems that never get addressed, mostly because people don't ask about them often (if ever).

#626
Quote from: jumpjack on Thu 19/01/2023 07:58:46I thought that this fix included also the overlays ordering bug (undefined order if Zorder is the same):

Quote- Fixed GUI sorting for cases when ZOrder is equal (this could cause both regression in drawing order, and click detection mistakes);

No, this is not related to overlays. It fixes a regression in 3.6.0 related to GUI, that also use IDs when ZOrder is the same. This is the historical AGS behavior which we have to keep for backwards compatibility.

Besides, in your case, these are room overlays, and none of the game objects positioned inside a room (RoomObjects, Characters etc) have a reliable sort with equal baseline either. I mentioned this earlier in this forum thread, and explained what the problem is.

Whether this has to be changed or not is arguable, but "fixing" this may only be done if the mentioned problem is resolved; and definitely not in 3.6.0, because we're done making significant changes in it.

Meanwhile added respective notes to the ZOrder articles in the manual:
https://adventuregamestudio.github.io/ags-manual/GUI.html#guizorder
https://adventuregamestudio.github.io/ags-manual/Overlay.html#overlayzorder
#627
Well, using translation files, one could write a script that replaces texts back with "translations". Since in TRS you have original and "translated/fixed" entries, such script would have to run through all asc files, + Game.agf for dialog scripts, and replace old with new.

Actually, I wonder if such tool already exists. I vaguely recall either a tool or editor plugin that would export speech texts for editing.
Was that SpeechCenter, or DialogDesigner?
#628
Quote from: Vincent on Wed 18/01/2023 10:05:58Hello I am trying to convert a game from Ags to Android, I'm sorry in advance if this question has been asked already. It seems that when I change setting 'Touch To Mouse Emulation' to be 'Two Fingers' nothing change, basically I'd like to perform a 'right click' but there is no way I am able to do that, I've been trying a lot but still nothing. Is this just me or can you perform a right click?

Please clarify, do you build your game as a proper APK, or running a AGS Player (universal launcher)? Where exactly do you set these options?
#629
I'd like to question whether the above method of adding coordinates is the best in this scenario. As Rik Vargard mentioned, he wants to have the GUI display player's and enemy's health. Does this mean that the GUIs should be located in certain position relative to these characters?

If you want the GUI to be displayed above particular spot in the room, then instead you may use a more simple method, where you base your GUI coordinates on wanted room coordinates.
In generic example you can do this:
Code: ags
function late_repeatedly_execute_always()
{
    myGui1.X = ROOM_X - Game.Camera.X;
    myGui1.Y = ROOM_Y - Game.Camera.Y;
}

Or, let's say, you want to place a GUI above player's head:
Code: ags
function late_repeatedly_execute_always()
{
    ViewFrame* vf = Game.GetViewFrame(player.View, player.Loop, player.Frame);
    int sprite_height = Game.SpriteHeight[vf.Graphic];
    myGui1.X = player.x - Game.Camera.X - (myGUI.Width / 2);
    myGui1.Y = player.y - sprite_height - Game.Camera.Y - myGUI.Height;
}
#630
https://github.com/adventuregamestudio/ags/releases/tag/v.3.6.0.38

3.6.0.38 was released in November 2022.

But, please, if you have small questions like this about what might be a mistake in current release, then it's best to post in the 3.6.0 release thread:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=60323.0
no need to open a whole new forum thread for this kind of stuff.
#631
"Default Game" was renamed to "Sierra-style" several years ago. Apparently, the warning inside the Empty template was not adjusted.
#632
Updated to RC6 (3.6.0.41)
(use download links in the first post)

Editor:
- Fixed syncdata.dat (lipsync) output file getting parsed like Papagayo source;
- Fixed GUI.Visible property was resetting to false when PopupStyle is switched to Modal;

Engine:
- Fixed GUI sorting for cases when ZOrder is equal (this could cause both regression in drawing order, and click detection mistakes);
- Fixed GUI buttons could retain mouse-over pic after interface is disabled then enabled (this is a regression since recent update).
- Fixed memory leak occuring when the TTF font is drawn partially outside the DrawingSurface.
- Fixed few mistakes occuring after restoring much older saves in a game that was upgraded to 3.6.0.
- Fixed crash occuring if a plugin tried to call SetVirtualScreen().



Reported issues remaining:
* Direct3D is said to still be not fully stable when alt+tabbing in exclusive fullscreen mode: https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-0-release-candidate-rc1/msg636650995/#msg636650995
#633
AGS 3.5.1 - Patch 17
Full release number: 3.5.1.24


For Editor
Spoiler

For Android
Spoiler

For Engine/Editor developers
Spoiler

Released: 16th January 2023

Previous stable version: AGS 3.5.0 P10 forum thread


This release is brought to you by:

- Alan v. Drake
- Crimson Wizard
- Donovan Watteau (fix for big-endian systems)
- eri0o
- fernewelten (fixes)
- James Duong (implemented "--console-attach" option for Windows)
- Morgan Willcock
- Nick Sonneveld
- rofl0r
- Pablo Navarro (fixes)
- Thierry Crozat (bug fixing)
- vga256 (bug fixing)



Summary

3.5.1 is a minor update after 3.5.0, which contains mostly utility additions, fixes and perfomance improvements.

Changes in the Patch 17:

Editor:
- Fixed GUI.Visible property was resetting to false when PopupStyle is switched to Modal.

Engine:
- Performance improvement in Direct3D/OpenGL renderers, related to plugins which subscribe to render events.
- Fixed renderer error occuring if room background frames are of different sizes.
- Fixed software renderer may have an unpainted black line at the bottom, if there's a GUI or Overlay positioned partially offscreen.
- Fixed GUI buttons could retain mouse-over pic after interface is disabled then enabled (this is a regression since recent patch).
- Fixed crash occuring when user creates too many Overlays in script; will report a scripting error instead.
- Fixed memory leak occuring when the TTF font is drawn partially outside the DrawingSurface.
- Fixed Parser.Said() could lead to a program crash in case there are space-separated words following the comma (e.g. "climb,get in bed").
- Fixed crash occuring if a plugin tried to call SetVirtualScreen().

Plugins:
- Fixed SnowRain plugin drawing particles only in 320x200 bounds.


Changes in the Patch 16:

Editor:
- Fixed autocomplete crashing the editor if there was an import declared with type and variable having identical names, and user tries to type that variable's name and a dot to access its members.
- Fixed newly created Views taking free IDs in the middle of the list in random order instead of a straight one (after you previously deleted some Views).

Engine:
- Added missing "DrawSprite" function for "agsblend" plugin stubs.
- Fixed loading pre-3.5.0 games on big endian systems.
- Fixed GUI buttons not displaying the mouse-over image if the interface state was toggled to enabled state while the mouse was over the button.

Updated the manual with certain fixes and corrected examples of using Camera and Viewport structs.


Changes in the Patch 15:

Editor:
- Fixed crash that could occur when changing View's ID to an unused number in the middle.
- Fixed comments and string literals were styled incorrectly in dialog scripts.
- Fixed unterminated string literals in script were not considered as errors when processing scripts for translation update and autonumbering of speech lines, leading to wrong results.
- Fixed Editor was updating translation file even if errors were found while scanning the scripts, which could cause a TRS corruption.
- Fixed Editor could overwrite changes done manually to TRS while the editor is open and if you run a translation update right after.
- Fixed potential program crash on exit in case an editor's plugin has mistakes in "shutdown" callback. Instead editor will report a component's error, but still close properly after.

Script API:
- Removed a rule that Viewport and Camera with ID 0 can't be deleted.


Changes in the Patch 14:

Editor:
- Do not error when compiling a 256 colors game if Direct3D or OpenGL are selected as a default graphics driver (display a warning instead).
- Fixed crash when trying to import pre-2.60 game projects.


Changes in the Patch 13:

Engine:
- Fixed room object does not update its texture if it had a dynamic sprite assigned to it, and that sprite was unassigned, modified or recreated with same ID, and then reassigned again, - all within the same game frame.
- Fixed normal font renderer is not reinitialized correctly in the engine if a plugin uses IAGSEngine::ReplaceFontRenderer(), passing original renderer's pointer (which it received from the previous ReplaceFontRenderer call).


Changes in the Patch 12:

Engine:
- Fixed GUI textual controls don't redraw when the game translation changes until player clicks on GUI (regression since previous 3.5.1 updates).
- Fixed multitasking mode persisting if the game was switched from windowed to fullscreen mode (even though it's not supposed to work in fullscreen).


Changes in the Patch 11:

Editor:
- Fixed batch sprite export with "Set exported file as sprite source" option was assigning new source paths without file extension.

Engine:
- Perfomance fix: GUIs changing Transparency or Visible state should not redraw their surface.

Compatibility:
- Allow AudioClip.Play to to place clips on a crossfade channel, which is normally unaccessible from script. This prevents errors in some games that relied on this behavior.


Changes in the Patch 10:

Engine:
- Fixed crash when visible viewport does not have any linked camera.
- Fixed ListBox.FillSaveGameList() may include save slots with negative slot number (e.g. when the save file has "*.-01" extension).
- Fixed potential crash after failed RunAGSGame() call.
- Fixed search for the game data by GUID when restoring a save belonging to another game;
  this was implemented in 3.5.1, but appeared to not work correctly.


Changes in the Patch 9:

Editor:
- Removed restriction on max dialog topics in the project. The dialog limit in the engine was removed in 3.4.1, but remained in the Editor by oversight.
- Fixed Audio Clip items in the project tree not displaying their IDs right after being renamed.

Compiler:
- Fixed crash occuring when compiler tries to report "Already referenced name as import" error.

Engine:
- Added "--translation" and "--no-translation" command-line arguments.


Changes in the Patch 8:

Engine:
- Clearer error messages for Get/SetProperty functions.
- Fixed PlayFlic() command fails to start the video (regression in 3.5.1).
- Fixed DrawingSurface.DrawSurface() not applying transparency parameter correctly if the drawn surface has alpha channel.
- Fixed OVERHOTSPOT is not updated immediately when character's name changes while cursor is above that character.

Templates:
- In BASS template fixed right click not dropping currently selected item if cursor was hovering over another item.


Changes in the Patch 7:

Editor:
- Added "Layout -> Reset to Defaults" menu command.
- Editor will now reset panel layout to default state if loading layout fail for any reason.
- Default config is now saved also when the game is run in debug mode (F5). This ensures that the test run is using the latest Default Setup, if the user's config has not been created yet.
- Editor will now display an error if user tried to reserve too many channels for audio types.
- Fixed Editor failing to start if user preferences file is corrupted.
- Fixed "Use old-style custom dialog options API" was not set when importing pre-3.4.0 projects.
- Fixed comboboxes' drop-down arrows were not painted with the right color from a color theme.

Engine:
- Fixed program crash occuring if the game reserved too many channels for audio types.
- Fixed potential crash occuring when player loads a save made in a multi-frame room, but the room was since edited and no longer has as many frames.
- Fixed character may have incorrect Frame (property) values while turning.


Changes in the Patch 6:

Editor:
- Added line numbers in the dialog script editor.
- Fixed Dialog script loosing changes if the pane is closed or redocked.
- Fixed controls arrangement on the Dialog pane getting broken when it's redocked.

Engine:
- Fixed filepaths in scripts that have backslashes ('\') fail on non-Windows systems.
  All the (script) File functions will now convert backslashes in filepaths into forward slashes for compatibility.
- Fixed engine was still creating standard directories for game saves and data, even if user provided the custom paths for these.
- Fixed TextBox control crashing the game if it's empty and player presses Backspace.
- Fixed controls on a fully transparent GUI were not interactive (this is an original AGS behavior, which was unintentionally changed in 3.5.0 by mistake).

Compatibility:
- When running 3.5.0 games, treat fully transparent GUI as non-interactable.
  In AGS transparent GUIs may be still interacted with, but 3.5.0 introduced an unintentional (and undocumented) change to this, which was reverted in 3.5.1.

Android:
- Support global engine's config file when the game is run from the Launcher: it's located in the AGS games' parent directory, same place where android.cfg is.

WinSetup:
- Added "Custom game shared data path" to complement "Custom save path" option.


Changes in the Patch 5:

Contained no changes and was a formal re-release with only fixed program build instructions for Linux.


Changes in the Patch 4:

Editor:
- Fixed swapping of inventory item's numeric ID could lead to errors.
- Fixed crash when importing pre-3.* games with multiple script modules.
- Renamed "Enforce object-based scripting" setting to "Enforce post-2.62 scripting". This is for clarity.

Compiler:
- Fixed potential memory corruption when user script reaches max nested if/else blocks.

Engine:
- Also tell module name and approximate source line when reporting script import errors for the variables and local functions.


Changes in the Patch 3:

Editor:
- Fixed sprite file over 2 GB could not be loaded (regression since the last patch).

Engine:
- Further improvement to GUI perfomance: don't redraw GUI when the mouse cursor is hovering over or interacting with controls not leading to an actual visual change.
- Fixed ListBox items could become unaccessible if its font or height is changed leading to a disabled scrollbar.


Changes in the Patch 2:

Engine:
- Fixed speech lipsync getting disabled after loading another game with RunAGSGame().
- Fixed MOD/XM clips fail to play (regression).
- Fixed certain OGV videos fail to play (regression).
- Fixed software renderer was not updating game screen correctly when running a game with legacy "letterboxed" feature (regression).


Changes in the Patch 1:

Editor:
- Fixed script compiler sometimes was not specifying actual Dialog number when reporting errors in the dialog scripts.

Engine:
- Fixed Game.TranslationFilename always returning empty string (regression).
- Fixed GUI controls which were toggled from disabled to enabled state not responding to the mouse clicks until the mouse is moved (regression).
- Fixed OpenGL did not apply a Linear filter when "Render sprites in screen resolution" option is off.


What is new in 3.5.1

Editor:
- Added "Attach game data to exe" option to General Settings. This lets you to package game data separately from the game.exe (only important on Windows at the moment).
- Deprecated "Limit display mode to 16-bit" property in Runtime Setup as it's no longer used by the engine.
- Display aspect ratio in game resolution dialog.
- Implemented classic Color Picker dialog for the Color type values in the property grid, instead of the default one which does not allow user-defined colors.
- Improved tab switching performance for script windows.
- Editor will now enforce full game rebuild after upgrading an older project, this ensures that all scripts are recompiled with the new version rules.
- Fixed room lists in property editor were not updated after room number is changed.
- Fixed importing pre-3.* projects broken by incorrect assignment of "Game file name" property.
- Fixed importing Characters and GUI without sprites still created empty sprite folders.
- Fixed crash when exporting/importing Characters with no Normal View.
- Fixed translation compiler did not correctly save some of the escaped sequences, such as "\n".

Scripting:
- Implemented correct parsing of a "const string" function return type.
- Fixed implementing imported functions was forbidden in the room scripts.

Script API:
- Added GUI.Shown readonly property that tells whether GUI is active on screen. This is primarily for GUIs with "Popup At Y" style, because they hide themselves regardless of Visible property. Note that since 3.5.0 GUI.Visible only tells a script-set value.
- File.Open() now supports $CONFIGFILE$ tag which will try to open user config file for reading or writing regardless of where config is located on disk.
- Added System.SaveConfigToFile() which writes current engine settings to the user config file. Only the options that can be changed at runtime are written back at the moment.
- GetTranslation() now returns "const string" (was "string"). This is to prevent modifying returned string using old-style string functions, such as StrCat(), as this string may be allocated in the internal engine memory for its own use.

Engine:
- Support loading audio and video from data packages larger than 2 GB.
- Improved game data loading times by introducing buffered file stream. Initial tests showed 3-4 times faster file reading.
- Improved game perfomance by not reupdating all of the GUIs each time anything changes, instead only affected GUI will be updated each time.
- Some improvement to general script perfomance.
- Some improvement to script Dictionary and Set types perfomance.
- Room Object's Graphic property now can be assigned a sprite with index over 32767 and up to 65535. This restriction is due to internal data format, which cannot be fully fixed without breaking compatibility with plugin API. This may still be worked around by assigning a View, as View's frames may contain sprites of any index available.
- Similarily, Object's View, Loop and Frame can now be assigned a value over 32767 and up to 65535; not that this was ever an issue...
- Removed arbitrary limit of 1000000 dynamic array elements (now supports over 2 billion).
- Dialogs with no enabled options left will be now stopped, instead of raising script error.
- Engine will not longer quit the game when failing to write a save, but simply display an error on screen (...why this was a thing in the first place?!).
- When restoring a save engine will now try to match game pack by GUID rather than using exe/pack name. This resolves potential problems when game package may have different name in distribution to another system. Also makes saves in multi-game collections more reliable.
- In Debug game mode allow to toggle infinite FPS mode (prior it could not be turned off).
- Expanded text parser error messages for easier debugging.
- Adjusted all the command-line options to have consistent prefix convention, where all full-name options must be preceded by double-dash, and one-letter options by single dash.
- Added "--localuserconf" command and similar global config option which tells engine to read and write user config in the game's directory rather than using standard platform path. Game dir must be writeable for this to work.
- Added "--conf" command which forces engine to read only explicit config file on startup.
- Added "--user-data-dir" and "--shared-data-dir" commands for setting save game directory and shared app data directory from command line (this corresponds to existing options in config).
- Fully configurable log output (in both game config and command line) allows to set up which message types and groups are printed by which output methods (sinks), including: file, system console, in-game console. "warnings.log" is now created only if file log was not requested by user.
- Added "--log-" set of command line options for setting up log output.
- Added "--tell-filepath" option for printing known engine's and game's file locations.
- Added "--tell-gameproperties" option for printing some of the game's general settings.
More information on log config and --tell commands currently may be found in following text file: OPTIONS.md
This has to be added to the manual eventually.
- Support proper lookup for Allegro 4 library resources (such as its own config and digital MIDI patches) in the game directory.
- Engine will no longer precreate directories for common files: saves, user config, shared files and so forth, - before actually having to write these. This ensures that no new directories are created on your disk without actual need. Also this fixed a problem that could happen if someone deleted e.g. a game's save directory while game was running.
- Fixed running game from another directory by passing its relative filename as command-line argument: in this case engine was incorrectly using its own directory to search for external game data, opening files for reading by script command, and so on.
- Fixed some of the engine's own hotkeys (such windowed/fullscreen mode toggle) not working during certain skippable game states.
- Fixed overlay was set to wrong position if it were using TextWindow gui and either its text or X, Y properties got changed.
- Fixed crash occuring when the speech is using text window gui with zero Padding and the speech text is an empty line.
- Fixed characters and room objects were not updating their looks if their current graphic was a Dynamic Sprite, and that sprite was modified with ChangeCanvasSize, CopyTransparencyMask, Crop, Flip, Resize, Rotate or Tint function.
- Fixed Views' frames keeping reference to deleted Dynamic Sprites causing crashes. Now they will be reset to dummy sprite 0 for safety.
- Fixed engine crash when button's graphic is set to sprite out of range.
- Fixed animated cursor's normal graphic reappearing in between animation frames if mouse mode is being repeatedly reassigned, for example in rep-exec script.
- Fixed certain interactions did not work with GUI if it was made fully transparent.
- Fixed ListBox.FillSaveGameList() search pattern, it included files which contain save filename pattern but do not exactly match; for example: "agssave.001_".
- Fixed engine was ignoring audio files in game directory when running games which use old audio system.
- Fixed crash in Direct3D and OpenGL renderers that occured if game uses a plugin that performs software drawing on screen, and one of the rooms is smaller than the game's resolution.
- Fixed Direct3D was assigning wrong fullscreen refresh rate sometimes, slowing alt-tabbing.
- Fixed "--test" mode was lost upon restoring a save.

Engine Plugin API:
- Added IAGSEngine::GetRenderStageDesc() function which returns current render stage parameters. As of this version these parameters include 3 transformation matrixes, allowing any 3D render plugin to stay compliant to engine's scene rendering.

Compatibility:
- Fixed engine was trying to read unnecessary data when loading pre-2.72 games.
- Fixed "upscale" mode for old games (was broken in 3.5.0). Also engine will now try to detect if "upscale" mode wanted by reading old config options (if they are present).
- Fixed GUI.Visible not returning expected values for GUIs with "Popup At Y" style in pre-3.5.0 games, breaking some older games logic.
- Fixed potential buffer overflow when reading pre-3.1.0 games with old dialog script texts.
- Fixed engine was applying player's position too early when ChangeRoom was called for 2.72 and earlier games, which could result in wrong placement in the new room if the character was walking right before the transition.

Android:
- Corrected game scanning in AGS launcher, now it will work consistently with the desktop ports, and detect any compatible game data files named "*.ags" or "*.exe".

OSX:
- When looking for game files engine will no longer use hardcoded filename, will search for any compatible pack file instead.

Windows:
- Windows version of the engine now reads global configuration file. It is looked up in "%USERPROFILE%/Saved Games/Adventure Game Studio/acsetup.cfg"
- Default log file location is now also in "%USERPROFILE%/Saved Games/Adventure Game Studio".
- Added "--no-message-box" command line option to hide message boxes when alerts are raised. These messages will be still printed to log (if one is enabled).
- Added "--console-attach" command line option to try attach to the parent process's console. This is useful if you run game from command line and want to see engine's log in the console.

WinSetup:
- Fixed changing fullscreen mode from "use current desktop" to explicit resolution on save.







Thanks to everyone who contributed to and tested this version!



#634
Quote from: jumpjack on Fri 13/01/2023 09:01:05
Quote from: Khris on Fri 13/01/2023 07:42:45If two overlays have the same z-order, their per-frame order is based on the cosmic rays hitting the earth and the energy flowing through ley lines in that precise quantum moment, which makes them flicker to the front and back.

:-D  Funny... but I think this is not the case: if you watch carefully you can see that flickering is not random, it always happens at same moment on same overlay when player is in same position. There is something in the engine code which makes player position influence overlays draw order.  ???

It's not literally "random", as in Khris's joke. The actual result is determined by the number of game elements, their z-orders, and std::sort algorithm. As character moves around, its z-order changes (with y coordinate), which affects overall sorting. Elements with equal z-order will be treated depending on a coincidental factor. This result is actually deterministic in a given environment, but it won't help to know how it's received, and should not be relied upon, that's the point. (Hypothetically, it may even depend on C++ library implementation used when compiling the engine, so different versions of engine on different platforms may have slightly different result.)
#635
Quote from: jumpjack on Fri 13/01/2023 07:31:52Yes, I assigned same Zorder to all objects which in "real world" would lie down on same floor tile. But they are drawn bottom-up, so I don't get why the final result is not as I would expect.

What would "bottom-up" mean, logically? The overlay sorting is only defined by ZOrder parameter. The sprite sorting in AGS is done using a standard std::sort algorithm, where if two or more elements have equal factor, their relative order is undefined. Their order of creation does not mean anything in this regard.
EDIT: hmm, I thought this is mentioned in the manual, but it's not, so i have to add a clarification...

To make their order defined, we'd need to introduce another parameter, that would be used when zorder of two elements is equal. Historically AGS does this for GUI: if two GUI has same ZOrder, then it will also compare their IDs. But it does not do that in rooms (well, I mentioned that above).

If you want them to be reliably "bottom-up", then there are at least two natural solutions:
1) Have them have explicitly different zorder;
UPD: note that zorder may be negative too, so in case of a floor, you may make floor tiles have sequences of zorder < 0, to ensure they never draw over characters and other elements.
2) Paint the stacking tiles on a single overlay (as much as possible without breaking sorting among other overlays and characters).
UPD: you may even draw floor tiles on a room background, instead of creating overlays.
#636
Quote from: Khris on Thu 12/01/2023 22:34:21The parts that disappear and reappear seem to be in the same spot as a bunch of background overlays; is it possible they have the same z-order value? As in, cannot be sorted reliably?

This may be the case; I recall that in some separate case AGS also compared object ID, which corresponds to their order of creation. Perhaps same could be applied to the drawing sort. The problem here though is that ID sequences are not shared through all the object types (for example, there may be roomobject with ID 1 and character with ID 1, and overlay with ID 1).

To improve this situation in the future we'd need to setup a certain rule for how the sorting is done among all the objects which have equal zorder/baseline.

The solution for now may be to give these tiles slightly different ZOrder.

Another solution that could be tried here, in my opinion: merging multiple static tiles, that are located in the same position, on a single overlay, instead of creating a separate overlay for each tiny element.
#638
So, all of this is not related to fading, or making GUIs visible, even following triggers the problem:
Code: ags
function btn1_OnClick(GUIControl *control, MouseButton button)
{
  Wait(40); // Move mouse away from the button while game is paused
}

I noticed that you have a setting that when interface is disabled, GUI should "display normally". This may be an essential difference between yours and my test games.
#639
Quote from: jumpjack on Thu 12/01/2023 15:58:23I define ZOrder of all my overlays only once at room creation, but I see various overlays changing draw order while character moves around them: sometimes overlay A is drawn over overlay B, other times B gets over A while character moves around; how do character movements influence overlays zorder?

Hmm, unless that's a scripting mistake of some kind, this might be a sorting issue in the engine. Character movement influences only how character itself appears compared to other elements, not how elements appear in relation to each other.

Do you have a script example demonstrating this behavior? Alternatively, is it possible to download a game.ags file somewhere, to let me test this under debugger?
I will try to set up my own test too.

EDIT:
Here's my test game that creates N room overlays randomly in the room, in "Before fade-in" event:
https://www.dropbox.com/s/by18sil7hozd99z/test--360overlayssort.zip?dl=0
I do not observe same effect there. But maybe my game setup has differences.

Are you sure you do not recreate overlays repeatedly, for example, or change their Graphic, etc?
#640
Quote from: rongel on Thu 12/01/2023 12:11:36Things that don't work:
- Fading out and fading back in the GUI (that has the button) with Tween Module
- Making another GUI visible after clicking the button (no Tween Module, no fades). This seems the most strange one to me.

I can send my test game if it's easier to see what I mean.

I could not reproduce this using the temp 3.6.0 build (which I linked above). I guess I will have to see this in your game...
SMF spam blocked by CleanTalk