Menu

Show posts

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

Show posts Menu

Topics - Crimson Wizard

#21
I gave a quick try to this long existing feature request, to support having object interaction and event functions in any script module besides Global Script.
https://github.com/adventuregamestudio/ags/pull/2534

Making this work on the engine's side was pretty simple. Although in the implementation that I tried engine tests every script for the matching symbol, which may make running interaction somewhat slower, depending on the number of modules. I doubt that would be a performance problem, since this uses fast lookup tables, and normally happens as a reaction to player input. But there's definitely a room for improvement here. Either the script name may be saved along with the function name during game compilation; I suppose that would be a reasonable thing to do. Or it may be cached at runtime after running the event for the first time (or do this in case compiled data does not contain a script name).

But frankly I was more bothered about Editor's side of this issue, where "..." should do something more than leading to a global script.

This made me step back and think that it may be a smarter thing to save script name alongside with the function name. In other words, have strings like "GlobalScript.asc::cEgo_Interact". And if it does not have a script name, then assume it's a GlobalScript. This might work well at least if saved in compiled game, but also may work if used in the events fields. Maybe...

I suppose further, that maybe the Editor may automatically copy the previously used script name from assigned events when you create a new handler. For example, if you have a Character, and you have already assigned a "MyCustomModule.asc::cEgo_Interact" for Interact event, then you press [...] button for Look event, editor will insert "MyCustomModule.asc::cEgo_Look". If there are multiple scripts names used in these events for some reason, then maybe the first found one is used (?).

I am posting these thoughts here, willing to make a small pause and think this over again, but maybe somebody has ideas too. Unfortunately, even though the ticket exists for a very long time now (https://github.com/adventuregamestudio/ags/issues/485), there was not much discussion of this. Unless there had been one on forums and I missed it.
#22
AGS 3.6.1 - Patch 6
Full release number: 3.6.1.28


For Editor
Spoiler

For Android
Spoiler
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler


Released: 16th September 2024

Previous stable version: AGS 3.6.0 P11 forum thread


This release is brought to you by:

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



Summary

3.6.1 update focuses mainly on improving performance and usability of existing features, in both Editor and Engine.

The noteable addition to the Editor is a "Log Panel", which lets you read game logs right in the editor's window. "Goto definition" now works on game object script names and opens their respective panels. Room editor features better panning and zoom controls. Views allow to select and modify multiple frames at once.

In the engine, there's a significant improvement to script performance, which may make script-heavy games run 30-40% faster compared to AGS 3.6.0 (these were real test results on a certain game with 3D simulation). There's a big improvement to the speed of manipulating Overlays, and general speed improvement of graphics rendering primarily useful for high resolution games.

There are other fixes and improvements to various parts of the program too.
Please be sure to read "Upgrading to AGS 3.6.1" topic in the manual: https://adventuregamestudio.github.io/ags-manual/UpgradeTo361.html



Changes in the Patch 6:

Editor:
 - Fixed Ctrl+C and Ctrl+V not working in GUI editor.
 - Fixed sprite export and copying a sprite to clipboard operations were always exporting a 32-bit image, regardless of the actual sprite's color depth.
 - Fixed "Recreate spritefile" command was unintentionally converting any sprite to 32-bit if its source was not found, and it was taking existing image from the old spritefile.

Engine:
 - Fixed Software renderer could crash the game under some circumstances when the sprite cache's limit is exceeded (this is a regression in 3.6.1).
 - Fixed text-based lipsync's frame delay calculation: the existing formula was causing the delay value to "jump" back and forth with the slightest difference of speech text length, resulting in the speech lines of close length to be played with the notably different animation speeds.
 - Fixed drawing a 32-bit sprites on a 8-bit surface (e.g. a room mask), it was done wrong and was causing a memory corruption too.
 - Fixed drawing a room's walkable mask in script could cause errors during character walking if used colors exceeded walkable area number limit.
 - Fixed walk-behinds not drawn over characters and objects anymore (regardless of their baselines) after walk-behind mask was changed using drawing operations in script.
 - Fixed Game.SimulateKeyPress() not working in "old key-handling mode" (regression since 3.6.0).
 - Fixed script location is not reported in case of logical errors in engine's functions (regression since 3.6.0).

WinSetup:
 - Removed an obscure "Use 85 Hz display" option.


Changes in the Patch 5:

Editor:
 - When the room background size changes, clamp Room Edges to the new size.
 - Fixed Editor refusing to load a project if its folder name exceeds 40 characters.
   (An obsolete historical limitation which we forgot to cut from the program.)

Compiler:
 - Fixed script compilation hanging forever if a non-latin unicode character is met in script (outside of comments).

Engine:
 - Fixed GUI.ProcessClick() using mouse position when detecting a GUI control, instead of the position passed in the argument list.
 - Fixed Region.GetAtScreenXY() was returning null for offscreen coordinates. Made it return region[0] for consistency with other room areas, and backwards compatibility.
 - Fixed room Overlays not sorted in the order of their creation, like screen Overlays.
 - Fixed a potential mistake in Lucas-Arts speech position when there are multiple room viewports and speaking character is not directly visible in any of them.
 - Fixed Engine could switch program's locale to the current system locale by mistake when player is typing text. This could potentially lead to random glitches in text input in games which are run in ASCII mode and are handling extended characters.
 - Fixed TextBox was trying to display unsupported characters (in ASCII mode), resulting in random garbage.


Changes in the Patch 4:

Editor:
 - Fixed extracting templates with very large files inside would cause "Out of memory" error.
 - Fixed crash occuring when trying to import a non-existant GIF frame during Sprite Import.
 - Fixed potential mistake with sprite transparency occuring when importing a 8-bit sprite into 16/32-bit game.

Compiler:
 - Fixed "\t" (and few other less common escaped chars) not handled properly when they are inside string literals.
 - Fixed a crash in compiler occuring if user script defined a variadic function.
   (User-defined variadic functions are not properly usable at the moment, but this at least prevents an unhandled exception.)

Scripting:
 - Declare "UNICODE" macro for scripts if game is made in unicode mode.

Script API:
 - Added a number of missing OPT_* constants used with Get/SetGameOption functions.

Engine:
 - Fixed setting Screen.AutoSizeViewportOnRoomLoad to false in "game_start" could cause primary viewport and camera become initialized with zero width and height.
 - Fixed setting camera's size in "game_start" would unexpectedly get camera clamped to 320x200.
 - Fixed number of mistakes in Text Parser occuring when handling "multiwords".


Changes in the Patch 3:

Editor:
 - Fixed that after deleting a View's frame editor did not select next frame (regression in 3.6.1).
 - Fixed "Delete last loop" button not appearing in the View Editor if the view is filled using "Assign sprites to view" command from the Sprite Manager.

Engine:
 - Implemented an alternate solution for rendering "bad" TTF fonts that does not increase their loading times (after previous patch 2).
 - Allow scene render during "load room" event if the last room transition was "Instant".
   This has to be done because number of games used this event for custom transitions.
 - For games compiled in "Debug" mode "warnings.log" file will be written in "savegame dir" on platforms where modifying game directory is forbidden in principle (OSX, iOS, Android, Web).
 - Fixed System.Log() was registered for plugins using a wrong argument list.

Compatibility:
 - Fixed loading of 3.5.0 saves (broken in 3.6.1).

Windows:
 - Fixed disk space check was testing space in the current directory instead of the save game location.


Changes in the Patch 2:

Editor:
 - Fixed few potential program errors for "Generate Keystore" in Android preferences.
 - Fixed external processes (such as test game runs) were started using ShellExecute, which could theoretically lead to unintended results.

Engine:
 - Fixed String.Replace crashing the engine if the resulting string exceeds 3000 bytes.
 - Fixed releasing a mouse button could cause double "on_event" call (with eEventGUIMouseUp).
 - Improved rendering of TTF fonts which have glyph sizes surpassing declared font's height.
   This fixes the look of text on gui controls, and automatic outlining on these fonts.
 - Fixed a dialog shown with InputBox() function drawing typed text beyond text box'es border.
 - Fixed custom dialog options in the "old mode" not triggering redraw when the active option changes.


Changes in the Patch 1:

Editor:
- Fixed View's frame preview sometimes drawn incorrectly, in case of certain panel sizes.
- Fixed folding in the script editor not working correctly if there's a commented closing bracket ("//}") inside this code section.
- Fixed Editor sometimes failing to update game exe's file information and/or icons, if user was importing any sprites during this working session.

Engine:
- Fixed room objects not updating under Direct3D/OpenGL renderer, if they were assigned a dynamic sprite, then that sprite was deleted, and a new one assigned with coincidentally same ID.
- Fixed room objects not updating under Software renderer, if they were assigned a dynamic sprite, and that sprite was modified while object was not visible on screen.
- Fixed inventory cursor's crosshair not displayed (when enabled in game settings).



What is new in 3.6.1

Common features:
- Implemented Deflate compression option for sprites.
- 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.
- 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 (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.
- 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.
- Adjust sprites' import settings after "Crop sprite edges" command; this would ensure that these sprites are restored from source file keeping their cropped sizes.
- 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.
- 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.
- 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 Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
- 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 Editor could miss some of the files when cleaning up old compiled files after the Game's Filename property is changed.

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 sprite 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:
- Updated to SDL 2.28.5 and SDL_Sound 2.0.3+.
- 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 actual impact is proportional to the game's resolution and amount of simultaneously animated objects on screen.
- WFN font renderer now too supports unicode mode and renders texts in utf-8, so long as the font contains glyphs of corresponding indexes.
- 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.
- Ensure that when Overlays have identical ZOrder they will be sorted in the order of their creation. Besides convenience, this is also meant to restore historical behavior from before Overlay.ZOrder property was introduced.
- Allow game to call DynamicSprite.CreateFromDrawingSurface() and CreateFromBackground() with zero or negative size, clamping it to 1x1, in consistency with Create().
- 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.
- 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 message boxes, disregarding game's "Display all messages as speech" option.
- Display critical alerts as system modal messages on all platforms that support that (unless engine is run with "--no-message-box" parameter).
- 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 script behavior in case a local variable was assigned a value without being initialized with a zero memory by compiler's intruction beforehand. This is not a problem with the standard compiler, but technically could be an issue with any custom implementation.
- Fixed old-style letterbox viewport getting broken after loading an old pre-3.5.0 save.

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.
- 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 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.
- 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.

Windows:
- 32-bit Windows engine is now built as "large address aware" program, which will allow it to use up to 3 GB of RAM on 32-bit systems and 4 GB of RAM on 64-bit systems (was 2 GB previously).

iOS:
- Updated port for 3.6.*.

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

WinSetup:
- Added options for setting texture cache and sound cache size.
- Added options to disable particular graphic drivers and graphic driver selection, and fullscreen mode selection.




Thanks to everyone who contributed to and tested this version!



#23
Something I did not realize earlier, but since there's a color theme selection on AGS forum now, it's possible to switch between light and dark theme (at least).

Thing is, if I mark certain text with a color in my posts, such as "AGS release" for example, this color will not necessarily look good in the other theme.

Is there any way to format my post with some respect to the theme that a user chooses? Like, define different font color for a text, one per a theme, or use a color-defining keyword provided by the forum itself?

If not, would it be possible to implement in the new website?
#24
So, I posted this on github in our repository. I've been considering to fix the naming rule for the voice clips to let avoid conflicts when characters have identical first 4 characters. My proposal was to instead require using a full character name in the clip names.
https://github.com/adventuregamestudio/ags/issues/1456

But then I found there's another separate possible conflict, that is when character name has digits in it.

For example: character names are cGuy1 and cGuy11. And you do this:
Code: ags
cGuy1.Say("&11 word");
cGuy11.Say("&1 word");
Both will result in a voice clip name "guy111".

This of course is a very rare case, but it's still possible. Which means that the current rule has a loophole.
Besides, having any digits in character's name makes following clip number harder to distinguish.

The only way to avoid a situation like that completely is to separate name and number with a symbol that cannot be in a scriptname, but can be in a filename. Such symbol as a dot ('.') or a hyphen ('-'), or else.
I.e. make voice clips called like: guy1.1.ogg or guy1-1.ogg.

What do you think about this?
#25
AGS 3.6.1 - Patch 5
Full release number: 3.6.1.27


For Editor
Spoiler

For Android
Spoiler
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler


Released: 5th August 2024

Previous stable version: AGS 3.6.0 P11 forum thread


This release is brought to you by:

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



Summary

3.6.1 update focuses mainly on improving performance and usability of existing features, in both Editor and Engine.

The noteable addition to the Editor is a "Log Panel", which lets you read game logs right in the editor's window. "Goto definition" now works on game object script names and opens their respective panels. Room editor features better panning and zoom controls. Views allow to select and modify multiple frames at once.

In the engine, there's a significant improvement to script performance, which may make script-heavy games run 30-40% faster compared to AGS 3.6.0 (these were real test results on a certain game with 3D simulation). There's a big improvement to the speed of manipulating Overlays, and general speed improvement of graphics rendering primarily useful for high resolution games.

There are other fixes and improvements to various parts of the program too.
Please be sure to read "Upgrading to AGS 3.6.1" topic in the manual: https://adventuregamestudio.github.io/ags-manual/UpgradeTo361.html



Changes in the Patch 5:

Editor:
 - When the room background size changes, clamp Room Edges to the new size.
 - Fixed Editor refusing to load a project if its folder name exceeds 40 characters.
   (An obsolete historical limitation which we forgot to cut from the program.)

Compiler:
 - Fixed script compilation hanging forever if a non-latin unicode character is met in script (outside of comments).

Engine:
 - Fixed GUI.ProcessClick() using mouse position when detecting a GUI control, instead of the position passed in the argument list.
 - Fixed Region.GetAtScreenXY() was returning null for offscreen coordinates. Made it return region[0] for consistency with other room areas, and backwards compatibility.
 - Fixed room Overlays not sorted in the order of their creation, like screen Overlays.
 - Fixed a potential mistake in Lucas-Arts speech position when there are multiple room viewports and speaking character is not directly visible in any of them.
 - Fixed Engine could switch program's locale to the current system locale by mistake when player is typing text. This could potentially lead to random glitches in text input in games which are run in ASCII mode and are handling extended characters.
 - Fixed TextBox was trying to display unsupported characters (in ASCII mode), resulting in random garbage.


Changes in the Patch 4:

Editor:
 - Fixed extracting templates with very large files inside would cause "Out of memory" error.
 - Fixed crash occuring when trying to import a non-existant GIF frame during Sprite Import.
 - Fixed potential mistake with sprite transparency occuring when importing a 8-bit sprite into 16/32-bit game.

Compiler:
 - Fixed "\t" (and few other less common escaped chars) not handled properly when they are inside string literals.
 - Fixed a crash in compiler occuring if user script defined a variadic function.
   (User-defined variadic functions are not properly usable at the moment, but this at least prevents an unhandled exception.)

Scripting:
 - Declare "UNICODE" macro for scripts if game is made in unicode mode.

Script API:
 - Added a number of missing OPT_* constants used with Get/SetGameOption functions.

Engine:
 - Fixed setting Screen.AutoSizeViewportOnRoomLoad to false in "game_start" could cause primary viewport and camera become initialized with zero width and height.
 - Fixed setting camera's size in "game_start" would unexpectedly get camera clamped to 320x200.
 - Fixed number of mistakes in Text Parser occuring when handling "multiwords".


Changes in the Patch 3:

Editor:
 - Fixed that after deleting a View's frame editor did not select next frame (regression in 3.6.1).
 - Fixed "Delete last loop" button not appearing in the View Editor if the view is filled using "Assign sprites to view" command from the Sprite Manager.

Engine:
 - Implemented an alternate solution for rendering "bad" TTF fonts that does not increase their loading times (after previous patch 2).
 - Allow scene render during "load room" event if the last room transition was "Instant".
   This has to be done because number of games used this event for custom transitions.
 - For games compiled in "Debug" mode "warnings.log" file will be written in "savegame dir" on platforms where modifying game directory is forbidden in principle (OSX, iOS, Android, Web).
 - Fixed System.Log() was registered for plugins using a wrong argument list.

Compatibility:
 - Fixed loading of 3.5.0 saves (broken in 3.6.1).

Windows:
 - Fixed disk space check was testing space in the current directory instead of the save game location.


Changes in the Patch 2:

Editor:
 - Fixed few potential program errors for "Generate Keystore" in Android preferences.
 - Fixed external processes (such as test game runs) were started using ShellExecute, which could theoretically lead to unintended results.

Engine:
 - Fixed String.Replace crashing the engine if the resulting string exceeds 3000 bytes.
 - Fixed releasing a mouse button could cause double "on_event" call (with eEventGUIMouseUp).
 - Improved rendering of TTF fonts which have glyph sizes surpassing declared font's height.
   This fixes the look of text on gui controls, and automatic outlining on these fonts.
 - Fixed a dialog shown with InputBox() function drawing typed text beyond text box'es border.
 - Fixed custom dialog options in the "old mode" not triggering redraw when the active option changes.


Changes in the Patch 1:

Editor:
- Fixed View's frame preview sometimes drawn incorrectly, in case of certain panel sizes.
- Fixed folding in the script editor not working correctly if there's a commented closing bracket ("//}") inside this code section.
- Fixed Editor sometimes failing to update game exe's file information and/or icons, if user was importing any sprites during this working session.

Engine:
- Fixed room objects not updating under Direct3D/OpenGL renderer, if they were assigned a dynamic sprite, then that sprite was deleted, and a new one assigned with coincidentally same ID.
- Fixed room objects not updating under Software renderer, if they were assigned a dynamic sprite, and that sprite was modified while object was not visible on screen.
- Fixed inventory cursor's crosshair not displayed (when enabled in game settings).



What is new in 3.6.1

Common features:
- Implemented Deflate compression option for sprites.
- 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.
- 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 (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.
- 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.
- Adjust sprites' import settings after "Crop sprite edges" command; this would ensure that these sprites are restored from source file keeping their cropped sizes.
- 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.
- 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.
- 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 Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
- 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 Editor could miss some of the files when cleaning up old compiled files after the Game's Filename property is changed.

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 sprite 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:
- Updated to SDL 2.28.5 and SDL_Sound 2.0.3+.
- 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 actual impact is proportional to the game's resolution and amount of simultaneously animated objects on screen.
- WFN font renderer now too supports unicode mode and renders texts in utf-8, so long as the font contains glyphs of corresponding indexes.
- 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.
- Ensure that when Overlays have identical ZOrder they will be sorted in the order of their creation. Besides convenience, this is also meant to restore historical behavior from before Overlay.ZOrder property was introduced.
- Allow game to call DynamicSprite.CreateFromDrawingSurface() and CreateFromBackground() with zero or negative size, clamping it to 1x1, in consistency with Create().
- 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.
- 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 message boxes, disregarding game's "Display all messages as speech" option.
- Display critical alerts as system modal messages on all platforms that support that (unless engine is run with "--no-message-box" parameter).
- 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 script behavior in case a local variable was assigned a value without being initialized with a zero memory by compiler's intruction beforehand. This is not a problem with the standard compiler, but technically could be an issue with any custom implementation.
- Fixed old-style letterbox viewport getting broken after loading an old pre-3.5.0 save.

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.
- 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 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.
- 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.

Windows:
- 32-bit Windows engine is now built as "large address aware" program, which will allow it to use up to 3 GB of RAM on 32-bit systems and 4 GB of RAM on 64-bit systems (was 2 GB previously).

iOS:
- Updated port for 3.6.*.

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

WinSetup:
- Added options for setting texture cache and sound cache size.
- Added options to disable particular graphic drivers and graphic driver selection, and fullscreen mode selection.




Thanks to everyone who contributed to and tested this version!



#26
AGS 3.6.1 - Patch 4
Full release number: 3.6.1.26


For Editor
Spoiler

For Android
Spoiler
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler


Released: 7th July 2024

Previous stable version: AGS 3.6.0 P11 forum thread


This release is brought to you by:

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



Summary

3.6.1 update focuses mainly on improving performance and usability of existing features, in both Editor and Engine.

The noteable addition to the Editor is a "Log Panel", which lets you read game logs right in the editor's window. "Goto definition" now works on game object script names and opens their respective panels. Room editor features better panning and zoom controls. Views allow to select and modify multiple frames at once.

In the engine, there's a significant improvement to script performance, which may make script-heavy games run 30-40% faster compared to AGS 3.6.0 (these were real test results on a certain game with 3D simulation). There's a big improvement to the speed of manipulating Overlays, and general speed improvement of graphics rendering primarily useful for high resolution games.

There are other fixes and improvements to various parts of the program too.
Please be sure to read "Upgrading to AGS 3.6.1" topic in the manual: https://adventuregamestudio.github.io/ags-manual/UpgradeTo361.html



Changes in the Patch 4:

Editor:
 - Fixed extracting templates with very large files inside would cause "Out of memory" error.
 - Fixed crash occuring when trying to import a non-existant GIF frame during Sprite Import.
 - Fixed potential mistake with sprite transparency occuring when importing a 8-bit sprite into 16/32-bit game.

Compiler:
 - Fixed "\t" (and few other less common escaped chars) not handled properly when they are inside string literals.
 - Fixed a crash in compiler occuring if user script defined a variadic function.
   (User-defined variadic functions are not properly usable at the moment, but this at least prevents an unhandled exception.)

Scripting:
 - Declare "UNICODE" macro for scripts if game is made in unicode mode.

Script API:
 - Added a number of missing OPT_* constants used with Get/SetGameOption functions.

Engine:
 - Fixed setting Screen.AutoSizeViewportOnRoomLoad to false in "game_start" could cause primary viewport and camera become initialized with zero width and height.
 - Fixed setting camera's size in "game_start" would unexpectedly get camera clamped to 320x200.
 - Fixed number of mistakes in Text Parser occuring when handling "multiwords".


Changes in the Patch 3:

Editor:
 - Fixed that after deleting a View's frame editor did not select next frame (regression in 3.6.1).
 - Fixed "Delete last loop" button not appearing in the View Editor if the view is filled using "Assign sprites to view" command from the Sprite Manager.

Engine:
 - Implemented an alternate solution for rendering "bad" TTF fonts that does not increase their loading times (after previous patch 2).
 - Allow scene render during "load room" event if the last room transition was "Instant".
   This has to be done because number of games used this event for custom transitions.
 - For games compiled in "Debug" mode "warnings.log" file will be written in "savegame dir" on platforms where modifying game directory is forbidden in principle (OSX, iOS, Android, Web).
 - Fixed System.Log() was registered for plugins using a wrong argument list.

Compatibility:
 - Fixed loading of 3.5.0 saves (broken in 3.6.1).

Windows:
 - Fixed disk space check was testing space in the current directory instead of the save game location.


Changes in the Patch 2:

Editor:
 - Fixed few potential program errors for "Generate Keystore" in Android preferences.
 - Fixed external processes (such as test game runs) were started using ShellExecute, which could theoretically lead to unintended results.

Engine:
 - Fixed String.Replace crashing the engine if the resulting string exceeds 3000 bytes.
 - Fixed releasing a mouse button could cause double "on_event" call (with eEventGUIMouseUp).
 - Improved rendering of TTF fonts which have glyph sizes surpassing declared font's height.
   This fixes the look of text on gui controls, and automatic outlining on these fonts.
 - Fixed a dialog shown with InputBox() function drawing typed text beyond text box'es border.
 - Fixed custom dialog options in the "old mode" not triggering redraw when the active option changes.


Changes in the Patch 1:

Editor:
- Fixed View's frame preview sometimes drawn incorrectly, in case of certain panel sizes.
- Fixed folding in the script editor not working correctly if there's a commented closing bracket ("//}") inside this code section.
- Fixed Editor sometimes failing to update game exe's file information and/or icons, if user was importing any sprites during this working session.

Engine:
- Fixed room objects not updating under Direct3D/OpenGL renderer, if they were assigned a dynamic sprite, then that sprite was deleted, and a new one assigned with coincidentally same ID.
- Fixed room objects not updating under Software renderer, if they were assigned a dynamic sprite, and that sprite was modified while object was not visible on screen.
- Fixed inventory cursor's crosshair not displayed (when enabled in game settings).



What is new in 3.6.1

Common features:
- Implemented Deflate compression option for sprites.
- 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.
- 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 (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.
- 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.
- Adjust sprites' import settings after "Crop sprite edges" command; this would ensure that these sprites are restored from source file keeping their cropped sizes.
- 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.
- 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.
- 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 Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
- 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 Editor could miss some of the files when cleaning up old compiled files after the Game's Filename property is changed.

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 sprite 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:
- Updated to SDL 2.28.5 and SDL_Sound 2.0.3+.
- 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 actual impact is proportional to the game's resolution and amount of simultaneously animated objects on screen.
- WFN font renderer now too supports unicode mode and renders texts in utf-8, so long as the font contains glyphs of corresponding indexes.
- 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.
- Ensure that when Overlays have identical ZOrder they will be sorted in the order of their creation. Besides convenience, this is also meant to restore historical behavior from before Overlay.ZOrder property was introduced.
- Allow game to call DynamicSprite.CreateFromDrawingSurface() and CreateFromBackground() with zero or negative size, clamping it to 1x1, in consistency with Create().
- 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.
- 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 message boxes, disregarding game's "Display all messages as speech" option.
- Display critical alerts as system modal messages on all platforms that support that (unless engine is run with "--no-message-box" parameter).
- 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 script behavior in case a local variable was assigned a value without being initialized with a zero memory by compiler's intruction beforehand. This is not a problem with the standard compiler, but technically could be an issue with any custom implementation.
- Fixed old-style letterbox viewport getting broken after loading an old pre-3.5.0 save.

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.
- 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 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.
- 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.

Windows:
- 32-bit Windows engine is now built as "large address aware" program, which will allow it to use up to 3 GB of RAM on 32-bit systems and 4 GB of RAM on 64-bit systems (was 2 GB previously).

iOS:
- Updated port for 3.6.*.

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

WinSetup:
- Added options for setting texture cache and sound cache size.
- Added options to disable particular graphic drivers and graphic driver selection, and fullscreen mode selection.




Thanks to everyone who contributed to and tested this version!



#27
GUI controls in AGS games did not receive much updates since it turned opensource. While AGS allows to create many custom things with scripting, using raw drawing and/or overlays (for instance), there are situations when things would rather be achieved using standard GUI controls, but they are either missing a property or behavior.

Here I tried to organize ideas and requests that I heard over previous years. I think that for the long term it's best to not rush adding stuff to gui controls, but think this over first. I also think that, since GUI controls have a class hierarchy already, it is easier to expand multiple controls at once, as you may add common behavior to the parent class instead of adding same thing to many controls many times.

I also look at some classic GUI frameworks, such as C# WinForms, for comparison and example.

Related tickets (some directly, some indirectly):
https://github.com/adventuregamestudio/ags/issues/1208
https://github.com/adventuregamestudio/ags/issues/472
https://github.com/adventuregamestudio/ags/issues/669
https://github.com/adventuregamestudio/ags/issues/1876

NOTE: here I would not like to discuss dynamic creation of GUI controls (a well known request), as that's tangential to their looks and behavior.


So here's my thoughts and proposals.
Following list may be amended and altered after discussion.


1. Common Control events.

GUIControl should have a OnClick event, available to all the subtypes.
In addition to that: OnMouseDown/OnMouseUp events, in case one wants to distinct these events. @eri0o once suggested to have more "generic" name like OnPointerDown/OnPointerUp, suitable for multiple sorts of "devices". There may be other alternatives (to avoid mixing "pointer" terms), e.g. OnCursorDown/Up, etc.

The purpose of having these in the parent class is to let script low-level handling of player's input for any control.

2. Common Control appearance.

GUIControl should have Background and Border properties, so these are available to all subtypes. Including Background/Border Color and Image.
Optionally: Border width.
Optionally, Advanced: tiled Border graphics (but not sure how to configure these conveniently).

Alternatively, we might insert an intermediate class, something like FrameControl, which defines a control which has a "box" like appearance. This will keep an option to have controls derived from GUIControl but having a completely different kind of appearance.

The reasoning: sometimes user may like to have an underlaying color or image for a control, but with the exception of a Button (and maybe Slider) there's no direct way to do this. The workarounds are: either put another nonclickable button with a graphic underneath, or paint GUI background. The latter is inconvenient, as you will have to repaint it anytime if controls are moved.

This involves properties:
* BackgroundColor;
* BorderColor;
* BorderWidth;
* Image; maybe having "Image" is better than "BackgroundImage"? but need to consider pre-existing properties in derived controls, such as Button and Slider.
* ImageStyle: normal, stretched, tiled (?).

3. Labels.

Labels are defined as a control that displays a text or image and does not have any additional "interactive states" or values.

OTOH there's a suggestion to make Labels support image animation, similar to how Buttons are animated currently (Animate command). See the feature suggestion ticket.

New properties:
* Padding for the text or image. (ticket)
* Full set of TextAlignment options (like Button has currently).
If animation is supported, then it also will have to have:
* readonly View, Loop, Frame.

4. Buttons.

Buttons become a subtype of Label, inheriting its properties and behavior.
They are defined as a control that has multiple states depending on user input: normal, highlighted (under cursor), pushed.

While Buttons may reuse "BackgroundColor" as "NormalColor" (it's not necessary to do this though), they have multiple states, and so would likely need extra Color properties for "MouseOver" and "Pushed" state as well.

In regards to the BorderColor, buttons have a quirk that in their 3D look they draw border with 2 colors: a lighter color on top and left and darker color on right and bottom. At the moment I'm not sure which would be the best option here. Either they may derive these by mathematically darkening/lightening BorderColor property value, or require separate properties.

Buttons should have a ClickAction and NewModeNumber properties deprecated. These properties are a legacy from times when Iconbars were not scripted, but had cursor modes appointed to each button. All of this may be done in script now.
ClickAction = NoAction is equivalent to not having any registered OnClick function, so that's similarly redundant.
Buttons will simply be either ones which run some script on OnClick or not.

5. ListBoxes.

Properties that let to define a fixed row height, and/or row padding (padding is added to the font's height). I suppose that row height should be exclusive with row padding.
Text alignment including vertical alignment, in case row height is larger than the font.

Support for multiline List items, where a long text is wrapped into multiple lines instead of being cut at the control's edge.
(This may be mutually exclusive with row height)

Item arrangement property: allow to display items from bottom up.

Custom graphics for the scrollbar: arrow sprite(s), scrollbar sprite, scroll position sprite. And/or tiled scrollbar setting, where scrollbar is defined by upper/bottom edge and a middle tile.
#28
While I've been working on a pathfinding API, where functions like WalkPath and MovePath were added, others suggested to add a way to instigate a "patrol" mode over a single path, where character would move back and forth. In other words, something like a Repeat parameter, but which would tell to alternate directions instead of repeating same direction.

This reminded me that I was thinking of expanding RepeatStyle enum for Animations a while ago.

At some point I noticed that in the engine RepeatStyle consists of 3, not 2, variants, except one of them is "hidden" and supported only for a deprecated AnimateObject function (iirc). This third variant is "OnceReset", which means that the animation is played once, but then reset to the starting frame, as opposed to stopping at the last frame.
Unfortunately its support is inconsistent, and this constant is not a "official" part of RepeatStyle enum in script.

Anyway, I've been thinking about expanding animation parameters, which, I suppose, could be also applied to any function that involves a repeatable action, such as WalkPath.

The idea is to have a standard group of parameters for this. Such as:
- start frame
- end frame
- RepeatStyle
- direction, which means "starting direction".

Start frame and end frame would define a (optional) range of frames, and RepeatStyle would define how the animation is run between them.

The RepeatStyle I've been thinking was:
- Once - goes from start to end frame and stops at end frame;
- OnceReset - goes from start to end frame and resets to start frame;
- OnceAndBack - goes from start to end frame, and then goes backwards to start frame;
- Repeat - loops between start and end frame, using the starting direction;
- RepeatAlternate - loops between start and end frame, changing direction each time it reaches either of these two.

Range parameters should be made so that it's possible to have wrapping ranges, e.g. in a loop of 0-10 frames one may have a starting frame 8 and ending frame 4, so that animation went 8,9,10,0,1,2,3,4 if direction is forward.

Do you see any other useful options here?



Another thing, while thinking about this, I realized that logically there's a place to add a "Tween style" (or "easing") in this list of parameters, if we'd like to implement "tweening" into the engine (at least to functions like Animate).
#29
AGS 3.6.1 - Patch 3
Full release number: 3.6.1.25


For Editor
Spoiler

For Android
Spoiler
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler


Released: 9th June 2024

Previous stable version: AGS 3.6.0 P11 forum thread


This release is brought to you by:

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



Summary

3.6.1 update focuses mainly on improving performance and usability of existing features, in both Editor and Engine.

The noteable addition to the Editor is a "Log Panel", which lets you read game logs right in the editor's window. "Goto definition" now works on game object script names and opens their respective panels. Room editor features better panning and zoom controls. Views allow to select and modify multiple frames at once.

In the engine, there's a significant improvement to script performance, which may make script-heavy games run 30-40% faster compared to AGS 3.6.0 (these were real test results on a certain game with 3D simulation). There's a big improvement to the speed of manipulating Overlays, and general speed improvement of graphics rendering primarily useful for high resolution games.

There are other fixes and improvements to various parts of the program too.
Please be sure to read "Upgrading to AGS 3.6.1" topic in the manual: https://adventuregamestudio.github.io/ags-manual/UpgradeTo361.html



Changes in the Patch 3:

Editor:
 - Fixed that after deleting a View's frame editor did not select next frame (regression in 3.6.1).
 - Fixed "Delete last loop" button not appearing in the View Editor if the view is filled using "Assign sprites to view" command from the Sprite Manager.

Engine:
 - Implemented an alternate solution for rendering "bad" TTF fonts that does not increase their loading times (after previous patch 2).
 - Allow scene render during "load room" event if the last room transition was "Instant".
   This has to be done because number of games used this event for custom transitions.
 - For games compiled in "Debug" mode "warnings.log" file will be written in "savegame dir" on platforms where modifying game directory is forbidden in principle (OSX, iOS, Android, Web).
 - Fixed System.Log() was registered for plugins using a wrong argument list.

Compatibility:
 - Fixed loading of 3.5.0 saves (broken in 3.6.1).

Windows:
 - Fixed disk space check was testing space in the current directory instead of the save game location.


Changes in the Patch 2:

Editor:
 - Fixed few potential program errors for "Generate Keystore" in Android preferences.
 - Fixed external processes (such as test game runs) were started using ShellExecute, which could theoretically lead to unintended results.

Engine:
 - Fixed String.Replace crashing the engine if the resulting string exceeds 3000 bytes.
 - Fixed releasing a mouse button could cause double "on_event" call (with eEventGUIMouseUp).
 - Improved rendering of TTF fonts which have glyph sizes surpassing declared font's height.
   This fixes the look of text on gui controls, and automatic outlining on these fonts.
 - Fixed a dialog shown with InputBox() function drawing typed text beyond text box'es border.
 - Fixed custom dialog options in the "old mode" not triggering redraw when the active option changes.


Changes in the Patch 1:

Editor:
- Fixed View's frame preview sometimes drawn incorrectly, in case of certain panel sizes.
- Fixed folding in the script editor not working correctly if there's a commented closing bracket ("//}") inside this code section.
- Fixed Editor sometimes failing to update game exe's file information and/or icons, if user was importing any sprites during this working session.

Engine:
- Fixed room objects not updating under Direct3D/OpenGL renderer, if they were assigned a dynamic sprite, then that sprite was deleted, and a new one assigned with coincidentally same ID.
- Fixed room objects not updating under Software renderer, if they were assigned a dynamic sprite, and that sprite was modified while object was not visible on screen.
- Fixed inventory cursor's crosshair not displayed (when enabled in game settings).



What is new in 3.6.1

Common features:
- Implemented Deflate compression option for sprites.
- 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.
- 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 (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.
- 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.
- Adjust sprites' import settings after "Crop sprite edges" command; this would ensure that these sprites are restored from source file keeping their cropped sizes.
- 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.
- 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.
- 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 Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
- 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 Editor could miss some of the files when cleaning up old compiled files after the Game's Filename property is changed.

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 sprite 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:
- Updated to SDL 2.28.5 and SDL_Sound 2.0.3+.
- 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 actual impact is proportional to the game's resolution and amount of simultaneously animated objects on screen.
- WFN font renderer now too supports unicode mode and renders texts in utf-8, so long as the font contains glyphs of corresponding indexes.
- 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.
- Ensure that when Overlays have identical ZOrder they will be sorted in the order of their creation. Besides convenience, this is also meant to restore historical behavior from before Overlay.ZOrder property was introduced.
- Allow game to call DynamicSprite.CreateFromDrawingSurface() and CreateFromBackground() with zero or negative size, clamping it to 1x1, in consistency with Create().
- 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.
- 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 message boxes, disregarding game's "Display all messages as speech" option.
- Display critical alerts as system modal messages on all platforms that support that (unless engine is run with "--no-message-box" parameter).
- 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 script behavior in case a local variable was assigned a value without being initialized with a zero memory by compiler's intruction beforehand. This is not a problem with the standard compiler, but technically could be an issue with any custom implementation.
- Fixed old-style letterbox viewport getting broken after loading an old pre-3.5.0 save.

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.
- 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 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.
- 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.

Windows:
- 32-bit Windows engine is now built as "large address aware" program, which will allow it to use up to 3 GB of RAM on 32-bit systems and 4 GB of RAM on 64-bit systems (was 2 GB previously).

iOS:
- Updated port for 3.6.*.

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

WinSetup:
- Added options for setting texture cache and sound cache size.
- Added options to disable particular graphic drivers and graphic driver selection, and fullscreen mode selection.




Thanks to everyone who contributed to and tested this version!



#30
Editor Development / Pathfinding API in script
Sun 02/06/2024 17:55:53
I had a sudden moment of enthusiasm today, so wrote a draft for the basic Pathfinding API...
(To be fair, this is not a sudden idea, we discussed this on github a while ago.)

PR: https://github.com/adventuregamestudio/ags/pull/2441
Download for a test (based on AGS 4): https://cirrus-ci.com/task/5429664145997824
Last Updated: 14th June

The Pathfinding api lets user to use AGS internal pathfinder in script. This allows to calculate paths on the current room's walkable areas, but also lets to create a pathfinder object with a custom mask (from a sprite).

The new API is following:

Code: ags
builtin managed struct Pathfinder {
  /// Tries to find a move path from source to destination, returns an array of navigation points.
  Point*[] FindPath(int srcx, int srcy, int dstx, int dsty);
  /// Traces a straight path from source to destination, returns the furthermost point reached.
  Point* Trace(int srcx, int srcy, int dstx, int dsty);
};

builtin managed struct MaskPathfinder extends Pathfinder {
  /// Creates a new MaskPathfinder, initialized with the given 8-bit mask sprite
  static MaskPathfinder* Create(int mask_sprite); 
  /// Assigns a new mask to this MaskPathfinder
  void SetMask(int mask_sprite);
};

Pathfinder class is a parent class that provides generic methods, unrelated to how the pathfinding works. User cannot create objects of this class directly.
MaskPathfinder is a child class that implements a pathfinder based on 8-bit masks.

**IMPORTANT**: MaskPathfinder is currently disabled in script, because AGS does not let create or import 8-bit sprites in hi-color games. There's a separate task planned to resolve this problem. After that is done, MaskPathfinder may be re-enabled.

And this to the Room struct:

Code: ags
struct Room {
  <...>
  /// Gets this Room's Pathfinder object that lets find route around walkable areas.
  readonly Pathfinder *PathFinder;
}

Note that the Room returns a pointer of parent type Pathfinder, but it creates MaskPathfinder internally. This is done to restrict user from changing the room pathfinder's mask, because this pathfinder object is meant to represent actual room's walkable areas.

Then new variants of Walk and Move that accept array of Points:
Code: ags
/// Moves the character along the path, ignoring walkable areas, without playing his walking animation.
function Character.MovePath(Point*[], BlockingStyle=eNoBlock);
/// Moves the character along the path, ignoring walkable areas, automatically playing his walking animation.
function Character.WalkPath(Point*[], BlockingStyle=eNoBlock);
/// Returns the moving path of this character, or null if it's not moving
Point*[] Character.GetPath();
/// Moves the object along the path, ignoring walkable areas.
function Object.MovePath(Point*[], int speed, BlockingStyle=eNoBlock);
/// Returns the moving path of this object, or null if it's not moving
Point*[] Object.GetPath();

In these MovePath and WalkPath functions it is possible to pass a result of Pathfinder.FindPath, but also possible to just make your own path the way you please. GetPath() functions return the copies of the current path. If moving order changes, the previously returned array becomes obsolete (and not automatically updated, of course).

The working example script:
Spoiler

WARNING: player Character must be set Solid = false for this script to work! otherwise paths won't be found, because they start inside the Character's blocking area.

Code: ags
DynamicSprite *pathspr;
DynamicSprite *mask_copy;
Overlay *pathover;

function on_mouse_click(MouseButton button)
{
	if (pathover == null)
	{
		pathspr = DynamicSprite.Create(Room.Width, Room.Height);
		pathover = Overlay.CreateRoomGraphical(0, 0, pathspr.Graphic);
	}
	
	if (mask_copy == null)
	{
		mask_copy = DynamicSprite.Create(Room.Width, Room.Height);
	}
	
	DrawingSurface *mask_copy_ds = mask_copy.GetDrawingSurface();
	DrawingSurface *mask = WalkableArea.GetDrawingSurface();
	mask_copy_ds.Clear(30);
	mask_copy_ds.DrawSurface(mask);
	mask.Release();
	mask_copy_ds.Release();
  
	Point *goal = Screen.ScreenToRoomPoint(mouse.x, mouse.y);
	Pathfinder *finder = Room.PathFinder;
	Point *path[] = finder.FindPath(player.x, player.y, goal.x, goal.y);
	Point *trace = finder.Trace(player.x, player.y, goal.x, goal.y);
	
	DrawingSurface *ds = pathspr.GetDrawingSurface();
	ds.Clear(COLOR_TRANSPARENT);
	ds.DrawImage(0, 0, mask_copy.Graphic, 50);
	
	if (path != null)
	{
		for (int i = 0; i < path.Length; i++)
		{
			if (i > 0)
			{
				ds.DrawingColor = 1;
				ds.DrawLine(path[i - 1].x, path[i - 1].y, path[i].x, path[i].y);
			}
			ds.DrawingColor = 4;
			ds.DrawRectangle(path[i].x - 1, path[i].y - 1, path[i].x + 1, path[i].y + 1);
		}
	}
	
	if (trace != null)
	{
		ds.DrawingColor = 12;
		ds.DrawLine(player.x, player.y, trace.x, trace.y);
	}
	
	ds.Release();
}
[close]

Illustration of running above script:
(clicking around calculates a walk path from character to a certain point, and draws that path on screen)



Possibly we'd also need extra property or argument for the Pathfinder returned by the Room, which tells to ignore solid objects and characters, because right now they may unexpectedly "get in a way" (both literally and figuratively).
**UPDATE:** this problem is left for the future. At the moment the workaround is to manually toggle Solid property of wanted objects or characters before calling FindPath.
#31
I'd like to revisit a problem of loading older saves into an updated AGS game.

For the reference, the old thread about my previous working prototype:
https://www.adventuregamestudio.co.uk/forums/engine-development/load-older-game-saves-prototype-solution/
And the more recent conversation on the issue:
https://www.adventuregamestudio.co.uk/forums/engine-development/save-system-overhaul/

The problem with saves: in case someone does not know or have forgotten

AGS "saves" are in fact "savestates", not exactly equivalent, but close to a plain game memory dump.
When the savestate is restored, engine tries to fill the read data into the game objects. Dynamically created objects don't have any issues, but objects created at design-time (we may call these "static" objects) must match in numbers and order. If number of order of these objects is different, restoration of this save will fail (if only order is different, then engine may proceed, but result will be erroneous). This refers to script data as well (global script variables).
The potential save breaking reasons and existing workarounds are explained in full detail in this article in the manual:
https://adventuregamestudio.github.io/ags-manual/GameSavesCompatibility.html

When you look at this problem, at the first glance the solution could be to use unique object identifiers (like "script names") to match read data with existing objects. But this is complicated by the following major reasons:
1. Not all "objects" have a script name or any kind of unique id.
2. Not all "objects" have their names written into a compiled game, some exist only at design time and during compilation (best example: names of script variables).
3. Strange as it is, but in many places script names are not obligatory in AGS, and may be missing.
(Also, even when present, they are not written into a save game, although that's easier to fix on its own.)

There are other major issues with the existing save system, such as the fact that it stores literally everything, even something that you won't normally expect to be saved and restored in a game. This fact makes me believe that in the long run it may not be worth to "fix" existing save system, but rather worth developing a different one, based on a new principles.

Unfortunately, I do not feel like having an energy and enthusiasm for such task today. So I leave that for other times or other developers.

But at the same time I would like to try to provide a minimal possible solution that would let users patch their published games without fear of breaking older saves, at least for the time being.
There are still workarounds for that (mentioned in the page I linked above), but these still require predicting this issue, and making preparations.

The requirements for this "minimal solution", in my opinion, are:

1. User should be able to apply this solution when upgrading an older game, published before this solution was implemented.
2. This solution should be safe to add to existing game, and removed from game, that is - toggled on and off, without affecting the game itself.
3. User should at least be able to add more items of each type, while letting older saves still load. I think it's okay to not support item removal, as unnecessary items may be detached from the use (hidden etc).
4. With this solution, user must have an opportunity to script reaction to a "old" save, and tell whether to load it or not; and be able to update the game state after load is completed as necessary.
5. If an older save is loaded and has less items of certain type in it, the remaining items must reset to their initial state, as they are at design time. If requirement 4 is implemented, then user will be able to adjust these items after load, as necessary.
6. For the requirement 4, there has to be a guaranteed way to deduce which "game version" the save was written by. It's likely that script variables cannot be used here, as the preliminary save check has to be done prior to loading any modifiable game data such as script variables. Also because of requirements 1. and 2.



There are two things that I've been thinking about adding to AGS for this purpose. These may be reviewed, implemented and used in parallel or individually (separate from each other).

1. Minimal way of telling which parts of game data to write into save or load from a save.

In the past I noticed that there are things that likely should not be a part of a game's save, but are netherless written into a save state. This may cause problems when patching a game, but also may unnecessarily increase save's size.

One good example are GUI. In most games GUI are used just as menus, so something that lies "outside" of the game's progress state.
Classic problem here, an author wants to add a new translation, and translations are selected in-game by pressing a button. New translation means new button, but that new button will break the old saves. That is stupid, especially if we note that GUI don't have to be in saves.

Views - rarely have a meaning to be saved, but since they are saved "just in case" (because some of the frame properties may be modified at runtime), this makes them contributing the older save breakage.

Another example is dynamically created assets (dynamic sprites). These take much memory, but may be recreated knowing game situation from script variables right after a save is restored, for example. So there may be a reason to not put them into saves.

My thought is to have a simple way to tell the engine which types of data to put into a save and load from existing save. Thankfully, our current save format is divided into "components", which makes it technically easier to accomplish. What is needed here is to figure out a script API. Either this should be a new function that sets "save configuration" for the further use, or an optional argument to existing SaveGameSlot / RestoreGameSlot functions. Such argument may be either a set of bit flags (numeric constants combined in one integer value), or a formatted string.

Such option might solve this problem for many of the use cases already.



2. Allow to read saves with less contents than the current game

This is the original solution that I tried to implement a number years ago. It might go roughly like this:

1. While the engine reads the save, and finds out that save has less saved objects (or less script data, etc) than the current game, it runs a script callback. In this script callback user's script must be used to pass back the resolution whether to keep loading or cancel with error.
If save has more data than the game, or if there's no callback found, or if callback returned negative answer, then the restoration is cancelled.
This way the presence of a callback in script serves a safety check, that the user expected their games to load older saves with less data.

2. If restoration is allowed, engine restarts the game, loading its initial set of data, and then restores this save. This is done so to ensure that all data which is not present in the game is reset to initial state, for safety.

There are few nuances to think through here. One is a timing of executing that script callback. It may be done immediately as a problem is detected, but if done after partially restoring a save, the whole game may be in an unstable state. So running script could not be reliable. Another option is to only find if such callback is present in the script, restore the save, but run callback after the save got restored. Since it's still technically possible to read it. This way it may be possible to also check contents of a script data in that callback.

Another nuance is the game versioning. If you read the old thread you may notice that there I implemented a whole new struct containing numbers of various game objects for the user to check. Today I doubt this is a good idea, as it may be not very convenient or reliable, so I'd rather go with a more explicit "game version".
I don't know if we should rely on user having a variable that tells this game's version. We might also add a game property for this, and write it both into a game data and saves.

#32
I've been neglecting the issues with the navigation bar for a very long time. I know that some of the things mentioned here have been mentioned before, perhaps more than once.
(E.g. see https://www.adventuregamestudio.co.uk/forums/editor-development/feature-request-make-arrows-for-scrolling-through-room-elements-larger/)
Recently @Radiant also mentioned some related problems on github.

Although this navigation control received a lot of criticism, it should not be removed without having a good replacement designed first (Here's a conversation about this: )https://www.adventuregamestudio.co.uk/forums/editor-development/suggestion-room-explorer-a-tree-like-control-for-navigating-room-contents/).

For now, the short-term goal is to provide minor fixes to make its negative sides less annoying.

I've quickly set up an experimental version, based on older @eri0o 's work, and my own recent findings.
The PR may be found here: https://github.com/adventuregamestudio/ags/pull/2422
The latest build downloaded here: https://cirrus-ci.com/task/4945972789248000

Following is the list of implemented fixes:
1. Scroll dropdown menu with the mouse wheel.
2. Increase the size of "arrow" buttons.
3. Dropdown height is made at least as big to accommodate 16 items at once, that is current max number of walkable areas, etc.
4. Fixed dropdown menu closing when hovering over other items in the bar.
EDIT: this fix is temporarily removed, because it turned to be not reliable and causing new problems.

Known issues:
1. After scrolling with a wheel, there's a certain position desync when scrolling with buttons: they may scroll further than necessary (not sure yet if possible to fix).

The biggest problem there is that the "tool strip" control used in this navigation bar is not easy to customize, and we often have to rely on hacks. This is somewhat offset by the fact that the WinForms source code is now available for reading, so we can at least learn how these controls work.

Here I try to follow the principle of doing as less changes as possible...
#33
AGS 3.6.1 - Patch 2
Full release number: 3.6.1.24


For Editor
Spoiler

For Android
Spoiler
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler


Released: 2th May 2024

Previous stable version: AGS 3.6.0 P11 forum thread


This release is brought to you by:

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



Summary

3.6.1 update focuses mainly on improving performance and usability of existing features, in both Editor and Engine.

The noteable addition to the Editor is a "Log Panel", which lets you read game logs right in the editor's window. "Goto definition" now works on game object script names and opens their respective panels. Room editor features better panning and zoom controls. Views allow to select and modify multiple frames at once.

In the engine, there's a significant improvement to script performance, which may make script-heavy games run 30-40% faster compared to AGS 3.6.0 (these were real test results on a certain game with 3D simulation). There's a big improvement to the speed of manipulating Overlays, and general speed improvement of graphics rendering primarily useful for high resolution games.

There are other fixes and improvements to various parts of the program too.
Please be sure to read "Upgrading to AGS 3.6.1" topic in the manual: https://adventuregamestudio.github.io/ags-manual/UpgradeTo361.html



Changes in the Patch 2:

Editor:
 - Fixed few potential program errors for "Generate Keystore" in Android preferences.
 - Fixed external processes (such as test game runs) were started using ShellExecute, which could theoretically lead to unintended results.

Engine:
 - Fixed String.Replace crashing the engine if the resulting string exceeds 3000 bytes.
 - Fixed releasing a mouse button could cause double "on_event" call (with eEventGUIMouseUp).
 - Improved rendering of TTF fonts which have glyph sizes surpassing declared font's height.
   This fixes the look of text on gui controls, and automatic outlining on these fonts.
 - Fixed a dialog shown with InputBox() function drawing typed text beyond text box'es border.
 - Fixed custom dialog options in the "old mode" not triggering redraw when the active option changes.


Changes in the Patch 1:

Editor:
- Fixed View's frame preview sometimes drawn incorrectly, in case of certain panel sizes.
- Fixed folding in the script editor not working correctly if there's a commented closing bracket ("//}") inside this code section.
- Fixed Editor sometimes failing to update game exe's file information and/or icons, if user was importing any sprites during this working session.

Engine:
- Fixed room objects not updating under Direct3D/OpenGL renderer, if they were assigned a dynamic sprite, then that sprite was deleted, and a new one assigned with coincidentally same ID.
- Fixed room objects not updating under Software renderer, if they were assigned a dynamic sprite, and that sprite was modified while object was not visible on screen.
- Fixed inventory cursor's crosshair not displayed (when enabled in game settings).



What is new in 3.6.1

Common features:
- Implemented Deflate compression option for sprites.
- 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.
- 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 (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.
- 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.
- Adjust sprites' import settings after "Crop sprite edges" command; this would ensure that these sprites are restored from source file keeping their cropped sizes.
- 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.
- 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.
- 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 Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
- 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 Editor could miss some of the files when cleaning up old compiled files after the Game's Filename property is changed.

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 sprite 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:
- Updated to SDL 2.28.5 and SDL_Sound 2.0.3+.
- 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 actual impact is proportional to the game's resolution and amount of simultaneously animated objects on screen.
- WFN font renderer now too supports unicode mode and renders texts in utf-8, so long as the font contains glyphs of corresponding indexes.
- 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.
- Ensure that when Overlays have identical ZOrder they will be sorted in the order of their creation. Besides convenience, this is also meant to restore historical behavior from before Overlay.ZOrder property was introduced.
- Allow game to call DynamicSprite.CreateFromDrawingSurface() and CreateFromBackground() with zero or negative size, clamping it to 1x1, in consistency with Create().
- 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.
- 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 message boxes, disregarding game's "Display all messages as speech" option.
- Display critical alerts as system modal messages on all platforms that support that (unless engine is run with "--no-message-box" parameter).
- 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 script behavior in case a local variable was assigned a value without being initialized with a zero memory by compiler's intruction beforehand. This is not a problem with the standard compiler, but technically could be an issue with any custom implementation.
- Fixed old-style letterbox viewport getting broken after loading an old pre-3.5.0 save.

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.
- 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 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.
- 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.

Windows:
- 32-bit Windows engine is now built as "large address aware" program, which will allow it to use up to 3 GB of RAM on 32-bit systems and 4 GB of RAM on 64-bit systems (was 2 GB previously).

iOS:
- Updated port for 3.6.*.

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

WinSetup:
- Added options for setting texture cache and sound cache size.
- Added options to disable particular graphic drivers and graphic driver selection, and fullscreen mode selection.




Thanks to everyone who contributed to and tested this version!



#34
I am bit conflicted about where to post this... But I need an advice.

There's a problem about BASS and Verb Coin templates: although they include save/load dialogs, there's no way to bring these on using just the mouse; you can only do this by pressing F5/F7 on keyboard. This is not working for all platforms (does not work for mobile device), and not obvious either (makes users think there's no save/load functionality in these templates).

I am currently trying to bring BASS and Verb Coin to some consistency with Sierra-style template, in terms of options menu. Porting the missing menus is not a big deal, but there's a question of design: how to present the buttons that open these menus.

For BASS template I simply replaced the existing "Quit" button on a Inventory Bar, making it look like this:

(I also replaced up/down inventory arrows with left/right, because I thought that maybe it's more convenient to scroll it step by step rather than whole item row at once.)

The Verb Coin is a problem, because it did not have any existing bars. It has a verb coin with verbs called by holding LMB, and an inventory window called by clicking RMB.
For a test I added a dropping menu bar like this:


But I don't know if that's suitable for Verb Coin. What is expected from Verb Coin, does this style allow any "bars" on screen?

Alternatively, I have these thoughts:
- Show this menu bar only when Inventory is on screen; so player will call both Inventory window and menu bar using RMB.
- Replace the 4-button menu bar with only 1 "options" button in the top-right corner, shown only when cursor moves to the corner (not just up), similar to how Tumbleweed template did this.
#35
AGS 3.6.1 - Patch 1
Full release number: 3.6.1.23


For Editor
Spoiler

For Android
Spoiler
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler


Released: 8th April 2024

Previous stable version: AGS 3.6.0 P11 forum thread


This release is brought to you by:

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



Summary

3.6.1 update focuses mainly on improving performance and usability of existing features, in both Editor and Engine.

The noteable addition to the Editor is a "Log Panel", which lets you read game logs right in the editor's window. "Goto definition" now works on game object script names and opens their respective panels. Room editor features better panning and zoom controls. Views allow to select and modify multiple frames at once.

In the engine, there's a significant improvement to script performance, which may make script-heavy games run 30-40% faster compared to AGS 3.6.0 (these were real test results on a certain game with 3D simulation). There's a big improvement to the speed of manipulating Overlays, and general speed improvement of graphics rendering primarily useful for high resolution games.

There are other fixes and improvements to various parts of the program too.
Please be sure to read "Upgrading to AGS 3.6.1" topic in the manual: https://adventuregamestudio.github.io/ags-manual/UpgradeTo361.html



Changes in the Patch 1:

Editor:
- Fixed View's frame preview sometimes drawn incorrectly, in case of certain panel sizes.
- Fixed folding in the script editor not working correctly if there's a commented closing bracket ("//}") inside this code section.
- Fixed Editor sometimes failing to update game exe's file information and/or icons, if user was importing any sprites during this working session.

Engine:
- Fixed room objects not updating under Direct3D/OpenGL renderer, if they were assigned a dynamic sprite, then that sprite was deleted, and a new one assigned with coincidentally same ID.
- Fixed room objects not updating under Software renderer, if they were assigned a dynamic sprite, and that sprite was modified while object was not visible on screen.
- Fixed inventory cursor's crosshair not displayed (when enabled in game settings).



What is new in 3.6.1

Common features:
- Implemented Deflate compression option for sprites.
- 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.
- 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 (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.
- 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.
- Adjust sprites' import settings after "Crop sprite edges" command; this would ensure that these sprites are restored from source file keeping their cropped sizes.
- 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.
- 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.
- 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 Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
- 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 Editor could miss some of the files when cleaning up old compiled files after the Game's Filename property is changed.

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 sprite 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:
- Updated to SDL 2.28.5 and SDL_Sound 2.0.3+.
- 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 actual impact is proportional to the game's resolution and amount of simultaneously animated objects on screen.
- WFN font renderer now too supports unicode mode and renders texts in utf-8, so long as the font contains glyphs of corresponding indexes.
- 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.
- Ensure that when Overlays have identical ZOrder they will be sorted in the order of their creation. Besides convenience, this is also meant to restore historical behavior from before Overlay.ZOrder property was introduced.
- Allow game to call DynamicSprite.CreateFromDrawingSurface() and CreateFromBackground() with zero or negative size, clamping it to 1x1, in consistency with Create().
- 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.
- 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 message boxes, disregarding game's "Display all messages as speech" option.
- Display critical alerts as system modal messages on all platforms that support that (unless engine is run with "--no-message-box" parameter).
- 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 script behavior in case a local variable was assigned a value without being initialized with a zero memory by compiler's intruction beforehand. This is not a problem with the standard compiler, but technically could be an issue with any custom implementation.
- Fixed old-style letterbox viewport getting broken after loading an old pre-3.5.0 save.

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.
- 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 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.
- 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.

Windows:
- 32-bit Windows engine is now built as "large address aware" program, which will allow it to use up to 3 GB of RAM on 32-bit systems and 4 GB of RAM on 64-bit systems (was 2 GB previously).

iOS:
- Updated port for 3.6.*.

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

WinSetup:
- Added options for setting texture cache and sound cache size.
- Added options to disable particular graphic drivers and graphic driver selection, and fullscreen mode selection.




Thanks to everyone who contributed to and tested this version!



#36
AGS Engine & Editor Releases / AGS 3.6.1
Mon 01/04/2024 20:10:49
AGS 3.6.1
Full release number: 3.6.1.22


For Editor
Spoiler

For Android
Spoiler
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler


Released: 1st April 2024

Previous stable version: AGS 3.6.0 P11 forum thread


This release is brought to you by:

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



Summary

3.6.1 update focuses mainly on improving performance and usability of existing features, in both Editor and Engine.

The noteable addition to the Editor is a "Log Panel", which lets you read game logs right in the editor's window. "Goto definition" now works on game object script names and opens their respective panels. Room editor features better panning and zoom controls. Views allow to select and modify multiple frames at once.

In the engine, there's a significant improvement to script performance, which may make script-heavy games run 30-40% faster compared to AGS 3.6.0 (these were real test results on a certain game with 3D simulation). There's a big improvement to the speed of manipulating Overlays, and general speed improvement of graphics rendering primarily useful for high resolution games.

There are other fixes and improvements to various parts of the program too.
Please be sure to read "Upgrading to AGS 3.6.1" topic in the manual: https://adventuregamestudio.github.io/ags-manual/UpgradeTo361.html

The full changelog follows.


What is new in 3.6.1

Common features:
 - Implemented Deflate compression option for sprites.
 - 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.
 - 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 (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.
 - 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.
 - Adjust sprites' import settings after "Crop sprite edges" command; this would ensure that these sprites are restored from source file keeping their cropped sizes.
 - 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.
 - 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.
 - 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 Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
 - 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 Editor could miss some of the files when cleaning up old compiled files after the Game's Filename property is changed.

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 sprite 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:
 - Updated to SDL 2.28.5 and SDL_Sound 2.0.3+.
 - 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 actual impact is proportional to the game's resolution and amount of simultaneously animated objects on screen.
 - WFN font renderer now too supports unicode mode and renders texts in utf-8, so long as the font contains glyphs of corresponding indexes.
 - 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.
 - Ensure that when Overlays have identical ZOrder they will be sorted in the order of their creation. Besides convenience, this is also meant to restore historical behavior from before Overlay.ZOrder property was introduced.
 - Allow game to call DynamicSprite.CreateFromDrawingSurface() and CreateFromBackground() with zero or negative size, clamping it to 1x1, in consistency with Create().
 - 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.
 - 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 message boxes, disregarding game's "Display all messages as speech" option.
 - Display critical alerts as system modal messages on all platforms that support that (unless engine is run with "--no-message-box" parameter).
 - 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 script behavior in case a local variable was assigned a value without being initialized with a zero memory by compiler's intruction beforehand. This is not a problem with the standard compiler, but technically could be an issue with any custom implementation.
 - Fixed old-style letterbox viewport getting broken after loading an old pre-3.5.0 save.

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.
 - 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 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.
 - 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.

Windows:
 - 32-bit Windows engine is now built as "large address aware" program, which will allow it to use up to 3 GB of RAM on 32-bit systems and 4 GB of RAM on 64-bit systems (was 2 GB previously).

iOS:
 - Updated port for 3.6.*.

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

WinSetup:
 - Added options for setting texture cache and sound cache size.
 - Added options to disable particular graphic drivers and graphic driver selection, and fullscreen mode selection.




Thanks to everyone who contributed to and tested this version!



#37
AGS 3.6.0 - Patch 11
Full release number: 3.6.0.58


For Editor
Spoiler

For Android
Spoiler
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler

Released: 1st April 2024

Previous stable version: AGS 3.5.1 P20 forum thread


This release is brought to you by:

- Alan v. Drake (improvements, fixes)
- Cameron Cawley [ccawley2011] (fixes, improvements to SpriteFont plugin)
- Crimson Wizard (stuff :))
- Dominik Mierzejewski (fix)
- Donovan Watteau (fix)
- eri0o (updated Android port, Web port, Editor improvements, etc)
- fernewelten (new fonts outlining, improvements to script compiler, fixes)
- Francesco Ariis (fixes)
- Morgan Willcock (improving templates, help with CI)
- Pablo Navarro [panreyes] (fixes)
- ChamberOfFear (improvements)
- rofl0r (fixes, suggestions)
- sonneveld (porting engine to SDL2)
- Thierry Crozat (fixes, plugin update)
- vga256 (fixes)
- Walter Agazzi (fixes)


Summary

AGS 3.6.0 is another big change to AGS.
First of all, this release presents a SDL2-based engine. For about 2 decades AGS engine was based on Allegro 4 graphic library, which was discontinued somewhere in the early 2010-ies (only received few patches since). There was an intent to move to to Allegro 5 or SDL since, but for various reasons this task was continuously postponed. Now it's done.
Secondly the Editor and Engine now have full Unicode support. This means that you may use any language whatsoever in scripts, object descriptions and custom properties, as well as translations; so long as you also provide proper unicode fonts.
Third, we have finally expanded a list of platforms that the Editor can build for: now this includes Android and Web (Emscripten) port.

There are much more changes and improvements in this release, check out the full list of changes below.
Also, please be sure to read "Upgrading to AGS 3.6" topic in the manual: https://adventuregamestudio.github.io/ags-manual/UpgradeTo36.html



Changes in the Patch 11:

Editor:
- Fixed exception in Room Messages editor occuring if a certain game's Character is missing.

Engine:
- Fixed disabled GUIs not hiding their controls if "Hide all their controls" disabled style is set in General Settings, and game is run with Direct3D or OpenGL renderers.
- Fixed "greyed out" GUI controls leaving traces on parent GUIs when running with Software renderer.
- Fixed text parser in Dialog Options not working correctly if "new key handling" mode is on.
- Fixed DynamicSprite.SaveToFile() return value was inverse (regression in 3.6.0).
- Fixed engine crash in GetHotspotProperty() if the function is called with invalid ID.
- Fixed room Camera may fail to restore its position in the room after loading a save.
- Fixed fonts may not be assigned correct parameters when a new game is launched by calling RunAGSGame() in script (regression since 3.6.0 or 3.5.*).

Compatibility:
- Fixed engine refusing to load saves made by 3.2.0 engine, although being capable to do so.


Changes in the Patch 10:

Editor:
- Fixed a warning condition for copying 32-bit bitmaps to a desktop clipboard of less color depth.
- Fixed keyboard shortcuts for GUI Editor's Copy and Paste commands.
- Fixed a rare exception when scrolling the room in the editor.
- Fixed "Auto-number speech lines" and "Create voice acting script" operations failing if a Character's name contains underscore.

Compiler:
- Fixed escaped character literals not being parsed correctly. This makes character literals like '\n' and '\t' actually work in script.

Engine:
- Updated SDL_Sound library to 2.0.3.
- Improved OpenGL texture management, which should result in less system and video memory spent on sprite textures.
- Fixed Character.AddWaypoint() potentially using wrong walkspeed, if multiple characters or objects are ordered to start a non-blocking move in a mixed order.
- Fixed Character.AddWaypoint() is using incorrect speed if this room has a non 1:1 mask resolution, and "Scale speed with mask resolution" setting is enabled.
- Fixed Overlay.Create() crashing the engine if a non-existing sprite is passed as an argument.
- Fixed Say("...") command get stuck in endless loop if Speech.DisplayPostTimeMs is non-zero.
- Fixed PlayFlic() not working if called second time in game. This is likely a regression since 3.6.0.
- Fixed NumPad keys not handled properly by the engine (in on_key_press, IsKeyPressed, and TextBox control). This is a regression since 3.6.0.
- Fixed OpenGL renderer causing scaled sprites to have colored outlines sometimes while using Linear filter.


Changes in the Patch 9:

Engine:
- Fixed engine incorrectly reporting a script loading error, which may occur if the total size of script's global variables is bigger than the size of the compiled bytecode.


Changes in the Patch 8:

Editor:
- Fixed command "Crop sprite edges" in the Sprite Manager would copy import settings from the completely unrelated sprite onto the cropped one.

Engine:
- Fixed `@GAMENAME@` label not updating if Game.Name property is changed at runtime.
- Fixed System.ColorDepth was reporting a final display resolution, while it should report game's native resolution for historical reasons.

Compatibility:
- Fixed "upscale" mode not working for "default" game resolution in pre-3.1 games (the hidden meaning of "default" is 320x200 also).

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.


Changes in the Patch 7:

Editor:
- For Android build target disabled compression of `.ags` and `.vox` assets, as that slows down engine streaming resources (sprites etc).
- 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 RAM use spiking fast during batch sprite reimport from sources, which could randomly lead to program errors.
- 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 GUI controls unexpectedly clipping parts of text even if "controls clip contents" setting is disabled, in case when their Font has VerticalOffset property set.


Changes in the Patch 6:

Editor:
- 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 Script editor not marking "autoptr" and "builtin" as keywords.
- Fixed Script editor not applying color theme to character literals.
 
Engine:
- Made String.Chars and Length properties work faster in ASCII mode.
- Issue a warning when blocking Display or Say commands are called during fade-out.
- 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 "Before fade-in" event could be called recursively under some peculiar conditions (regression since 3.6.0).
- Fixed buttons on a non-clickable GUI were still changing to "mouse over" graphic under cursor.
- Fixed button click not registered if it has been made not visible and visible again during a single game frame (regression since 3.6.0).
- Fixed TextWindow borders drawn behind the rightmost corner pieces, which may be seen if the edge sprites are half-transparent.
- Fixed a brief black screen flash occuring right after the video playback ends (regression since 3.6.0).
- Fixed engine refusing to load legacy saves if the audio clip count does not match (number of audio clips should not affect saves).
 
WinSetup:
- Added an option to disable "smooth scaled sprites" setting.
- Added an option to disable language selection.
- Made filter names in "disabled" section treated in case insensitive way.


Changes in the Patch 5:

Editor:
- Reimplemented multiple sprites properties editing in the Sprite Manager. This ability was dropped in 3.5.0 unintentionally.
- Fixed Autocomplete not treating certain struct members as "static" or "protected" if their declaration is too long.

Engine:
- Fixed Character.WalkStraight() was resetting walking animation if called during walking.
- 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).

Compatibility:
- Implemented "legacysave_assume_dataver" override option in config, which lets to instruct the engine which game data version to assume when restoring 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.
- Implemented "legacysave_let_gui_diff" override option in config, which lets the engine to read less gui elements from restored save than the number registered by the game. This is to emulate a (possibly unintended) effect in pre-3.5.0 saves.
- 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. If the test failed, engine will act according to "legacysave_let_gui_diff" config option: either quit with error or log a warning and continue.

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

Templates:
- In "Verb Coin" template fixed action label could be updated incorrectly if the cursor was moved over buttons on any other GUI.


Changes in the Patch 4:

Editor:
- Export Game's Title into translations.
- Fixed Game.agf was not created after importing a 2.* game project (regression in 3.6.0).

Engine:
- Character.AnimationVolume property is now applied to the portrait animation as well.
- Removed few of the less important game messages from logging, because they may quickly clutter the log under some circumstances.
- Fixed when animating a character portrait, the first frame's linked sound is not played.
- 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).
- Fixed crash occuring when you resize DynamicSprite while it is displayed on screen.
- Fixed audio clip started right before a ChangeRoom would not play until after the room changes.
- Fixed in Software display mode the room Overlays may not be properly covered by a walk-behind under very specific conditions.
- Fixed System.Log() would cause engine crash if there are more format placeholders than args.
- Fixed some game options that are not allowed to be changed at runtime could still be overwritten when restoring an old save, leading to a weird game behavior.


Changes in the Patch 3:

Editor:
- Don't error when loading a room file which has unsupported number of events, instead these will be cut out. This may let e.g. use room templates from newer versions of AGS.
- Sprite's default property is changed from deprecated Resolution setting to SourceFile.
- 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).
- Fixed importing SCI fonts with >128 chars.
- Fixed font preview did not properly display characters with indexes 128-255.

Engine:
- Fixed "noloopcheck" script function modifier was not handled correctly sometimes.
- Fixed a button with inventory placeholder did not update immediately when the active inventory is set.
- Fixed textual GUIs were not redrawn immediately after a call to SetGameOption(OPT_RIGHTTOLEFT).


Changes in the Patch 2:

Common:
- Fixed a TTF font could cause a crash in the Editor or the Engine if the font renderer tries to draw a letter with higher number than the highest glyph number in the font.

Editor:
- Added "Restore all sprites..." command to the Sprite Manager's context menu (this duplicates the "File -> Recreate sprite file" menu command added previously).
- Refresh Sprite Manager after fully recreating a sprite file.
- Sprites will now hide their "Resolution" property if the game settings have "Allow relative asset resolutions" disabled. This is to avoid user's misuse of this property.
- Fixed a minor memory leak occuring when editing a tree item's label in Project Explorer.

Engine:
- Engine will now find and load plugins in the game dir when run from a different location.
- Fixed crash occuring if Character was told to FaceLocation while "Turn to face" game setting is enabled, and character's View does not have enough loops.
- Fixed Character resetting current non-blocking animation if it was ordered to Move, as soon as it arrives at destination.
- Fixed crash occuring if a GUI button was somehow set a negative NormalImage number.
- Fixed "bad script stack" error could be sometimes displayed if the game was aborted in the middle of running a script.


Changes in the Patch 1:

Editor:
- Fixed room's deprecated setting LegacyMusicVolumeAdjustment not applied correctly.

Engine:
- Fixed Room Objects whose dynamic sprite was deleted in "leave room" event becoming invisible during fade-out transition. Logically this has to happen, but historically they kept displaying until the transition end, so we restored this behavior for compatibility, and simply because there's no "after fade-out" event in the engine yet to delete these sprites.
- Fixed Game.StopAudio() fails to remove queued clips if no particular audio type id is requested.
- Fixed performance regression in the script related to long loops (regression in 3.6.0).
- Fixed memory leak occuring when printing text in Right-to-left mode (regression in 3.6.0).
- Fixed rare mistake during text wrapping which may occur if a Unicode text is cut in the middle of the word.
- Fixed playing certain WAVs caused game to freeze forever on exit.

Compatibility:
- Fixed frame-linked sounds not playing in the games made before 3.6.0.
- Allow game to call DynamicSprite.Create() with negative size, clamping it to 1x1.

Templates:
- In Sierra-style template fixed "mouse over" graphic for the "Load" icon.



What is new in 3.6.0

Common features:
- Full Unicode support for all game texts: game properties, scripts, translations, input.
  ASCII/ANSI mode is still working, for backwards compatibility. This may be configured in the game project.
- Extended sprite compression options: lossless storage optimization for 16- and 32-bit sprites; LZW compression option for sprites in addition to existing RLE compression.
- GUI controls may now be told to clip their contents, which means that nothing gets drawn outside of their borders (as defined by X, Y, Width, Height properties). The only exception is Sliders, which are more complicated.
- The historical TTF fonts' "fixup" that altered their height and vertical offset is now optional and works only if backwards compatible option is set.
- Max number of AudioChannels is now 16 (was 8).
- Removed game Cursors hard limit (was 20).
- Increased Room Objects limit to 256 (was 40).
- Discontinued "Windows Game Explorer" support in both Editor and Engine.

Editor:
- Editor requires .NET Framework 4.6 to run.
- Added Android build target support (requires "Android component" installed).
- Added Web/Emscripten build target support (requires "Web build component" installed).
- Expanded UI color theme format, support global color options and allow missing entries.
- Script editor works in unicode mode.
- Added "Text format" option in General Settings which lets switching between ASCII/ANSI and Unicode (UTF-8) modes. This defines which format the game texts will be written in, when saving the game project and compiling the game.
- Added "Use old-style keyboard handling" option to the General Settings, which lets select between classic key press handling and new one meant for unicode chars support in scripts.
- Supports compiling UTF-8 translations. TRS file now has "Encoding" setting that tells how to interpret this TRS text.
- Added support for building multiple speech voxes, by taking files from the Speech subfolders.
- Added support for adding custom files into the game package. This is done by assigning a list of directories to "Package custom data folder" option in General Settings.
- Editor now copies a acsetup.cfg file from the project's root folder (if one is provided by) as a base for generating default config file. Settings from Default Setup will be written over, but other found options won't be removed.
- Added "Sprite file compression" option in General Settings, replacing "Compress the sprite file" option. The new option allows a selection of compression algorithm used for sprites.
  Currently supported: None, RLE (old default compression) and LZW.
- Added "Enable sprite storage optimization" option to the General Settings, that permits the editor to repack sprites in a different storage format, reducing their disk size whenever possible. This option may be used alongside with the sprite compression. Note that this does not change how the sprites work in game.
- Added "GUI controls clip their contents" option to the General Settings.
- Added "TTF fonts height used in the game logic" option to the General Settings, that makes your game use real font's pixel height when arranging text and text-based UI elements, as opposed to the nominal font's size.
- Added "Touch to Mouse Emulation", "Touch to Mouse motion mode" and "Display FPS on Screen" to Default Setup. Removed few deprecated options.
- Added "TTF font adjustment" property to Fonts, as well as to General Settings where it serves as a project default for the new fonts. This property lets you choose between "no changes" and backward compatible TTF fixup meant to keep fonts made for AGS displayed as they were meant to.
- In the "Import TTF" dialog added a choice to import the size closest to the given pixel height.
- Fonts now have Auto Outline Style and Auto Outline Thickness properties.
- Fonts now have a readonly Family Name field, that lets user see the original name of a font they've imported (if available).
- Added IdleDelay property to Characters that lets you set time needed to pass before IdleView is activated. This is equivalent to the Character.SetIdleView script function.
- Added Character.IdleAnimationDelay property to let setup idle view's animation speed.
- Added Cursor.AnimationDelay property to let setup cursor's animation speed.
- The TextWindow edges now have distinct names in the dropdown list of the property grid.
- Rooms created from a Blank template will now have default background of a game's resolution.
- When creating new room objects they will now have their script names set to some default value.
- Added Room.BackgroundAnimationEnabled property to let have disabled animation on room load.
- Editor will now create an empty sprite file if one is missing in the game project. Any existing sprite descriptions in the project will be kept, letting user to reimport these from sources.
- Added "File -> Restore all sprites from sources" menu command.
- Added "Apply" button on editor's Preferences dialog.
- In Preferences replaced "Import Color Theme" with a "Open Theme Folder", as a temporary solution for managing theme files.
- Select script editor's font in the editor's Preferences.
- Added "Help" option to the editor pane's tab context menu.
- Upgraded script editor to Scintilla 3.21.1 and ScintillaNET 3.6.3.
- Cursor's position in script is now displayed on the status bar.
- Dialog scripts now too can open help topics for keywords or script functions under cursor on F1.
- Added zoom controls for the Sprite Manager, Character, Cursor, Inventory and View panes.
- Sprites may now be imported by drag'n'drop into the Sprite manager.
- In sprite manager's context menu added command "Create source files for all sprites with missing / external sources..."
- In sprite manager's context menu added (restored) command "Replace sprite using previous files".
  Also made "previous file" remembered consistently whenever a sprite is imported or replaced.
- In sprite manager's "export all" dialog added "skip if inside project's folder" option.
- In sprite manager's "export all" dialog added "reset tile settings" option.
- On the View pane the frames having set delay and linked sound will be now indicated with icons.
- Editor no longer errors and fails when opening a game project with some script files missing.
- Editor no longer errors on empty translations when compiling the game.
- Editor now exports values of the string type Custom Properties to translations.
- Editor no longer prevents exporting string arguments from Get/SetTextProperty calls to TRS file.
- Editor now cleanups spritefile on game load, identifying any data not referenced by the project and marking it for deletion.
- Fixed editor silently enabling all available Build Targets when upgrading a pre-3.4.0 project. This could be very inconvenient as there are several of them supported now.
- Fixed open folders in the Project Tree were collapsing whenever you create a new subfolder or change an object's name in properties.
- Fixed editor was not preventing from entering Character's and AudioClip's ScriptName too long for the engine to handle.
- Fixed Image and View properties in various objects were allowing negative values.
- Fixed some of the object previews (at least GUI) could crash if user entered a non-existing sprite's number as an Image property.
- Fixed editor displaying unhandled exception if the script which user is trying to open was missing. Instead it will now open a blank script.
- Fixed room editor was suggesting to save the modified room even if no changes were made.
- Fixed a recently imported sprite could be displayed incorrectly scaled up in the room editor for high-resolution games, if the "Allow relative asset resolutions" was enabled in General Settings, and the sprite 0 had "Resolution" property set to "Low".
- Fixed program crash occuring on sprite's import if failed to open a source file for any reason.
- Fixed View animation preview stopping at frame 100 (if loop contains over 100 frames).
- Fixed going to a "find all" result in dialog script did not highlight the found text, and sometimes did not scroll down to it.
- Fixed "Goto Definition" not working for Enums and Defines (macros).
- Fixed script autocomplete sometimes was not updated right after opening a script.
- Fixed script autocomplete for function calls was mistreating commas in strings and inline comments as if they were separating actual parameters.
- Fixed script autocomplete was not displaying members of extended structs if the parent struct was declared in another header.
- Fixed script autocomplete was not working for enum names.
- Fixed structs and enums were not highlighted if declared inside a script's body.
- Fixed in dialogs numbers inside names were incorrectly highlighted as numeric values.
- Fixed matching or mismatching braces were not highlighted consistently at all times in regular and dialog scripts.
- Fixed crash occuring when user was trying to set breakpoint on the very last line in script.
- Fixed few editor panes were not opening correct help topics in F1.
- (Possibly) fixed error message text in the runtime error popup could be drawn partially beyond the popup borders if the user's system has text scaling option enabled.

Compiler:
- Support unicode character literals.
- Support using float literals when defining default values for function arguments.
- Support hexadecimal number literals (e.g. "0xABCDEF").
- Removed 500-characters line limit.

Script API:
- Expanded `on_key_press` callback, now supports two parameters: key code and key modifier flags.
- In the new key handling mode `on_key_press` is called for each actual key press;
  e.g. combinations like Ctrl+Z will result in two `on_key_press` calls, one with eKeyCtrlLeft and second with eKeyZ; added support for "NEW_KEYINPUT_API" macro in scripts.
- Implemented new `on_text_input(int ch)` callback which is called when the engine receives a printable character. This callback is essential for handling unicode chars in script.
- Similarily, expanded `dialog_options_key_press` with the third `mod` argument, and implemented `dialog_options_text_input` callback for receiving unicode chars during the custom dialog options state.
- Implemented `dialog_options_close` callback which is called when custom dialog options are removed from the screen. This allows to perform any required cleanup.
- Added eEventEnterRoomAfterFadein event for `on_event` callback, which corresponds to "enter after fade-in" room event.
- Added eKey constants for Shift, Control and Alt keys.
- Added eKeyMod enum for key modifiers constants.
- String.AppendChar(), ReplaceChar() functions and String.Chars[] property are now working with the unicode characters.
- String.Format("%c") specifier will now be able to print unicode characters.
- Extended Button.Animate() to have blocking style, direction and starting frame parameters, thus matching other Animate commands (of Character and Object).
- Extended all Animate() commands by adding "volume" parameter, that defines volume of the frame-linked sounds for the duration of this animation.
- Added Character.AnimationVolume, defining volume of the frame-linked sounds.
- Added Character.IdleAnimationDelay to let control idle view's animation speed.
- Character.Scaling is no longer limited by a range of 5-200 (now supports 1-32767).
- Hotspot.Name and Object.Name may now be set in script.
- Added Object.ManualScaling and Object.Scaling.
- Deprecated Object.IgnoreScaling (use Object.ManualScaling instead).
- Object.SetView default loop & frame values are now 0 (was -1 which retained loop and frame indexes from the previous view, often unexpected to the user).
- DrawingSurface.DrawImage() and DrawSurface() now support optional source rect coordinates.
- Added functions for getting DrawingSurface of room masks: GetDrawingSurfaceForWalkableArea(), GetDrawingSurfaceForWalkbehind(), Hotspot.GetDrawingSurface(), Region.GetDrawingSurface().
- Added new delay parameter to Mouse.ChangeModeView() to let control cursor's animation speed.
- Added Game.ChangeSpeechVox() and Game.SpeechVoxFilename, support switching the voice-over pack.
- Added Mouse.AutoLock property that toggles automatic mouse lock inside the game window.
- Added Room.Exists().
- Added System.Log().
- Added SkipWait() that skips any active Wait() function.
- Added WaitMouse() to complement existing Wait functions.
- Added InputType enum which defines input devices and lets create their sets as flags.
- Added WaitInput(), a more generic and extendable function that accepts a combination of flags telling which input types to wait for.
- All Wait* functions now may have infinite timeout if you pass a negative timeout parameter.
- All Wait* functions now return the reason they were skipped: a combination of InputType flag and a respective key or button code.
- Added GUIControl.Transparency property.
- Added Overlay.CreateRoomGraphical and CreateRoomTextual. Use these two functions to create "room overlays": that is - overlays that display a sprite inside the room, sorted among other room objects, characters and walk-behinds.
- Added readonly Overlay.InRoom property that tells if this is a room or screen overlay.
- Extended Overlay.CreateGraphical() with a new "clone" parameter that tells whether to assign a sprite index, or make a sprite's copy owned exclusively by this overlay. The former will save program memory but make overlay update if the sprite is edited later. The latter is meant primarily for backwards compatibility.
  Overlay.CreateRoomGraphical has the same param.
- Added Overlay.Graphic property that lets you change overlay's sprite after it's created.
- Added Overlay.Width and Height properties, that let you freely scale existing Overlay.
- Added readonly Overlay.GraphicWidth and GraphicHeight properties that let read original overlay's graphic size, as not all overlays hold a sprite reference (e.g. textual overlays).
- Added Overlay.Transparency property.
- Added Overlay.ZOrder property that lets you sort Overlays among themselves and other objects in the same "game layer": screen overlays are sorted among GUI, while room overlays are sorted among room objects, characters and walk-behinds.
- Added Speech.TextOverlay and Speech.PortraitOverlay for accessing blocking speech overlay and portrait overlay respectively.
- Added Game.BlockingWaitSkipped which tells the result of the last blocking wait skipping, also including result of the blocking speech skipping.
- SkipSpeechStyle now supports eSkipNone mode; when used it will disable any kind of skipping, such speech can be only skipped by a direct command from script.
- Extended Screen.ScreenToRoomPoint() with an optional "restrictToViewport" argument, which lets to choose whether tests over empty place result in conversion through the default viewport or a null pointer.
- Added AudioClip.PlayOnChannel().
- Added AudioChannel.Pause() and Resume() functions, and IsPaused property.
- Added AudioChannel.SeekMs(), complementing PositionMs (as the Seek() function interprets position differently depending on the audio format).
- PlayVideo() now supports an option to play both game's and video's audio track simultaneously.
- Added File.WriteRawInt() to complement ReadRawInt().
- File paths in script now support $DATA$ token, which tells to read files from the game package. This only works for read operations. Functions that support this token currently are:
  File.Open(), DynamicSprite.CreateFromFile(), ListBox.FillDirList().
- Debug(2, 0) command that displayed walkable areas is superceded by Debug(2, n), where "n" is a mask type: 0 - none, 1 - hotspots, 2 - walkbehinds, 3 - walkable areas, 4 - regions. This command also works as a toggle switch, calling it with the same mask index will turn it off.
- Debug(5, n) command that displayed character's walk paths now also works as a toggle switch.

Engine:
- New SDL2-based backend for graphics, audio and input.
- Hqx graphic filters discontinued (could be temporary).
- Windows-only DirectMedia video playback discontinued (could be temporary).
  Only OGG/OGV videos are kept supported at this point.
- Support resizing game window on desktop systems.
- Support "borderless full-screen window" mode in addition to the real (exclusive) fullscreen.
- Support for switching vertical sync at runtime with Direct3D/OpenGL renderers. Also enable vsync in windowed mode too.
- Unicode (UTF-8) text support: engine can now switch between ASCII and UTF-8 text mode. This is controlled by both game's OPT_GAMETEXTENCODING setting and translation's "Encoding" setting: they tells whether to interpret game texts as UTF-8 or ASCII/ANSI.
- Support optional translation's "GameEncoding" setting: it hints the original game's codepage to help with their conversion. This is mostly meant for translating existing older (ANSI) games.
- Engine now supports using real pixel height of the TTF fonts when arranging text and UI elements on screen; using nominal import size of the font is used as a compatible mode for the old games.
- Also supports separate "normal" and backward compatible "fixup" modes when initializing TTF fonts, letting to display both common TTFs and ones made specifically for AGS in the past to display as they were meant to be.
- Supports scripts using functions and variables from any other scripts, regardless of the script module order in the project.
- Removed limit of simultaneous Button animations.
- Removed limit of Character followers.
- Removed Overlay limit.
- Character.SetWalkSpeed() is no longer restricted by an arbitrary limit of 50.
- Process character's idle view based on real game speed, not hardcoded 40 fps.
- Improved file writing times (e.g. when doing a game save) by using buffered file stream. Initial tests showed 50% faster file writing.
- Engine now renders GUI controls as separate textures when using hardware accelerated renderers. This may significantly improve performance in the high-resolution games and games with large number of GUI elements on screen.
- Engine now shares the video texture data for all game objects on screen sharing same sprite. This improves performance in case there are multiple objects which use same image.
- Various performance optimizations for both raw drawing and texture updates (Direct3D/OpenGL).
- Engine now ensures that in threaded audio mode the AudioChannel's state only changes once the game is updated, and not while the game script is running. This prevents situations when the clip could begin playing before all properties are set in script, or when AudioChannel's properties' values (such as Position) could change while running a game script.
- 24-bit wav PCM support, comes with the new sound library.
- File.ReadRawLineBack() now always reads full line, and not limited to 200 characters anymore.
- Debug displays, such as showing room mask and character walk paths, are now implemented as non-blocking translucent overlays, allowing you to keep playing the game while they are on.
- Implemented debug key controls for calling a built-in save and restore game dialogs. These controls have to be set in user config as "save_game_key" and "restore_game_key" in "[override]" category. These may be used by testers if the game is missing a save function or one is bugged.
- Engine now supports loading compiled scripts as separate files packed along with the game, along with those embedded into the main game data or inside room files.
- Engine no longer bails out with error if the chosen translation cannot be loaded on startup.
- When reporting script errors, engine will print callstack for all the active script "threads": for example, if there's Wait() function called and error happened in repeatedly_execute_always, then it will print both actual error's location, and Wait() call's location.
- Engine config now has graphic modes defined as a simplier string options: "[graphics] fullscreen" for the fullscreen mode setup, and "[graphics] window" for the windowed.
  Fullscreen option can explicitly define a "borderless full-screen window" mode.
- Added "emul_mouse_mode" and "emul_mouse_relative" options to config in "[touch]" category.
- Added "cache_size" and "stream_threshold" options to config in "[sound]" category, they setup the rules for sound caching and choosing whether to load a clip fully into mem or stream one.
- Added "load_latest_save" and "show_fps" options to config in "[misc]" category.
- Added "background" option to config in "[misc]" category, that defines the starting run-in-background (aka multitasking) mode (may later be changed by SetMultitaskingMode()).
  Added "--background" command line option for the same purpose.
- Added "--sdl-log" command line option for setting up SDL2 library output verbosity. The engine log config now has a new "sdl" group meant for SDL2 messages.
- Support "--user-conf-dir" command-line arg (and "user_conf_dir" config option) superceding "--localuserconf"; the new option directly tells the location of user config file.
- Path related command-line and config options, - such as "shared_data_dir", "user_data_dir" and "user_conf_dir", now support $GAMENAME$ token in path which is resolved to the game's title.
- Added "--clear-cache-on-room-change" command-line arg (and similar config option).
- Don't error when DrawingSurface.DrawImage has bad transparency parameter (warning instead).
- Don't error when detecting bad format in File.Read* functions (warning instead).
- Added stubs for agsshell plugin (a contemporary cross-platform variant of ags_shell).
- Added stubs for agsappopenurl plugin.
- Fixed potential crashes if a room-related API function has been called in "game_start"; this is achieved by having a dummy room placeholder object. Still results of such calls are undefined and should not be relied upon.
- Fixed potential crash on room load if the walkable area mask contained color values above the supported range.
- Fixed dialog script's "goto-previous" command not working if used from the first sub-topic run using "goto-dialog" (a very-very old bug).
- Fixed AGS_EngineInitGfx plugin callback was not called during OpenGL renderer initialization.
- Fixed Direct3D/OpenGL renderers were displaying plugin's raw drawings in a wrong position in the scrolling rooms, if the drawing was done on AGSE_PRESCREENDRAW or AGSE_POSTROOMDRAW events.
- Fixed overlay may fail to be created sometimes, if previously another overlay had been forcefully removed when changing rooms (this is an ancient bug which existed for many years).
- Fixed ListBox.RowCount reporting 0 if called before the control was displayed once.
- Fixed GetTextWidth would still return a size of an outline for an empty text string.
- Fixed text may be misaligned in gui controls, as its outline thickness is not counted.
- Fixed some TTF fonts could be cut at the bottom when the speech is displayed.
- Fixed scheduled sound fadeout effect was not cancelled by skipping a cutscene.
- Fixed OGV Theora videos positioned incorrectly if they have certain sizes or aspect ratios.
- Fixed game fps sped up if SetGameSpeed() is called repeatedly in game script.
- Fixed game not reacting to system close commands when stuck in script, which made it impossible
  to close the "hanging" game by usual means (other than terminating the process).

Engine Plugin API:
- Added IAGSEngine::GetGameInfo() function which returns information about the game, such as its title and GUID.
- Added new render callback AGSE_POSTROOMDRAW, for handling drawing inside the room above all room objects.
- Added IAGSFontRenderer2 interface, expanding the original font renderer interface, improving font plugins support.
- Added ReplaceFontRenderer2() and NotifyFontUpdated() functions.

Compatibility:
- Fallback to the first loop with frames if current character's loop does not have any.
- Use the dummy frame if current character's speech view loop does not have any.
- Ignore character having view/loop with no frames while it's not in the current room.
- Legacy behavior of MoveCharacterBlocking's return value.
- Fixed walkable area's continuous scaling was broken for high-res rooms in old games.
- In pre-3.* games force player to walkable area after changing rooms, this is to emulate an unintentional effect created by the old engines.
- Fixed pre-3.4.1 anti-aliased TTF fonts display (their vertical position was broken).
- For pre-3.5.0 games support old behavior of coincidental dynamic sprite replacement on GUI backgrounds (and few other places) without explicit assignment; that is - when the new DynamicSprite is created right after deleting an old one.
- Support Label.TextAlignment with legacy alignment constants for pre-3.5.0 games made with the custom engine from "Clifftop Games".
- Support native resolution hack for games made with "Clifftop Games" custom engine, where 640x400 games are run as 640x360.

Android:
- Rewrote universal AGS game launcher/player using up-to-date Google guidelines. The former "launcher" is now called "AGS Player".
- Implemented single game project template meant for building your own signed APK.
- Implemented two touch-to-mouse control scheme (selectable in config), for one finger emulating LMB only, and for two fingers emulating LMB and RMB.
- Support relative motion speed setting for touch-to-mouse emulation.
- In AGS Player added "Browse" button to the game folder selection, which opens default system file picker.
- AGS Player now searches for games recursively, in all the subfolders.
- AGS Player now has preference button per each game, which opens individual game's settings.

OSX:
- OpenGL renderer is now supported on MacOS.

Web / Emscripten:
- Initial port release.

Windows:
- Installer will create program links with three-digit version in the name.

Plugins:
- Added SpriteFont plugin to the list of builtins, for ports that use ones.
  SpriteFont plugin is updated to support custom "Clifftop Games" font variants.

WinSetup:
- Added "Fullscreen as borderless window" checkbox.
- Remade sound options to reflect the move to the new audio system in the engine.




Known issues

* Although Unicode text is supported overall, some languages may still not be printed correctly automatically. Firstly, those that require "letter linking", such as Arabic or Persian, do not have the proper linking on its own. This may be worked around using special text converters and fonts. Another issue is that texts printed right-to-left in the source (where print direction is done using Unicode's control characters) are not wrapped correctly and may require manual placement of line breaks, or scripting their split in game.
* MIDI no longer plays on its own on Windows. For MIDI you (and your players) must install "sound banks" (also known as "sound font"). Please refer to this article: https://adventuregamestudio.github.io/ags-manual/MIDI-playback.html
* AudioChannel.Position and AudioChannel.Seek do not work for MIDI and MOD sounds. Try sticking to PositionMs and SeekMs for now.
* There are reports about Direct3D not being able to restore the fullscreen mode after alt+tabbing occasionaly.





Thanks to everyone who contributed to and tested this version!



#38
A recent conversation on Discord have reminded that importing masks into AGS (for walkable areas, hotspots, etc) is simply not usable.

Not every graphic software can export into 8-bit bitmap format, and those which can, they not necessarily allow to configure the palette. This means that the image will have colors randomly given palette indexes, making it impossible to predict area numbers. In the best case software will assign indexes starting from 0 and up, but others might choose arbitrary indexes in the full range (0-255), while editor cannot use those above "max area number" limit (16 for walkable areas, for example).

Even if image is "successfully" imported, this means the trouble is only postponed, because any change to the existing image may shuffle these indexes again, in which case reimport will break area indexes, forcing user to reapply all properties and events.

This is a critical problem, in my opinion, and this makes me very confused about how people work with the room masks at all, all these years; and why this problem is not set among the topmost priorities, and not discussed on forums. Because this is a fundamental functionality required to make rooms, and it is not reliable if at all usable.
#39
AGS 3.6.0 - Patch 10
Full release number: 3.6.0.57


For Editor
Spoiler

For Android
Spoiler
NOTE: the Editor now includes Android build component letting you prepare your own games for Android
[close]

For Engine/Editor developers
Spoiler

Released: 21th February 2024

Previous stable version: AGS 3.5.1 P20 forum thread


This release is brought to you by:

- Alan v. Drake (improvements, fixes)
- Cameron Cawley [ccawley2011] (fixes, improvements to SpriteFont plugin)
- Crimson Wizard (stuff :))
- Dominik Mierzejewski (fix)
- Donovan Watteau (fix)
- eri0o (updated Android port, Web port, Editor improvements, etc)
- fernewelten (new fonts outlining, improvements to script compiler, fixes)
- Francesco Ariis (fixes)
- Morgan Willcock (improving templates, help with CI)
- Pablo Navarro [panreyes] (fixes)
- ChamberOfFear (improvements)
- rofl0r (fixes, suggestions)
- sonneveld (porting engine to SDL2)
- Thierry Crozat (fixes, plugin update)
- vga256 (fixes)
- Walter Agazzi (fixes)


Summary

AGS 3.6.0 is another big change to AGS.
First of all, this release presents a SDL2-based engine. For about 2 decades AGS engine was based on Allegro 4 graphic library, which was discontinued somewhere in the early 2010-ies (only received few patches since). There was an intent to move to to Allegro 5 or SDL since, but for various reasons this task was continuously postponed. Now it's done.
Secondly the Editor and Engine now have full Unicode support. This means that you may use any language whatsoever in scripts, object descriptions and custom properties, as well as translations; so long as you also provide proper unicode fonts.
Third, we have finally expanded a list of platforms that the Editor can build for: now this includes Android and Web (Emscripten) port.

There are much more changes and improvements in this release, check out the full list of changes below.
Also, please be sure to read "Upgrading to AGS 3.6" topic in the manual: https://adventuregamestudio.github.io/ags-manual/UpgradeTo36.html



Changes in the Patch 10:

Editor:
 - Fixed a warning condition for copying 32-bit bitmaps to a desktop clipboard of less color depth.
 - Fixed keyboard shortcuts for GUI Editor's Copy and Paste commands.
 - Fixed a rare exception when scrolling the room in the editor.
 - Fixed "Auto-number speech lines" and "Create voice acting script" operations failing if a Character's name contains underscore.

Compiler:
 - Fixed escaped character literals not being parsed correctly. This makes character literals like '\n' and '\t' actually work in script.

Engine:
 - Updated SDL_Sound library to 2.0.3.
 - Improved OpenGL texture management, which should result in less system and video memory spent on sprite textures.
 - Fixed Character.AddWaypoint() potentially using wrong walkspeed, if multiple characters or objects are ordered to start a non-blocking move in a mixed order.
 - Fixed Character.AddWaypoint() is using incorrect speed if this room has a non 1:1 mask resolution, and "Scale speed with mask resolution" setting is enabled.
 - Fixed Overlay.Create() crashing the engine if a non-existing sprite is passed as an argument.
 - Fixed Say("...") command get stuck in endless loop if Speech.DisplayPostTimeMs is non-zero.
 - Fixed PlayFlic() not working if called second time in game. This is likely a regression since 3.6.0.
 - Fixed NumPad keys not handled properly by the engine (in on_key_press, IsKeyPressed, and TextBox control). This is a regression since 3.6.0.
 - Fixed OpenGL renderer causing scaled sprites to have colored outlines sometimes while using Linear filter.


Changes in the Patch 9:

Engine:
 - Fixed engine incorrectly reporting a script loading error, which may occur if the total size of script's global variables is bigger than the size of the compiled bytecode.


Changes in the Patch 8:

Editor:
 - Fixed command "Crop sprite edges" in the Sprite Manager would copy import settings from the completely unrelated sprite onto the cropped one.

Engine:
 - Fixed `@GAMENAME@` label not updating if Game.Name property is changed at runtime.
 - Fixed System.ColorDepth was reporting a final display resolution, while it should report game's native resolution for historical reasons.

Compatibility:
 - Fixed "upscale" mode not working for "default" game resolution in pre-3.1 games (the hidden meaning of "default" is 320x200 also).

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.


Changes in the Patch 7:

Editor:
 - For Android build target disabled compression of `.ags` and `.vox` assets, as that slows down engine streaming resources (sprites etc).
 - 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 RAM use spiking fast during batch sprite reimport from sources, which could randomly lead to program errors.
 - 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 GUI controls unexpectedly clipping parts of text even if "controls clip contents" setting is disabled, in case when their Font has VerticalOffset property set.


Changes in the Patch 6:

Editor:
- 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 Script editor not marking "autoptr" and "builtin" as keywords.
- Fixed Script editor not applying color theme to character literals.
 
Engine:
- Made String.Chars and Length properties work faster in ASCII mode.
- Issue a warning when blocking Display or Say commands are called during fade-out.
- 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 "Before fade-in" event could be called recursively under some peculiar conditions (regression since 3.6.0).
- Fixed buttons on a non-clickable GUI were still changing to "mouse over" graphic under cursor.
- Fixed button click not registered if it has been made not visible and visible again during a single game frame (regression since 3.6.0).
- Fixed TextWindow borders drawn behind the rightmost corner pieces, which may be seen if the edge sprites are half-transparent.
- Fixed a brief black screen flash occuring right after the video playback ends (regression since 3.6.0).
- Fixed engine refusing to load legacy saves if the audio clip count does not match (number of audio clips should not affect saves).
 
WinSetup:
- Added an option to disable "smooth scaled sprites" setting.
- Added an option to disable language selection.
- Made filter names in "disabled" section treated in case insensitive way.


Changes in the Patch 5:

Editor:
- Reimplemented multiple sprites properties editing in the Sprite Manager. This ability was dropped in 3.5.0 unintentionally.
- Fixed Autocomplete not treating certain struct members as "static" or "protected" if their declaration is too long.

Engine:
- Fixed Character.WalkStraight() was resetting walking animation if called during walking.
- 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).

Compatibility:
- Implemented "legacysave_assume_dataver" override option in config, which lets to instruct the engine which game data version to assume when restoring 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.
- Implemented "legacysave_let_gui_diff" override option in config, which lets the engine to read less gui elements from restored save than the number registered by the game. This is to emulate a (possibly unintended) effect in pre-3.5.0 saves.
- 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. If the test failed, engine will act according to "legacysave_let_gui_diff" config option: either quit with error or log a warning and continue.

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

Templates:
- In "Verb Coin" template fixed action label could be updated incorrectly if the cursor was moved over buttons on any other GUI.


Changes in the Patch 4:

Editor:
- Export Game's Title into translations.
- Fixed Game.agf was not created after importing a 2.* game project (regression in 3.6.0).

Engine:
- Character.AnimationVolume property is now applied to the portrait animation as well.
- Removed few of the less important game messages from logging, because they may quickly clutter the log under some circumstances.
- Fixed when animating a character portrait, the first frame's linked sound is not played.
- 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).
- Fixed crash occuring when you resize DynamicSprite while it is displayed on screen.
- Fixed audio clip started right before a ChangeRoom would not play until after the room changes.
- Fixed in Software display mode the room Overlays may not be properly covered by a walk-behind under very specific conditions.
- Fixed System.Log() would cause engine crash if there are more format placeholders than args.
- Fixed some game options that are not allowed to be changed at runtime could still be overwritten when restoring an old save, leading to a weird game behavior.


Changes in the Patch 3:

Editor:
- Don't error when loading a room file which has unsupported number of events, instead these will be cut out. This may let e.g. use room templates from newer versions of AGS.
- Sprite's default property is changed from deprecated Resolution setting to SourceFile.
- 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).
- Fixed importing SCI fonts with >128 chars.
- Fixed font preview did not properly display characters with indexes 128-255.

Engine:
- Fixed "noloopcheck" script function modifier was not handled correctly sometimes.
- Fixed a button with inventory placeholder did not update immediately when the active inventory is set.
- Fixed textual GUIs were not redrawn immediately after a call to SetGameOption(OPT_RIGHTTOLEFT).


Changes in the Patch 2:

Common:
- Fixed a TTF font could cause a crash in the Editor or the Engine if the font renderer tries to draw a letter with higher number than the highest glyph number in the font.

Editor:
- Added "Restore all sprites..." command to the Sprite Manager's context menu (this duplicates the "File -> Recreate sprite file" menu command added previously).
- Refresh Sprite Manager after fully recreating a sprite file.
- Sprites will now hide their "Resolution" property if the game settings have "Allow relative asset resolutions" disabled. This is to avoid user's misuse of this property.
- Fixed a minor memory leak occuring when editing a tree item's label in Project Explorer.

Engine:
- Engine will now find and load plugins in the game dir when run from a different location.
- Fixed crash occuring if Character was told to FaceLocation while "Turn to face" game setting is enabled, and character's View does not have enough loops.
- Fixed Character resetting current non-blocking animation if it was ordered to Move, as soon as it arrives at destination.
- Fixed crash occuring if a GUI button was somehow set a negative NormalImage number.
- Fixed "bad script stack" error could be sometimes displayed if the game was aborted in the middle of running a script.


Changes in the Patch 1:

Editor:
- Fixed room's deprecated setting LegacyMusicVolumeAdjustment not applied correctly.

Engine:
- Fixed Room Objects whose dynamic sprite was deleted in "leave room" event becoming invisible during fade-out transition. Logically this has to happen, but historically they kept displaying until the transition end, so we restored this behavior for compatibility, and simply because there's no "after fade-out" event in the engine yet to delete these sprites.
- Fixed Game.StopAudio() fails to remove queued clips if no particular audio type id is requested.
- Fixed performance regression in the script related to long loops (regression in 3.6.0).
- Fixed memory leak occuring when printing text in Right-to-left mode (regression in 3.6.0).
- Fixed rare mistake during text wrapping which may occur if a Unicode text is cut in the middle of the word.
- Fixed playing certain WAVs caused game to freeze forever on exit.

Compatibility:
- Fixed frame-linked sounds not playing in the games made before 3.6.0.
- Allow game to call DynamicSprite.Create() with negative size, clamping it to 1x1.

Templates:
- In Sierra-style template fixed "mouse over" graphic for the "Load" icon.



What is new in 3.6.0

Common features:
- Full Unicode support for all game texts: game properties, scripts, translations, input.
  ASCII/ANSI mode is still working, for backwards compatibility. This may be configured in the game project.
- Extended sprite compression options: lossless storage optimization for 16- and 32-bit sprites; LZW compression option for sprites in addition to existing RLE compression.
- GUI controls may now be told to clip their contents, which means that nothing gets drawn outside of their borders (as defined by X, Y, Width, Height properties). The only exception is Sliders, which are more complicated.
- The historical TTF fonts' "fixup" that altered their height and vertical offset is now optional and works only if backwards compatible option is set.
- Max number of AudioChannels is now 16 (was 8).
- Removed game Cursors hard limit (was 20).
- Increased Room Objects limit to 256 (was 40).
- Discontinued "Windows Game Explorer" support in both Editor and Engine.

Editor:
- Editor requires .NET Framework 4.6 to run.
- Added Android build target support (requires "Android component" installed).
- Added Web/Emscripten build target support (requires "Web build component" installed).
- Expanded UI color theme format, support global color options and allow missing entries.
- Script editor works in unicode mode.
- Added "Text format" option in General Settings which lets switching between ASCII/ANSI and Unicode (UTF-8) modes. This defines which format the game texts will be written in, when saving the game project and compiling the game.
- Added "Use old-style keyboard handling" option to the General Settings, which lets select between classic key press handling and new one meant for unicode chars support in scripts.
- Supports compiling UTF-8 translations. TRS file now has "Encoding" setting that tells how to interpret this TRS text.
- Added support for building multiple speech voxes, by taking files from the Speech subfolders.
- Added support for adding custom files into the game package. This is done by assigning a list of directories to "Package custom data folder" option in General Settings.
- Editor now copies a acsetup.cfg file from the project's root folder (if one is provided by) as a base for generating default config file. Settings from Default Setup will be written over, but other found options won't be removed.
- Added "Sprite file compression" option in General Settings, replacing "Compress the sprite file" option. The new option allows a selection of compression algorithm used for sprites.
  Currently supported: None, RLE (old default compression) and LZW.
- Added "Enable sprite storage optimization" option to the General Settings, that permits the editor to repack sprites in a different storage format, reducing their disk size whenever possible. This option may be used alongside with the sprite compression. Note that this does not change how the sprites work in game.
- Added "GUI controls clip their contents" option to the General Settings.
- Added "TTF fonts height used in the game logic" option to the General Settings, that makes your game use real font's pixel height when arranging text and text-based UI elements, as opposed to the nominal font's size.
- Added "Touch to Mouse Emulation", "Touch to Mouse motion mode" and "Display FPS on Screen" to Default Setup. Removed few deprecated options.
- Added "TTF font adjustment" property to Fonts, as well as to General Settings where it serves as a project default for the new fonts. This property lets you choose between "no changes" and backward compatible TTF fixup meant to keep fonts made for AGS displayed as they were meant to.
- In the "Import TTF" dialog added a choice to import the size closest to the given pixel height.
- Fonts now have Auto Outline Style and Auto Outline Thickness properties.
- Fonts now have a readonly Family Name field, that lets user see the original name of a font they've imported (if available).
- Added IdleDelay property to Characters that lets you set time needed to pass before IdleView is activated. This is equivalent to the Character.SetIdleView script function.
- Added Character.IdleAnimationDelay property to let setup idle view's animation speed.
- Added Cursor.AnimationDelay property to let setup cursor's animation speed.
- The TextWindow edges now have distinct names in the dropdown list of the property grid.
- Rooms created from a Blank template will now have default background of a game's resolution.
- When creating new room objects they will now have their script names set to some default value.
- Added Room.BackgroundAnimationEnabled property to let have disabled animation on room load.
- Editor will now create an empty sprite file if one is missing in the game project. Any existing sprite descriptions in the project will be kept, letting user to reimport these from sources.
- Added "File -> Restore all sprites from sources" menu command.
- Added "Apply" button on editor's Preferences dialog.
- In Preferences replaced "Import Color Theme" with a "Open Theme Folder", as a temporary solution for managing theme files.
- Select script editor's font in the editor's Preferences.
- Added "Help" option to the editor pane's tab context menu.
- Upgraded script editor to Scintilla 3.21.1 and ScintillaNET 3.6.3.
- Cursor's position in script is now displayed on the status bar.
- Dialog scripts now too can open help topics for keywords or script functions under cursor on F1.
- Added zoom controls for the Sprite Manager, Character, Cursor, Inventory and View panes.
- Sprites may now be imported by drag'n'drop into the Sprite manager.
- In sprite manager's context menu added command "Create source files for all sprites with missing / external sources..."
- In sprite manager's context menu added (restored) command "Replace sprite using previous files".
  Also made "previous file" remembered consistently whenever a sprite is imported or replaced.
- In sprite manager's "export all" dialog added "skip if inside project's folder" option.
- In sprite manager's "export all" dialog added "reset tile settings" option.
- On the View pane the frames having set delay and linked sound will be now indicated with icons.
- Editor no longer errors and fails when opening a game project with some script files missing.
- Editor no longer errors on empty translations when compiling the game.
- Editor now exports values of the string type Custom Properties to translations.
- Editor no longer prevents exporting string arguments from Get/SetTextProperty calls to TRS file.
- Editor now cleanups spritefile on game load, identifying any data not referenced by the project and marking it for deletion.
- Fixed editor silently enabling all available Build Targets when upgrading a pre-3.4.0 project. This could be very inconvenient as there are several of them supported now.
- Fixed open folders in the Project Tree were collapsing whenever you create a new subfolder or change an object's name in properties.
- Fixed editor was not preventing from entering Character's and AudioClip's ScriptName too long for the engine to handle.
- Fixed Image and View properties in various objects were allowing negative values.
- Fixed some of the object previews (at least GUI) could crash if user entered a non-existing sprite's number as an Image property.
- Fixed editor displaying unhandled exception if the script which user is trying to open was missing. Instead it will now open a blank script.
- Fixed room editor was suggesting to save the modified room even if no changes were made.
- Fixed a recently imported sprite could be displayed incorrectly scaled up in the room editor for high-resolution games, if the "Allow relative asset resolutions" was enabled in General Settings, and the sprite 0 had "Resolution" property set to "Low".
- Fixed program crash occuring on sprite's import if failed to open a source file for any reason.
- Fixed View animation preview stopping at frame 100 (if loop contains over 100 frames).
- Fixed going to a "find all" result in dialog script did not highlight the found text, and sometimes did not scroll down to it.
- Fixed "Goto Definition" not working for Enums and Defines (macros).
- Fixed script autocomplete sometimes was not updated right after opening a script.
- Fixed script autocomplete for function calls was mistreating commas in strings and inline comments as if they were separating actual parameters.
- Fixed script autocomplete was not displaying members of extended structs if the parent struct was declared in another header.
- Fixed script autocomplete was not working for enum names.
- Fixed structs and enums were not highlighted if declared inside a script's body.
- Fixed in dialogs numbers inside names were incorrectly highlighted as numeric values.
- Fixed matching or mismatching braces were not highlighted consistently at all times in regular and dialog scripts.
- Fixed crash occuring when user was trying to set breakpoint on the very last line in script.
- Fixed few editor panes were not opening correct help topics in F1.
- (Possibly) fixed error message text in the runtime error popup could be drawn partially beyond the popup borders if the user's system has text scaling option enabled.

Compiler:
- Support unicode character literals.
- Support using float literals when defining default values for function arguments.
- Support hexadecimal number literals (e.g. "0xABCDEF").
- Removed 500-characters line limit.

Script API:
- Expanded `on_key_press` callback, now supports two parameters: key code and key modifier flags.
- In the new key handling mode `on_key_press` is called for each actual key press;
  e.g. combinations like Ctrl+Z will result in two `on_key_press` calls, one with eKeyCtrlLeft and second with eKeyZ; added support for "NEW_KEYINPUT_API" macro in scripts.
- Implemented new `on_text_input(int ch)` callback which is called when the engine receives a printable character. This callback is essential for handling unicode chars in script.
- Similarily, expanded `dialog_options_key_press` with the third `mod` argument, and implemented `dialog_options_text_input` callback for receiving unicode chars during the custom dialog options state.
- Implemented `dialog_options_close` callback which is called when custom dialog options are removed from the screen. This allows to perform any required cleanup.
- Added eEventEnterRoomAfterFadein event for `on_event` callback, which corresponds to "enter after fade-in" room event.
- Added eKey constants for Shift, Control and Alt keys.
- Added eKeyMod enum for key modifiers constants.
- String.AppendChar(), ReplaceChar() functions and String.Chars[] property are now working with the unicode characters.
- String.Format("%c") specifier will now be able to print unicode characters.
- Extended Button.Animate() to have blocking style, direction and starting frame parameters, thus matching other Animate commands (of Character and Object).
- Extended all Animate() commands by adding "volume" parameter, that defines volume of the frame-linked sounds for the duration of this animation.
- Added Character.AnimationVolume, defining volume of the frame-linked sounds.
- Added Character.IdleAnimationDelay to let control idle view's animation speed.
- Character.Scaling is no longer limited by a range of 5-200 (now supports 1-32767).
- Hotspot.Name and Object.Name may now be set in script.
- Added Object.ManualScaling and Object.Scaling.
- Deprecated Object.IgnoreScaling (use Object.ManualScaling instead).
- Object.SetView default loop & frame values are now 0 (was -1 which retained loop and frame indexes from the previous view, often unexpected to the user).
- DrawingSurface.DrawImage() and DrawSurface() now support optional source rect coordinates.
- Added functions for getting DrawingSurface of room masks: GetDrawingSurfaceForWalkableArea(), GetDrawingSurfaceForWalkbehind(), Hotspot.GetDrawingSurface(), Region.GetDrawingSurface().
- Added new delay parameter to Mouse.ChangeModeView() to let control cursor's animation speed.
- Added Game.ChangeSpeechVox() and Game.SpeechVoxFilename, support switching the voice-over pack.
- Added Mouse.AutoLock property that toggles automatic mouse lock inside the game window.
- Added Room.Exists().
- Added System.Log().
- Added SkipWait() that skips any active Wait() function.
- Added WaitMouse() to complement existing Wait functions.
- Added InputType enum which defines input devices and lets create their sets as flags.
- Added WaitInput(), a more generic and extendable function that accepts a combination of flags telling which input types to wait for.
- All Wait* functions now may have infinite timeout if you pass a negative timeout parameter.
- All Wait* functions now return the reason they were skipped: a combination of InputType flag and a respective key or button code.
- Added GUIControl.Transparency property.
- Added Overlay.CreateRoomGraphical and CreateRoomTextual. Use these two functions to create "room overlays": that is - overlays that display a sprite inside the room, sorted among other room objects, characters and walk-behinds.
- Added readonly Overlay.InRoom property that tells if this is a room or screen overlay.
- Extended Overlay.CreateGraphical() with a new "clone" parameter that tells whether to assign a sprite index, or make a sprite's copy owned exclusively by this overlay. The former will save program memory but make overlay update if the sprite is edited later. The latter is meant primarily for backwards compatibility.
  Overlay.CreateRoomGraphical has the same param.
- Added Overlay.Graphic property that lets you change overlay's sprite after it's created.
- Added Overlay.Width and Height properties, that let you freely scale existing Overlay.
- Added readonly Overlay.GraphicWidth and GraphicHeight properties that let read original overlay's graphic size, as not all overlays hold a sprite reference (e.g. textual overlays).
- Added Overlay.Transparency property.
- Added Overlay.ZOrder property that lets you sort Overlays among themselves and other objects in the same "game layer": screen overlays are sorted among GUI, while room overlays are sorted among room objects, characters and walk-behinds.
- Added Speech.TextOverlay and Speech.PortraitOverlay for accessing blocking speech overlay and portrait overlay respectively.
- Added Game.BlockingWaitSkipped which tells the result of the last blocking wait skipping, also including result of the blocking speech skipping.
- SkipSpeechStyle now supports eSkipNone mode; when used it will disable any kind of skipping, such speech can be only skipped by a direct command from script.
- Extended Screen.ScreenToRoomPoint() with an optional "restrictToViewport" argument, which lets to choose whether tests over empty place result in conversion through the default viewport or a null pointer.
- Added AudioClip.PlayOnChannel().
- Added AudioChannel.Pause() and Resume() functions, and IsPaused property.
- Added AudioChannel.SeekMs(), complementing PositionMs (as the Seek() function interprets position differently depending on the audio format).
- PlayVideo() now supports an option to play both game's and video's audio track simultaneously.
- Added File.WriteRawInt() to complement ReadRawInt().
- File paths in script now support $DATA$ token, which tells to read files from the game package. This only works for read operations. Functions that support this token currently are:
  File.Open(), DynamicSprite.CreateFromFile(), ListBox.FillDirList().
- Debug(2, 0) command that displayed walkable areas is superceded by Debug(2, n), where "n" is a mask type: 0 - none, 1 - hotspots, 2 - walkbehinds, 3 - walkable areas, 4 - regions. This command also works as a toggle switch, calling it with the same mask index will turn it off.
- Debug(5, n) command that displayed character's walk paths now also works as a toggle switch.

Engine:
- New SDL2-based backend for graphics, audio and input.
- Hqx graphic filters discontinued (could be temporary).
- Windows-only DirectMedia video playback discontinued (could be temporary).
  Only OGG/OGV videos are kept supported at this point.
- Support resizing game window on desktop systems.
- Support "borderless full-screen window" mode in addition to the real (exclusive) fullscreen.
- Support for switching vertical sync at runtime with Direct3D/OpenGL renderers. Also enable vsync in windowed mode too.
- Unicode (UTF-8) text support: engine can now switch between ASCII and UTF-8 text mode. This is controlled by both game's OPT_GAMETEXTENCODING setting and translation's "Encoding" setting: they tells whether to interpret game texts as UTF-8 or ASCII/ANSI.
- Support optional translation's "GameEncoding" setting: it hints the original game's codepage to help with their conversion. This is mostly meant for translating existing older (ANSI) games.
- Engine now supports using real pixel height of the TTF fonts when arranging text and UI elements on screen; using nominal import size of the font is used as a compatible mode for the old games.
- Also supports separate "normal" and backward compatible "fixup" modes when initializing TTF fonts, letting to display both common TTFs and ones made specifically for AGS in the past to display as they were meant to be.
- Supports scripts using functions and variables from any other scripts, regardless of the script module order in the project.
- Removed limit of simultaneous Button animations.
- Removed limit of Character followers.
- Removed Overlay limit.
- Character.SetWalkSpeed() is no longer restricted by an arbitrary limit of 50.
- Process character's idle view based on real game speed, not hardcoded 40 fps.
- Improved file writing times (e.g. when doing a game save) by using buffered file stream. Initial tests showed 50% faster file writing.
- Engine now renders GUI controls as separate textures when using hardware accelerated renderers. This may significantly improve performance in the high-resolution games and games with large number of GUI elements on screen.
- Engine now shares the video texture data for all game objects on screen sharing same sprite. This improves performance in case there are multiple objects which use same image.
- Various performance optimizations for both raw drawing and texture updates (Direct3D/OpenGL).
- Engine now ensures that in threaded audio mode the AudioChannel's state only changes once the game is updated, and not while the game script is running. This prevents situations when the clip could begin playing before all properties are set in script, or when AudioChannel's properties' values (such as Position) could change while running a game script.
- 24-bit wav PCM support, comes with the new sound library.
- File.ReadRawLineBack() now always reads full line, and not limited to 200 characters anymore.
- Debug displays, such as showing room mask and character walk paths, are now implemented as non-blocking translucent overlays, allowing you to keep playing the game while they are on.
- Implemented debug key controls for calling a built-in save and restore game dialogs. These controls have to be set in user config as "save_game_key" and "restore_game_key" in "[override]" category. These may be used by testers if the game is missing a save function or one is bugged.
- Engine now supports loading compiled scripts as separate files packed along with the game, along with those embedded into the main game data or inside room files.
- Engine no longer bails out with error if the chosen translation cannot be loaded on startup.
- When reporting script errors, engine will print callstack for all the active script "threads": for example, if there's Wait() function called and error happened in repeatedly_execute_always, then it will print both actual error's location, and Wait() call's location.
- Engine config now has graphic modes defined as a simplier string options: "[graphics] fullscreen" for the fullscreen mode setup, and "[graphics] window" for the windowed.
  Fullscreen option can explicitly define a "borderless full-screen window" mode.
- Added "emul_mouse_mode" and "emul_mouse_relative" options to config in "[touch]" category.
- Added "cache_size" and "stream_threshold" options to config in "[sound]" category, they setup the rules for sound caching and choosing whether to load a clip fully into mem or stream one.
- Added "load_latest_save" and "show_fps" options to config in "[misc]" category.
- Added "background" option to config in "[misc]" category, that defines the starting run-in-background (aka multitasking) mode (may later be changed by SetMultitaskingMode()).
  Added "--background" command line option for the same purpose.
- Added "--sdl-log" command line option for setting up SDL2 library output verbosity. The engine log config now has a new "sdl" group meant for SDL2 messages.
- Support "--user-conf-dir" command-line arg (and "user_conf_dir" config option) superceding "--localuserconf"; the new option directly tells the location of user config file.
- Path related command-line and config options, - such as "shared_data_dir", "user_data_dir" and "user_conf_dir", now support $GAMENAME$ token in path which is resolved to the game's title.
- Added "--clear-cache-on-room-change" command-line arg (and similar config option).
- Don't error when DrawingSurface.DrawImage has bad transparency parameter (warning instead).
- Don't error when detecting bad format in File.Read* functions (warning instead).
- Added stubs for agsshell plugin (a contemporary cross-platform variant of ags_shell).
- Added stubs for agsappopenurl plugin.
- Fixed potential crashes if a room-related API function has been called in "game_start"; this is achieved by having a dummy room placeholder object. Still results of such calls are undefined and should not be relied upon.
- Fixed potential crash on room load if the walkable area mask contained color values above the supported range.
- Fixed dialog script's "goto-previous" command not working if used from the first sub-topic run using "goto-dialog" (a very-very old bug).
- Fixed AGS_EngineInitGfx plugin callback was not called during OpenGL renderer initialization.
- Fixed Direct3D/OpenGL renderers were displaying plugin's raw drawings in a wrong position in the scrolling rooms, if the drawing was done on AGSE_PRESCREENDRAW or AGSE_POSTROOMDRAW events.
- Fixed overlay may fail to be created sometimes, if previously another overlay had been forcefully removed when changing rooms (this is an ancient bug which existed for many years).
- Fixed ListBox.RowCount reporting 0 if called before the control was displayed once.
- Fixed GetTextWidth would still return a size of an outline for an empty text string.
- Fixed text may be misaligned in gui controls, as its outline thickness is not counted.
- Fixed some TTF fonts could be cut at the bottom when the speech is displayed.
- Fixed scheduled sound fadeout effect was not cancelled by skipping a cutscene.
- Fixed OGV Theora videos positioned incorrectly if they have certain sizes or aspect ratios.
- Fixed game fps sped up if SetGameSpeed() is called repeatedly in game script.
- Fixed game not reacting to system close commands when stuck in script, which made it impossible
  to close the "hanging" game by usual means (other than terminating the process).

Engine Plugin API:
- Added IAGSEngine::GetGameInfo() function which returns information about the game, such as its title and GUID.
- Added new render callback AGSE_POSTROOMDRAW, for handling drawing inside the room above all room objects.
- Added IAGSFontRenderer2 interface, expanding the original font renderer interface, improving font plugins support.
- Added ReplaceFontRenderer2() and NotifyFontUpdated() functions.

Compatibility:
- Fallback to the first loop with frames if current character's loop does not have any.
- Use the dummy frame if current character's speech view loop does not have any.
- Ignore character having view/loop with no frames while it's not in the current room.
- Legacy behavior of MoveCharacterBlocking's return value.
- Fixed walkable area's continuous scaling was broken for high-res rooms in old games.
- In pre-3.* games force player to walkable area after changing rooms, this is to emulate an unintentional effect created by the old engines.
- Fixed pre-3.4.1 anti-aliased TTF fonts display (their vertical position was broken).
- For pre-3.5.0 games support old behavior of coincidental dynamic sprite replacement on GUI backgrounds (and few other places) without explicit assignment; that is - when the new DynamicSprite is created right after deleting an old one.
- Support Label.TextAlignment with legacy alignment constants for pre-3.5.0 games made with the custom engine from "Clifftop Games".
- Support native resolution hack for games made with "Clifftop Games" custom engine, where 640x400 games are run as 640x360.

Android:
- Rewrote universal AGS game launcher/player using up-to-date Google guidelines. The former "launcher" is now called "AGS Player".
- Implemented single game project template meant for building your own signed APK.
- Implemented two touch-to-mouse control scheme (selectable in config), for one finger emulating LMB only, and for two fingers emulating LMB and RMB.
- Support relative motion speed setting for touch-to-mouse emulation.
- In AGS Player added "Browse" button to the game folder selection, which opens default system file picker.
- AGS Player now searches for games recursively, in all the subfolders.
- AGS Player now has preference button per each game, which opens individual game's settings.

OSX:
- OpenGL renderer is now supported on MacOS.

Web / Emscripten:
- Initial port release.

Windows:
- Installer will create program links with three-digit version in the name.

Plugins:
- Added SpriteFont plugin to the list of builtins, for ports that use ones.
  SpriteFont plugin is updated to support custom "Clifftop Games" font variants.

WinSetup:
- Added "Fullscreen as borderless window" checkbox.
- Remade sound options to reflect the move to the new audio system in the engine.




Known issues

* Although Unicode text is supported overall, some languages may still not be printed correctly automatically. Firstly, those that require "letter linking", such as Arabic or Persian, do not have the proper linking on its own. This may be worked around using special text converters and fonts. Another issue is that texts printed right-to-left in the source (where print direction is done using Unicode's control characters) are not wrapped correctly and may require manual placement of line breaks, or scripting their split in game.
* MIDI no longer plays on its own on Windows. For MIDI you (and your players) must install "sound banks" (also known as "sound font"). Please refer to this article: https://adventuregamestudio.github.io/ags-manual/MIDI-playback.html
* AudioChannel.Position and AudioChannel.Seek do not work for MIDI and MOD sounds. Try sticking to PositionMs and SeekMs for now.
* There are reports about Direct3D not being able to restore the fullscreen mode after alt+tabbing occasionaly.





Thanks to everyone who contributed to and tested this version!



#40
As AGS 3.6.1 is closing the final release, and AGS 4.0 is getting public wip releases, I'd like to begin discussion of a roadmap for the future updates.
I suppose that 3.* version branch won't get any major releases from now own (unless someone would want to add more engine ports with full backward compatibility), but there might still be minor updates with fixes and performance improvements.
4.* branch, on another hand, should get a full attention now.

With the opensource AGS development there always have been an problem of undefined roadmap, many changes were done randomly or sporadically, this resulted in inefficiently spent work time, and caused various repeating issues. Frankly, I consider 3.5.0 to be the first "proper" release, and 3.6.0 the first "good" release, and much of their content normally should have been accomplished several years earlier.
The state of 3.6.0 and 3.6.1 is relatively fine, I guess; and if you take AGS 4.0, with its expanded scripting features, it's already possible to do alot of things in AGS games. But there are tasks that have been considered priority at start and are not even properly addressed yet. There is still a number of old problems that make users life worse.

I think we need to define priorities for the next major release(s), and determine which important goals may be accomplished realistically. Even if getting to the goal seems to require a lot of work, the path to it may be split into subtasks, and work done step by step, so long as we stay focused on it.

Thinking of existing problems and choosing priorities, I suppose that potential goals may be categorized.

First of all, there is a typical division based on types of users and uses of AGS:
1) Things that are important for the main bulk of users, and for making common adventure games.
2) Things that are important for advanced users, and advanced or non-standard use of the engine.

Then there's a division based on whether we add something new or try to improve existing:
1) A new feature that would open up alot of new or better opportunities.
2) Getting more opportunities from existing functionality, by extending them or letting users customize it (e.g. by exposing something internal into script).
3) Simply improving performance and convenience of existing features.

Eventually there is a "thematic" feature category, that is category related to doing particular work (e.g. scripting, debugging, translating, creating game content etc) or achieving particular actions in the game (e.g. with script, graphics, audio, video, etc).

IMO we could start with defining a list of things, such as
1) Existing features, things you can do, but which are so not convenient that are main source of wasting time and effort during game making ("bottlenecks").
2) Lack of abilities that cause people to do time-wasting workarounds instead of using a direct solution (also "bottlenecks").
3) Functionality which is more or less common in adventure games, at least in particular genres, but not quite developed in AGS yet (the example I'm personally thinking about is a rudimentary video playback).

This refers to both a process of making a game, and game's capabilities.
SMF spam blocked by CleanTalk