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

#1441
Quote from: RootBound on Sat 13/04/2024 16:13:10If others do agree, I think it would be good if the source could be hosted in the AGS repository so that it's in a permanent and accessible place that several developers already have access to.

This may certainly be done. We have a "organization" on github, which is a kind of a supergroup for AGS-related repositories. It includes templates, old demo game, etc. I can add a new repository there, and grant access permissions specifically to you, and anybody else willing to work on this project (that requires having a github account).

The game releases may be also hosted within the repository, at least for starters (there's a "Releases" page where one can upload an archived compiled game).
#1442
Quote from: Yanek_Crispbread on Sat 13/04/2024 08:34:12Oh wow! You are a stone cold genius, thank you so much. To be honest I always use MP3 but I missed converting this somehow, usually if I have accidentally used a WAV file it just doesn't play, thank you I will change.

I think that in a situation like this it would be a good idea to test commonly used sounds one by one: start them save/restore, etc, until you hit one that causes issues. Somehow I did not guess to suggest this myself earlier.

Something else I'd like to ask; when reading the file's media info I found its original author and title. Does this WAV come directly from the author's website, or did you create it by downloading and converting an original file?
If you converted it, could you tell which software and encoding parameters did you use, or perhaps create a smaller clip out of it using same encoding?
The reason why I ask is because I wanted to send this file for analysis to the developers of the sound library which we use, but the existing wav is quite big (over 60 MB), which may be not convenient, and also am concerned about legal issues.


Quote from: Yanek_Crispbread on Sat 13/04/2024 08:34:12Do you have any games out on Steam or Itch.io I can buy to repay you?

Thank you, but no, I don't make games myself.
#1443
Some interesting progress. Now it understands variable names, including member names:



Branch is still here:
https://github.com/ivan-mogilko/ags-refactoring/tree/ags4--draft-memwatch

This requires script compiler to generate a table of contents of script memory.
And naturally, we need RTTI to be built as well, because RTTI tells us about struct fields.

For the time being I put resolving request inside Engine, it is just faster to write dirty code there.

Currently not supported:
- Accessing array elements (but it's a matter of parsing `[ i ]`);
- Imported variables (from other scripts). These need a mechanism that resolves local declaration to their actual memory location.
- Local variables (those that are allocated on stack). These require a somewhat different approach, because they do not exist in a single instance, but are generated as functions are called (and same local variable may be generated multiple times in case of recursive call), so there's no "fixed" address.


UPDATE: arrays work now (both regular and managed).

UPDATE2: imported variables from other scripts work now.
Imports from the engine don't work yet.
#1444
Alright, I found the culprit. It's the wav file called aDay1. Apparently, it fails to "seek" properly (and engine seeks the sound to certain position after restoring a save), and starts playing garbage.

This is very easy to test: play this sound and then call Seek:
Code: ags
AudioChannel *x = aDay1.Play();
if (x != null)
    x.Seek(1000); // any number really


I must investigate this further, as it's likely an issue with the sound library that we're using. It either has a mistake, or does not entirely support particular formats or encodings.

As for this game, I recommend trying OGG format instead. AGS had multiple issues with WAV in the past, so OGG may be safer. Also, it has better compression, so filesize will likely get smaller.
#1445
Quote from: Danvzare on Fri 12/04/2024 11:03:23For the Verb Coin, have you considered just copying Deponia?

I've never played Deponia, so could not consider it. The last non-AGS Verb Coin game I played was Monkey Island 3 probably. Maybe this is where "right click to show inventory" was taken from too.

I can do it any way, but I wish there were some consensus about how it should be, because I do not want to remake this several times.

I can also wait and let people here discuss what would be the convenient templates look, and then just do it how you say.
I'm not good at making these decisions. It's one thing if this were for my personal game then I'd do it how i want, but it's not.
#1446
Quote from: Yanek_Crispbread on Thu 11/04/2024 23:48:00At the moment I am having considerable issues with a very strange bug, which is turning the audio to white noise on restoring any game... I may have to disable saving for the demo until I can fix it, but the issue doesn't seem to be the coding. Very curious! I may have to rebuild it from scratch :/

This is quite strange, but somewhat similar problem has been reported a while ago:
https://www.adventuregamestudio.co.uk/forums/advanced-technical-forum/problems-with-ags-and-pc-sound/
And I think i heard about "white noise" specifically elsewhere, but forgot where or who mentioned that...
EDIT: ah, it was probably you, under another nickname, on AGS Discord.

Which version of AGS is game is made with? Which "audio driver" do you have selected in winsetup?
Does this happen on other computers, for any other people, or only on your computer?
Is it possible to download the demo if I like to observe and investigate the issue?

PS. There's definitely no need to rebuild whole game from scratch, as this is likely an issue with the engine or very particular sound files, and not your game script (game script alone cannot cause this).
#1447
I think this conversation goes somewhat sideways. It started with a very specific user request, but now there's a discussion about a hypothetical functionality which contains a list of features, and everyone has got their own list.

The starting request has 2 conditions, at least from my understanding:
1. Being able to color particular words or sequence of words.
2. The text is static, so "raw" drawn once and then kept displayed without changes.

Is this correct, or was there anything else to it?

I think that above may be easily done by a script module today, and should not cause much trouble in high resolution (latter may be tested for performance to see if I'm right or wrong).

Perhaps it would be proper to focus on this problem in this thread, and find out how to solve this within the existing engine version?



For a more complicated functionality, I believe, it's a matter of deciding the purpose and use cases, then writing specification of a desired behavior. Personally, I can easily see a use case for both an animated text, and a emulation of a markdown or HTML page in game. These may require separate approaches, while having some "base functionality" beyond (there's always ways to pick out common code).

Implementation is always a separate question. Once there's a requirement for behavior, we can think about how to implement this, having performance in mind.

It may turn out that it is not possible to run "something" fast in the current engine, because engine does not support modern fast ways of doing things. Like rendering text glyphs as textures, for example, or similar. That's fine, we may leave that "something" for the better times, or keep it potentially slow, available for users who may live with that, and writing down list of things we'd need in the engine to make it faster.

But please, don't plan on pushing the giant formatting feature into the engine only because it's slow to make in script at the moment. I do not think that this whole text formatting with colors and animations should be inside engine, because engine is meant for "basic logical bricks". Everyone will have their own ideas about the formatting behavior, and should have a chance to implement them. IMO it's better to look at this in opposite way, and figure out what the engine could provide to make things like this formatting easier to do in script. Like, if you remember, there was a suggestion of hardware accelerated drawing: https://github.com/adventuregamestudio/ags/issues/2059



On another hand, there may also be various tricks already available to speed things up, if updating a text made with raw drawing appears slow. I don't know about having each letter as an overlay, but it could be separate overlays for animated parts, for example.
Another thing, for a typewriting, instead of redrawing whole thing after every letter is added, one could draw the full text at once, and then hide the part that should not be visible yet with an overlaying object.
Well, just saying.
#1448
I am bit conflicted about where to post this... But I need an advice.

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

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

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

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

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


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

Alternatively, I have these thoughts:
- Show this menu bar only when Inventory is on screen; so player will call both Inventory window and menu bar using RMB.
- Replace the 4-button menu bar with only 1 "options" button in the top-right corner, shown only when cursor moves to the corner (not just up), similar to how Tumbleweed template did this.
#1449
By the way, in regards to module communication; it's a fact that AGS script currently does not have a easy method of making "interfaces", as in, abstract classes that declare methods which other classes implement.

It's possible to extend a base class, and upcast a managed pointer to base class. This allows to make a parent class with the most basic commands and properties, which may be then extended by an actual implementor. For example:
Code: ags
managed struct TextDrawer
{
    protected String fullText;
    protected int drawFromChar;
    protected int drawToChar;

    import void SetText(String text);
    import void SetDrawRange(int from, int to);
};

// then elsewhere

managed struct FancyTextDrawer extends TextDrawer
{
    ... do actual stuff
};

/*managed?*/ struct Typewriter
{
     import void SetTextDrawer(TextDrawer *text_drawer);
};

In the above example, a Typewriter class could have a pointer to TextDrawer and assign from/to properties, telling actual FancyTextDrawer which part to draw.

The problem with above is that this imposes a base class restriction on implementing classes. There may be only 1 parent class, and if there's a case where extending something is not convenient, or we need more than 1 interface type implemented by the same class for some reason, then this approach no longer works.


So I've been thinking if there's a workaround in AGS script, and I think that an alternative is a helper managed struct serving a "messenger" between 2 classes.

Consider following example:
Code: ags
managed struct TextDrawerInstruction
{
    int drawFromChar;
    int drawToChar;
};

/*managed?*/ struct FancyTextDrawer
{
    import void SetDrawerInstruction(TextDrawerInstruction *inst);

    protected TextDrawerInstruction *myInst;
};

/*managed?*/ struct Typewriter
{
    import TextDrawerInstruction *GetDrawerInstruction();

    protected TextDrawerInstruction *myInst;
};

Here we do not require the class to extend any parent, but require that it could accept a certain object by pointer, and read that object when deciding what to do. Typewriter in this example has to give this "message" object out and change its parameters over time, thus saying that things should be drawn differently.
#1450
I would also separate typewriting from text formatting, as typewriting is more or less step-by-step alteration of "current text" (or "current position"), and this may be done by a higher-level "class", similar to how existing typewriter modules use labels or textual overlays.

In other words,

  Typewriter
            ->  Fancy text drawer
                        -> Drawing surface
#1451
This may be done with a script module, if it's only colors then this should not be overly complicated imo.

General idea may be following:
1. Parse the input string, write down an array of positions where color changes, and get a pure string without tags.
2. Calculate line splitting for a pure string, as you would with a normal text.
3. Draw parts of lines line by line and colored section by section.
#1452
Quote from: RootBound on Wed 10/04/2024 15:48:28HERE IS THE UPDATED VERSION: https://www.mediafire.com/file/bbpyfh7a3qb0npm/AGSQuest.zip/file

Unfortunately I do not have much spare time now to comment on the game itself, but I will comment on a project folder organization.

In the long run, and considering the game source will be eventually available for share and modifications, it's essential to have external assets well organized.

AGS saves the paths to source files for sprites and audio items, which allows to fully rebuild the resource "cache", so long as the source files are available. If the files are located inside game folder, then the paths are relative, and kept regardless of where you move the project to (different folder, or different computer).

But if you rearrange source files later, then these paths will get broken. They may be restored afterwards (there are few ways to do this, I think, both from the Editor, and editing project file Game.agf by hand). But this may be a tedious task in case of large number of assets.

For this reason it's best to come to at least basic folder structure early.

My suggestion is to have subfolders inside Assets, at minimum sprites and audio should be separate, and any unused or temporary resources should better be move to their respective folder (files not related to the game which happen to be there should be excluded from repository).

There's no need to overthink this, so any simple rule for the folder structure will do, so long as it's kept throughout the development.

For example:

Assets
  - Sprites
     - Characters
     - Inventory
     - GUI
     - Rooms
         - Room 1 - AGS Logo
         - Room 2 - Main Menu
     ...etc
  - Audio
     - Music
     - Sounds
         - Room 3 - Forest with Treehouse
      ...etc



In terms of the rooms, something that I may mention is that AGS has state-saving and non-state-saving types of rooms, where non-state-saving are assigned a number of 301 and above.
Menus and intro screens do not have to be state-saving, so it may be "cleaner" to have them 301+. This is not really essential, but may hint a person who studies this demo game about this difference.



EDIT: Oh, sorry, another thing that I noticed, is that sounds are made as WAVs, but it looks like they were cut from larger sounds presented as OGG. I think using OGG format is generally better, because the compression is higher, and also AGS had some issues with certain wav formats in the past. It's also better to keep at 44100 Hz, and an average bitrate (I noticed that some sounds there are 96000Hz, which is unnecessarily high).

But so long as the folder and file structure is maintained, it will always be possible to update the source file(s) keeping the filenames, and have it refreshed in the game's item either automatically or by command from Editor's menu.
#1453
Quote from: RootBound on Wed 10/04/2024 16:23:10@Crimson Wizard do you mean put the zip file (which contains the uncompleted game project folder) on git, or put the folder itself there uncompressed? And do you mean add it to the official AGS repository or somewhere else?

The files should not be compressed of course, that would defeat the purpose of the source control, as it needs to be able to detect changes with each update. Repository would contain simply the contents of a AGS project folder.

When it comes to AGS project, there's a general recommendation to NOT put certain things in repository, as they may be generated by the Editor, and will only unnecessarily increase the size of repository (by a lot). These files need to be added to "ignore" list. This includes:
- AudioCache folder; the project should have a subfolder with original sound/music files instead, referenced by audio clips as "source file".
- acsprset.spr file; the project should have a subfolder with original image files, referenced by sprites as "source files" too.
Both AudioCache and acsprset.spr may be regenerated when the project is opened in the editor, so long as source image file have relative paths inside the project.
- any backup files (.bak), and user settings (*.user files).
- folders with compiled game: Compiled and _Debug.


It does not have to be any official repository at this point, and the source may be cloned to another place anytime later.
#1454
It would be much better to put the game's source in the online repository with source control, such as git or svn.
This way it will be safe, and will allow anyone to clone, download, and suggest changes in organized way.


#1455
Quote from: Matti on Wed 10/04/2024 15:00:53Wouldn't it be (theoretically) possible to have a textcolor for a specific String instead of a whole label? That way one could add several strings in a row with different colors each.

Label has a single String Text property and it must be able to return everything that was set. If it has to support multiple strings each with its own color, then Label would need to be redone into having an array of Texts, paired with color values, at least.


A more universal way to do this would be to implement an extended type of Label that supports some kind of a display formatting in a string, using tags.
#1456
Quote from: eri0o on Wed 10/04/2024 01:39:49Uhm, just thinking back at this, I know that the Editor loads a GUID for each module pair when editing the script. Is that GUID present in the script object?

No, GUID is purely editor thing and is not a part of the compiled script. The scripts may be identified with their "sectionname" which contains either name of header or script file. This is used when resolving types for RTTI.
#1457
AGS Engine & Editor Releases / Re: AGS 3.6.1
Wed 10/04/2024 02:21:19
Okay, the links got approved, so i can post a patch again now:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-1-patch-1-61538
#1458
AGS 3.6.1 - Patch 1
Full release number: 3.6.1.23


For Editor
Spoiler

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

For Engine/Editor developers
Spoiler


Released: 8th April 2024

Previous stable version: AGS 3.6.0 P11 forum thread


This release is brought to you by:

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



Summary

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

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

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

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



Changes in the Patch 1:

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

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



What is new in 3.6.1

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

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

Scripting:
- Support "#else" preprocessor directive.

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

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

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

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

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

iOS:
- Updated port for 3.6.*.

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

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




Thanks to everyone who contributed to and tested this version!



#1459
Quote from: eri0o on Wed 10/04/2024 00:10:04I am more trying to think from the perspective that the import is in the header, so it gets into all scripts. So I think it would show everywhere. Which could crowd the variable watcher.

I suppose you imply the list that mentions all known variables?
If that's a list that has all variables from all the game, then it will have to include each unique variable only once. This may be achieved by creating a unique key, something like module.variable. If local variables are also included there, then the key would be more complex, including a function and likely a range of lines (i've been speculating on this in one of the previous comments).
If that's a list that only shows variables visible from the current place (a break point), then the variables may be filtered according to their visibility scope. I suppose that may work similar to how autocomplete works, although I haven't thought this through. In my opinion this is a secondary problem, and may be done as an extra task after the general mechanism is implemented.

My primary goal right now is to make possible for user to manually type variable's name into the list, and let Editor & engine resolve that into a value.
#1460
Quote from: eri0o on Tue 09/04/2024 23:34:18If I understood this, what you mean is if you export a variable from one script and import it in other, it would not show up in the global context when debugging that other script.

No, I did not mean that. Why would not it appear if its declaration is visible?

What I was saying is that we cannot know the actual address of a variable at the time of compiling the script, so this part has to be resolved by the engine, not the editor.
SMF spam blocked by CleanTalk