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

#41
Quote from: greg on Tue 22/07/2025 13:58:16I'm observing a seam between contiguous walkbehinds.  (I noticed this with patch 1, and I'm seeing it with patch 2 as well.)

You mention patch 1 and patch 2, did it happen before, or started only with 3.6.2 patch 1?
Does this appear with particular graphic driver / graphic filter combination, or all of them?
Which is the game scaling ratio which you run with (native game res vs window size)?

I've seen a similar issue in much older games, and that was caused by uneven texture scaling which caused subpixels. The only way to fix that seemingly was to either adjust walk-behinds by couple of pixels or replace walk-behind with an object and let it overlap another a little (although I cannot tell if that might work in your case).
#42
I believe we may have both, both methods seem useful.

https://github.com/adventuregamestudio/ags/issues/2792
#43
So View editor needs either a "Reverse frames" or a "Paste in reverse" command, or both of them in the context menu.

Also, while checking the View editor I noticed that there's no regular "Copy/Paste" command acting over selected frames, only "Copy loop/Paste loop". Probably that's because there was no way to select multiple frames before (this ability was only added in the latest versions).


Quote from: eri0o on Tue 22/07/2025 02:08:12About the runtime CW mentioned, I guess it would use a third parameter like eForwardsThenBackwards or something.

I had this proposal about expanding animation parameters:
https://www.adventuregamestudio.co.uk/forums/engine-development/proposal-expand-animation-range-repeat-parameters/
#44
Are you speaking of reversing loops in the editor, or at runtime?

If runtime, there's a Direction parameter in Animate function, does it work for this case?
https://adventuregamestudio.github.io/ags-manual/Character.html#characteranimate
https://adventuregamestudio.github.io/ags-manual/Object.html#objectanimate

EDIT: or are you speaking about COPY / PASTing selected frames in reverse order?
#45
Quote from: Gal Shemesh on Sun 20/07/2025 16:44:11So many things that I used to make workaround codes for were fixed.

Often I don't know if something is broken unless users report that. When users don't report and resort to workarounds, the bugs tend to stay for months, if not years. The majority of engine bugs fixed in this patch were reported by a person who was not making own games, but playing existing older games.
#46
There's a "user cheat sheet" for the new scripting features in AGS 4:
https://github.com/adventuregamestudio/ags/wiki/New-compiler%27s-end-user-cheat-sheet



The type casting is possible for managed types, in both ways.

1. Upcasting, child -> parent, was always possible, and is resolved at compile time.
2. Downcasting, parent -> child, is supported in AGS 4 using C#-like "X as Y" syntax, and is resolved at runtime:
Code: ags
Button* btn = control as Button;
MyChild* child = parent_ptr as MyChild;
This works with any managed struct, whether built-in, declared by user or from plugins (but plugins must register the types correctly for this to work, because it's based on checking typenames at runtime).
Downcasting does not throw any errors in case of failure, but returns "null" if pointer cannot be cast to the requested type. This is also useful if you iterate through an array of parent pointers, which may point to multiple child types, and check which actual child type each object is.



Method overriding is currently NOT possible, because there's no proper support for virtual function table. So you still cannot have separate implementations for the same function in parent and child structs.
This may be worked around somehow. For example, one could store a "my type id" in a parent class, or test which type the "this" pointer is, make a downcast, and delegate to particular child's function. That's just one idea, perhaps there may be other solutions.
#47
The 4.0 Alpha 23 is released now, with 2 important fixes:
- Fixed memory leak in room compilation, so hopefully "out of memory" errors should not occur (unless you load too much stuff at once).
- Fixed error popup closing automatically if there's a "watch variables" panel.
#48
Updated to Alpha 23
(Please use download links in the first post)

This update contains all the additions and fixes from 3.6.2 Patch 2 (except ones related to backwards compatibility).

Own changes:

Editor:
 - Fixed memory leak occuring when compiling room scripts, which may eventually lead to "out of memory" errors.

Compiler:
- Compiler checks arguments of text formatting functions where possible, and reports mismatching args during compilation.
- Fixed a wrong error was reported if a "null" is passed as a `const string` function parameter.

Script API:
 - Added GameInfo struct that contains meta-information about the game, such as developer's name, developer's URL, version, and so forth.
- Added VideoPlayer.FrameWidth and FrameHeight properties.
- Added VideoPlayStyle enum, PlayVideo() now uses VideoPlayStyle as "flags" argument.

Engine:
- Improved video playback's synchronization between video and audio streams.
- Fixed engine was closing the game too early while connected Editor is displaying a script error popup, if there was "Watch Variables" pane active at the same time.

Manual
The manual now contains WIP version of AGS 4 feature documentation. It will be improved and expanded further in the next updates.



EDIT:
The new GameInfo struct was added in script, this lets read the game and developer information that you can optionally enter in General Settings:
Code: ags
builtin struct GameInfo {
  /// Gets the game's title
  static readonly attribute String Title;
  /// Gets the game's description
  static readonly attribute String Description;
  /// Gets the game's developer's name
  static readonly attribute String DeveloperName;
  /// Gets the game's developer's URL string
  static readonly attribute String DeveloperURL;
  /// Gets the game's genre description
  static readonly attribute String Genre;
  /// Gets the game's release date as a DateTime instance
  static readonly attribute DateTime* ReleaseDate;
  /// Gets the game's release version, represented as "X.Y.Z.W" string
  static readonly attribute String Version;
};
#49
Quote from: Monsieur OUXX on Sat 19/07/2025 20:59:46
Quote from: Crimson Wizard on Sat 19/07/2025 19:27:05That operation is supposed to restore sprites in game so long as the sources are available. Were they available?
No, they were not -- that's what I meant. The project is about 10 years old, most of the sources are long gone and exist only inside the project's Sprites. The "of course" was not meant to be sarcastic :-)

If you like, then you can create new sources and bind your sprites to them.
Go to Sprite Manager, right click to bring a context menu, and choose "Create source files for sprites with missing...". That command does the "export sprites" operation combined with reassigning sprite's source path.
#50
There was this ticket opened a while back in regards to the project saving, maybe related:
https://github.com/adventuregamestudio/ags/issues/1177

Another ticket is related to changing sprite format storage:
https://github.com/adventuregamestudio/ags/issues/1281



Quote from: Monsieur OUXX on Fri 18/07/2025 18:26:43- Then, I re-opened AGS and I helped the game going back to a healthy state by doing "File -> Restore all sprites from source".
- But then the sprites themselves were of course still missing.

What do you mean? please elaborate. That operation is supposed to restore sprites in game so long as the sources are available. Were they available?

Quote from: Monsieur OUXX on Fri 18/07/2025 18:26:43- Or, at least, there should be more than one backup file generated. It's no longer 2005, we could have 10 of them (I'm exaggerating to make a point) and it would still use close to no resources.

Depends! I've seen game projects where sprite files were several GBs large.
We may have this as a setting in Editor Preferences though.
#51
This is now added in 3.6.2 Patch 2.
#52
Quote from: Baguettator on Sat 19/07/2025 06:34:40Another thing I just thought about : possibility for buttons having their text displayed on several lines (same way as labels) ?

This is already supported in the latest version, you just need to enable WrapText property.
#54
AGS 3.6.2 - Patch 2
Full release number: 3.6.2.12


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: 19th July 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)
- mausimus (fixes)
- 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.


Changes in the Patch 2:

This is a 3.6.2 Patch 2.

Editor:
 - The multiline Text edit window can now be called for all the "free text" properties in the game, by pressing the "..." button.
 - "Edit Custom Properties" and "Edit property schema" dialogs are now resizable, and remember their size and position.
 - When making a game template Editor will now use an optional "template.files" file, if one is found in the project folder. This file should contain include/exclude filepath patterns, and lets include subfolders into the template too.
 - Fixed Editor application freezing at the Splash screen if any exception occured when starting up. Now it should close itself properly.
 - Fixed "Export sprites" dialog visual style and being cut on Windows 11.
 - Fixed script preprocessor not recognizing macros which begin with a underscore.
 - Fixed that error reports occuring when opening a room had only their first line displayed in a message box, instead of a full error message.
 - Fixed wrongly issued warnings about voice-over filenames not matching selected naming style.
 - Fixed that during a test game run new function names may still be auto-inserted into the object's event property when user clicks on "..." button (or double clicks the gui control), while actual functions won't be added to script, as the script is forbidden from being modified during game test.
 - Fixed that if there was already a function name inserted into a gui control's event property, but actual function not present in script, the function is not created when user double clicks the gui control.

Compiler:
 - Fixed error occuring when processing a global variable which type is an empty struct.

Script API:
 - Fixed default values for save slots range in FillSaveGameList(), RestoreGameDialog() and SaveGameDialog(), they did not match historical behavior of these functions. The default slots range is now 0-99.

Engine:
 - Fixed game refusing to load if a font file is not found, use font 0 as a fallback instead.
   (This restores a historical behavior, but now it works for any font, not only WFNs.)
 - Fixed characters being forcedly moved to a walkable area after a call to FaceLocation() or a similar function.
 - Fixed a single black frame displayed before the video when PlayVideo() is called.
 - Fixed "fade-out" transition could sometimes not play to the end.
 - Fixed mouse cursor and OVERHOTSPOTlabels displayed for 1 frame between fade-in and "After fade-in" event, which could cause them flickering unexpectedly if "After fade-in" script contains blocking cutscene.
 - Fixed OVERHOTSPOTlabels not redrawing after blocking action ends if the cursor remains over the same hotspot where it was before the action.
 - Fixed game interface could become enabled for a single game frame each time right before the Dialog options are displayed. This could cause e.g. a "normal" cursor or OVERHOTSPOTtext to appear for the split second.
 - Fixed gui texts aligned to Bottom or Right had a position mistake in 1 pixel.
 - Fixed slightly broken slider's handle position for thin sliders with very small handle sprites.
 - Fixed SayAt() not being clamped at the screen width (as it was historically).
 - Fixed AudioClip.IsAvailable not working correctly.
 - Fixed sprite cache or texture cache not initializing properly if their size in config is assigned to a too large number. The cache sizes will be now correctly limited to the max possible size available to the current engine build (32-bit or 64-bit).

Compatibility:
 - Corrected a fix for the misaligned text centering on buttons in pre-3.6.0 games (the previous fix introduced in 3.6.2 Patch 1 happened to be breaking some other cases).

WinSetup:
 - If any of the cache sizes in config is set to a value not present in the option lists, the list will be assigned to the nearest matching value, instead of resetting to default.

Templates:
 - Source asset files (sprites) are included along with the template games now.


Changes in the Patch 1:

Editor:
- On failed new font import do not replace the font with font 0 in preview, as that's confuses users and hides import errors.
- Fixed an unhandled exception which occured on Text Parser panel when user pressed Enter while no item is selected.

Engine:
- Try to detect incorrect argument types in string formatting functions such as String.Format, in attempt to avoid crashes when a '%s' format is used (this is still not 100% secure though).
- Do not quit with error if a wrong GUI type is assigned as a "TextWindow GUI", display default message box instead and log a warning.
- Fixed a crash occuring when reading Character.DestinationX/Y properties while the character is turning on spot after a call to FaceDirection.
- Fixed a crash occuring when SpeechView is assigned a view that has no loops.
- Fixed Lucas-Arts speech positioning mistake occuring, for example, when there's a big transparent GUI covering whole screen.
- Fixed dialog options with no text, they were displayed and could be selected by player, which should not be happening.
- Fixed Character.PlaceOnWalkableArea() and Room.NearestWalkableArea() returning wrong results if Room's mask resolution is not 1:1.
- Fixed Direct3D and OpenGL renderers displaying sprites with occasional "magenta" pixels when "Smooth scaled sprites" setting is enabled but graphic filter is set to "Nearest-neighbour".

Compatibility:
- Support detecting and loading game data from Linux game ports where it's called "agsgame.dat", and is created using an older version of the third-party "agspack" utility.
- Disable smooth walk transition in pre-3.6.1 games, as apparently this breaks logic in some of them where precise walking coordinates and/or timing is required by scripts.
- Fixed misaligned text centering on buttons in pre-3.6.0 games.



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

#55
I've written a article about Attributes a while ago, but this question made me realize that I did few things wrong there. Here's an updated and (hopefully) complete article now:
https://adventuregamestudio.github.io/ags-manual/ScriptAttributes.html
#56
@edmundito
I've been testing attributes today, and found out that this case works (in the modern versions of AGS) if you don't declare getter/setter in struct, but use extender syntax instead. I.e. using following code:

Code: ags
managed struct Child {
  int Index;

  import readonly attribute String Name;
};

managed struct Parent {
  import readonly attribute Child* children[];
};

String _names[];
Child* _children[];

String get_Name(this Child*) {
  return _names[this.Index];
}

Child* geti_children(this Parent*, int index) {
  return _children[index];
}
#57
Quote from: Baguettator on Fri 18/07/2025 22:29:41Well I was thinking about :

- importing a font file
- create a button
- give this button the font you just imported
- choose the size of the font for THIS button (and eventually its style if possible)
- allow to manipulate font's property for each button or things using texts (labels etc...), such as the font's size, dynamically in scripts. My best example for it is about translations : if you have a button with the text "ABCD" inside, and when you change translation the texts becomes "ABCDEFGHIJ", the button could be too small to have the text properly inside, so you could just change the font's size to fit the text there.

Giving each control additional font settings will be suboptimal IMO, not only because that's going to be an extra hassle to configure font on each control, but also because the font renderers must cache the glyphs (letters) in each separate size and style (they don't load font once and then display resized, they actually precreate letters in each size). If there will be a setting for each button, label, etc, that may give users an idea that they may ignore the number of font variants, and they will eventually boost the amount of cached fonts. So I'd rather not do that.

I'd rather keep a single "Font" property on things, and have all settings in a Font object. You can already have any number of Fonts from a single file in AGS 4, where you import a font file once, and create any number of font variants from that font file. We may have a "style" added later as well, if we support attaching multiple style font files as a single "font file source".

This leaves a translation problem, and ability to create Font objects at runtime, either as a command in script, or an instruction in the translation file. That's something that has to be developed from ground up, as right now there's no font structure in script at all, nor a collection of fonts that one could iterate, only numbers. But that should be feasible in theory.
#58
Quote from: Monsieur OUXX on Fri 18/07/2025 10:28:22I have some kind of hunch that it could also be a concurrency issue. Something along the lines of: "the startup process of the game overlaps its immediate interruption. For example: The new compiler switches to the Log Panel or the Watch Panel just as the game ends and the Editor tries to display the window. One of the two processes wins the race, and the window gets closed".

So, I did some tests and can confirm that this starts happening after "Watch Panel" gets enabled. It even keeps happening if I hide "Watch Panel", the only way to make it stop is to restart the Editor.

("Log Panel" does not cause this.)

Both the error popup and watch panel are based on editor->engine communication channel. The problem may occur on either side.
#59
Of course, it makes sense to add this editor for each text field in game, unless they have special format rules already.
#60
I should mention that there's now a WIP version of ags4 manual, including "Upgrading to 4.0" topic.
Unfortunately, there's no online version yet, but there's a file that you may download:
https://github.com/adventuregamestudio/ags-manual/releases/latest/download/ags4-help.chm

It will be included along with the next AGS 4 update.
SMF spam blocked by CleanTalk