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

#1
A while ago selmiak has requested that when objects and characters are moved by keyboard in the room editor, the editor would also display their coordinates, similar to how they are displayed when being dragged by a mouse.
https://github.com/adventuregamestudio/ags/issues/984

I tried to make this work with a small change
https://github.com/adventuregamestudio/ags/pull/2229

But that immediately raised a question of when to hide this extra label with coordinates on them.

The problem is, when you move with a mouse the hint may stay for as long as the mouse button is down.
But with keyboard, when arrow is down the object will keep moving. User may want to stop for a while to think, or check something. If I make the hint disappear in this moment, then user will have to hit an arrow once again to make it reappear, but will move object away from its location at the same time. This makes things uncomfortable, and I am concerned that this will defeat the purpose of the fix.

There are following options that came to mind (there may be others which i missed):
1. Make coordinates display all the time so long as object is selected;
2. Keep coordinates display after it's been moved by keys until it's moved by mouse or deselected;
3. Hide this hint by a timer run after user released the moving keys (but then some users may argue that timeout is not enough).

I cannot decide, so post here to ask for opinions.
Option 1) is the simpliest, but I wonder if users won't like how it looks like.


If you like to see how this works,
there's a temp build with this feature (3.6.1 based): https://cirrus-ci.com/task/6302126616346624
here's a video recorded:
https://github.com/adventuregamestudio/ags/pull/2229#issuecomment-1810476782
#2
AGS 3.6.0 - Patch 6
Full release number: 3.6.0.53


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: 3rd November 2023

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



#3
I'm posting in this general tech section to be able to gather more opinions (maybe people look here more often than in "engine development"?)

I will have to explain something first, so please bear with me.

AGS historically has a hidden problem: its pathfinder and walking algorithm uses math with relatively low precision. This may result in rounding mistakes. What this means in practice is that under some circumstances the "movement direction" (vector) is slightly off, e.g. more towards X than Y (or other way). In such case the character may reach the X destination while Y destination is still few pixels away. This difference mostly depends on the walk length. By experiment, I think, in 320x200 area it rarely exceeds 2-3 pixels, but in larger areas (walking fully across a scrolling rooms, or walking around high-res rooms) it may actually be bigger, like 5+ pixels.

In AGS 4 Alan Drake had changed the math to use proper floating-point math, which seems to improve this situation (but I did not experiment much with that yet).

In the AGS 3.* branch I am afraid to make such change, because of the backwards compatibility with games, which may be scripted to depend on how character walks exactly (that is unfortunate, but ags 3 is still used to run these old games, as well as its scummvm port).

How is this issue solved currently in AGS (and for a long time):
When AGS finds out that one coordinate is complete, but another is not (for example X done and Y is still not reached), it starts waiting until character reaches Y, but also accepts a certain "mistake", in 2-3 pixels.
If character is already within 2-3 pixels from the destination, then it just stops. This makes its real stopping point inaccurate, but nothing else happens.
However, if character is further away, then it keeps "walking", but because the movement vector is still pointing in the same direction, usually it takes few moments for it to reach the proper Y coordinate.
This results in a buggy effect known as "walking in place".
Here's the actual example:
Spoiler

[close]

In the end, not only the character may end up in a slightly wrong position (2-3 pixels away), but there's a chance this above animating in place happening, which looks quite weird.

I guess that there may be various approaches to solve this problem. Currently I'm experimenting with a solution where engine will, so to speak, turn the walking vector to make it point right along the unfinished axis, while keeping its length (that means - walking speed), in order to reach the destination faster. At the same time, I removed the "mistake acceptance" completely, forcing character to always reach the requested destination.
This should make character make some extra short move, properly animating, but this may look more natural than just moving legs in place.

Now, the reason why I explain all this here, is that a result of this solution is that the character may make a kind of a "final step" in a slightly different direction in the end. And I've been wondering how acceptable or non-acceptable this looks like.

Here's a compiled game i used for the test:
https://www.dropbox.com/scl/fi/r52c6zy1odiabeuwnautu/walk-problem-test.zip?rlkey=3e9yfgeze8dujeeb1n4ov6d3u&dl=0
I scripted this game to make a walk between very particular coordinates that illustrate this problem case: this is done by pressing Space button.
But in theory it may be possible to have similar effect when walking around the room for the long distances.

Of course I may be overthinking this too...
#4
AGS 3.6.0 - Patch 5
Full release number: 3.6.0.52


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: 14th September 2023

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



#5
Many years ago, when the open source stage of AGS has just began, people were discussing means to improve it. Perhaps I was not the only one, but once I suggested to make a room contents explorer panel, similar to the Project Explorer, with a tree-like structure. I had Project Explorer as an example, but I recall that others also were suggesting art software as a reference (like Photoshop, with its groups and layers).

Unfortunately, tzachs, who was intending to work on this, had an opinion that another explorer-like panel would take too much extra space on screen. Somehow his idea was that the AGS UI is already too clogged. This is why he went the direction of Navigation bar, that we have today.

But this navigation bar turned to have a number of usability issues, and is difficult to customize too.

My suggestion is to revive the topic of a proper room explorer, and design one at least "on paper", defining which would be more convenient.
#6
AGS 3.6.0 - Patch 4
Full release number: 3.6.0.51


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 August 2023

Previous stable version: AGS 3.5.1 P20 forum thread


This release is brought to you by:

- sonneveld (porting engine to SDL2)
- 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)
- Thierry Crozat (fixes, plugin update)
- vga256 (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 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!



#7
We had a thought to optionally support a Sierra-style speech view with character portraits in the default game templates. But for that we'd need to have Roger's portraits.

If anybody is willing to draw a portrait animation for the Roger character, something simple, consisting of < 10 frames, please contact us here in this thread, or here in this suggestion thread on github:
https://github.com/adventuregamestudio/ags-template-source/issues/36

Please keep in mind that the style should match the resolution and art style of the default template assets, more or less.

Perhaps, it would be a good idea to post this work in Critics Lounge first, to get peoples reaction.
#8
There's a peculiar problem that I'm currently trying to solve.

Historically object's animation in AGS is designed so that you have to call Object.SetView first in order to assign a view, and only then Animate in order to begin animation.

This is in a way similar to Character's LockView/Animate pair, but there's a caveat: for some reason, unlike Character.LockView, Object.SetView also triggers a linked sound frame, while for Character this is only done when Animation starts.

I don't know if this is intentional or not. This may be related to Object.SetView internally passing to an older function called SetObjectFrame, which possibly could have been used as a step-by-step replacement to animation in older versions of AGS.

But this behavior conflicts with Animate, because apparently, a pair of SetView/Animate will cause 2 frames, or same frame to be processed 2 times in a quick succession. By "processed" I mean anything related to the frame's activation. Currently this is playing a linked sound.

To clarify: if you have a sound linked to a frame 0 of the given loop, then setting object to that frame with SetView, and then calling Animate will play that sound twice. Normally we do not notice that because the sounds will play in sync. But it may be found out if you print the state of AudioChannels somewhere in real time.

With the addition of "volume" parameter to Animate() function in 3.6.0 this issue becomes more complicated, because user may want to animate an object with one volume, but SetView will play it with a full volume.

At first I thought that adding AnimationVolume property to Object will solve this (similar to one added to Character type), but then realized that this does not solve this logical conflict between SetView and Animate at all: because both object's AnimationVolume and current Animate's vol param are relative factors that are consecutively applied to the default volume (i.e.: final_volume = 100% * AnimationVolume % * current Animate's volume %). As a result SetView will play a sound with one volume (not yet affected by Animate's parameter), while the rest of the frames will be once again played with other volume.
The only way to mitigate this would be to always run Animate with volume param = 100, which effectively makes this parameter useless...


To summarize this conflict:
- You must call SetView if you want to Animate an object;
- At the same time calling SetView processes the current frame's behavior regardless of whether you are planning to animate or not.


I'd like to find some solution for this, because it's wrong and annoying. Ideally this solution should be something applicable to the 3.6.1 release, as it's already causing trouble to users (this is how I found this problem).
#9
AGS 3.6.0 - Patch 3
Full release number: 3.6.0.50


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 July 2023

Previous stable version: AGS 3.5.1 P20 forum thread


This release is brought to you by:

- sonneveld (porting engine to SDL2)
- 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)
- Thierry Crozat (fixes, plugin update)
- vga256 (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 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!



#10
AGS 3.6.0 - Patch 2
Full release number: 3.6.0.49


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: 4th June 2023

Previous stable version: AGS 3.5.1 P20 forum thread


This release is brought to you by:

- sonneveld (porting engine to SDL2)
- 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)
- Thierry Crozat (fixes, plugin update)
- vga256 (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 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!



#11
AGS 4 - Early Alpha 4
Full release number: 4.0.0.1

ACHTUNG!

This is a EARLY ALPHA version of AGS 4.
This is a WIP version, and must go through extensive testing.
Use at your own risk. Please back up any games before opening them in this version of AGS.
New settings in this version WILL make your project files unusable in previous versions after saving with this version.


For Engine/Editor developers
Spoiler


Last updated: 3rd November 2023



This release is brought to you by:

- Alan v.Drake
- Crimson Wizard
- eri0o (joystick & gamepad support, other improvements)
- fernewelten (new script compiler)
- ChamberOfFear, aka persn (open room format, Editor improvements)
-  Matteo Piovanelli (some improvements)



What is AGS 4

AGS 4.0 is an upcoming version which is currently in experimental stage. The primary idea of this version is a complete removal of the deprecated functionality: game settings and script functions. AGS 4 will no longer be able to run older 2.* or 3.* games. It will only guarantee the import of the latest 3.* game projects (such as 3.6.0). This means that if you want to update your existing game to AGS 4, then you'll have to first import and save it in 3.6.0. If your game is using any of the deprecated settings or script commands - you'll have to replace these, as 4.0 will no longer have necessary "backwards compatibility" switches in General Settings.

It is still in works, and there is a number of large changes planned.
But what are the ready major new features of AGS 4?

Open Room format

The new room format made by @ChamberOfFear now stores rooms as a collection of directories with room data split into multiple files. The room properties are stored in XML, which make it possible to read and even edit by hand outside of the editor. Room backgrounds and region masks are stored as separate PNG images.

This improves the safety of working with rooms, allows to change things externally, and simplify teamwork to some degree.

New script compiler with new syntax features

The new compiler was written by @fernewelten, and it grants a whole bunch of syntax improvements to the AGS script, such as nested structs, multi-dimensional arrays, dynamic arrays have `Length` pseudo-property, and so on.

The full cheat-sheet of the new features may be found here:
https://github.com/adventuregamestudio/ags/wiki/New-compiler%27s-end-user-cheat-sheet
If anyone is curious, here's the more "technical" version, explaining things in depth:
https://github.com/adventuregamestudio/ags/wiki/Features-of-the-new-Script-Compiler

Managed pointers inside managed structs

These are also allowed now (this is not related directly to the script compiler, but also to how engine handles dynamically created objects). This feature finally opens full potential of structs referencing each other with pointers, and allow you to create virtually any kind of data storage in script.

To give an example:
Code: ags
managed struct Item; // pre-declaration

managed struct Person {
    Item* items[];
};

managed struct Item {
    Person* owner;
};

Here's a LinkedList module I wrote for a test:
https://www.dropbox.com/s/sxur2bsccsvaqmr/ags399-LinkedList.zip?dl=0

Advanced object features

The game objects have two new features worth mentioning up front: Blend Mode and Rotation.
* BlendMode property lets you change the way object is drawn, selecting one of the 10 classic modes (Add, Subtract, Dodge, etc). This gives you ability to make more visual effects in your game.
* Rotation property (called GraphicRotation in some) lets you to rotate the object by a number of degrees. Most standard things have this, and even Cameras, so you may, for example, rotate the whole room view, and characters in it individually. Rotation is hardware accelerated (in Direct3D/OpenGL mode) and does not slow things down, unlike rotating dynamic sprites. Engine correctly detects clicks on rotated objects, so for example, rotated GUI will be fully functional.

What else is PLANNED for AGS 4?

Here's the milestone proposal:
https://github.com/adventuregamestudio/ags/issues/1298

It's not clear at the moment whether all of these features will be a part of the first 4.0 release, but at least some of these will hopefully be.

How safe is this WIP version currently?

It is relatively stable, and there are few people who were already using it to make games for a while: Alan Drake is one of them, and I suspect that fernewelten was also using it sometimes for his games because of his new compiler (but I may be mistaken).
The biggest problem with this is that this version will be updated further, so some things may not be final. Project format may also change in the next updates. We'll try to keep things upgradeable (so that the previous projects made in this WIP version won't just break).
And it surely it will benefit from more testers.



The full changelog follows:

Contains all additions from AGS 3.6.1 Beta 8, except ones made for backwards compatibility.

Common:
- Most of the deprecated functionality (game settings and script API) is cut out from both Editor and Engine, and is no longer supported. The Editor guarantees to import the projects saved by AGS 3.6.0 and later. The Engine may run games compiled in 3.6.0, but only so long as they don't use any deprecated settings or script commands.
- Completely removed Global Messages and Room Messages.
- Removed built-in support for Game Score, including related game settings and GiveScore script command. Users are advised to script their own score counter if they need one.
- Removed support for '[' as a linebreak character in text.
- Added FLAC support for music, speech and sound effects.

Editor:
- Open room project format: rooms are now saved as subfolders in "Rooms" folder, where each component has its own separate file (room data, backgrounds, masks and scripts).
- Support room backgrounds and masks as PNGs.
- Translation sources are now saved in PO format.
- General panel look enhancements.
- Support built-in Base Color Themes that have the custom themes applied over them.
- Game template selection now displays template's description right in the dialog.
- F2 is now a hotkey for editing labels in the Project Tree. "Game statistics" are now displayed by Ctrl + F2.
- Script editor supports "word wrap" mode.
- In General Settings added "Use extended compiler" option that lets to choose a new script compiler for your game (see list of changes in related section below).
- Added BlendMode property to Characters, GUI and Room Objects.
- Added readonly Length property to AudioClips, for the reference.
- Fixed faulty double-click on project items in case user dragged the cursor away.

Compiler:
- The new extended script compiler is available. Almost all of the new Scripting features are only supported when using the new script compiler.
- Optimization to the bytecode generation: same scripts may now work faster at runtime.

Scripting:
- Support for having regular structs inside any structs (regular or managed); there's no nesting limit.
- Support having managed pointers inside managed structs.
- When declaring a pointer to managed struct you may now omit "*" sign.
- When writing struct's function's code you may now omit "this" keyword when addressing current struct's member (variable, attribute or function).
- Support for extender attributes.
- Support for multi-dimensional regular (non-dynamic) arrays. They may have any positive number of dimensions.
- Dynamic arrays now have Length pseudo-attribute used to retrieve their length.
- Global variables may now be declared right after struct's or enum's declaration, between the closing bracket and closing semi-colon.
- Functions now may call any other function from within same script, regardless of their order of declaration.
- Compiler can now evaluate integer or float expressions at compile time whenever result is actually constant and can be calculated at compile time.
- "const" keyword now may be used to define compile-time "int" and "float" constants.
- "readonly" keyword now may be used to declare non-modifiable variables (local or global) and function parameters.
- Added "fallthrough" keyword, which is used to hint that switch's case does not require a break statement. This is only to clarify coder's intent and prevent compiler's warnings.
- Support pre-increment and pre-decrement operators (++x, --x).
- Support bitwise negation operator (~x).
- Support addressing members of the function return values in one expression. This lets chain multiple commands including function calls, e.g. GetObject().MyVariable...and so on.
- Two sequenced string literals ("text" "text") are now automatically concatenated.

Script API:
- Most of the deprecated API is now removed completely, except those that have no equivalent.
- Added SCRIPT_EXT_AGS4 macro which tells whether extended script syntax is supported by the compiler. This may be used to know whether the script is being compiled by the old or new compiler.
- Added SCRIPT_EXT_NESTEDPOINTERS macro which tells whether nested managed structs are supported by the compiler.
- Added Joystick struct, meant to work with joystics and gamepads in script.
- Added BlendMode enum.
- Added Character.BlendMode, GUI.BlendMode, Object.BlendMode, Overlay.BlendMode.
- Added Character.UseRegionTint and Object.UseRegionTint, deprecated Character.IgnoreLighting.
- Added Camera.Rotation, Character.GraphicRotation, GUI.Rotation, Object.GraphicRotation, Overlay.Rotation.
- Added DrawingSurface.BlendImage() and DrawingSurface.BlendSurface() functions.
- AudioChannel.Position and PositionMs no longer return a very large value while skipping cutscene.
- Removed "hasAlphaChannel" param from DynamicSprite.Create() and CreateFromExistingSprite().
- Removed HasAlphaChannel property from DialogOptionsRenderingInfo.
- Removed "transparent" param from Overlay.CreateGraphical() and CreateRoomGraphical().

Engine:
- Support joystick and gamepad input.
- Implemented more accurate Character movement. The movement direction is now more precise and diagonal movement speed no longer may exceed MovementSpeed setting.
- Animated buttons now display flipped frames correctly.
- (possibly) Fixed characters sometimes keep walking animation for a short time after arriving to their destination.
- Added "--print-rtti" command line option which prints script RTTI table to the log.
  (RTTI stands for "runtime type information", and is used for handling of certain advanced script features, such as nested managed structs.)

#12
AGS 3.6.1 - Beta 12
Full release number: 3.6.1.11

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


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: 3rd November 2023

Previous stable version: AGS 3.6.0 P6 forum thread


This release is brought to you by:

- Crimson Wizard
- eri0o (Log Panel, Room panning, other additions)
- Walter Agazzi (fixes)



What is new in 3.6.1

3.6.1 is planned to be a minor version, focusing on improving performance and usability of existing features, and also possibly on restoring few functionalities cut while porting the engine to SDL2.

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

Editor:
- Discontinued Source control integration functionality, removed "Put sound and sprite files in source control" option from General Settings.
- Made Editor a Dpi-aware application, which might improve its looks in Windows 10 and higher. This is disabled (may be temporarily), as it turned out to cause troubles on some user setups.
- Improved Room Editor controls:
  Added free panning mode done by holding the middle mouse button, or alternatively - by holding Space + LMB.
  Mouse Wheel without key modifiers scrolls the room vertically; Shift + Mouse Wheel scrolls
  the room horizontally.
  Zoom is done by Ctrl + Mouse Wheel and room now zooms towards or outwards the cursor position.
- In Room Editor the context menu is now displayed by RMB or Shift + RMB while editing masks.
  The individual room mode menu is merged with the "copy coordinates" command when shown.
- In Dialog Script editor support most Edit menu and context menu commands from the regular Script editor, with a few exceptions.
- In Sprite Manager added command "View" -> "Show filenames" which toggles display of a sprite's source filename under the sprites.
- During sprite export Editor will display a proper progress dialog.
- Zoom controls in Character and View panes now allow downscaling too. View editor displays the preview sprite stretched to fill the parent panel.
- View editor now allows to select multiple frames at once, across multiple loops too, using standard Shift + LMB and Ctrl + LMB combinations. Properties panel lets modify properties for all the selected frames at once.
- Added "Replace with all sprites from folder" command to the View editor's context menu.
- For Audio Clips in the project tree added "Force Reimport", "Force reimport all file(s)" and "Replace Source File" context menu commands.
- For Output Panel added "Copy selection" context menu command.
- Implemented Log Panel that lets you see the engine and game logs right in the Editor.
- Improved LipSync panel looks in case user's system has display scaling option enabled.
- "Goto Definition" command in script will now work for most of the game entities too, such as Characters, GUIs, and so forth. In that case it will find a game's entity and open a respective editor panel for it. This still does not work for some types, such as Room objects, and Views.
- Added main menu commands for opening a Project folder and Compiled folder.
- Added "Export Global Messages to script" menu command. This command is meant for upgraded pre-3.2 game projects, and will generate a script with a String array, moving global messages texts there.
- For script's tabs added a context menu command for opening this script's location.
- In General Settings moved few properties to different groups for better consistency.
- Added "Scale Character sprite offsets" property to General Settings. This property refers to scaling of Character.z and sprite offsets added by LockViewOffset script command.
- Added TextureCacheSize and SoundCacheSize properties to Default Setup. These let configure the sizes of runtime texture and sound cache sizes respectively.
- Added "Leave room after fade-out" event to Rooms (script function called "Unload" by default).
- Added Translated property to all GUI Controls (was available only in ListBox). Translated property tells whether this control's text has to be translated, and applied text direction (in right-to-left text mode).
- Support '\n' linebreak character in the Label's Text and potentially other text properties.
- Config will now be saved in UTF-8, letting to support setup program's title text in unicode.
- 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.
- Export Game's Title into translations.
- Fixed Editor refusing to open a game if one of the translation files is missing.
- Fixed Project Explorer's folders collapsing after certain user actions, such as dragging items or renaming things.
- 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 ScriptName property to AudioClip, Character, Dialog, GUI, GUIObject, Hotspot, InventoryItem, Object.
- Added static GetByName() function to AudioClip, Character, Dialog, GUI, GUIObject, Hotspot, InventoryItem, Object.
- Added Object.AnimationVolume property, which works similar to Character.AnimationVolume.
- Added static File.ResolvePath() and File.Path attribute.
- Added support for a text formatting to a number of functions: DisplayAtY(), Character.SayAt(), Character.SayBackground(), DrawingSurface.DrawStringWrapped().

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

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

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

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

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





Log Panel

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



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

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

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

The message types are dividing between Main, Game and Script.
Main - is the main engine messages, mostly related to something important initializing or changing.
Game - are various game-related events.
Script - are messages printed by a System.Log command in script.

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

Expanded interaction functions

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

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

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

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

WFN fonts supporting Unicode

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

Here's the modified Radiant's FontEdit which supports editing any character in range 0-65535:
https://www.dropbox.com/s/xth28bfzu78vtqi/FontEditUni.zip?dl=0
this is an "unofficial" version made purely for test.
The source project may be found here (if anyone is interested):
https://github.com/ivan-mogilko/fontedit
The example of the WFN font hosting Greek alphabet (only capitals, for test):
https://github.com/adventuregamestudio/ags/files/11540578/AGSFNT0_UNI.zip
may be tried with e.g.
Code: ags
Display("ΟΙ ΘΕΟΙ ΤΟΥ ΟΛΥΜΠΟΥ"); // THE GODS OF OLYMPUS
#13
AGS 3.6.0 - Patch 1
Full release number: 3.6.0.48


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: 2nd May 2023

Previous stable version: AGS 3.5.1 P20 forum thread


This release is brought to you by:

- sonneveld (porting engine to SDL2)
- 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)
- Thierry Crozat (fixes, plugin update)
- vga256 (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 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!



#14
Hello, this is literally a AGS HELP WANTED, in the sense that we need help for the AGS itself.

The AGS manual is lacking many topics, and some existing ones are not complete or not very well done overall. Unfortunately, there have been very little volunteers to help with it over the years.

I cannot remember if I did this before on Recruitment board, but I decided to do now (again?).

We are looking for a person which is:
- Good with writing in English;
- Good with explaining things to people, especially to those who might have less technical knowledge about the topic;
- Good with AGS, of course (you must know the subject well).

Our manual (source) repository is here:
https://github.com/adventuregamestudio/ags-manual
The manual may be edited as a Wiki, using Markdown language:
https://github.com/adventuregamestudio/ags-manual/wiki
There are basic guidelines for working with it:
https://github.com/adventuregamestudio/ags-manual/blob/master/CONTRIBUTING.md
I think the Tutorial pages may be used as an example of a "tone" that we'd like to have, that is not overly encyclopedic, and easy enough to understand for a non-technical person or a kid:
https://github.com/adventuregamestudio/ags-manual/wiki/acintro1
https://github.com/adventuregamestudio/ags-manual/wiki/acintro2
https://github.com/adventuregamestudio/ags-manual/wiki/acintro3


Currently this may be edited by anyone who has a Github account, although the dev team retains a right to edit or even reset your changes if you do something weird there. TBH I was about to discuss setting permissions differently with our dev team, but that's a separate question.

You may look for the list of tasks in the repository's issue tracker:
https://github.com/adventuregamestudio/ags-manual/issues
you may open ones too if you feel the need to



The tasks we are primarily interested in are:
1) Enhancing description of the Editor and editing various items in the project. Issue: https://github.com/adventuregamestudio/ags-manual/issues/218
2) Writing thorough explanation of Game Features, basically, explaining the logic of how things work in game, how they are set up and how they behave. Issue: https://github.com/adventuregamestudio/ags-manual/issues/209
3) Expanding tutorials, explaining solutions to most typical problems (say, run continuous state update in repeatedly_execute, and other).


If you have questions or suggestions, please contact us in this forum thread, at the issue tracker or AGS Discord (there's a channel dedicated to documentation). You may also send me a PM, although I'd prefer to keep the discussion public.
#15
This question is partially about syntax and partially about a technical issue in AGS.

There is a number of languages that are written right-to-left (Arabic, Persian, Hebrew, few others).

AGS has a built-in "Right to left" text mode, but it looks like it was meant strictly for ASCII method, and is not fully usable with Unicode texts. The thing is that unicode texts may already be written right-to-left (they may contain control characters for this, if I understand correctly).

The problem with AGS though is that the way it wraps the text assumes the text was originally written left-to-right (in script or translation files). In the Right-to-left mode the engine will wrap the text same way as for left-to-right, but then reverse each line separately.

This does not work at all with "proper" R-to-L Unicode texts. As they already are reversed, the line splitting may result in beginning of the sentence appearing on the last line.

My first thought was that a fix should simply be to revert the order of the split lines instead.
Or, more correctly: do the line splitting by scanning the text in reverse.

But then I started considering things like multiple sentences in the same string, or even multiple paragraphs in the same string, and got very confused.

My question is: supposing you have 2 sentences in, say, Arabic or Persian. How are those 2 sentences are written normally? Is their order also reversed? If yes, then the above fix will work... if not, then it won't work, because you will need to have first sentence arranged first (which may take multiple lines), then the second, and so on.

And then there's a case when you have a number of paragraphs in one string. Obviously, the order of paragraphs must not be reversed. But if a single sentence inside a paragraph is wrapped, then wrapping of that particular sentence will have to be reversed...
In other words, there may be groups of lines wrapped in reverse order, but groups themselves have to be arranged in original order...

So, thinking about this, I was coming to an idea that there's no trivial generic solution here.

Or rather, the only "trivial" generic solution is to write R-to-L languages completely left-to-right in the source texts, and let the engine revert them after splitting in lines.

Without this, the engine would have to parse the text's syntax using punctuation, finding where the sentences are (separated with fullstops), and where the paragraphs are (separated with manual linebreaks).
Well, this is not impossible, but at the same time things like that was not done in the AGS engine before.

Does anybody have ideas on this?
#16
AGS Engine & Editor Releases / AGS 3.6.0
Sat 01/04/2023 06:59:24
AGS 3.6.0
Full release number: 3.6.0.47


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 2023

Previous stable version: AGS 3.5.1 P20 forum thread


This release is brought to you by:

- sonneveld (porting engine to SDL2)
- 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)
- Thierry Crozat (fixes, plugin update)
- vga256 (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




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!



#17
AGS 3.5.1 - Patch 20
Full release number: 3.5.1.27


For Editor
Spoiler

For Android
Spoiler

For Engine/Editor developers
Spoiler

Released: 29th March 2023

Previous stable version: AGS 3.5.0 P10 forum thread


This release is brought to you by:

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



Summary

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


Changes in the Patch 20:

Engine:
- Fixed AudioClip.Play allowing to place clips on a crossfade channel in general case; there's still a backward-compatible case where it's allowed to do so for audio types with reserved channels that exceed the normal channel limit. (Regression since 3.5.1 Patch 11)


Changes in the Patch 19:

Engine:
- Fixed System.Volume is not correctly applied after restoring the save. (Regression since at least 3.4.0)


Changes in the Patch 18:

Engine:
- Fixed background speech and textual overlays may disable GUI when being continuously created in repeatedly_execute* kind of functions. (Regression since previous patch).


Changes in the Patch 17:

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

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

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


Changes in the Patch 16:

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

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

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


Changes in the Patch 15:

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

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


Changes in the Patch 14:

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


Changes in the Patch 13:

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


Changes in the Patch 12:

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


Changes in the Patch 11:

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

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

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


Changes in the Patch 10:

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


Changes in the Patch 9:

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

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

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


Changes in the Patch 8:

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

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


Changes in the Patch 7:

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

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


Changes in the Patch 6:

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

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

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

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

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


Changes in the Patch 5:

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


Changes in the Patch 4:

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

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

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


Changes in the Patch 3:

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

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


Changes in the Patch 2:

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


Changes in the Patch 1:

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

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


What is new in 3.5.1

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

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

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

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

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

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

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

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

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

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







Thanks to everyone who contributed to and tested this version!



#18
AGS 3.5.1 - Patch 19
Full release number: 3.5.1.26


For Editor
Spoiler

For Android
Spoiler

For Engine/Editor developers
Spoiler

Released: 5th March 2023

Previous stable version: AGS 3.5.0 P10 forum thread


This release is brought to you by:

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



Summary

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


Changes in the Patch 19:

Engine:
- Fixed System.Volume is not correctly applied after restoring the save. (Regression since at least 3.4.0)


Changes in the Patch 18:

Engine:
- Fixed background speech and textual overlays may disable GUI when being continuously created in repeatedly_execute* kind of functions. (Regression since previous patch).


Changes in the Patch 17:

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

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

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


Changes in the Patch 16:

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

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

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


Changes in the Patch 15:

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

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


Changes in the Patch 14:

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


Changes in the Patch 13:

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


Changes in the Patch 12:

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


Changes in the Patch 11:

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

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

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


Changes in the Patch 10:

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


Changes in the Patch 9:

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

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

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


Changes in the Patch 8:

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

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


Changes in the Patch 7:

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

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


Changes in the Patch 6:

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

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

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

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

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


Changes in the Patch 5:

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


Changes in the Patch 4:

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

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

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


Changes in the Patch 3:

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

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


Changes in the Patch 2:

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


Changes in the Patch 1:

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

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


What is new in 3.5.1

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

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

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

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

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

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

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

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

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

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







Thanks to everyone who contributed to and tested this version!



#19
For a while the website is displaying a link to the forum thread of an upcoming Alpha/Beta version of AGS on downloads page, but it's hidden under a very obscure "Other Downloads & Resources >>" spoiler, and even there it's  somewhere in the middle of the links list, named "AGS Work in Progress Releases", with a link that leads to a forum thread.

(For some reason a "Previous version" link is even more visible)

This apparently is quite inconvenient and people keep missing its presence.

Is there anything that could be done with this?

From my experience, when software's Beta is ready, their websites have both latest stable and next wip version downloads as two buttons together.
#20
I was not certain where to post this; as this is not a technical issue, so will post here...

AGS Editor has 4 hidden splash screens, which is coded to display on particular days: Christmas, Valentine's day, and so on. These splashes are photographs of "old" members of AGS community, made somewhere in 2000-ies. (I don't know full story of these, and don't know most of the people on these photos.)

I wonder if it is okay to remove these from the Editor, let's say, starting from 3.6.0 release; or if there any reason to not remove them.

The reasons I have for this suggestion are:

1) These photographs are made in the times when AGS community was perhaps a more "close" group of people, who knew each other well enough. Today many new members won't even know who these people are, and these photos won't have any sentimental or other value for the majority of users. For the same reason, these won't likely to achieve their original "easter egg" purpose.

2) I cannot speak for the people on these photos of course, but hypothetically some of them may see their remaining presence on the program splashscreens as unwanted. I'm unaware whether they gave any permission to Chris Jones, but now a different team is developing the program, and neither of us have their permission.

3) These screens may actually startle users who do not know their backstory. In the past I've seen at least couple of reports in which users wondered if this is a doing of a virus, or a hacker.
SMF spam blocked by CleanTalk