Adventure Game Studio

AGS Support => AGS Engine & Editor Releases => Topic started by: Crimson Wizard on Sat 27/05/2023 04:37:47

Title: AGS 3.6.1 - Beta 16 -- new WIP version
Post by: Crimson Wizard on Sat 27/05/2023 04:37:47
AGS 3.6.1 - Beta 16
Full release number: 3.6.1.15

ACHTUNG!
(http://i.imgur.com/3gHhXIz.png)
This is a BETA version of AGS 3.6.1.
It's considered relatively stable but is not thoroughly tested yet and also may have planned additions.
Use at your own risk. Please back up any games before opening them in this version of AGS.
New settings in this version may make your project files unusable in previous versions after saving with this version.

Download AGS 3.6.1 Beta 16 installer (https://github.com/adventuregamestudio/ags/releases/download/v3.6.1.15/AGS-3.6.1.15-Beta16.exe)
Download AGS 3.6.1 Beta 16 as a .zip archive (https://github.com/adventuregamestudio/ags/releases/download/v3.6.1.15/AGS-3.6.1.15-Beta16.zip)

For Editor
Spoiler
VC 2015 redistributable needed for AGS Editor on Windows (https://download.microsoft.com/download/6/A/A/6AA4EDFF-645B-48C5-81CC-ED5963AEAD48/vc_redist.x86.exe)
Download Color Themes for the Editor (https://github.com/adventuregamestudio/ags-themes/archive/refs/heads/master.zip)
[close]

For Android
Spoiler
AGS Player, suitable for running any compatible AGS game (https://github.com/adventuregamestudio/ags/releases/download/v3.6.1.15/AGS-3.6.1.15-debug.apk)
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler
AGS source code central repository (https://github.com/adventuregamestudio/ags/tree/master)
Debug symbols database (for analysing crash dumps) (https://github.com/adventuregamestudio/ags/releases/download/v3.6.1.15/AGS-3.6.1.15-pdb.zip)
[close]


Released: 28th December 2023

Previous stable version: AGS 3.6.0 P7 forum thread (https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-0-patch-7/)


This release is brought to you by:

- Alan v.Drake (fixes, improvements)
- Crimson Wizard
- edmundito (iOS fixes)
- eri0o
- Walter Agazzi (fixes)



What is new in 3.6.1

3.6.1 is planned to be a focused on improving performance and usability of existing features, and also possibly on restoring few functionalities cut while porting the engine to SDL2 (in 3.6.0).

Common features:
- Implemented Deflate compression option for sprites. (This is an algorithm used in PNG and ZIP formats, and testing shows about x1.5-x2 compression improvement compared to LZW).
- Removed length limits for: Game name, savegame folder, Character's script name and regular name (description), Inventory item's name (description), Mouse cursor's script name, Audioclip's script name.

Editor:
- Discontinued Source control integration functionality, removed "Put sound and sprite files in source control" option from General Settings.
- Made Editor a Dpi-aware application, which might improve its looks in Windows 10 and higher. This is disabled (may be temporarily), as it turned out to cause troubles on some user setups.
- Improved Room Editor controls:
  Added free panning mode done by holding the middle mouse button, or alternatively - by holding Space + LMB.
  Mouse Wheel without key modifiers scrolls the room vertically; Shift + Mouse Wheel scrolls
  the room horizontally.
  Zoom is done by Ctrl + Mouse Wheel and room now zooms towards or outwards the cursor position.
- In Room Editor the context menu is now displayed by RMB or Shift + RMB while editing masks.
  The individual room mode menu is merged with the "copy coordinates" command when shown.
- In Room Editor the hint with coordinates is now also displayed when moving Objects or Characters with keyboard.
- In Dialog Script editor support most Edit menu and context menu commands from the regular Script editor, with a few exceptions.
- In Sprite Manager added command "View" -> "Show filenames" which toggles display of a sprite's source filename under the sprites.
- During sprite export Editor will display a proper progress dialog.
- Zoom controls in Character and View panes now allow downscaling too. View editor displays the preview sprite stretched to fill the parent panel.
- View editor now allows to select multiple frames at once, across multiple loops too, using standard Shift + LMB and Ctrl + LMB combinations. Properties panel lets modify properties for all the selected frames at once.
- Added "Replace with all sprites from folder" command to the View editor's context menu.
- For Audio Clips in the project tree added "Force Reimport", "Force reimport all file(s)" and "Replace Source File" context menu commands.
- For Output Panel added "Copy selection" context menu command.
- Implemented Log Panel that lets you see the engine and game logs right in the Editor.
- Improved LipSync panel looks in case user's system has display scaling option enabled.
- "Goto Definition" command in script will now work for most of the game entities too, such as Characters, GUIs, and so forth. In that case it will find a game's entity and open a respective editor panel for it. This still does not work for some types, such as Room objects, and Views.
- Added main menu commands for opening a Project folder and Compiled folder.
- Added "Export Global Messages to script" menu command. This command is meant for upgraded pre-3.2 game projects, and will generate a script with a String array, moving global messages texts there.
- For script's tabs added a context menu command for opening this script's location.
- In General Settings moved few properties to different groups for better consistency.
- Added "Scale Character sprite offsets" property to General Settings. This property refers to scaling of Character.z and sprite offsets added by LockViewOffset script command.
- Added TextureCacheSize and SoundCacheSize properties to Default Setup. These let configure the sizes of runtime texture and sound cache sizes respectively.
- Added "Leave room after fade-out" event to Rooms (script function called "Unload" by default).
- Added Translated property to all GUI Controls (was available only in ListBox). Translated property tells whether this control's text has to be translated, and applied text direction (in right-to-left text mode).
- Support '\n' linebreak character in the Label's Text and potentially other text properties.
- When run with "/compile" argument Editor will print all messages to the console (stdout), instead of displaying modal message windows.
- For Android build target Editor now supports a directory to place plugins in.
- For Android build target disabled compression of .ags and .vox assets, as that seriously slows down engine streaming resources (sprites etc).
- When building a game for Android and Linux the Editor will now be more tolerant to missing plugins and only issue a warning instead of stopping with error.
- Config will now be saved in UTF-8, letting to support setup program's title text in unicode.
- For non-Windows build targets Editor will fix config containing Direct3D graphics driver option and set OpenGL instead.
- For Color Themes: implemented character literal, braces match and braces error settings.
- Made Editor be somewhat more tolerate to missing XML nodes in Game.agf, in many cases it will still let open a game.
- When upgrading older game projects, Editor will insert a call to SetRestartPoint() in the end of the 'game_start' function in GlobalScript.asc. This is done to complement removal of an automatic restart point in the engine. This inserted command is safe to remove.
- When upgrading pre-3.2 rooms with disabled SaveLoadEnabled property the Editor will reset this property and insert a comment with a warning into the corresponding room's script. This is done because this property is deprecated as is no longer accessible.
- Fixed Editor refusing to open a game if one of the translation files is missing.
- Fixed General Settings and Default Setup not working correctly right after importing a pre-3.* game project.
- Fixed importing GIFs or 8-bit PNGs may lose transparent pixels if source images used other palette index than 0 for transparency.
- Fixed sprites may get wrong transparency settings after "Crop sprite edges" operation.
- Fixed Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
- Fixed a rare exception when scrolling the room in the editor.
- Fixed deleting collapsed "region" in script would sometimes lead to portion of the script undeleted but staying invisible.
 - (Possibly) Fixed a "Index out of range" exception in Script editor, related to the "script location" drop-down list, which could occur at random circumstances while working with the script, and any Color Theme is enabled.
- Fixed Dialog properties displaying internal values not meant to be seen by a user.
- Fixed selecting parent GUI after its control did not display GUI's own properties in the Properties Grid.
- Fixed Editor could miss some of the files when cleaning up old compiled files after the Game's Filename property is changed.
- Fixed Editor generating deprecated settings in the default config file.

Scripting:
- Support "#else" preprocessor directive.

Script API:
- Implemented Room's "After fade-out" event.
- Added eEventLeaveRoomAfterFadeout event for the global "on_event".
- Added eEventGameSaved event which runs after game was saved.
- Expanded interaction functions for Character, Object, InventoryItem, Hotspot and Region types: now they all receive respective object's pointer as a parameter, similar to GUI event functions, as well as a cursor mode this interaction was run with, if applicable.
- Added Game.ResetDoOnceOnly(), which completely resets all DoOnceOnly instances.
- Added Game.PrecacheSprite() and Game.PrecacheView(), which preload certain sprites and linked frame sounds into the engine's cache memory.
- Added ScriptName property to AudioClip, Character, Dialog, GUI, GUIObject, Hotspot, InventoryItem, Object.
- Added static GetByName() function to AudioClip, Character, Dialog, GUI, GUIObject, Hotspot, InventoryItem, Object.
- Added Object.AnimationVolume property, which works similar to Character.AnimationVolume.
- Added static File.ResolvePath() and File.Path attribute.
- Added support for a text formatting to a number of functions: DisplayAtY(), Character.SayAt(), Character.SayBackground(), DrawingSurface.DrawStringWrapped().

Engine:
- Significant performance improvement to scripts. Script running speed restored to a level close to AGS 3.2.1. Testing few "script-heavy" games showed fps raise by up to 30-40% compared with 3.6.0 engine.
- Improved performance of String objects in script. For instance, appending a character to a String is now roughly x2 times faster, *sequential* iteration of String.Chars[] in Unicode mode is about x12 (!) times faster (Strings in ASCII mode have relatively less improvement, because they have been faster than Unicode mode already).
- Improved performance when creating, deleting and manipulating Overlays; allows the game to have thousands of those with much less slowing down.
- Improved performance when updating and deleting dynamic sprites, and notifying any objects that have to redraw themselves. Engine no longer resets Graphic properties of objects referencing deleted dynamic sprite to 0.
- Implemented "texture cache", in addition to the existing "sprite cache". The texture cache keeps textures generated from raw sprites and lets reusing them, improving performance and reducing CPU workload. The textures mostly occupy the video memory (on GPU). The actual impact is proportional to the game's resolution and amount of simultaneously animated objects on screen.
- WFN font renderer now supports unicode texts in utf-8.
- Buttons, ListBoxes and TextBoxes now support Right-to-left text direction.
- DrawingSurface.DrawString now supports Right-to-left text direction.
- All the script File functions now treat paths in case-insensitive way (including subdirs), which makes them platform-independent.
- Removed an automatic SetRestartPoint() call at startup. This is done in case user does not want to use default "restart" save slot, or has a custom save system.
- Support handling multiple mouse clicks per game frame, similar to how multiple key presses were supported since 3.6.0.
- When starting up, engine will now precache only first 4 or 8 loops of the starting player character's View. This is done to avoid filling sprite cache with too much sprites at once in case when the player's View contains lots of additional animations.
- Characters will now have their graphic offsets, set by Character.z property and LockViewOffset() function, scaled along with the character's own scaling. This is done so long as the respective game option is enabled in the General Settings.
- Ensure that character and object scaling is updated even when the game is not drawn. This fixes rare issues when their scale property did not update in time whilst the game was completely fadeout, and similar cases.
- Allow to change Character's move speed while its moving.
- When Character is ordered a new move command while already moving, the engine will try to make a smooth transition between old and new moving without a delay.
- Engine will now log a warning for the most incorrect parameters to Animate function instead of quitting the game.
- Engine will now skip blocking Character.Say commands instantly while skipping a cutscene.
- Added new config settings in "graphics" section: "sprite_cache_size" (which replaces deprecated "cachemax" in "misc") and "texture_cache_size".
- Character.AnimationVolume now applies to the portrait animation too.
- Object.SetView now lets invalid loop and frame values, and fallbacks to using loop 0, frame 0, printing a warning. This is also consistent with backwards-compatble SetObjectFrame() behavior.
- Changed Object.SetView() to not play a frame's sound, which could lead to a duplicated sound play if Object.Animate is run right after.
- Text Overlays internal images are now registered as dynamic sprites, and their IDs may be read from Overlay.Graphic. This lets find out their sizes using Game.SpriteWidth/SpriteHeight and optionally draw them somewhere using DrawingSurface.DrawImage().
- Ensure all the script API is now correctly available for the plugins.
- Engine will now safeguard plugin's reading and writing of game saves, so that any mistakes done by plugins won't affect other parts of a save.
- Engine will disable vsync in a "infinite fps" mode, because vsync prevents getting more fps.
- Engine will force any in-game debug messages to be displayed in standard message boxes, disregarding game's "Display all messages as speech" option.
- Print some info about memory usage when reporting a "Out of memory" error.
- Deprecated in-game "console", as practically useless.
- Added new config settings in "graphics" section: "sprite_cache_size" (which replaces deprecated "cachemax" in "misc") and "texture_cache_size".
- Fixed Characters may be seemingly "walking in place" for some time when arriving at destination.
- Fixed Display and Say commands treating the second met "&" sign as a voice-over token too (they must only check the first one in string).
- Fixed PlayMP3File() function limiting filename argument by an arbitrary number of characters.
- Fixed speechlines were adjusting their Y position while trying to not overlap GUIs even when these GUIs are completely offscreen.
- Fixed first Sierra-style speechline in a sequence was adjusting its Y position without need when GUIs are set to be hidden during game pause (this includes blocking speech). Normally, the speechlines are adjusting their Y position in order to not overlap GUIs, but when GUIs are hiding during speech there should not be any need to do so.
- Fixed GAMENAMElabel is not updated if Game.Name changes in script.
- Fixed script behavior in case a local variable was assigned a value without being initialized with a zero memory by compiler's instruction beforehand. This is not a problem with the standard compiler, but technically could be an issue with any custom implementation.

Engine Plugin API:
- Added IAGSStream interface, IAGSEngine.OpenFileStream() and GetFileStreamByHandle().
- Added IAGSEngine.ResolveFilePath() method, which resolves a script path (with location tokens) into a proper system filepath.
- Fixed IAGSEngine.GetFontType() incorrectly reporting TTF font type for WFN fonts with more than 128 characters.

Compatibility:
- In Editor, restored all the Character's variables available in "backward-compatible" mode. This is primarily to make it easier to import very old games.
- Fixed slower character walking speeds in pre-3.1 upscaled and high-resolution games.
- Fixed Object.SetView() and SetObjectFrame() not treating -1 for loop and frame as "keep previous values" in older games.
- Allow to run an animation over a loop with zero frames, by using the placeholder frame. This lets particular old games to continue running instead of crashing with error.
- Fixed inventory window not updated after game.top_inv_item is assigned a new value.
- Fixed a "New Room" command in old-style dialog scripts was preventing "First time Enter room" event to be called.

iOS:
- Updated port for 3.6.*.

Windows:
- Fixed a rare bug when the Windows engine could fail loading the game for no good reason. This error is related to a bug in Windows SDK 8.1.

Web / Emscripten:
- Fixed Safari cannot switch the game into fullscreen mode.

WinSetup:
- Added options for setting texture cache and sound cache size.





Log Panel

We're now featuring a new Editor window called "Log Panel".

(https://user-images.githubusercontent.com/1833754/240559473-79fa1df9-2b44-42d8-bc52-095f6005e70e.png)

If it's not present, it may be enabled in the "Window" menu.

This panel receives log messages from the engine when running the game in a test mode (F5), and prints in the text box. This is a short-term log, it's limited by 4k messages (i think) and when hitting the limit it will clear the older ones. Its main purpose is to let users see the current and the recent state of the game.

The log settings may be configured by pressing the "Show configuration" tool button, this will make them visible to the right from the log window. The settings include 2 groups of settings:
* Log Output - lets configure the minimal level of messages that the Editor will receive. These options are only applied once the game is starting.
* Log Filter - lets configure the current (temporary) level of messages. These options may be applied anytime.

The message types are dividing between Main, Game and Script.
Main - is the main engine messages, mostly related to something important initializing or changing.
Game - are various game-related events.
Script - are messages printed by a System.Log (https://adventuregamestudio.github.io/ags-manual/System.html#systemlog) command in script.

The Log window's font may be configured separately, in Editor Preferences, on "Advanced" tab.

Expanded interaction functions

Regarding expanded interaction functions, these are functions connected to Look at, Interact, Talk to and other similar events. They all now may have 2 parameters: a pointer to object, and cursor mode, similar to the following examples:
Code (ags) Select
function Ego_Interact(Character *c, CursorMode mode)
function oObject1_Look(Object *o, CursorMode mode)

Exceptions:
- Hotspot WalkOn and MouseOver events do not have CursorMode parameter.
- All Region events do not have CursorMode parameter.

The purpose of this addition is to improve situation where you connect same function to multiple events and/or multiple objects at once. In such case you will be able to distinguish object and mode for which the function is actually called.

These new parameters are optional. If you don't have them declared in script, they will be ignored by the engine, and your script is going to run as before.
Also, naturally, you do not have to use them, if you don't need to (even if they are declared).

WFN fonts supporting Unicode

Engine can now draw unicode texts using WFN fonts too, if WFN fonts have appropriate letters.
Unfortunately, existing WFN editors do not let add letters at indices higher than 255. This means they need to be upgraded to allow arbitrary higher slots.
Current WFN format does not exactly have a limit to the glyph index, but it has a limit to 64k bytes of letter pixel data. This amount potentially allows it to store several alphabets in low-resolution within a single font. You may always split languages into separate fonts anyway.

Here's the modified Radiant's FontEdit which supports editing any character in range 0-65535:
https://www.dropbox.com/s/xth28bfzu78vtqi/FontEditUni.zip?dl=0
this is an "unofficial" version made purely for test.
The source project may be found here (if anyone is interested):
https://github.com/ivan-mogilko/fontedit
The example of the WFN font hosting Greek alphabet (only capitals, for test):
https://github.com/adventuregamestudio/ags/files/11540578/AGSFNT0_UNI.zip
may be tried with e.g.
Code (ags) Select
Display("ΟΙ ΘΕΟΙ ΤΟΥ ΟΛΥΜΠΟΥ"); // THE GODS OF OLYMPUS
Title: Re: AGS 3.6.1 - Beta -- new WIP version
Post by: edmundito on Sat 27/05/2023 14:35:40
As mentioned on Discord, I'm excited about this release!

I tested the editor on my high DPI display, and many panels must be fixed. I also wonder if Editor plugins would also be affected.

I made a video showing the glitches: https://1drv.ms/v/s!Ap-i3SuJykLihinGCZ0jdiCcj6E_?e=eBEiVC

Edit: I just tested the Speech Center editor plugin, and there are problems: https://1drv.ms/i/s!Ap-i3SuJykLihituN9TEAgr3nvmj?e=XQgu9p
Title: Re: AGS 3.6.1 - Beta -- new WIP version
Post by: Crimson Wizard on Sat 27/05/2023 14:43:12
Quote from: edmundito on Sat 27/05/2023 14:35:40I tested the editor on my high DPI display, and many panels must be fixed. I also wonder if Editor plugins would also be affected.

I made a video showing the glitches: https://1drv.ms/v/s!Ap-i3SuJykLihinGCZ0jdiCcj6E_?e=eBEiVC

Edit: I just tested the Speech Center editor plugin, and there are problems: https://1drv.ms/i/s!Ap-i3SuJykLihituN9TEAgr3nvmj?e=XQgu9p

Could you demonstrate how the previous version looks on the same monitor?
Also, which OS do you run this on?

Personally I did not know how this works, as I have only 1 monitor and still using Windows 7...
EDIT: I might experiment with the Windows 10 vm later if I figure out how to emulate a very big monitor.

We might revert this change if there's no easy fix to this.
Title: Re: AGS 3.6.1 - Beta -- new WIP version
Post by: edmundito on Sat 27/05/2023 14:50:56
Quote from: Crimson Wizard on Sat 27/05/2023 14:43:12Could you demonstrate how the previous version looks on the same monitor?
Also, which OS do you run this on?

Sure, it looks like it always does but pixelated compared to the rest of the os:
https://1drv.ms/i/s!Ap-i3SuJykLihiyT3svQiDjWaPNo?e=7ESpxl

My specs are:
Windows 10 Home 21H2
Resolution: 2880x1800
Scale: 200%
Title: Re: AGS 3.6.1 - Beta -- new WIP version
Post by: Crimson Wizard on Sat 27/05/2023 15:06:44
Quote from: edmundito on Sat 27/05/2023 14:50:56My specs are:
Windows 10 Home 21H2
Resolution: 2880x1800
Scale: 200%


So it has these glitches on a particular monitor only, or overall on Win 10? Or do you have only 1 monitor (i was not sure how to interpret what you say)?
Title: Re: AGS 3.6.1 - Beta -- new WIP version
Post by: eri0o on Sat 27/05/2023 15:36:39
Uhm, that is weird, I did the change because I always do this setting manually on Win10 by right clicking the AGS Editor executable and selecting the scaling option by hand to get rid of the bluriness of the script editor. I don't have the side effects, like in theory some things could be fixed by using a layout instead of hardcoded positions, but things like the tabs and other details that I see in your print screen should already just scale correctly. When running AGS Editor through wine (in Linux or macOS) you can set font scaling options and the text in the tab appears to scale correctly - without being cut in the bottom like in your screenshot capture. We can rollback that change until someone can figure a better way to test for these. :/

Edit: for some reason I thought it was windows 11, I see now you have windows 10 too. I don't have a monitor with the same resolution or some way to reproduce it.  :sad: 

Edit2: wait a minute, now I see you mentioned you have scaling set to 200%, so possibly this is something I can set here to see what happens. I know in theory moving to NET 4.8 gives access to a different windows forms that could possibly improve this situation but maybe it's something better in ags4.
Title: Re: AGS 3.6.1 - Beta -- new WIP version
Post by: edmundito on Sat 27/05/2023 16:02:56
Quote from: eri0o on Sat 27/05/2023 15:36:39Edit2: wait a minute, now I see you mentioned you have scaling set to 200%, so possibly this is something I can set here to see what happens. I know in theory moving to NET 4.8 gives access to a different windows forms that could possibly improve this situation but maybe it's something better in ags4.

To clarify, I have to set it to 200% because the whole desktop would be too small to read. When I change it to 100%, the editor looks fine (same as 3.6.0) so it may be that the scaling setting is not compatible with the current forms.

You can test it out by going to the Windows screen/display settings and changing the scale.
Title: Re: AGS 3.6.1 - Beta -- new WIP version
Post by: eri0o on Tue 30/05/2023 21:53:58
@edmundito made a test for download here (https://github.com/ericoporto/ags/releases/download/3.6.1.1/AGS-3.6.1.0-Beta-ScalableTest.zip), where the color palette, sprite manager, inventory and lipsync panels should be scaling correctly. Could you try to see if I am on the right path?
Title: Re: AGS 3.6.1 - Beta -- new WIP version
Post by: edmundito on Fri 02/06/2023 01:38:47
@eri0o I tested the build and the panels you mentioned are looking good!



Title: Re: AGS 3.6.1 - Beta 2 -- new WIP version
Post by: Crimson Wizard on Tue 06/06/2023 00:33:58
Updated to Beta 2
(Please use download links in the first post)

This includes all the fixes from 3.6.0 Patch 2 too.

Backported a group of UI improvements from ags4 branch (forgot to do this much earlier); + couple of simple but convenient script events.

Editor:
- Improved Room Editor controls:
   Added free panning mode done by holding the middle mouse button, or alternatively - by holding Space + LMB.
   Mouse Wheel without key modifiers scrolls the room vertically; Shift + Mouse Wheel scrolls the room horizontally.
   Zoom is done by Ctrl + Mouse Wheel and room now zooms towards or outwards the cursor position.
 - In Room Editor the context menu is now displayed by RMB, or Shift + RMB while editing masks.
   The individual room mode menu is merged with the "copy coordinates" command when shown.
 - Reimplemented multiple sprites properties edit in the Sprite Manager. This ability was dropped in 3.5.0 unintentionally.
 - Added "Leave room after fade-out" event to Rooms (script function called "Unload" by default).

Script API:
 - Implemented Room's "After fade-out" event.
 - Added eEventLeaveRoomAfterFadeout event for the global "on_event".
 - Added eEventGameSaved event which runs after game was saved.


Also fixed Sprite Manager and Inventory pane's misalignment on Windows 10+ with desktop scaling. There are few more panes that have the problems, but they were not fixed yet, as it turned out to be more difficult to be compatible with different OSes and scaling variants.
Title: Re: AGS 3.6.1 - Beta 2 -- new WIP version
Post by: boycalledjames on Mon 12/06/2023 10:13:24
@Crimson Wizard

As requested, just reporting the scaling issues discussed previously on Discord.

3.6.1 WIP build scaling bug:
Text and icons on the AGS Editor UI appear small or cut off and become difficult to navigate when using a 4K display on Windows 10/11. This can be mitigated somewhat by setting Windows' High DPI settings under the exe's properties to either 'System' or 'System (enhanced)'. However, this overrides AGS Editor's in-game Fullscreen/Windowed scaling settings when playtesting, resulting in pixels that stretch and warp at uneven rates when sprites move across the screen.

(Configuring the High DPI settings separately on the acwin.exe has also been tested, but this does not appear to impact results.)
Title: Re: AGS 3.6.1 - Beta 3 -- new WIP version
Post by: Crimson Wizard on Mon 26/06/2023 16:59:38
Updated to Beta 3
(Please use download links in the first post)

Changes in this update:

Editor:
- In Sprite Manager added command "View" -> "Show filenames" which toggles display of a sprite's source filename under the sprites.
- During sprite export Editor will display a proper progress dialog.
- Added Translated property to all GUI Controls (was available only in ListBox). Translated property tells whether this control's text has to be translated, and applied text direction (in right-to-left text mode).
 - Reverted Editor's "dpi awareness" (possibly temporarily), as in current state it was causing disproportional scaling of Editor and editor plugins' panels on Windows 10+ with enabled desktop scaling.
 - Fixed importing SCI fonts with >128 chars.
 - Fixed font preview did not properly display characters with indexes 128-255 (regression since 3.6.0).
 - Fixed full spritefile recreation would write duplicate sprites into the spritefile, if game project (Game.agf file) contained multiple sprites with same ID for any reason (for example, if they were added by manually editing Game.agf).

Script API:
 - Added Game.ResetDoOnceOnly(), which completely resets all DoOnceOnly instances.

Engine:
- Performance improvement to creating, deleting and manipulating Overlays; allows the game to have thousands of those with much less slowing down.
- Buttons, ListBoxes and TextBoxes now support Right-to-left text direction.
- DrawingSurface.DrawString now supports Right-to-left text direction.
- Object.SetView now lets invalid loop and frame values, and fallbacks to using loop 0, frame 0, printing a warning. This is also consistent with backwards-compatble SetObjectFrame() behavior.
- Engine will disable vsync in a "infinite fps" mode, because vsync prevents getting more fps.
- Engine will force any in-game debug messages to be displayed in standard message boxes, disregarding game's "Display all messages as speech" option.
- Fixed character & object tint usage was inverted: applied ambient tint when told to use explicit one, and vice-versa (regression in previous 3.6.1 Beta).
- Fixed speechlines were adjusting their Y position while trying to not overlap GUIs even when these GUIs are completely offscreen.
- Fixed first Sierra-style speechline in a sequence was adjusting its Y position without need when GUIs are set to be hidden during game pause (this includes blocking speech). Normally, the speechlines are adjusting their Y position in order to not overlap GUIs, but when GUIs are hiding during speech there should not be any need to do so.
- Fixed GUI controls were not redrawn right after option OPT_RIGHTTOLEFT is changed in script.
- Fixed "noloopcheck" script function modifier was not handled correctly sometimes (regression in 3.6.0).

Engine Plugin API:
- Fixed IAGSEngine.GetFontType() incorrectly reporting TTF font type for WFN fonts with more than 128 characters.

Compatibility:
- Fixed Object.SetView() and SetObjectFrame() not treating -1 for loop and frame as "keep previous values" in older games.



NOTE: I will need to make another patch to 3.6.0 bit later with few of these fixes, because they also apply there.
Title: Re: AGS 3.6.1 - Beta 3 -- new WIP version
Post by: Crimson Wizard on Mon 03/07/2023 13:48:17
Unfortunately this was not noticed prior to Beta 3 release, but there's a new regression: the GUI labels do not draw any text in the Editor (at design time).

Here's a fixed update:
https://cirrus-ci.com/task/6658536059437056
Title: Re: AGS 3.6.1 - Beta 4 -- new WIP version
Post by: Crimson Wizard on Sun 09/07/2023 16:11:51
Updated to Beta 4
(Please use download links in the first post)

Changes in this update:

Editor:
- Added TextureCacheSize and SoundCacheSize properties to Default Setup. These let configure the sizes of runtime texture and sound cache sizes respectively.
- Fixed Labels don't draw text in preview (regression since the previous Beta 3).

Engine:
- Implemented "texture cache", in addition to the existing "sprite cache". The texture cache keeps textures generated from raw sprites and lets reusing them, improving performance and reducing CPU workload. The textures mostly occupy the video memory (on GPU). The actual impact is proportional to the game's resolution and amount of simultaneously animated objects on screen.
- All the script File functions now treat paths in case-insensitive way (including subdirs), which makes them platform-independent.
- Added new config settings in "graphics" section: "sprite_cache_size" (which replaces deprecated "cachemax" in "misc") and "texture_cache_size".

WinSetup:
- Added options for setting texture cache and sound cache size.



These were the the last major changes planned for the 3.6.1 update. I suppose we'll leave this in Beta stage for a couple of months, to let people test this, and fix/improve things as needed.
Title: Re: AGS 3.6.1 - Beta 4 -- new WIP version
Post by: Crimson Wizard on Tue 11/07/2023 15:09:17
There have been a report about the recent Beta causing error
"UpdateDDBFromBitmap: mismatched colour depths".
Unfortunately, I was not able to test the game which caused this, because it is a big download, and i had issues with internet connection recently.
I suspect that particular graphic feature is causing this. I may experiment with various things, but this is a unreliable kind of test.
If anyone experience same problem, please report here!

EDIT: okay, what's happening is a "false positive" error check , happens when sprites are not 32-bit.
Title: Re: AGS 3.6.1 - Beta 5 -- new WIP version
Post by: Crimson Wizard on Sat 15/07/2023 19:08:43
Updated to Beta 5
(Please use download links in the first post)

Changes in this update:

Editor:
- Support '\n' linebreak character in the Label's Text and potentially other text properties.
(along with the traditional AGS's '[')

Script API:
- Added static File.ResolvePath() and File.Path attribute.
These are mostly useful for diagnostic purposes, or logging, or to pass into plugins, for instance. File.ResolvePath() takes path like "$SAVEGAMEDIR$/data.dat" and returns the actual path on player's computer. File.Path returns the actual path this file was opened at.

Engine:
- Fixed IsSpeechVoxAvailable() returning positive result if run from IDE and Speech folder is empty.
- Fixed speech and messages were skipped by modifiers and other special keys (Ctrl, Alt, etc). (regression since 3.6.0)
Also fixed few regressions since previous Beta 4:
- Fixed engine crash when trying to render a non-32bit sprite.
- Fixed ListBox.FillSaveGameList() fills the items in a wrong order.
- Fixed File.Open() fails if no location token is present in a path.
- Fixed walkable area 0's scaling is completely ignored by characters and objects.

Plugin API:
- Added IAGSEngine.ResolveFilePath() method, which resolves a script path (with location tokens) into a proper system filepath.
Title: Re: AGS 3.6.1 - Beta 5 -- new WIP version
Post by: Crimson Wizard on Fri 21/07/2023 16:50:00
Found few more regressions in 3.6.1.

One noteable one is: calling ChangeRoom from the dialog script is broken and leads to weird behavior.


EDIT: sorry, false alarm, it was a scripting mistake in my test game apparently.
Title: Re: AGS 3.6.1 - Beta 5 -- new WIP version
Post by: .M.M. on Sat 22/07/2023 12:01:24
Great work everyone, I love the way AGS gets constantly better and better with time - the log panel window is a perfect addition!

Unfortunately, every time I close the game, I get an error message:
Quote---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0050387A; program pointer is +9904, engine version , gtags (10,70)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and contact the game author for support or post these details on the AGS Technical Forum.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------

I tried reinstalling (BETA 5 version), but it keeps showing up. I don't see any problem with the project - is it safe for the project files if I just continue working and ignore the error message for now?
Title: Re: AGS 3.6.1 - Beta 5 -- new WIP version
Post by: Crimson Wizard on Sat 22/07/2023 12:03:44
@.M.M.  could you try the latest build here and tell if the error still persists?
https://cirrus-ci.com/task/5862661473173504

you may download either installer or a zip archive from where it sais "Artifacts".
Title: Re: AGS 3.6.1 - Beta 5 -- new WIP version
Post by: .M.M. on Sat 22/07/2023 12:13:32
@Crimson Wizard No errors with the new build, everything runs smoothly. Thank you!  :)
Title: Re: AGS 3.6.1 - Beta 5 -- new WIP version
Post by: Crimson Wizard on Sat 22/07/2023 19:48:04
There's an experimental change that adds object pointer as an argument to all interaction functions:
https://github.com/adventuregamestudio/ags/pull/2061

I would appreciate if somebody could download a test build and try it out, see if it works well:
https://cirrus-ci.com/task/4853453999046656
Updated version, fixed Hotspot's WalkOn and Mouse over event args:
https://cirrus-ci.com/task/4755886569160704
(will be ready in 30-40 mins after posting this)
Title: Re: AGS 3.6.1 - Beta 6 -- new WIP version
Post by: Crimson Wizard on Fri 28/07/2023 22:01:09
Updated to Beta 6
(Please use download links in the first post)

Changes in this update:

Editor:
- Discontinued Source control integration functionality, removed "Put sound and sprite files in source control" option from General Settings.
- Export Game's Title into translations.
- Fixed Editor refusing to open a game if one of the translation files is missing.
- Fixed Game.agf was not created after importing a 2.* game project (regression in 3.6.0).
- Fixed Log Panel displaying recent messages with a delay.

Script API:
- Expanded interaction functions for Character, Object, InventoryItem, Hotspot and Region types: now they all receive respective object's pointer as a parameter, similar to GUI event functions, as well as a cursor mode this interaction was run with, if applicable.
- Added Object.AnimationVolume property, which works similar to Character.AnimationVolume.

Engine:
- Character.AnimationVolume now applies to the portrait animation too.
- Changed Object.SetView() to not play a frame's sound, which could lead to a duplicated sound play if Object.Animate is run right after.
- Removed few of the less important game messages from logging, because they may quickly clutter the log under some circumstances.
- Fixed deleted dynamic sprite leaving sprite slots marked as "taken" forever, which continuously increases the size of the sprites list at runtime (regression since previous 3.6.1 Betas)
- Partially improved performance of repeated creation and deletion of a large number of dynamic sprites on each game update (regression since previous 3.6.1 Betas)
- Fixed Buttons and ListBoxes using Translated property in reverse way (regression since previous 3.6.1 Betas).
- Fixed debugger (editor) log output did not receive initial engine messages.

Web / Emscripten:
- Fixed Safari cannot switch the game into fullscreen mode.



Regarding expanded interaction functions, these are functions connected to Look at, Interact, Talk to and other similar events. They all now may have 2 parameters: a pointer to object, and cursor mode, similar to the following examples:
Code (ags) Select
function Ego_Interact(Character *c, CursorMode mode)
function oObject1_Look(Object *o, CursorMode mode)

Exceptions:
- Hotspot WalkOn and MouseOver events do not have CursorMode parameter.
- All Region events do not have CursorMode parameter.

The purpose of this addition is to improve situation where you connect same function to multiple events and/or multiple objects at once. In such case you will be able to distinguish object and mode for which the function is actually called.

These new parameters are optional. If you don't have them declared in script, they will be ignored by the engine, and your script is going to run as before.
Title: Re: AGS 3.6.1 - Beta 7 -- new WIP version
Post by: Crimson Wizard on Sat 19/08/2023 20:14:39
Updated to Beta 7
(Please use download links in the first post)

Changes in this update:

Contains all fixes from 3.6.0 Patch 4.

Editor:
- In Dialog Script editor support most Edit menu and context menu commands from the regular Script editor, with a few exceptions.
- Added "Replace with all sprites from folder" command to the View editor's context menu.
- For Audio Clips in the project tree added "Force Reimport", "Force reimport all file(s)" and "Replace Source File" context menu commands.
- For Output Panel added "Copy selection" context menu command.
- Improved LipSync panel looks in case user's system has display scaling option enabled.

Engine:
- Support handling multiple mouse clicks per game frame, similar to how multiple key presses were supported since 3.6.0.
- Fixed program crash occuring when trying to get a screenshot from a save which does not contain one (regression in previous 3.6.1 Betas).

Android:
- Fixed crash in AGS Player when opening a games directory for browsing a list of games (regression in previous 3.6.1 Betas).
Title: Re: AGS 3.6.1 - Beta 8 -- new WIP version
Post by: Crimson Wizard on Fri 01/09/2023 18:15:24
Updated to Beta 8
(Please use download links in the first post)

Changes in this update:

Common features:
- Implemented Deflate compression option for sprites. (This is an algorithm used in PNG and ZIP formats, and testing shows about x1.5-x2 compression improvement compared to LZW).

Editor:
- Fixed Line tool in the Room Editor triggering sometimes after a context menu was called with Shift + RMB.
- Fixed Autocomplete not treating certain struct members as "static" or "protected" if their declaration is too long.

Engine:
- Fixed Character's idle animation getting reset to frame 0 when the speech is played without a valid speech view (idle animation should continue playing in such case).
- Fixed idle animation sometimes not starting immediately after Character finishes walking.
- Fixed a crash occuring if script tries to get or set a custom property for a non-existing Room Object (this seem possible to do by iterating over `object[]` array).
- Fixed invalid gui could be interacted with if a previous interaction displayed a message box on screen, sometimes leading to engine crashes (regression since the previous Beta).

Compatibility:
- Implemented "dataver_for_legacysaves" override option in config, which lets to instruct the engine which game data version to assume when loading legacy (pre-3.5.0) saves. This "hack" appeared to be necessary because of a mistake done during development of the older engine versions, where the save format was changed, but engine was made to rely on the game data version instead of incrementing save format index.
- Fixed engine could try to load game data from game.exe without checking whether data is actually appended to it when restoring a legacy save in a game with a different file structure.
- Fixed number of GUI elements were not tested when loading a legacy save, which could lead to GUI data getting overwritten incorrectly without a warning if number of controls changed since.

Plugins:
 - Fixed potential "index out of bounds" exceptions in the built-in PalRender plugin.



Some of the fixes mentioned here will likely be also backported to 3.6.0 and released as a part of next patch.
Title: Re: AGS 3.6.1 - Beta 8 -- new WIP version
Post by: nightmarer on Sat 02/09/2023 15:47:53
Great work! Great improvement the Deflate compression.
Title: Re: AGS 3.6.1 - Beta 8 -- new WIP version
Post by: Crimson Wizard on Sun 03/09/2023 01:29:23
QuoteSupport handling multiple mouse clicks per game frame, similar to how multiple key presses were supported since 3.6.0.

Ah, I just realized that there is still an oversight in this. on_mouse_click should probably have mx,my parameters, in case the mouse moved between clicks?

I primarily added this multiple clicks support after being asked by a person who was doing a tool-automated speed run of AGS games. So, it was supposed to support multiple simulated clicks in a row. But since mouse.x,y properties are only updated once per game frame, then this is still useless... (except when clicking on gui and interactive objects that have proper events, perhaps)

EDIT: also I noticed that some engines have "modifier keys" as a part of the mouse event (let know whether player did  Ctrl + Click, and similar).
Title: Re: AGS 3.6.1 - Beta 8 -- new WIP version
Post by: Crimson Wizard on Sun 10/09/2023 02:53:57
I found a very nasty bug; it occurs after you restored a save containing user managed structs, and then try to save again. When saving it has a chance to crash the engine, or write a random amount of garbage into the save file.

This bug was introduced around 3.6.1 Beta 1, released in the end of May. Which makes me wonder how it lasted unnoticed for 3 full months. Unless nobody is using 3.6.1 Betas, or nobody who used them had any managed structs in their scripts...

It is possibly not present in ags 4 releases, because of some differences in program code.

EDIT: we have some trouble with the build server, but I will release an emergency update with a fix as soon as it's working again.
Title: Re: AGS 3.6.1 - Beta 9 -- new WIP version
Post by: Crimson Wizard on Fri 15/09/2023 00:13:00
Updated to Beta 9
(Please use download links in the first post)

Contains all changes from 3.6.0 Patch 5.

Other changes in this update:

Editor:
 - Zoom controls in Character and View panes now allow downscaling too. View editor displays the preview sprite stretched to fill the parent panel.
 - View editor now allows to select multiple frames at once, across multiple loops too, using standard Shift + LMB and Ctrl + LMB combinations. Properties panel lets modify properties for all the selected frames at once.

Script API:
 - Added ScriptName property to AudioClip, Character, Dialog, GUI, GUIObject, Hotspot, InventoryItem, Object.
 - Added static GetByName() function to AudioClip, Character, Dialog, GUI, GUIObject, Hotspot, InventoryItem, Object.

Engine:
 - Improved performance when updating and deleting dynamic sprites, and notifying any objects that have to redraw themselves. Engine no longer resets Graphic properties of objects referencing deleted dynamic sprite to 0.
- Text Overlays internal images are now registered as dynamic sprites, and their IDs may be read from Overlay.Graphic. This lets find out their sizes using Game.SpriteWidth/SpriteHeight and optionally draw them somewhere using DrawingSurface.DrawImage().
- Fixed managed structs in script may cause program crashes after you restored a save and try to save again (regression in previous 3.6.1 Betas).

Compatibility:
 - Warn of write into "readonly" script variables, instead of error, as some older games may to try to write there.
 - Fixed inventory window not updated after game.top_inv_item is assigned a new value.
Title: Re: AGS 3.6.1 - Beta 9 -- new WIP version
Post by: Baguettator on Fri 15/09/2023 11:08:29
Hi ! I noticed a problem, I use 3.6.1.6, I have some "strings" declared at the top of my script, I give them a value in game_start function (String a="My String A" etc...), but if I have a code that asks "if (Label.Text==a)", it crashes as "a" is null.

Perhaps it has been fixed since newest versions, but I have to mention it in case of !

Of course, the call of "a" is done after "a" has been given a value, and after game_start function.

EDIT : also I saw that declaring label array in game_start doesn't work (label pointers will be null if they are called later in the code)
Title: Re: AGS 3.6.1 - Beta 9 -- new WIP version
Post by: Crimson Wizard on Fri 15/09/2023 12:27:20
Quote from: Baguettator on Fri 15/09/2023 11:08:29Hi ! I noticed a problem, I use 3.6.1.6, I have some "strings" declared at the top of my script, I give them a value in game_start function (String a="My String A" etc...), but if I have a code that asks "if (Label.Text==a)", it crashes as "a" is null.

This sounds like this may be a scripting mistake, please post an actual script example, and exact error message.

Quote from: Baguettator on Fri 15/09/2023 11:08:29EDIT : also I saw that declaring label array in game_start doesn't work (label pointers will be null if they are called later in the code)

Please post an actual script example, so that we can see what exactly you are doing.
Title: Re: AGS 3.6.1 - Beta 9 -- new WIP version
Post by: Dave Gilbert on Fri 15/09/2023 18:19:31
Dang. I blink and there are new updates. Thanks so much! I will try it soon.
Title: Re: AGS 3.6.1 - Beta 9 -- new WIP version
Post by: Baguettator on Mon 18/09/2023 05:25:49
Quote from: Crimson Wizard on Fri 15/09/2023 12:27:20
Quote from: Baguettator on Fri 15/09/2023 11:08:29Hi ! I noticed a problem, I use 3.6.1.6, I have some "strings" declared at the top of my script, I give them a value in game_start function (String a="My String A" etc...), but if I have a code that asks "if (Label.Text==a)", it crashes as "a" is null.

This sounds like this may be a scripting mistake, please post an actual script example, and exact error message.

Quote from: Baguettator on Fri 15/09/2023 11:08:29EDIT : also I saw that declaring label array in game_start doesn't work (label pointers will be null if they are called later in the code)

Please post an actual script example, so that we can see what exactly you are doing.

OK sorry it's my fault, it seems I made a mistake in my code...!
Title: Re: AGS 3.6.1 - Beta 9 -- new WIP version
Post by: Baguettator on Mon 18/09/2023 13:38:30
Quote from: Crimson Wizard on Fri 15/09/2023 12:27:20
Quote from: Baguettator on Fri 15/09/2023 11:08:29Hi ! I noticed a problem, I use 3.6.1.6, I have some "strings" declared at the top of my script, I give them a value in game_start function (String a="My String A" etc...), but if I have a code that asks "if (Label.Text==a)", it crashes as "a" is null.

This sounds like this may be a scripting mistake, please post an actual script example, and exact error message.

Quote from: Baguettator on Fri 15/09/2023 11:08:29EDIT : also I saw that declaring label array in game_start doesn't work (label pointers will be null if they are called later in the code)

Please post an actual script example, so that we can see what exactly you are doing.

Sorry, but in fact, it a real bug !

What I did :

// At the top of TopScript.asc, a Script File located higher than global Script.
String a;

function game_start()
{
  a="Test";
}

export a;

// In TopScript.ash
import String a;

// In Global Script

function on_key_press(eKeyCode keycode, int mod)
{
  if (keycode==eKeyG) Display(a); // THIS crashes because it returns a null String !
}

That's a problem !
Title: Re: AGS 3.6.1 - Beta 9 -- new WIP version
Post by: Crimson Wizard on Mon 18/09/2023 13:43:51
@Baguettator
I used your code in a new game, and it works correctly. You may try it yourself, if you would just create a new test game from a random template.

Is this the real code you are using? Is this string variable changed anywhere else in script?

I think it's best to deal with cases like this in the tech help forums first, to let others look into your script and make sure it's not a scripting mistake.
Title: Re: AGS 3.6.1 - Beta 9 -- new WIP version
Post by: Baguettator on Mon 18/09/2023 21:51:33
Quote from: Crimson Wizard on Mon 18/09/2023 13:43:51@Baguettator
I used your code in a new game, and it works correctly. You may try it yourself, if you would just create a new test game from a random template.

Is this the real code you are using? Is this string variable changed anywhere else in script?

I think it's best to deal with cases like this in the tech help forums first, to let others look into your script and make sure it's not a scripting mistake.

Big Sorry... The problem was I made a mistake in the name of the "game_start" function. I forgot the "_"... So it wasn't called !

And sorry, I told about it here as I thought it was a bug from the new versions of AGS.

Thanls for help anyway !
Title: Re: AGS 3.6.1 - Beta 10 -- new WIP version
Post by: Crimson Wizard on Sat 30/09/2023 00:17:12
Updated to Beta 10
(Please use download links in the first post)

Changes in this update:

Editor:
- "Goto Definition" command in script will now work for most of the game entities too, such as Characters, GUIs, and so forth. In that case it will find a game's entity and open a respective editor panel for it. This still does not work for some types, such as Room objects, and Views.
- Added main menu commands for opening a Project folder and Compiled folder.
- For script's tabs added a context menu command for opening this script's location.
- Added "Scale Character sprite offsets" property to General Settings. This property refers to scaling of Character.z and sprite offsets added by LockViewOffset script command.
- Config will now be saved in UTF-8, letting to support setup program's title text in unicode.
- Fixed GUI editor could display selection rectangle from a different GUI editor pane, if two or more are displayed on screen at the same time.
- Fixed Editor could miss some of the files when cleaning up old compiled files after the Game's Filename property is changed.

Engine:
- Characters will now have their graphic offsets, set by Character.z property and LockViewOffset() function, scaled along with the character's own scaling. This is done so long as the respective game option is enabled in the General Settings.
- Allow to change Character's move speed while its moving.
- When Character is ordered a new move command while already moving, the engine will try to make a smooth transition between old and new moving without a delay.
- Engine will now skip blocking Character.Say commands instantly while skipping a cutscene.
- Deprecated in-game "console", as practically useless.
- Fixed buttons on a non-clickable GUI were still changing to "mouse over" graphic under cursor.
- Fixed Characters may be seemingly "walking in place" for some time when arriving at destination.
- Fixed "Before fade-in" event could be called recursively under some peculiar conditions (this is a regression since 3.6.0).
- Fixed button click not registered if it has been made not visible and visible again during a single game frame (this is a regression since 3.6.0).

Compatibility:
- Fixed a "New Room" command in old-style dialog scripts was preventing "First time Enter room" event to be called.
Title: Re: AGS 3.6.1 - Beta 10 -- new WIP version
Post by: Crimson Wizard on Sat 30/09/2023 08:48:53
There's a serious mistake since Beta 9 (one before the current one) which cause portrait animations to not update. Unfortunately it was reported only now.

I will have to release another update as soon as this is fixed; or re-release Beta 10.

EDIT: done, sorry, please download again.
Title: Re: AGS 3.6.1 - Beta 10 -- new WIP version
Post by: eri0o on Sat 30/09/2023 12:15:44
It looks re-released!
Title: Re: AGS 3.6.1 - Beta 10 -- new WIP version
Post by: Dave Gilbert on Sat 30/09/2023 13:43:18
QuoteGoto Definition" command in script will now work for most of the game entities too, such as Characters, GUIs, and so forth. In that case it will find a game's entity and open a respective editor panel for it. This still does not work for some types, such as Room objects, and Views

YESSSSSSSSSSS. Thank you so much! I didn't even realize I wanted this. :)

edit: It even works from the dialog editor!! Bliss!
Title: Re: AGS 3.6.1 - Beta 10 -- new WIP version
Post by: Crimson Wizard on Thu 05/10/2023 23:50:51
Radiant had decided to "officially" release his FontEdit's sources under LGPL3 license, so now I can post an experimental version source, which allows to create WFN (bitmap) fonts with up to 64k characters, making it usable for Unicode games too:
https://github.com/ivan-mogilko/fontedit

Executable:
https://www.dropbox.com/s/xth28bfzu78vtqi/FontEditUni.zip?dl=0

The version may has some minor functionalities disabled during this update, and I did not have time to go back and fix everything. But if anyone would like to take this on, the sources are available, and also I may accept PRs.

Although, I believe someone should rewrite this on a modern UI framework, to make this program work on other platforms too.

NOTE: There's a Rulaman's FontEditor, also available as the Editor's plugin, but unfortunately I found its source code more complicated to edit and upgrade to 64k chars limit for some reasons.
Title: Re: AGS 3.6.1 - Beta 10 -- new WIP version
Post by: Crimson Wizard on Mon 23/10/2023 17:29:01
There's a bug introduced in the latest Beta (10) where a character who is ordered to move several times in a row would "teleport" to a random location in he room.

I was going to release a new update soon, but got distracted. So until then, here's a temporary build that has it fixed:
https://cirrus-ci.com/task/6707220583284736
Title: Re: AGS 3.6.1 - Beta 11 -- new WIP version
Post by: Crimson Wizard on Mon 23/10/2023 22:19:51
Updated to Beta 11
(Please use download links in the first post)

Changes in this update:

Editor:
- Added "Export Global Messages to script" menu command. This command is meant for upgraded pre-3.2 game projects, and will generate a script with a String array, moving global messages texts there.
- Made Editor be somewhat more tolerate to missing XML nodes in Game.agf, in many cases it will still let open a game.
- When upgrading older game projects, Editor will insert a call to SetRestartPoint() in the end of the 'game_start' function in GlobalScript.asc. This is done to complement removal of an automatic startup SetRestartPoint() call in the engine. This inserted command is safe to remove.
- When upgrading pre-3.2 rooms with disabled SaveLoadEnabled property the Editor will reset this property and insert a comment with a warning into the corresponding room's script. This is done because this property is deprecated as is no longer accessible.
- Fixed Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
- Fixed Script editor not marking "autoptr" and "builtin" as keywords.
- Fixed Script editor not applying color theme to character literals.

Scripting:
- Support "#else" preprocessor directive.

Script API:
- Added support for a text formatting to a number of functions: DisplayAtY(), Character.SayAt(), Character.SayBackground(), DrawingSurface.DrawStringWrapped().

Engine:
- Removed an automatic SetRestartPoint() call at startup. This is done in case user does not want to use default "restart" save slot, or has a custom save system.
- When starting up, engine will now precache only first 4 or 8 loops of the starting player character's View. This is done to avoid filling sprite cache with too much sprites at once in case when the player's View contains lots of additional animations.
- Fixed engine failing to startup sometimes if controller device subsystem failed to init (it should not init at all in this version, as we do not support joysticks yet).
- Fixed characters occasionally "teleporting" when ordered to move (regression since Beta 10)



NOTE: In regards to the SetRestartPoint() change, I have to post this clarification.
SetRestartPoint() and RestartGame() are still working as before. The change refers to the automatic restart point set when the game starts. This was disabled in the engine, in favor of letting users set it themselves if and where they prefer. Some games may need this, others not, some games use custom saves and it would not be fair to generate an unnecessary file on startup (and sometimes this file may be quite big, as it also depends on amount of script data).

As an attempt to make this transition easier, upon loading an older project the Editor will insert a SetRestartPoint() call into game_start() function in the GlobalScript. This call is safe to remove, or move elsewhere.
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: Crimson Wizard on Fri 03/11/2023 11:55:40
Updated to Beta 12
(Please use download links in the first post)

Contains all fixes from 3.6.0 Patch 6.

Other changes:

Editor:
- In General Settings moved few properties to different groups for better consistency.
- Apply color themes to Log Panel.
- Fixed View preview does not display very large sprites.

Engine:
- Improved performance of String objects in script. For instance, appending a character to a String is now roughly x2 times faster, *sequential* iteration of String.Chars[] in Unicode mode is about x12 (!) times faster (Strings in ASCII mode have relatively less improvement, because they have been faster than Unicode mode already).
- Fixed Overlays may display incorrectly after loading a legacy (pre-3.5.0) save file.



EDIT: I had to re-upload this again... after finding and fixing a mistake in String.Substring function :/
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: Crimson Wizard on Tue 14/11/2023 08:42:15
There's a mistake in Android port in this version, it does not let to start a game.

Here's a temporary editor build that has this fixed:
https://cirrus-ci.com/task/6489562277478400
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: Dave Gilbert on Tue 14/11/2023 19:21:36
Hi! I found a copy/paste bug in the latest version.

In the dialog editor tab, if I copy some text and try to paste it into one of the "option text" fields (using control-v), the text gets pasted into the SCRIPT instead of the option field.

For example, here I was trying to copy/paste the words "Yeah they do" into an option text field:

(https://www.wadjeteyegames.com/temp/paste-error.png)
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: Crimson Wizard on Wed 15/11/2023 11:39:47
Quote from: Dave Gilbert on Tue 14/11/2023 19:21:36Hi! I found a copy/paste bug in the latest version.

In the dialog editor tab, if I copy some text and try to paste it into one of the "option text" fields (using control-v), the text gets pasted into the SCRIPT instead of the option field.

Thank you for reporting, we're looking into this now.

As a workaround, use a "paste" command from the text field's context menu. This bug only occurs when you use keyboard shortcuts.
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: Dave Gilbert on Wed 15/11/2023 18:55:43
Thanks! I'll use that method for now, then. Right-clicking and selecting "paste" also works.
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: eri0o on Thu 16/11/2023 01:16:03
There is already a fix for the keyboard shortcuts that will be in the next 3.6.1 release! :) (now the issue is understood more in depth we are evaluating some details around this)
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: cat on Sun 19/11/2023 21:00:18
I do not know if this specific to this AGS version or a general thing (I'm using AGS Editor .NET (Build 3.6.1.10) v3.6.1, October 2023)

I have a game resolution of 1280 x 720 with a huge scrolling room (3760 x 720). I use the GotThere module which calls player.Walk(noBlock) and later checks if the player character has reached its destination.
I had the problem that for some hotspots it didn't work (for others it did). The module relies on the player reaching exactly the point that was demanded. Using the DebugHelper module, I found out that the player was standing on x = 2630 instead of the requested 2631. When I changed the requested walk-to point by one pixel (to 2630), it suddenly worked.

Now the question: Is this a known thing that the player will not reach certain points within a walkable area? Is this related to my room size or scrolling? Is this something with even vs. odd numbers (the other hotspot also didn't work with odd number but did with even)
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: Crimson Wizard on Sun 19/11/2023 21:13:38
Quote from: cat on Sun 19/11/2023 21:00:18Now the question: Is this a known thing that the player will not reach certain points within a walkable area? Is this related to my room size or scrolling? Is this something with even vs. odd numbers (the other hotspot also didn't work with odd number but did with even)

It has been a known thing that it sometimes characters do this: because of imperfect diagonal walking direction character could end up few pixels off and did not adjust the final position, avoiding making it look like a "jump".

But in the recent Beta (starting with v3.6.1.9, i think) there's a fix that is supposed to make character end up on a accurate destination, so long as there's a path to it. So, I am not sure if this is expected anymore.

Could you post a walkable mask (image that may be imported into AGS) and a pair of starting/ending coordinates that cause a mistake for us to test?
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: cat on Sun 19/11/2023 21:21:06
The walkable area is a rectangle, going from about 74, 702 to 3747, 719. No matter how often I tried, the character would not walk exactly to 2631, 710. 2631, 710 did work. Same for 1161, 710 vs 1160, 710.

I additionally have another walkable area, but this goes upwards in a totally different place and direction, I don't think this is related.
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: Crimson Wizard on Sun 19/11/2023 21:45:29
Quote from: cat on Sun 19/11/2023 21:21:06The walkable area is a rectangle, going from about 74, 702 to 3747, 719. No matter how often I tried, the character would not walk exactly to 2631, 710. 2631, 710 did work. Same for 1161, 710 vs 1160, 710.

Is this related to the starting coordinates or not at all?

Could you print Character.DestinationX/Y properties somewhere and see what they are after you issue a Walk command?
this might tell if this is a problem with pathfinding or walking.
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: cat on Sun 19/11/2023 21:51:44
Not at all. I click on the hotspot, the player walks to 2630, 710 (instead of 2631, 710) using the GotThere module (which uses player.Walk inside). While still standing there, I click the hotspot again, the character will not move and trigger the action. No matter how often I click. I change the desired point to 2630, 710 -> the player walks there and executes the action, no matter where I started.

(I'll be off to bed for now)
Title: Re: AGS 3.6.1 - Beta 12 -- new WIP version
Post by: Crimson Wizard on Sun 19/11/2023 22:50:50
Quote from: cat on Sun 19/11/2023 21:51:44Not at all. I click on the hotspot, the player walks to 2630, 710 (instead of 2631, 710) using the GotThere module (which uses player.Walk inside). While still standing there, I click the hotspot again, the character will not move and trigger the action. No matter how often I click. I change the desired point to 2630, 710 -> the player walks there and executes the action, no matter where I started.

Can you check the Room properties and tell what is the value of MaskResolution?
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Crimson Wizard on Mon 20/11/2023 15:36:27
Updated to Beta 13
(Please use download links in the first post)

Changes in this update:

Editor:
- In Room Editor the hint with coordinates is now also displayed when moving Objects or Characters with keyboard.
- For Android build target Editor now supports a directory to place plugins in.
- For Android build target disabled compression of `.ags` and `.vox` assets, as that seriously slows down engine streaming resources (sprites etc).
- When building a game for Android and Linux the Editor will now be more tolerant to missing plugins and only issue a warning instead of stopping with error.
- For Color Themes: implemented character literal, braces match and braces error settings.
- Fixed Editor failing to start if user preferences file is corrupted (this is a second fix, complementing one done in AGS 3.5.1).
- Fixed General Settings and Default Setup not working correctly right after importing a pre-3.* game project.
- Fixed in Dialog panel certain editing commands (Copy, Paste, Undo etc) would affect the script even if cursor is set to the option's text.
- Fixed Dialog properties displaying internal values not meant to be seen by a user.
- Fixed selecting parent GUI after its control did not display GUI's own properties in the Properties Grid.
- Fixed Editor generating deprecated settings in the default config file.

Engine:
- Fixed String.Substring() (regression in 3.6.1).
- Fixed File.Open() in case of an absolute path (regression in 3.6.1).
- Fixed pushed textual button not redrawn after mouse up (regression in 3.6.1).
- Fixed crash in Software renderer when drawing a flipped frame (regression in 3.6.1).

Engine Plugin API:
- Added IAGSStream interface, IAGSEngine.OpenFileStream() and GetFileStreamByHandle().
  Besides the obvious uses, this is critically needed for the games packaged into APK for Android, because plugins do not have a easy access to the game files in such case.
- Remade IAGSEngine.ResolveFilePath() (was introduced in 3.6.1 earlier), don't return allocated array of chars, instead accept an output buffer and its length as arguments.

Android:
- Fixed engine not being able to find game data when it is in APK.
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: cat on Mon 20/11/2023 16:42:56
Quote from: Crimson Wizard on Sun 19/11/2023 22:50:50Can you check the Room properties and tell what is the value of MaskResolution?

It is 1:2 - I didn't even know this setting existed! Should I change it to 1:1? What is the benefit of different resolutions?
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Crimson Wizard on Mon 20/11/2023 16:53:17
Quote from: cat on Mon 20/11/2023 16:42:56
Quote from: Crimson Wizard on Sun 19/11/2023 22:50:50Can you check the Room properties and tell what is the value of MaskResolution?

It is 1:2 - I didn't even know this setting existed! Should I change it to 1:1?

It's been historically hardcoded as 1:2 for high resolution games (anything above 320x200), but since some recent version (3.5.0 or 3.5.1) the default is now 1:1 everywhere and this property was added for backwards compatibility, and in case someone needs this for any reason.

There is another global property in General Settings (Rooms -> Default mask resolution) that sais what this value should be by default in newly created rooms.

Quote from: cat on Mon 20/11/2023 16:42:56What is the benefit of different resolutions?

Saving bit of memory on masks in very large rooms + maybe emulating less precise walking and click detection on hotspots; although to be fair I can hardly imagine the real use case.
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: cat on Mon 20/11/2023 16:55:33
Ah, okay. The game I'm working on is based on another (older) game. That's why the new settings are not applied.
With setting it to 1:1, it now works also with odd numbered coordinates.

Should I split out the posts about this topic here and move them to a different board/thread to keep this here clean?
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Crimson Wizard on Mon 20/11/2023 16:58:35
Quote from: cat on Mon 20/11/2023 16:55:33Should I split out the posts about this topic here and move them to a different board/thread to keep this here clean?

I don't think it's a big deal, so either is fine with me.

EDIT: if I recall right, changing mask resolution will convert existing one(s). It should be safe to convert to a higher res (1:2 -> 1:1), but opposite conversion is lossy (you will loose certain pixels and that cannot be automatically undone).
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: cat on Mon 20/11/2023 17:01:35
I just realized I don't have moderation powers in this board anyway ;)
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Baguettator on Mon 20/11/2023 18:18:37
Hi there ! Just launched my game previously made with 3.6.1.6, with the latest build 3.6.1.13, and I got a crash immediately. There is my error message :

An exception 0xC0000005 occured in ACWIN.EXE at EIP=0x0046522A. program pointer is -42, engine version 3.6.1.12, gtags (1,1).

Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Crimson Wizard on Mon 20/11/2023 18:24:24
Quote from: Baguettator on Mon 20/11/2023 18:18:37Hi there ! Just launched my game previously made with 3.6.1.6, with the latest build 3.6.1.13, and I got a crash immediately. There is my error message :

An exception 0xC0000005 occured in ACWIN.EXE at EIP=0x0046522A. program pointer is -42, engine version 3.6.1.12, gtags (1,1).

Do you mean that you run a compiled game with the new engine, or that you recompiled an older project with the new editor?
Is there anywhere I can download your compiled game to see what happens there?

If not, then I'd need to know what is in "game_start" function(s) in your game in order to reproduce the problem.
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Baguettator on Mon 20/11/2023 19:22:48
Yes I recompiled an old project ! And tried with another one, same crash.

I send you my project by PM.
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Crimson Wizard on Mon 20/11/2023 19:54:28
Alright, so I broke File.Open command in script. I've been changing things there and forgot to test, it fell out from my head.

I must fix this and re release the update.

But what can be possibly done to improve this situation? I constantly miss to test things. There have not been a single update where I did not have to quickly fix something. Maybe we can recruit testers?

EDIT: I wish we had some kind of automatic testing system running games and game scripts. Alot of problems could be prevented early.
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: cat on Mon 20/11/2023 20:26:51
I guess that's what betas are there for - that people can test them and find bugs.

As for improving the situation: what about providing the last two betas as download in a spoiler tag (just like "For Editor", but "Previous Betas"), so people can easily downgrade to a version before the bug so they can continue working while the bug is fixed? This could reduce stress to make a quick re-release.

Automatic smoke testing would be great, but this is a lot of work and comes with its own set of challenges.


By the way, thanks a lot for having a look at the mask resolution issue.
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Crimson Wizard on Mon 20/11/2023 20:31:31
Quote from: cat on Mon 20/11/2023 20:26:51As for improving the situation: what about providing the last two betas as download in a spoiler tag (just like "For Editor", but "Previous Betas"), so people can easily downgrade to a version before the bug so they can continue working while the bug is fixed? This could reduce stress to make a quick re-release.

All the previous Beta updates are available for download on our github releases page:
https://github.com/adventuregamestudio/ags/releases

But yes, I can add a link to previous beta to the first post too.
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Crimson Wizard on Mon 20/11/2023 21:58:20
The Beta 13 update was re-uploaded, with a File.Open script command fixed. Please download again (links are in the first post).
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Baguettator on Tue 21/11/2023 18:59:32
Thanks a lot Crimson Wizard ! I'm going to test it, but surely it works as you tested it before me with my project ;)
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Crimson Wizard on Tue 21/11/2023 19:46:36
Quote from: Baguettator on Tue 21/11/2023 18:59:32I'm going to test it, but surely it works as you tested it before me with my project ;)

Well, I only tested the startup, did not play your game further, so could miss something.
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Baguettator on Fri 24/11/2023 18:41:52
I feel very limited when I know that I can't dynamically increase or decrease the size of an array of a custom struct. Like :

struct Item
{
  String name;
};

Item items[];
items=new Item [50];

Is there any wish to make it possible in future versions of AGS ?

EDIT : weird thing is I can declare
Item items[];
in my script, and the game is launching well, but I can't then do
items = new Item [50];
Title: Re: AGS 3.6.1 - Beta 13 -- new WIP version
Post by: Crimson Wizard on Fri 24/11/2023 19:10:46
@Baguettator this may be done by creating a new array, copying old elements, and then assigning a new array to the pointer variable.

But I am bit puzzled with your example, because afaik regular structs cannot be stored in dynamic arrays, only managed structs can be. While Strings cannot be stored in managed structs in 3.6.* versions. So I am not certain what is your real use case.

EDIT: oh, judging by your thread in Tech Support, it appears that i misunderstood your intentions.
This problem is not about resizing existing array, but about having dynamic structs of regular structs, or structs containing strings.

In any case, I suggest looking into AGS 4 version (https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-4-0-early-alpha-for-public-test/), which has a new script compiler with a number of new features supported. The AGS 4 forum thread has a link to the new syntax cheat-sheet. Perhaps you will find a solution to your case there. If not, then please open a new suggestion for AGS 4 version. We try to not plan any big features for AGS 3 anymore.

EDIT: here's an active list of suggestions for the AGS 4 script:
https://github.com/adventuregamestudio/ags/issues?q=is%3Aopen+is%3Aissue+label%3A%22ags+4%22+label%3A%22context%3A+script+compiler%22+label%3A%22type%3A+enhancement%22
Title: Re: AGS 3.6.1 - Beta 14 -- new WIP version
Post by: Crimson Wizard on Mon 04/12/2023 11:34:07
Updated to Beta 14
(Please use download links in the first post)

Contains all the fixes from 3.6.0 Patch 7 (https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-0-patch-7/).

Other changes:

Editor:
- When run with "/compile" argument Editor will print all messages to the console (stdout), instead of displaying modal message windows.

Script API:
- Added Game.PrecacheSprite() and Game.PrecacheView(), which preload certain sprites and linked frame sounds into the engine's cache memory.



My intention is to have this as the last 3.6.1 "Beta", and make a "Release Candidate" after this version gets tested.

The purpose of 3.6.1 was improvements to the engine performance and Editor's convenience of use. Some things done here were not planned from the start, but appeared to have surprisingly good results (such as scripts execution speed, for example). There were also several "quality of life" improvements done for the Editor, such as Log Panel, and "Goto Definition" command from script's context menu opening characters and other game objects. Overall this seems like a nice relatively minor update after 3.6.0.
Title: Re: AGS 3.6.1 - Beta 14 -- new WIP version
Post by: Baguettator on Thu 14/12/2023 09:25:17
I don't know if it's possible to implement this in AGS 3.6.1, but could it be possible to add the "eWheeleast" and "eWheelwest" parameters for mousebuttons ? With any mouses, you can't do that, but with a pad (I don't know the name in english, but the square used with the fingers near the keys in a laptop that replaces the mouse)  you can do that. It could be great !
Title: Re: AGS 3.6.1 - Beta 14 -- new WIP version
Post by: Baguettator on Sun 17/12/2023 15:18:17
Also, I found that sometimes, the compiler doesn't see mistakes in sintax. I wrote that :

String a=String.Format("%d", dalle.typepion);

The compiler ran, and "a" was "0".

BUT typepion is an array in the "dalle" struct.

struct dalle
{
int typepion[10];
};

The compiler didn't tell "you can't make an int equal to an array". It should, isn't it ?
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Crimson Wizard on Thu 21/12/2023 12:31:23
Updated to Beta 15
(Please use download links in the first post)

Common features:
- Removed length limits for: Game name, savegame folder, Character's script name and regular name (description), Inventory item's name (description), Mouse cursor's script name, Audioclip's script name.

Editor:
- For non-Windows build targets Editor will fix config containing Direct3D graphics driver option and set OpenGL instead.
- Fixed sprites may get wrong transparency settings after "Crop sprite edges" operation.
- Fixed deleting collapsed "region" in script would sometimes lead to portion of the script undeleted but staying invisible.
- (Possibly) Fixed a "Index out of range" exception in Script editor, related to the "script location" drop-down list, which could occur at random circumstances while working with the script, and any Color Theme is enabled.

Engine:
- Print some info about memory usage when reporting a "Out of memory" error.
- Fixed Display and Say commands treating the second met "&" sign as a voice-over token too (they must only check the first one in string).
- Fixed `@GAMENAME@` label was not updated if Game.Name got changed in script.
- Fixed a crash when switching to a cursor mode which has no sprite assigned (regression in previous Beta).

Engine Plugin API:
- Expanded IAGSStream interface, which was added in previous Beta.

iOS:
- Updated port for 3.6.*.

Windows:
 - Fixed a rare bug when the Windows engine could fail loading the game for no good reason. This error is related to a bug in Windows SDK 8.1.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Dave Gilbert on Thu 21/12/2023 17:38:30
Quote- Print some info about memory usage when reporting a "Out of memory" error.

Awesome. Hopefully this helps track down the OOM errors I've been getting. Thanks! Nabbing now.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Dave Gilbert on Thu 21/12/2023 19:32:52
Sorry for double-posting. Unfortunately, this update doesn't seem to be compatible with the SpeechBubble module (https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/module-speechbubble-v0-8-0/). I get this error when any character speaks:

(http://www.wadjeteyegames.com/temp/bubble-error.png)

Any idea why this may be happening? I've tried adjusting the backwards compatibility settings but I get the same crash. I reverted back to beta 14 and everything works, so it must be something with the update.

Thanks in advance!

-Dave
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Crimson Wizard on Thu 21/12/2023 19:42:14
charBubbles contains a pointer to SpeechBubble. If it's null, then it was not created for some reason.

This is too complicated to have any ideas, as this involves a script module and a game script that use that. Can I have any test game where this may be reproduced?

EDIT: Okay, I will try with the game sources I had.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Dave Gilbert on Thu 21/12/2023 20:12:22
I made a small test game using the bubble module and the current update, and of course the bubble works perfectly!  :-D  So there must be something specific about my game that isn't playing nice with the update. I will see if I can narrow it down.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Crimson Wizard on Thu 21/12/2023 20:19:55
Quote from: Dave Gilbert on Thu 21/12/2023 20:12:22I made a small test game using the bubble module and the current update, and of course the bubble works perfectly!  :-D  So there must be something specific about my game that isn't playing nice with the update. I will see if I can narrow it down.

I could reproduce this using the "Old Skies" sources from October. Now I am going step by step back to see which changes in the engine cause this.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Dave Gilbert on Thu 21/12/2023 20:22:51
Oh! Wonderful. Thank you!
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Crimson Wizard on Thu 21/12/2023 21:02:15
I found that this is caused by removal of character name length restriction, but looking at exact set of changes in code I was not yet able to pinpoint the exact mistake.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Dave Gilbert on Thu 21/12/2023 21:31:05
It's always fascinating what obscure, seemingly unrelated things cause a bug. Thanks, CW.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Crimson Wizard on Thu 21/12/2023 22:12:11
Okay I found it, it was something I forgot to adjust in the engine after adding unlimited name fields to the character struct.

In very simple words, this caused either access of a wrong variable, or access of a wrong character altogether when using "character[]" array,

I will update the latest Beta download in a short while.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Crimson Wizard on Fri 22/12/2023 00:18:55
@Dave Gilbert the Beta 15 is reuploaded, please download again and try (same links).
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Dave Gilbert on Fri 22/12/2023 10:25:17
Awesome! I'll give it a whirl when I'm at my desk in a few hours. :)

edit: It worked! Thank you so much for the quick fix!
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Baguettator on Sat 23/12/2023 19:28:38
Hi !

In a near future, would it be possible to open a .txt File (using File.Open command, with eFileRead as a parameter, or eFileWrite) located in the game's directory ? I read that's it's not allowed because of Windows restrictions, but it could be very nice. I have manny data in my game saved into .txt files, I have placed them in $SAVEGAMEDIR$ folder, but if I update my game (especially these files), the players need to download them and place them manually in $SAVEGAMEDIR$.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Crimson Wizard on Sat 23/12/2023 19:32:25
Quote from: Baguettator on Sat 23/12/2023 19:28:38In a near future, would it be possible to open a .txt File (using File.Open command, with eFileRead as a parameter, or eFileWrite) located in the game's directory ? I read that's it's not allowed because of Windows restrictions, but it could be very nice. I have manny data in my game saved into .txt files, I have placed them in $SAVEGAMEDIR$ folder, but if I update my game (especially these files), the players need to download them and place them manually in $SAVEGAMEDIR$.

You can always open these files for reading using $INSTALLDIR$ path.
Also, it is possible to package custom files inside the game and read back using $DATA$ path. The custom files packaging is configured by General Settings -> Compiler -> Package custom data folders.
https://adventuregamestudio.github.io/ags-manual/File.html#fileopen
https://adventuregamestudio.github.io/ags-manual/GeneralSettings.html#compiler

As for writing, that's not a technical problem, but a design problem. Enabling this is simple, but as a result game authors may unintentionally produce games that cannot be run from certain locations, or on certain systems.
This is open for discussion though. If there are good ideas about how to make this safer, or have a backup plan in the engine, then we might implement them.

EDIT: One existing way to work around this restriction is to setup "custom savegame path" or "custom shared data path" either in Default setup, or individual player's setup. You may point them to the game folder using "." path (this means current dir), and then $SAVEGAMEDIR$ and $APPDATADIR$ will point to the game folder.

EDIT2: I might also notice that $SAVEGAMEDIR$ is a wrong place for the standard game files anyway, because default save location is in user's folder. This means that if there are multiple users on a PC, then they won't share these files. If you need to write some data shared among all players, then $APPDATADIR$ is a correct path.
But if you need custom files that you only read in game, then it's $INSTALLDIR$.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: eri0o on Sat 23/12/2023 20:47:14
I think the above case should definitely use $DATA$ path and just package the txt files inside the game package as it looks like you are reading those.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Baguettator on Mon 25/12/2023 19:19:19
OK, thanks for precisions Crimson Wizard !

I encountered a crash when I used the PlayMP3File command, using the 3.6.1.12 version of AGS editor.

https://drive.google.com/file/d/1IFszo6XzSL4t4ktSzoaBlmPnV5ecJGhI/view?usp=drive_link

We can't anymore use this function ?
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Crimson Wizard on Mon 25/12/2023 20:40:44
Quote from: Baguettator on Mon 25/12/2023 19:19:19I encountered a crash when I used the PlayMP3File command, using the 3.6.1.12 version of AGS editor.

https://drive.google.com/file/d/1IFszo6XzSL4t4ktSzoaBlmPnV5ecJGhI/view?usp=drive_link

We can't anymore use this function ?

The error messages like this, with "Illegal exception" title, mean that there's a error in the engine.
I shall look into this.

EDIT: found the problem, it was broken in 3.6.1 Beta around July-August.
Title: Re: AGS 3.6.1 - Beta 15 -- new WIP version
Post by: Baguettator on Tue 26/12/2023 19:20:09
Nice thanks ! Let me know when the next update is done for 3.6.1 :)
Title: Re: AGS 3.6.1 - Beta 16 -- new WIP version
Post by: Crimson Wizard on Thu 28/12/2023 16:26:17
Updated to Beta 16
(Please use download links in the first post)

This is a minor update, done soon after Beta 15 because there had to be a change in game save format.
WARNING: this update makes any runtime saves done in Beta 15 incompatible. We're sorry for this inconvenience. (Older saves WILL work.)

Changes in this update:

Editor:
- Fixed a rare exception when scrolling the room in the editor.

Engine:
- Remade changes to a save format introduced by 3.6.1.14 (Beta 15). Saves done by a 3.6.1.14 engine will no longer load correctly. (This does not affect any older saves.)
- Engine will now safeguard plugin's reading and writing of game saves, so that any mistakes done by plugins won't affect other parts of a save.
- Fixed Character.Name property's was not returning a new value in case if deprecated Character.name field was written to using a old-style string function like StrCopy (regression since Beta 15).
- Fixed PlayMP3File() crashing with null ptr access (regression since an earlier 3.6.1 Beta).
- Fixed PlayMP3File() function limiting filename argument by an arbitrary number of characters.

Engine Plugin API:
- Fixed IAGSStream::Seek return value - should return new position now, instead of true or false.

Title: Re: AGS 3.6.1 - Beta 16 -- new WIP version
Post by: Pax Animo on Mon 01/01/2024 17:08:58
Hey,

Just downloaded the latest build, installed it and started a new project from BASS template. After it finished preparing windows defender through up a virus detection.
(https://imgur.com/rdpnoSPl.png)
Title: Re: AGS 3.6.1 - Beta 16 -- new WIP version
Post by: eri0o on Mon 01/01/2024 17:16:19
You can submit a false positive report to Windows Defender Microsoft team

https://www.microsoft.com/en-us/wdsi/filesubmission/
Title: Re: AGS 3.6.1 - Beta 16 -- new WIP version
Post by: vga256 on Fri 05/01/2024 03:13:33
Running 3.6.1.15b (latest) and I tried upgrading my 3.6.0.x project using it. It compiles properly, but when I run the game, I get a pink background which fills in only when I move GUI objects over it. Screencap of behaviour here (MP4) (https://file.io/fszIMubX1GyV).

Happy to send a zip of my project if it helps to pin down the problem. Or perhaps it is something obvious I missed when upgrading my project?
Title: Re: AGS 3.6.1 - Beta 16 -- new WIP version
Post by: Crimson Wizard on Fri 05/01/2024 07:57:23
Quote from: vga256 on Fri 05/01/2024 03:13:33Running 3.6.1.15b (latest) and I tried upgrading my 3.6.0.x project using it. It compiles properly, but when I run the game, I get a pink background which fills in only when I move GUI objects over it. Screencap of behaviour here (MP4) (https://file.io/fszIMubX1GyV).

Happy to send a zip of my project if it helps to pin down the problem.

Please, give some details about your project:  color depth, the graphics driver you are using, what is the actual room background; are these real guis or you are drawing them on a drawing surface, etc.

Having the project or simply a compiled game may be useful too in case above information won't help to reproduce the problem.
Title: Re: AGS 3.6.1 - Beta 16 -- new WIP version
Post by: vga256 on Fri 05/01/2024 18:14:10
Quote from: Crimson Wizard on Fri 05/01/2024 07:57:23Please, give some details about your project:  color depth, the graphics driver you are using, what is the actual room background; are these real guis or you are drawing them on a drawing surface, etc.

Color depth: 32-bit
Resolution: 512x384
Renderer: Dragging GUI + dirty background painting occurs with SDL 2D Software Renderer. See note below.
Room background: 512x384 32-bit PNG
GUIs: No drawing surfaces or dynamicsprites used.

I will PM a zip of the project separately.

Notes on renderers:
The problem specifically with dirty background rectangles seems to be limited to the SDL2 2D Software Renderer. I also tested it with the OpenGL and D3D9 renders which do *not* paint dirty rectangles when dragging around GUIs. However, upon further testing I noticed that all three renderers produce a pink background between background fades. So unless there is some corrupted image in my sprites somewhere, it appears to be an underlying engine renderer problem somewhere.

It also may be of interest - I just tested it, and the exact same pink rendering problems also occur with AGS4.
Title: Re: AGS 3.6.1 - Beta 16 -- new WIP version
Post by: Crimson Wizard on Fri 05/01/2024 22:36:18
@vga256
It appears that this issue is caused by "Dissolve" room transition. Other transitions do not cause this, that's why I did not notice this in other games until now ("Dissolve" is rarely used).

EDIT: it looks like this problem was there for many months, since the early 2023 at least. Nobody noticed that.

EDIT2:
the fixed build may be downloaded here:
https://cirrus-ci.com/task/5391400494170112
Title: Re: AGS 3.6.1 - Beta 16 -- new WIP version
Post by: Crimson Wizard on Sat 06/01/2024 16:57:56
Opened a new thread for 3.6.1 Release Candidate:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-1-release-candidate-rc-1/

Will lock this thread now, please report any further issues in the new topic.