Menu

Show posts

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

Show posts Menu

Messages - Crimson Wizard

#101
Quote from: DiegoHolt on Wed 21/05/2025 17:07:47I'm using version 3.6, and I have downloaded 4 but still haven't tried it out. Can I just open my 3.6 project in the new version and work there without any problem? What do you all recommend? Do I keep working on the old one or should I change? My game is about half way progress.

I recommend trying DynamicSprite.Rotate first in 3.6, as it may give an acceptable result with the certain effort.
AGS 4.0 is not nearly as stable and consistent as 3.6 now.

Quote from: DiegoHolt on Wed 21/05/2025 17:07:47
Quote from: Crimson Wizard on Wed 21/05/2025 13:06:12AGS 4.0 does not support rotating gui controls yet, because there were some complications with them when I first added object rotation, and later I forgot to address this problem again.

This may be worked around by placing screenshots on multiple GUIs or Overlays, and rotating them instead.

So, in your last sentence are you talking about 3.x or 4?

I was talking about AGS 4.0.
#102
AGS 4.0 does not support rotating gui controls yet, because there were some complications with them when I first added object rotation, and later I forgot to address this problem again.

This may be worked around by placing screenshots on multiple GUIs or Overlays, and rotating them instead.
#103
Quote from: eri0o on Wed 21/05/2025 03:32:06Hey, I wanted to play with this and had some ideas, but currently the only texture a shader instance can have access to, is the one it is attached to. I think this is due to how AGS works that it works with sprites, which may or may not have a texture associated.

I had this in future plans. Did not think the implementation through yet.

But the general idea was to assign a sprite number as an extra "texture source" to the ShaderInstance. When this is done, the engine would create and lock a texture for that sprite in a texture cache, and assign to DDB as an extra sample texture. Then this extra texture is attached to a shader during render. Might try making an experiment in a few days.
#104
Quote from: Peegee on Tue 20/05/2025 08:19:09It's strange, when I removed the outline of the font, the text took more space in width...

That is unexpected. Could you tell which version of AGS are you using, which font, and how the outline was made (was it using another font, or automatic outline, etc)?

Quote from: Peegee on Tue 20/05/2025 08:19:09Sorry, I didn't want to send my picture so as not to reveal my game (GOBLiiNS6), and it was just a parchment (with an illustration).

Well, I understand, but you could make a screenshot in some mockup scene in such situation, with just the text shown.
#105
We've been asking for a game screenshot, because that will let us to clearly see the problem with your text. "Rough and contrasting" may have a number of reasons. Some reasons may be solved by easier means.

For example, have you tried turning "Anti-alias TTF fonts" on? This option is located in General Settings -> Text output. (Or do you have it turned on already?)
What is your game resolution? This option works better in high resolutions than in low resolutions.

Another option that you may try is making speech text's overlay slightly transparent (using Transparency property of a Speech.TextOverlay).

Spoiler
Example:
Code: ags
function repeatedly_execute_always()
{
    // test if there's a blocking speech overlay on screen
    if (Speech.TextOverlay != null)
    {
        Speech.TextOverlay.Transparency = 10; // this value may be experimented with
    }
}
[close]

I'd try the "GUI above the text" as a last option. It's not difficult to do, but seems like an unusual solution.
#106
Right click cycle is done in "handle_room_click" within the Sierra template, but it's done using standard function "Mouse.SelectNextMode", which automatically switches to the next enabled mode.

What you should do instead is disable all modes that you don't need. Open each unnecessary cursors in the editor and set "StandardMode" to False.
#107
There are definitely 2 opposite use cases of drawing a text:
1. When you draw a text on a prepared space, where the text must fit in that space.
2. When you draw a text (maybe limiting by some width), but then adjust the "space" to the text.

DrawingSurface API suits for the first purpose, and I could not figure out if it's possible to use for the second, unless it's an internal call where you already precalculated text size. But when I think more about this, there's another issue with DrawFancyString, as well as AGS own DrawStringWrapped: there's no way to limit by height.

And DrawingSurface does not expose "Clipping" feature either, which seems like an oversight.

Which means that if one needs to limit an output text by height, then they either have to get a precalculated text size first (Fancy module seem to have a FancyState for this, but it does not expose this atm, unless I missed anything), or draw on a intermediate sprite first, and then manipulate that sprite (crop or whatnot).
#108
Quote from: Snarky on Mon 19/05/2025 16:59:59That sounds correct to me. Consider the case of a textbox that is resized to fit the text content: you don't want to center the text around the halfway point of the "max width," but around the halfway point of the actual longest line width.

There are 2 different cases:

Case 1. When the text is being drawn on a prepared surface of the fixed-sized text box. This is the case of DrawingSurface.DrawFancyString which we tried first, and that's what I reported above. In such case I expect it to center relative to the "max width" that I pass; because otherwise it does not make any sense. I do not have a way to know the width of the longest line beforehand, so that I could adjust the x position.

Compare it with DrawingSurface.DrawStringWrapped, which wraps in the "max width":
https://adventuregamestudio.github.io/ags-manual/DrawingSurface.html#drawingsurfacedrawstringwrapped

Quotewidth is the width of the virtual textbox enclosing the text, and is the point that the text will wrap at. You can use the alignment parameter to determine how the text is horizontally aligned.

Case 2. When the text is placed on a exclusive sprite, resized to fit just the text, which one may align with the text box as sees fit. This is the case of DynamicSprite.CreateFromFancyString, which we used in the end.
#109
There's another bad bug in the lasted alpha version, which prevents from creating new Fonts in game.
Following temp build has it fixed:
https://cirrus-ci.com/task/5147027429916672
#110
We figured this out on Discord, using DynamicSprite.CreateFromFancyString instead, which allows to know the width and height occupied by the text, which in turn lets to align the resulting text on the background as the user wants.
(somehow this reminds me SDL_ttf which creates a bitmap with the text)

Quote from: eri0o on Mon 19/05/2025 02:55:29I think that's fine since the width is adjusted before when it calculates the word wrapping.

If you are referring to the horizontal alignment, then it does not center it in the provided "max width", but (apparently) longest line's width? This makes the whole text aligned to some seemingly random horizontal point, which is not what a user would expect.

Quote from: eri0o on Mon 19/05/2025 02:55:29@Akril15 , from your code I don't understand what you are trying to do, afaict if you don't maintain a global dynamic sprite and overlay I can't understand how they would show on screen.

There's a character.Say call right after that, which blocks the game and keeps created overlay displayed.

The code overall does following:
- displays a background GUI with some extra elements, such as character's name.
- creates a dynamic sprite with a Fancy text on it, makes a overlay and aligns over the background GUI.
- calls character.Say, so that the default lip-sync (and maybe voice) could work, and game blocks until speech is done.
#111
I think there may be a mistake in the module.

If you look in fancy.asc, function called "_draw_tokens", there's a line:
Code: ags
int text_width = fs.TextWidth;

It probably should be:
Code: ags
int text_width = fs.MaxTextWidth;
#112
If you read the DrawFancyString method, it looks like:
Code: ags
void DrawingSurface.DrawFancyString(int x, int y, const string text, optional FancyConfig* config, optional int width);

There's "optional int width" as the last parameter.
#113
AGS Engine & Editor Releases / Re: AGS 3.6.2
Sun 18/05/2025 18:52:45
Quote from: blexx on Sun 18/05/2025 12:10:45What are your plans for AGS 3.x.x? I guess from now on there will only be bugfixes and you are focusing on version 4? Or will version 3 continue to receive major updates?

Yes, the plan currently is to focus on AGS 4.
#115
AGS Engine & Editor Releases / AGS 3.6.2
Sat 17/05/2025 21:18:09
AGS 3.6.2
Full release number: 3.6.2.10


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: 17th May 2025

Previous stable version: AGS 3.6.1 P11 forum thread


This release is brought to you by:

- Alan v.Drake (fixes)
- Crimson Wizard
- edmundito (fixes)
- eri0o
- homelightgames (scalable images for the wizard dialogs)
- rofl0r (compatibility fixes for old games)
- Walter Agazzi (compatibility fixes for old games)


Summary

3.6.2 is planned to be a second update to 3.6, focusing mostly on convenience of existing Editor and Engine features, and expanding existing script commands. For a quick mention, the noteable changes are:
- you may create object event functions in any script of your choosing (except room events);
- a support for loading saves from older versions of the game;
- dynamic arrays have Length pseudo-attribute, letting you to read their length in script;
- dialog events (in "on_event") may let writing custom dialog handling in script easier.
But there's more.

As usual, please refer to "Upgrading to AGS 3.6.2" topic in the manual for further information on most outstanding changes in this version:
https://adventuregamestudio.github.io/ags-manual/UpgradeTo362.html

The full changelog follows.


What is new in 3.6.2

Common:
 - Event handler function are now allowed to be located in any script module.
 - New naming rule for the voice clips: full char name, followed by a number, separated by a dot, e.g. "RogerTheGreat.1234.ogg". The old rule may be enabled again by a switch in "Backwards Compatibility" settings.

Editor:
 - In "Start New Game Wizard" game template selection now displays template's description right in the dialog.
 - "Game statistics" now have Ctrl + F2 shortcut instead of F2.
 - F2 can be used for starting editing names of items in the Project Tree (ones that support that) and folders in the Sprite Manager.
 - Added "Game Speed" property in General Settings.
 - Added "Use old-style voice clip naming rule" property in General Settings, it lets to select whether the game should expect old-style voice clip filenames (4-letter char name followed by number) or the new one (full char name, followed by a number, separated by a dot).
 - In General Settings renamed "Override built-in inventory window click handling" option to the older variant "Handle inventory window clicks in script" (because it's easier to understand).
 - GUI selection in settings is now done using drop-down lists which list all eligible GUI types instead of having user to type GUI number. The setting will be automatically fixed if a GUI is removed.
 - Property Grid now displays Custom Properties right in the main properties list for each item that supports them.
 - Added "WrapText", "TextPaddingHorizontal", "TextPaddingVertical" properties to GUI Button.
 - GUI Labels can select full range of Alignment values in their TextAlignment property.
 - Added "TurnWhenFacing" property to Characters.
 - Textual GUI controls can now select "Null Font" as their font: this will prevent any text to be drawn even if one is assigned, and make it have zero size (when it matters).
 - Property Grid and Room's navigation bar now display object's description along with the script name on the drop-down list labels.
 - "Events" tab on the Properties Grid now has "ScriptModule" selection, which lets define in which module should the related script functions be generated and looked for. The GUI Controls use a ScriptModule set in their parent GUI, and Room events always has a fixed room script selected.
 - Added "Open Recent" submenu in the File menu.
 - Sync script editor's commands in Edit menu with the context menu.
 - Added "Toggle Line Comment" command to Edit menu for scripts.
 - More panes in the Editor are DPI-aware (rescale well with the system font scaling).
 - Editor tabs now display icons indicating their contents (may be disabled in Editor Preferences).
 - Room panel tabs now display room names.
 - Editor will now remember certain window states: "Sprite selector" window and splitter position, splitter position in "Sprite manager".
 - Support reordering folders in Project Explorer with drag & drop.
 - Support importing plain script files: ash, asc or both, - besides script modules (*.scm).
 - On "Color Finder" pane also display actual RGB values that the engine will use. They may be different from requested RGB, because historically engine limits drawing color's RGB precision to 16-bit.
 - Font's "SourceFilename" and "Font Size" properties now have buttons that let import another font file, or reimport same font with different size respectively, instead of clicking on a button on the preview window.
 - Added a readonly "ProjectFilename" property to Fonts, which displays their in-project file name.
 - Global Variables panel now allows to declare arrays.
 - Added "Controls transparency" slider to GUI edit pane.
 - Copy, paste and delete commands now apply to all the selected GUI controls in GUI editor.
 - When pasting a copied GUI control, Locked property of a new control will be turned off.
 - Support editing group properties for selected GUI controls.
 - Added a multiline Text edit window for Button and Label controls, that may be called by Ctrl+E, from context menu, or by pressing "..." button of the Text property in the Properties grid.
 - Support reordering folders in Sprite Manager with drag & drop.
 - Added "Replace source paths for sprites..." context menu command in Sprite Manager. This command allows to batch-replace parent folder for all sprite source paths, in case you moved original files from one folder to another.
 - Added "Palette index" selection for sprite's import transparency option.
 - Support importing 32-bit BMP files of extended formats (this support is formal at the moment, and does not guarantee that any of the extended data will be interpreted).
 - Support importing 1-bit (monochrome) and 4-bit images as sprites, room backgrounds and masks (converted to 8-bit).
 - Do not alter or clamp palette for 8-bit sprites imported in a 16/32-bit game.
 - Support importing indexed images which palettes contain translucent alpha as sprites with alpha.
 - Support importing indexed PNGs as room backgrounds and masks.
 - Added "Change Room Number" context menu command for the Rooms in Project Explorer.
 - When the room background size changes, reset room edges to defaults.
 - Removed obsolete "Copy walkable area mask to regions" command from the Room editor.
 - Improved scrolling of drop-down lists in the Room's navigation bar: made scroll buttons larger, and support mouse wheel.
 - In Room Editor, during any area drawing mode Ctrl + LMB now works as area picker regardless of the currently selected tool.
 - Added "Replace source paths for audio clips..." context menu command for the Audio node. This command allows to batch-replace parent folder for all clips' source paths, in case you moved original files from one folder to another.
 - Don't restrict compiling a voice-based lipsync if game has a Lucas-Arts style speech.
 - Do not delete previously built game exe from Compiled/Windows folder when testing a game from the editor.
 - Editor will now report any missing script functions that are assigned to events, but not present in script, as warnings when compiling the game.
 - Editor will now report any script functions that *look like* event functions, but not assigned to corresponding events, as warnings when compiling the game.
 - Editor will interrupt "Check for updates" process if it is taking too long with no progress.
 - Added "/maketemplate" command-line option that tells Editor to run, make template out of the said game, and quit.
 - Fixed Project Explorer refreshing when user changes names or descriptions of room objects.
 - Fixed importing indexed PNG as a sprite, previously Editor would mistakenly treat the source image as 32-bit.
 - Fixed importing GIFs with "palette 0 / N" transparency option would refer a palette color from each individual frame's palette rather than the original GIF palette, which could lead to wrong colors used as transparents.
 - Fixed importing 8-bit BMP sprites with no "Remap palette" and "Leave As Is" as a transparency option would still remap palette index 0 to the first found palette entry with Alpha 0, even if that's a filler entry not used by the image.
 - Fixed exporting room backgrounds was always writing a 32-bit image rather than using actual background's color depth.
 - Fixed Autocomplete failing in case of UNIX line endings in script file.
 - Fixed Autocomplete not giving correct results in case of a long chained access, i.e. something like "var[0].member.member".
 - Fixed Autocomplete giving wrong list of choices for wrong syntax cases like: indexed access of a type and non-array struct variable, member access of a static array.
 - Fixed Button getting resized to the image's size when user cancels different sprite assignment.
 - Fixed "Color Finder" and color properties were mapping a color number to RGB values with accuracy mistakes, resulting in slightly different values than the engine would use.
 - Fixed Font preview could crash the Editor with out of memory error in case of a very big font.
 - Fixed Editor refusing to open a project if one or more of the sections are missing in the file.
 - Fixed an unhandled exception occuring when rebuilding rooms if any script's header is missing.
 - Fixed a "unterminated string" error in Dialogs was not pointing to the actual error location.
 - Fixed double warning message when trying to close the Editor while a game test is running.
 - Fixed Editor may display a "save project" confirmation when run with "/compile" command-line parameter.

Scripting:
 - Dynamic arrays now have Length readonly property that returns their number of elements.
 - Support zero-length dynamic arrays. This may be useful if you need to have a dynamic array with no elements, but don't want to bother about checking a null pointer.

Script API:
 - Added eNullFont constant that lets assign or pass a "null font" to any property or function parameter which expects a font's ID. This "null font" will simply make any text not drawn and have no actual measurements (size, spacing, etc).
 - Added global events: eEventDialogStart, eEventDialogStop, eEventDialogRun, eEventDialogOptionsOpen, eEventDialogOptionsClose (these are handled in "on_event").
 - Events eEventGUIMouseDown and eEventGUIMouseUp now get additional parameters: mouse button, mouse x and y positions (relative to the exact GUI).
 - Expanded "on_mouse_click" callback, now supports two more parameters: click x,y coordinates.
 - Added RestoredSaveInfo struct which contains information about game save's contents,
 - Support "validate_restored_save" callback, which lets user to validate restored saves with mismatching data and request cancellation or continuation of restoring this save.
 - Added Button.WrapText, TextPaddingHorizontal, TextPaddingVertical.
 - Added Character.Following property that returns another Character that this one follows after.
 - Added Character.TurnWhenFacing property.
 - Added Character.MoveStraight() complementing WalkStraight().
 - Added DateTime.CreateFromDate() and CreateFromRawTime().
 - Added static Dialog.CurrentDialog property and non-static ExecutedOption and AreOptionsDisplayed properties.
 - Added static Dialog.Stop() function, a OO-style alias to StopDialog().
 - Added RenderLayer enum, and optional "layers" parameter to DynamicSprite.CreateFromScreenShot(), that tells which of the game's render layers to capture when making a screenshot.
 - Added File.Copy() and File.Rename().
 - Added FileSortStyle and SortDirection enum, and File.GetFiles() function that returns a dynamic array of filenames found using certain pattern, and optionally sorted by name or time, in ascending or descending order.
 - Added File.GetFileTime() that returns file's modification time.
 - Added File.ReadFloat(), WriteFloat(), ReadRawFloat(), WriteRawFloat(), ReadRawBytes() and WriteRawBytes().
 - Added Game.InBlockingWait property, that tells whether game is waiting for any blocking action or a Wait* call to complete.
 - Added SaveGameSortStyle enum and Game.GetSaveSlots() function that returns a dynamic array of save slot indexes, optionally sorted in certain way.
 - Added Game.GetSaveSlotTime() that returns a time this save slot was last written.
 - Added Game.ScanSaveSlots() that scans a range of game saves and tests them for compatibility, using "validate_restored_save" too if it's present in user script.
   This action is not run immediately, but is scheduled to be executed after current script ends. It reports of scanning completion by sending eEventSavesScanComplete event.
 - Label.TextAlignment has now type Alignment, rather than HorizontalAlignment, and has full alignment range (both horizontal and vertical).
 - Added optional "fileSortStyle" and "sortDirection" parameters to ListBox.FillDirList().
 - Added optional save slot range (min/max), saveSortStyle and sortDirection parameters to ListBox.FillSaveGameList(). This lets to define the exact range of saves it should fill, and order them in desired way.
 - Added ListBox.FillSaveGameSlots(), which initializes a list of saves from a dynamic array of save slot indexes.
 - Added Object.DestinationX and DestinationY properties, complementing ones in Character.
 - Added Overlay.SetPosition() and SetSize() functions for convenience.
 - Added Room.BackgroundCount readonly property.
 - Added Room.NearestWalkableArea() that returns the nearest found point on a walkable area.
 - Added GetWalkBehindBase() function, complementing SetWalkBehindBase().
 - Added Speech.SpeakingCharacter that returns currently speaking character (for blocking speech).
 - Added GetTimerPos() that returns timer's position (remaining time), in ticks.
 - Added CopySaveSlot() and MoveSaveSlot(), which moves existing save to another slot.
 - Added optional save slot range (min/max) parameters to RestoreGameDialog() and SaveGameDialog().
 - Added optional "sprite" parameter to SaveGameSlot(), that lets to pass a number of an arbitrary sprite to write into this save instead of a standard "screenshot".
 - Added optional "width", "height" and "layer" parameters to SaveScreenShot().
   SaveScreenShot() now accepts paths containing standard file tokens ($SAVEGAMEDIR$ etc).
 - Added SendEvent() function that allows to trigger "on_event" function calls in script. Special event value eEventUserEvent may be used as a base index for user-defined events.
 - Added System.DisplayFPS property that toggles FPS counter (a replacement to Debug(4, 1)).
 - Added System.GetEngineInteger() and System.GetEngineString() for returning diagnostic information about engine's runtime state. Possible arguments are defined by EngineValueID enum.
 - Added new game-wide option OPT_SAVEGAMESCREENSHOTLAYER that lets to define which of the game's render layers will be captured when making a standard screenshot for the save game.
 - Add SaveComponentSelection enum and game option OPT_SAVECOMPONENTSIGNORE, which lets to skip certain components when saving or restoring a game. This has dual purpose: reduce number of things in game that may break older saves by simply not having them in a save, and also reducing the size of game saves on disk (e.g. in case of dynamic sprites). Note that all things that were not restored from the save will retain their *current state*.
 - Fixed some script functions in AGS API were declared with "int" return value, while they are supposed to be "void".

Engine:
 - Updated to SDL 2.30.11 and SDL_Sound 2.0.4.
 - Engine now potentially supports reading saves made in older game versions with different content, so long as these saves have *less* data in any given type (i.e. less Characters, or less controls on a certain GUI, or less variables in script, and so forth). This feature is enabled by having a special "validate_restored_save" function anywhere in the game script, that accepts an argument of type RestoredSaveInfo. RestoredSaveInfo   contains various information about the restored save, and "Cancel" property, that must be explicitly set to "false" in script in order to allow to restore such save.
 - Engine supports returning to previously saved rooms which have less script data.
   It's important to remember though that it does no validation of restored room state on its own.
 - Dropped support for pre-3.5.0 game saves.
 - Increased the cap of simultaneously loaded scripts to 1024 (this includes all regular script modules, a single active dialog script, and a single active room script).
 - Engine no longer quits with error in case a script function assigned to a Room event is missing. Logs warnings about missing script functions assigned to any events.
 - Character.FollowCharacter() can now have a distance parameter up to 32766 (was limited to 255).
 - Ensure that Character.Speaking returns true when a speech is playing even if the character has no speech view.
 - Character.PlaceOnWalkableArea() now does a 1-pixel step scan, ensuring walkable area will be found regardless of how small it is. Optimized the search algorithm to keep it fast enough even in very large rooms.
 - Support voice-based lipsync (Pamela, Papagayo) with Lucas-Arts style speech.
 - DynamicSprite.CreateFromFile() may now load 1-bit and 4-bit bitmaps, converting to 8-bit.
 - Do not alter or clamp palette for 8-bit sprites loaded into a 16/32-bit game at runtime.
 - Assigning InventoryItem.Graphic will no longer reassign CursorGraphic too even if they were identical previously.
 - Calling DeleteSaveSlot() on a slot within 0-50 range will no longer secretly move a save with the topmost number (within the same range) to fill the emptied slot. If you still like to recreate this behavior, then use MoveSaveSlot() command.
 - Support calling StopDialog() inside any regular script and dialog script, and also while dialog options are displayed. That will schedule dialog's stop to be performed after current script finishes.
 - Removed arbitrary limit of 2k bytes for the result of String.Format().
 - Engine will no longer quit with error if any object is assigned a non-existing sprite, but continue, using a sprite 0 as a placeholder instead.
 - Ensure that the objects with identical z-order (baseline) always keep same relative sort order when being drawn (note: engine does not guarantee a predefined order, only a persistent one).
 - Implemented video buffering on a separate thread. Allow to drop late video frames.
 - When mouse is locked in window, confine its position to the game viewport; exclude black border.
 - Added "display" config option to "graphics" section. This is a 1-based display index, where 0 means "use default display".
 - Added new accessibility config settings in "access" section: "speechskip", "textskip", "textreadspeed". These let player to override game's skipping style for character speech and text messages, and text reading speed parameter that controls speech timing.
 - Added "max_save" config option in "override" section: this lets to enforce an arbitrary number of saves displayed in a standard save/restore dialogs in game.
 - Added "--display" command-line argument that lets choose which display to open game window on.
 - Added "--no-plugins" command-line argument that denies loading any plugins; also added respective config option "noplugins" in "override" section.
 - Fixed Software renderer being unable to restore a windowed mode on certain monitors, when switching from a real fullscreen mode.
 - Fixed character may get stuck inside a non-walkable area after Character.WalkStraight().
 - Fixed character may rarely finish walking on a non-walkable pixel.
 - Fixed calling Character.StopMoving() after AddWaypoint() succeeded a regular Walk() call with eWalkableAreas parameter will wrongfully teleport the character to the nearest walkable area, even though AddWaypoint is supposed to ignore walkable areas.
 - Fixed a number of region or hotspot's "Stand on hotspot" events may unexpectedly run after a blocking character's walk, even if character is no longer standing on that region/hotspot.
 - Fixed Lucas-Arts style character speech displaying offscreen if character is standing below the bottom of a room viewport.
 - Fixed calling Dialog.Start() inside a dialog script would create a nested "dialog state", which could eventually lead to internal mistakes and program stack overflow. Dialog.Start() will now schedule a proper dialog topic switch, equivalent to "goto-dialog" command.
 - Fixed displaying room masks with Debug command in legacy "upscale" mode.
 - Fixed a potential lockup that may occur when the engine is run from the editor, and is told to stop at a breakpoint.
 - Fixed 48khz OGG clips may have extra silence added to them in the end, causing "hickups" when the sound playback is looped.

Engine Plugin API:
 - Updated few callback and function prototypes in order to make them 64-bit compatible (allow pass and receive pointers). This includes AGS_EngineOnEvent for AGSE_TRANSLATETEXT and render stage events, and CallGameScriptFunction which now lets pass a const char* argument.
 - Added IAGSEngine.CreateDynamicArray(), which lets plugins to create dynamic arrays.
 - Added IAGSEngine.GetDynamicArrayLength() and IAGSEngine.GetDynamicArraySize(), which tell the passed array object's number of elements, and total size in bytes respectively.
 - Added IAGSEngine.Log(), which lets plugins to print using engine's log system.

Compatibility:
 - Fixed loading of games made in AGS 2.55-56 which include plugins.
 - Fixed loading of rare games made with AGS 2.5 or higher, which contained deprecated "room animations" (animations themselves are currently not functional).
 - Fixed old rooms with rare x3 resolution not displaying correctly.
 - Fixed old pathfinder imprecision affecting few pre-3.0 games.
 - Allow pre-2.7 games to have RestartGame() command be followed and overridden by a NewRoom().
   This is necessary for some older games to be able to proceed.

Windows:
 - Windows version of AGS is now built with MSVS 2019 and higher.

WinSetup:
 - Redesigned winsetup into a tabbed dialog.
 - Added "Reset To Defaults" button that resets all options to values from the game's default config file.
 - Added "Display" selection, allows to select which display to open the game window on.
 - Added "Accessibility" settings for skipping speech and text messages, for text reading speed.
 - In "disabled" section of config "access_skipstyle" setting lets disable all options in setup related to the speech and text skipping.
#117
AGS 3.6.1 - Patch 11
Full release number: 3.6.1.33


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: 17th May 2025

Previous stable version: AGS 3.6.0 P13 forum thread


This release is brought to you by:

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



Summary

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

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

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

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


Changes in the Patch 11:

Editor:
 - Clear output panels when loading a different project.

Engine:
 - Fixed engine could run scheduled previous room's event after changing to a different room.
   This could happen, for example, if the room was changed in "on_event" with eEventEnterRoomAfterFadein; in such case a previously scheduled "After Fade-in" would run before proper "Before Fade-in" of the new room.
 - Fixed in 8-bit games Fade effect did not having a frame delay (was passing instantly).

Compatibility:
 - Fixed certain old 8-bit games (like "Trilby's Notes") did not recover after the FadeOut() script command.


Changes in the Patch 10:

Editor:
- Fixed a check for an imported room mask size did not correctly account for the room's mask resolution setting (it worked, but mishandled some edge cases).
- Fixed exceptions occuring when reimporting a sprite or a audio clip from source, if the source filename string was wrapped in double quotes.
- Fixed script variables generation could sometimes produce a non-latin character in a variable name if the Editor is running on a system with non-English current locale.
- Fixed '\n' linebreaks not saved correctly in dialog option strings.
- Fixed translation compiler mistreating escaped opening bracket in a text line (`"\["`);
  it must keep it as-is, because "[" char is a old-style line break in AGS.
- Fixed LogPanel not applying filter settings right after they were changed.

Engine:
- Fixed a AudioChannel did not report a correct Position right after a AudioClip.PlayFrom() call.
- Fixed Button resizing to sprite 0 size if NormalGraphic is set to 0 (default button look).
- Fixed Character movement recalculation when changing move speeds while walking, and movement path contains 45-degrees diagonal segments.
- Fixed a solid Character (serving an obstacle) can get ignored by a walking Character, if the obstacle character's position appears within the walking character's own blocking zone.
  (This seems to be a redundant condition introduced very long time ago in the engine by mistake.)
- Fixed object's look not updated after it was assigned a dynamic sprite, redrawn, sprite deleted, object redrawn without a sprite (used a placeholder), and then another dynamic sprite assigned with coincidentally the same number.
- Fixed font outline index limited to 127 (although we theoretically support higher font numbers).
- Fixed font outline parameters not initialized correctly if engine is built by a system that treats "char" as unsigned 8-bit type.
- Fixed a crash which occured when script mistakenly tried to call RunInteraction() for a inventory item 0.
- Fixed loading translation entries larger than 1024 bytes.
- Fixed SDL log level was defaulting to "verbose" if not read from config (should be "info").

WinSetup:
- Fixed "Save and Run" command sometimes caused 2 engine processes, one of which terminated later.
  This did not prevent a game from running, but could result in temporary CPU and memory overload.


Changes in the Patch 9:

Editor:
- Fixed dragging an item to a folder in Project Explorer might cause that item to visibly appear in a wrong folder, if there are folders which name differ only in letter case.

Engine:
- Fixed Character.Animate() could cause game to error reporting "invalid loop" if this character was idling at the time, and Character.LockView() was not called prior to Animate(). (This is a regression in 3.6.1)
- Fixed inventory cursor hotspot (crosshair) not drawn properly over item sprites with alpha.

OSX:
- Fixed location of global config file: was in game installation directory, now in "Library/Application Support/uk.co.adventuregamestudio".


Changes in the Patch 8:

Editor:
- Fixed game cannot be loaded if its GameFileName setting is an empty string.
- Fixed pressing Alt was not selecting Main Menu.
- Fixed error occuring when trying to assign an image to the multiple selected View Frames if they have different initial images.
- Fixed script preprocessor directive "#else" in the nested conditions.

Engine:
- Made File.ReadStringBack() support reading back strings without null-terminator in the end
  (ReadStringBack() reads a string, which has its length prepended to the sequence of chars).
- Improved graphic mode selection when game window is moved to a secondary monitor.
  Note that still not all graphic setups are reliable on secondary monitors, specifically "real fullscreen" mode may be behaving unexpectedly if you try to switch to it on non-primary display.
- Fixed AudioChannel's Paused state is not saved when saving the game.
- Fixed error in case a character was walking while being locked to a temporary View, and switched to a directional loop which does not exist in the locked view.
- Fixed active item cursor's image may duplicate itself onto other cursors under certain conditions.
  (this is regression since 3.6.1 Patch 6)
- Fixed Inventory Window in automatic mode not redrawing its contents immediately when player character changes.
- Fixed ListBox.FillDirList() may add case-sensitive duplicates on platforms with case-sensitive filesystems.
- Fixed room's fade-out effect playing while skipping a cutscene (it must skip instantly).
- Fixed FadeOut or FadeIn not toggling screen state if they are inside a skipped cutscene. This could have resulted in screen not turning to black or not restored as expected if cutscene was skipped by player.
- Fixed Wait() delay of value > 32k would be treated as infinite timeout.
- Fixed Ctrl + Alt key combination not working (toggle mouse lock). This is a regression in 3.6.1.
- Fixed game may fail loading on platforms with strict memory alignment (e.g. MIPS processors).

Compatibility:
- Fixed SetCharacterViewEx() not treating "align" parameter according to old-style set of values.
- Fixed SetTextOverlay() could cause internal mistakes leading to unexpected errors in game.
- Fixed Wait() calls for pre-3.6.0 versions of Script API, where negative delay was treated as 0.

WinSetup:
- Fixed setup not distinguishing "desktop resolution" and "native resolution" from explicit resolution sizes when saving or loading config. Made sure that it remembers exactly the choice that user made ("desktop", "game resolution" or explicit resolution size).
- Fixed "native game resolution" not present in the list if it equals desktop resolution.
- Fixed nearest resolution selection in case config requested a resolution equal to the native game's resolution, but that resolution was not among the supported ones.


Changes in the Patch 7:

Engine:
- Hotfix mouse cursor not being drawn sometimes after changing rooms (regression in 3.6.1 P6).


Changes in the Patch 6:

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

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

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


Changes in the Patch 5:

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

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

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


Changes in the Patch 4:

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

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

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

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

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


Changes in the Patch 3:

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

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

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

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


Changes in the Patch 2:

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

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


Changes in the Patch 1:

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

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



What is new in 3.6.1

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

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

Scripting:
- Support "#else" preprocessor directive.

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

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

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

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

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

iOS:
- Updated port for 3.6.*.

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

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




Thanks to everyone who contributed to and tested this version!





#118
The custom speech is done by writing a function which you will use instead of standard Character.Say.
This function will need to do following actions (all or some of them):

- display a text, using a gui or overlay
- play animation (animating character, portrait, or both)
- play voice speech (see Game.PlayVoiceClip)
- wait until player's input and/or timeout
- cleanup (remove gui, remove overlay, stop animation, etc)

Since you probably will have to use a GUI method here, the simple code variant may look like this (as an example):
Code: ags
void SayRPG(this Character*, String text)
{
    if (String.IsNullOrEmpty(text))
        return; // don't display empty text

    // cut voice-over token from the speech
    int voice_number = -1;
    if (text.Chars[0] == '&')
    {
         String number_str = text.Substring(1, text.Length - 1);
         voice_number = number_str.AsInt;
         int voice_number_ends = text.IndexOf(" ");
         text = text.Substring(voice_number_ends + 1, text.Length - voice_number_ends - 1);
    }

    // setup things
    gSpeech.Visible = true;
    lblSpeechText.Text = text;
    btnSpeechPortrait.NormalGraphic = SPRITE_NUMBER;
    this.LockView(this.SpeechView);
    this.Animate(this.Loop, 0, eRepeat, eNoBlock);
    AudioChannel* voice_chan;
    if (voice_number >= 0)
    {
        voice_chan = Game.PlayVoiceClip(this, voice_number, true);
    }

    // wait for the number of frames enough to read the text with the TextReadingSpeed.
    // but also limit by the MinimumTextDisplayTimeMs for convenience
    int text_read_time = (text.Length * GetGameSpeed()) / Game.TextReadingSpeed;
    int min_read_time = Game.MinimumTextDisplayTimeMs * GetGameSpeed() / 1000;
    if (text_read_time < min_read_time)
        text_read_time = min_read_time;
    WaitInput(eInputAny, text_read_time);

    // cleanup things
    gSpeech.Visible = false;
    this.UnlockView();
    if (voice_chan != null)
    {
         voice_chan.Stop();
    }
}

and then used like

Code: ags
player.SayRPG("&5 my speech text");

Since you also need typing text animations, and portrait setup, this function will need to be expanded accordingly.
#119
Quote from: Peegee on Thu 15/05/2025 18:34:57Khris and Crimson, sorry, I had forgotten the .X-Code. The code works. It's not bad, the GUI is displayed well above, but the GUI must always be displayed. There, it is displayed only when the text arrives and its position is according to the size of the text pad. How to make it always be displayed, and does not move?

What do you mean by "always displayed"? like, display it for the whole game? or display it under certain conditions (for certain character, or in certain room)?

You can set Gui.Visible anytime you need. If you need a gui which is always visible, then you can set Visible property right in the Editor. But I suspect that is not exactly what you need.

Then, you said that you do not want it to move. Which speech style are you using in your game, is it Lucas Arts style where the text appears above the character's head, or Sierra style where it appears on top of the screen?
If it's Lucas-Arts style, then the speech may appear in different positions, and have different size.

Could you please post a screenshot or a mockup drawing of what you are trying to achieve? Right now I do not understand the purpose of these actions, and do not know what to suggest exactly.
#120
The feature has been merged into AGS 4 branch, and will be a part of the next AGS 4 Alpha Update.

I've rewritten the first post in this thread, please refer to it for the updated instructions, test build download, demo game, etc.
SMF spam blocked by CleanTalk