Jibble

There is a new version of the forums ready for testing. Please post here if you're willing to help test! We could also use the help of coders!

Author Topic: AGS 3.6.0 - Beta 9  (Read 10717 times)

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
AGS 3.6.0 - Beta 9
« on: 20 Mar 2022, 20:23 »
AGS 3.6.0 - Beta 9
Full release number: 3.6.0.29

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


For Editor


For Android
Spoiler: ShowHide

NOTE: the Editor now includes Android build component letting you prepare your own games for Android


For Engine/Editor developers


Released: 28rd June 2022

Previous stable version: AGS 3.5.1 P12 forum thread


This release is brought to you by:

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



What is new in 3.6.0

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

This version is currently in Beta stage, which means that all major features are present, but there's still a room for improvement, and of course this all has to be tested more and fixed as necessary.
We are also working on updating the documentation, as quite a few of the 3.6.0 changes will require user's attention and learning new things about Editor and script.

For more information please also see "Upgrading to AGS 3.6" topic in the manual: https://adventuregamestudio.github.io/ags-manual/UpgradeTo36.html


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

Editor:
 - Editor requires .NET Framework 4.6 to run.
 - Added Android build target support (requires "Android component" installed).
 - Added Web/Emscripten build target support (requires "Web build component" installed).
 - Script editor works in unicode mode.
 - Added "Text format" option in General Settings which lets switching between ASCII/ANSI and
   Unicode (UTF-8) modes. This defines which format the game texts will be written in, when saving the game project and compiling the game.
 - Added "Use old-style keyboard handling" option to the General Settings, which lets select between classic key press handling and new one meant for unicode chars support in scripts.
 - Supports compiling UTF-8 translations. TRS file now has "Encoding" setting that tells how to interpret this TRS text.
 - Added support for building multiple speech voxes, by taking files from the Speech subfolders.
 - Added support for adding custom files into the game package. This is done by assigning a list of directories to "Package custom data folder" option in General Settings.
 - Added "Sprite file compression" option in General Settings, replacing "Compress the sprite file" option. The new option allows a selection of compression algorithm used for sprites. Currently supported: None, RLE (old default compression) and LZW.
 - Added "Enable sprite storage optimization" option to the General Settings, that permits the editor to repack sprites in a different storage format, reducing their disk size whenever possible. This option may be used alongside with the sprite compression. Note that this does not change how the sprites work in game.
 - Added "GUI controls clip their contents" option to the General Settings.
 - Added "TTF fonts height used in the game logic" option to the General Settings, that makes your game use real font's pixel height when arranging text and text-based UI elements, as opposed to the nominal font's size.
 - Added "TTF font adjustment" property to Fonts, as well as to General Settings where it serves as a project default for the new fonts. This property lets you choose between "no changes" and backward compatible TTF fixup meant to keep fonts made for AGS displayed as they were meant to.
 - In the "Import TTF" dialog added a choice to import the size closest to the given pixel height.
 - Fonts now have Auto Outline Style and Auto Outline Thickness properties.
 - Fonts now have a readonly Family Name field, that lets user see the original name of a font they've imported (if available).
 - Added IdleDelay property to Characters that lets you set time needed to pass before IdleView is activated. This is equivalent to the Character.SetIdleView script function.
 - Added Character.IdleAnimationDelay property to let setup idle view's animation speed.
 - Added Cursor.AnimationDelay property to let setup cursor's animation speed.
 - Rooms created from a Blank template will now have default background of a game's resolution.
 - When creating new room objects they will now have their script names set to some default value.
 - Added Room.BackgroundAnimationEnabled property to let have disabled animation on room load.
 - Editor will now create an empty spriteset file (acsprset.spr) if one is missing in the game project. Any existing sprite descriptions in the project will be kept, letting user to reimport these from sources.
 - Added "File -> Restore all sprites from sources" menu command.
 - Added "Apply" button on editor's Preferences dialog.
 - Select script editor's font in the editor's Preferences.
 - Added "Help" option to the editor pane's tab context menu.
 - Upgraded script editor to Scintilla 3.21.1 and ScintillaNET 3.6.3.
 - Cursor's position in script is now displayed on the status bar.
 - Dialog scripts now too can open help topics for keywords or script functions under cursor on F1.
 - Added zoom controls for the Sprite Manager. Cursor, Inventory Item and View panes.
 - Sprites may now be imported by drag'n'drop into the Sprite manager.
 - In sprite manager's "export all" dialog added "skip if local" option.
 - In sprite manager's context menu added command "Create source files for all sprites with missing / external sources..."
 - On the View pane the frames having set delay and linked sound will be now indicated with icons.
 - Editor no longer errors on empty translations when compiling the game.
 - Editor now exports values of the string type Custom Properties to translations.
 - Editor no longer prevents exporting string arguments from Get/SetTextProperty calls to TRS file.
 - Editor now cleanups spritefile on game load, identifying any data not referenced by the project
   and marking it for deletion.
 - Fixed editor displaying unhandled exception if the room script which user is trying to open was missing. Instead it will now open a blank script.
 - Fixed room editor was suggesting to save the modified room even if no changes were made.
 - Fixed going to a "find all" result in dialog script did not highlight the found text, and sometimes did not scroll down to it.
 - Fixed few editor panes were not opening correct help topics in F1.

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

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

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

Compatibility:
 - Fallback to loop 0 if the speech view does not have frames in the current directional loop.
 - Set the first loop with frames if current character's loop does not have any for some reason.
 - Ignore character having view/loop with no frames while it's not in the current room.
 - Legacy behavior of MoveCharacterBlocking's return value.
 - Fixed walkable area's continuous scaling was broken for high-res rooms in old games.
 - In pre-3.* games force player to walkable area after changing rooms, this is to emulate an unintentional effect created by the old engines.
 - Fixed pre-3.4.1 anti-aliased TTF fonts display (their vertical position was broken).

Android:
 - Rewrote universal AGS game launcher/player using up-to-date Google guidelines. The former "launcher" is now called "AGS Player".
 - Implemented single game project template meant for building your own signed APK.
 - In AGS Player added "Browse" button to the game folder selection, which opens default system file picker.
 - AGS Player now searches for games recursively, in all the subfolders.

OSX:
 - OpenGL renderer is now supported on MacOS.

Web / Emscripten:
 - Initial port release.

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

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

« Last Edit: 28 Jun 2022, 03:19 by Crimson Wizard »

eri0o

Re: AGS 3.6.0 - Beta 1
« Reply #1 on: 21 Mar 2022, 00:45 »
Yey! We are in beta! Well done! 8-0

Re: AGS 3.6.0 - Beta 1
« Reply #2 on: 21 Mar 2022, 05:57 »
congrats on the beta release!. Nice job !!  ;-D  ;)
My official site: http://www.pershaland.ir/

Stranga

  • Check out my games via my website link!
    • I can help with making music
    • I can help with story design
Re: AGS 3.6.0 - Beta 1
« Reply #3 on: 22 Mar 2022, 00:04 »
Awesome news about the beta! Loving the new AGS features :D

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 1
« Reply #4 on: 22 Mar 2022, 14:03 »
Nice! Dutifully updating.

Re: AGS 3.6.0 - Beta 1
« Reply #5 on: 22 Mar 2022, 14:32 »
Amazing work! So many wonderful features here!!!
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

Stranga

  • Check out my games via my website link!
    • I can help with making music
    • I can help with story design
Re: AGS 3.6.0 - Beta 1
« Reply #6 on: 22 Mar 2022, 23:04 »
Having a strange problem since updating to the new beta, I think it may have something to do with the new keyboard handling system. I reverted back to the old via General settings but still doesn't seem to fix the problem.

My keyboard movement script is entirely done in repeatedly_execute(), which previously never interfered with hotspot.runinteraction, strangely if you hold down a movement key while interacting with a hotspot after the interaction completes the player is jolted in the direction of the key being held across the room. Seems to only happen if the game has entered a blocking sequence of some sort, maybe remembering key inputs during the hotspot interactions and playing them right after.

Keyboard Movement Script:
Spoiler: ShowHide
Code: Adventure Game Studio
  1. // Main script for module '8 Direction Movement'
  2.  
  3. import int  KeyUp[2];
  4. import int  KeyDown[2];
  5. import int  KeyLeft[2];
  6. import int  KeyRight[2];
  7. import int  KeyAction[2];
  8. import int  KeyBack;
  9. import int  KeyMenu;
  10. import int  KeySprint[2];
  11.  
  12.  
  13. //required values
  14.  
  15. int xm;
  16. int ym;
  17. int _xspeed=9; //Player Speed
  18. int _yspeed=9; //Player Speed
  19. int xwidth=1;
  20. int ywidth=1;
  21. int slide=3;
  22. int a;
  23. int c;
  24. int dir;
  25. bool diagslowdown=true;
  26. int walkanispeed=2;
  27. bool thrust;
  28. int walkingani=2;
  29. bool disablemove;
  30. bool nodirset;
  31. bool eightdir = false;
  32. int animticks;
  33. int animticks2;
  34. bool standing;
  35.  
  36. static function EightDir::SetSpeed(int x, int y) {
  37.   _xspeed = x;
  38.   _yspeed = y;
  39. }
  40.  
  41. static function EightDir::SetSize(int x, int y) {
  42.   xwidth = x;
  43.   ywidth = y;
  44. }
  45.  
  46. static function EightDir::WalkViewSpeed(int speed) {
  47.   walkanispeed = speed;
  48. }  
  49.  
  50.   static function EightDir::SetWalkView(int view) {
  51.   walkingani = view;
  52. }  
  53.  
  54. static function EightDir::SetSlide(int value) {
  55.   slide = value;
  56. }  
  57.  
  58. static function EightDir::Disable(bool value) {
  59.   disablemove = value;
  60. }  
  61.  
  62. static function EightDir::NoDirSet(bool value) {
  63.   nodirset = value;
  64. }  
  65.  
  66. static function EightDir::DiagSlow(bool value) {
  67.   diagslowdown = value;
  68. }  
  69.  
  70. static function EightDir::Thrust(int x, int y) {
  71.   xm=x;
  72.   ym=y;  
  73.   thrust=true;
  74. }  
  75.  
  76. static function EightDir::EightLoopsMode(bool value) {
  77.   eightdir = value;
  78. }
  79.  
  80. static function EightDir::IsMoving() {
  81.   if ((xm!=0)||(ym!=0)) {return 1;}
  82.   if ((xm==0)&&(ym==0)) {return 0;}
  83. }
  84.  
  85. static function EightDir::IsThrusting() {
  86.   return thrust;
  87. }
  88.  
  89. bool isInactive() {
  90.   if(player.Room == 0) return true;
  91.   return false;
  92. }
  93.  
  94. int moveto(int val, int incr, int target)
  95. {
  96.   bool lt = val<target;
  97.   bool gt = val>target;
  98.   int old = val;
  99.   if(lt) val += incr;
  100.   else if(gt) val -= incr;
  101.         if(((old<=target && val>=target) || (old>=target && val<=target)))
  102.                 val = target;
  103.   return val;
  104. }
  105.  
  106. #sectionstart repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE
  107. function repeatedly_execute()
  108. {
  109. if (!InDialogue)// <-----This was a test to see if I could use a global variable to stop being able to move/take inputs in whilst in an interaction...didn't work as well as I'd hoped
  110. {
  111. int wasdir = dir;
  112. int wasx = player.x;
  113. int wasy = player.y;
  114.  
  115.  
  116.   if(isInactive()) return;
  117.  
  118.   bool up=false;
  119.   bool down=false;
  120.   bool left=false;
  121.   bool right=false;
  122.  
  123.  
  124.   if ((IsInterfaceEnabled()==true)&&(IsGamePaused()==false))
  125.   {
  126.  
  127.   if (IsKeyPressed(KeyRight[0])||IsKeyPressed(KeyRight[1]))
  128.   {
  129.     right=true;
  130.   }
  131.   else if (IsKeyPressed(KeyLeft[0])||IsKeyPressed(KeyLeft[1]))
  132.   {
  133.     left = true;
  134.   }
  135.   else if (IsKeyPressed(KeyUp[0])||IsKeyPressed(KeyUp[1]))
  136.   {
  137.     up = true;
  138.   }  
  139.   else if (IsKeyPressed(KeyDown[0])||IsKeyPressed(KeyDown[1]))
  140.   {
  141.     down = true;
  142.   }  
  143.   else
  144.   {
  145.     walkanispeed=1;
  146.     return;
  147.   }
  148.   }
  149.  
  150.   if(!up && !down && !left && !right)
  151.   {
  152.     return;
  153.     player.StopMoving();
  154.   }
  155.  
  156.   if ((IsInterfaceEnabled()==false)||(disablemove==true)) {xm=0;ym=0;}
  157.  
  158.   bool speedup = false;
  159.  
  160.   if(IsKeyPressed(KeySprint[0])||IsKeyPressed(KeySprint[1])) speedup = true;
  161.  
  162.  
  163.  
  164.   int xspeed = _xspeed;
  165.   int yspeed = _yspeed;
  166.  
  167.    if(speedup)//RUN_________________________________RUN
  168.   {
  169.     if (player.View!=68)
  170.     {
  171.       player.LockView(68);
  172.     }
  173.     walkanispeed=4;
  174.     xspeed = 15;
  175.     yspeed = 15;
  176.   }
  177.   else
  178.   {
  179.    if (player.View!=2)
  180.    {
  181.      player.LockView(2);
  182.    }
  183.    walkanispeed=2;
  184.   }
  185.  
  186.   int accel = 20;
  187.  
  188.   if ((player.Moving==false)&&(IsInterfaceEnabled()==true)&&(IsGamePaused()==false)&&(disablemove==false)) {
  189.  
  190.     int b=0;
  191.    
  192.     if ((xm==0) && (ym==0)) {thrust=false;}
  193.  
  194.  
  195.     //moving values
  196.  
  197.       while (b<slide){
  198.  
  199.         if (thrust==false){
  200.          
  201.           if ((right==true) && (xm < xspeed))  {xm=moveto(xm,accel, xspeed);}   //right
  202.           if ((left==true) && (xm > xspeed*(-1)))  {xm=moveto(xm, accel, -xspeed);}   //left
  203.  
  204.           if ((down==true) && (ym < yspeed))  {ym=moveto(ym, accel, yspeed);}   //down
  205.           if ((up==true) && (ym > yspeed*(-1)))  {ym=moveto(ym, accel, -yspeed);}   //up
  206.  
  207.           if ((left==false) && (right==false)) xm = moveto(xm,accel, 0);
  208.           if ((up==false) && (down==false)) ym = moveto(ym,accel,  0);
  209.        
  210.         }  
  211.  
  212.       if (thrust==true) {
  213.        
  214.         if (xm != 0){xm=moveto(xm, accel, 0);}
  215.         if (ym != 0){ym=moveto(ym, accel, 0);}
  216.       }
  217.  
  218.     //slowdown
  219.  
  220.     if (thrust==false){
  221.       if (xm > xspeed){xm=moveto(xm, accel,  xspeed);}
  222.       if (xm < xspeed*(-1)){xm=moveto(xm, accel, -xspeed);}
  223.       if (ym > yspeed){ym=moveto(ym, accel, yspeed);}
  224.       if (ym < yspeed*(-1)){ym=moveto(ym, accel,  -yspeed);}
  225.     }
  226.  
  227.   b=b+1;
  228.   }
  229.  
  230.   //diagslowdown
  231.  
  232.   if (diagslowdown==true){
  233.  
  234.     int slow=0;
  235.     while (slow <slide+1){
  236.  
  237.      if ((right==true)&&(down==true)) {
  238.        if (xm>(xspeed*70)/100) {xm=(xm*70)/100;}
  239.        if (ym>(yspeed*70)/100) {ym=(ym*70)/100;}
  240.      }
  241.  
  242.      if ((left==true)&&(down==true)) {
  243.        if (xm<((xspeed*70)/100)*(-1)) {xm=((xspeed*70)/100)*(-1);}
  244.        if (ym>(yspeed*70)/100) {ym=(ym*70)/100;}
  245.      }
  246.  
  247.      if ((left==true)&&(up==true)) {
  248.        if (xm<((xspeed*70)/100)*(-1)) {xm=((xspeed*70)/100)*(-1);}
  249.        if (ym<((yspeed*70)/100)*(-1)) {ym=((yspeed*70)/100)*(-1);}
  250.      }
  251.  
  252.      if ((right==true)&&(up==true)) {
  253.        if (xm>(xspeed*70)/100) {xm=(xm*70)/100;}
  254.        if (ym<((yspeed*70)/100)*(-1)) {ym=((yspeed*70)/100)*(-1);}
  255.      }
  256.    slow=slow+1;
  257.    }
  258.   }
  259.  
  260.   //right
  261.  
  262.   int loop=0;
  263.  
  264.   if (xm>0){
  265.  
  266.     while (loop <xm) {
  267.       a=a+1;
  268.       if (a>9) {a=0;}
  269.       if (a==5){
  270.         player.x = player.x +xwidth;
  271.         if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())>0) {player.x=player.x +1;}
  272.         player.x = player.x -xwidth;
  273.       }
  274.     loop=loop+1;
  275.     }
  276.   }
  277.  
  278.  
  279.   //left
  280.  
  281.   loop=0;
  282.  
  283.   if (xm<0){
  284.  
  285.     while (loop > xm) {
  286.       a=a+1;
  287.       if (a>9) {a=0;}
  288.       if (a==5){
  289.         player.x = player.x -xwidth;
  290.         if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())>0) {player.x=player.x -1;}
  291.         player.x = player.x +xwidth;
  292.       }
  293.     loop=loop-1;
  294.    }
  295.   }
  296.  
  297.  
  298.   //down
  299.  
  300.   loop=0;
  301.  
  302.   if (ym>0){
  303.  
  304.     while (loop <ym) {
  305.       c=c+1;
  306.       if (c>9) {c=0;}
  307.       if (c==5){
  308.         player.y = player.y +ywidth;
  309.         if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())>0) {player.y=player.y +1;}
  310.         player.y = player.y -ywidth;
  311.       }
  312.     loop=loop+1;
  313.     }
  314.   }
  315.  
  316.  
  317.   //up
  318.  
  319.   loop=0;
  320.  
  321.   if (ym<0){
  322.     while (loop >ym) {
  323.       c=c+1;
  324.       if (c>9) {c=0;}
  325.       if (c==5){
  326.         player.y = player.y -ywidth;
  327.         if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())>0) {player.y=player.y -1;}
  328.         player.y = player.y +ywidth;
  329.       }
  330.     loop=loop-1;
  331.     }
  332.   }
  333.  
  334.  
  335.   //outpush
  336.  
  337.   player.x = player.x -xwidth;
  338.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x +1;}
  339.   player.x = player.x +xwidth;
  340.  
  341.   player.x = player.x +xwidth;
  342.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x -1;}
  343.   player.x = player.x -xwidth;
  344.  
  345.   player.y = player.y -ywidth;
  346.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y +1;}
  347.   player.y = player.y +ywidth;
  348.  
  349.   player.y = player.y +ywidth;
  350.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y -1;}
  351.   player.y = player.y -ywidth;
  352.  
  353.   //outpush #2
  354.  
  355.   player.y = player.y -ywidth;
  356.  
  357.   player.x = player.x -xwidth;
  358.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x +1;}
  359.   player.x = player.x +xwidth;
  360.  
  361.   player.y = player.y +ywidth;
  362.   player.y = player.y +ywidth;
  363.  
  364.   player.x = player.x -xwidth;
  365.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x +1;}
  366.   player.x = player.x +xwidth;
  367.  
  368.   player.y = player.y -ywidth;
  369.  
  370.  
  371.  
  372.   player.y = player.y -ywidth;
  373.  
  374.   player.x = player.x +xwidth;
  375.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x -1;}
  376.   player.x = player.x -xwidth;
  377.  
  378.   player.y = player.y +ywidth;
  379.  
  380.   player.y = player.y +ywidth;
  381.  
  382.   player.x = player.x +xwidth;
  383.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.x=player.x -1;}
  384.   player.x = player.x -xwidth;
  385.  
  386.   player.y = player.y -ywidth;
  387.  
  388.  
  389.  
  390.   player.x = player.x +xwidth;
  391.  
  392.   player.y = player.y -ywidth;
  393.   if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y +1;}
  394.   player.y = player.y +ywidth;
  395.  
  396.   player.x = player.x -xwidth;
  397.  
  398.  
  399.  
  400.   player.x = player.x -xwidth;
  401.  
  402.   player.y = player.y -ywidth;
  403.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y +1;}
  404.   player.y = player.y +ywidth;
  405.  
  406.   player.x = player.x +xwidth;
  407.  
  408.  
  409.  
  410.   player.x = player.x -xwidth;
  411.  
  412.   player.y = player.y +ywidth;
  413.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y -1;}
  414.   player.y = player.y -ywidth;
  415.  
  416.   player.x = player.x +xwidth;
  417.  
  418.  
  419.  
  420.   player.x = player.x +xwidth;
  421.  
  422.   player.y = player.y +ywidth;
  423.     if (GetWalkableAreaAt(player.x - GetViewportX(),player.y - GetViewportY())==0) {player.y=player.y -1;}
  424.   player.y = player.y -ywidth;
  425.  
  426.   player.x = player.x -xwidth;
  427.  
  428.  
  429.   //animations
  430.  
  431.   //set direction
  432.  
  433.   if (eightdir==false){
  434.  
  435.     if ((left==true)||(right==true)||(up==true)||(down==true)){
  436.  
  437.       if (thrust==false){
  438.  
  439.         if (ym>0) {if ((left==false)&&(right==false))  {dir=0;}}
  440.         if (xm<0) {if ((up==false)&&(down==false))  {dir=1;}}
  441.         if (xm>0) {if ((up==false)&&(down==false))  {dir=2;}}
  442.         if (ym<0) {if ((left==false)&&(right==false))  {dir=3;}}
  443.  
  444.         if ((ym>0) && (player.Loop==3))  {dir=0;}
  445.         if ((ym<0) && (player.Loop==0))  {dir=3;}
  446.         if ((xm>0) && (player.Loop==1))  {dir=2;}
  447.         if ((xm<0) && (player.Loop==2))  {dir=1;}
  448.       }
  449.     }
  450.   }
  451.  
  452.  
  453.   if (eightdir==true){
  454.  
  455.     if ((left==true)||(right==true)||(up==true)||(down==true)){
  456.  
  457.       if (thrust==false) {
  458.    
  459.         if ((xm>0)&&(ym==0)) {dir=2;}
  460.         if ((xm<0)&&(ym==0)) {dir=1;}
  461.         if ((xm==0)&&(ym>0)) {dir=0;}
  462.         if ((xm==0)&&(ym<0)) {dir=3;}
  463.  
  464.         if ((xm>0)&&(ym>0)) {dir=4;}
  465.         if ((xm<0)&&(ym>0)) {dir=6;}
  466.         if ((xm<0)&&(ym<0)) {dir=7;}
  467.         if ((xm>0)&&(ym<0)) {dir=5;}
  468.       }
  469.     }
  470.   }
  471. }
  472.  
  473.   bool any = (left==true)||(right==true)||(up==true)||(down==true);
  474.  
  475.         if(any)
  476.   {
  477.     if(dir != wasdir || player.Loop != dir || standing)
  478.     {
  479.       player.Loop = dir;
  480.                        
  481.                         //only reset this if we were standing previously
  482.                         if(standing)           
  483.                         {
  484.                                 //NOT 0 -- start nudging forward rather than slide in walk frame
  485.                                 player.Frame = 1;
  486.                         }
  487.     }
  488.     else
  489.     {
  490.       animticks++;
  491.       if(animticks>=walkanispeed)
  492.       {
  493.         animticks=0;  
  494.         animticks2++;
  495.        
  496.         int limit = 2;
  497.         if(speedup) limit=1;
  498.                  
  499.         ViewFrame* tmp = Game.GetViewFrame(player.View, player.Loop,  player.Frame);
  500.        
  501.         if(animticks2 > limit)
  502.         {
  503.           animticks2 = 0;
  504.           player.Frame = player.Frame+1;
  505.           if(tmp.LinkedAudio != null)
  506.           {
  507.             tmp.LinkedAudio.Play();
  508.             if(player.Frame >= Game.GetFrameCountForLoop(player.View,  player.Loop))
  509.               player.Frame = 1;
  510.           }
  511.         }
  512.       }
  513.     }
  514.   }
  515.   else
  516.   {
  517.     player.Frame = 0;
  518.                 standing = true;
  519.                 animticks = 0;
  520.                 animticks2 = 0;                
  521.                 return;
  522.   }
  523.   if(any) standing = false;
  524.  
  525.   if (player.Moving==true) {dir=player.Loop;}
  526.  
  527.   if (nodirset>0) {dir=player.Loop;}
  528.  
  529.   if (IsInterfaceEnabled()==false) {dir=player.Loop;}
  530.  
  531.   //LogMessage(String.Format("%d, yspeed=%d",player.y, yspeed));
  532. }
  533. else
  534. {
  535.   return;
  536. }
  537. }
  538. #sectionend repeatedly_execute  // DO NOT EDIT OR REMOVE THIS LINE
  539.  
  540.  

Interaction Script:
Spoiler: ShowHide
Code: Adventure Game Studio
  1. //----------------------------------------------------------------------------------------------------
  2. // on_key_press
  3. //----------------------------------------------------------------------------------------------------
  4. import int  KeyUp[2];
  5. import int  KeyDown[2];
  6. import int  KeyLeft[2];
  7. import int  KeyRight[2];
  8. import int  KeyAction[2];
  9. import int  KeyBack;
  10. import int  KeyMenu;
  11. import int  KeySprint[2];
  12. import int KeyInventory[2];
  13.  
  14. function on_key_press(eKeyCode keycode)
  15. {  
  16.  
  17.  if (IsGamePaused()) keycode = 0;
  18.  
  19.     // Action Key--------------------------------------------------------------------------------------------------------------
  20.     if (keycode == KeyAction[0] || keycode == KeyAction[1])
  21.     {
  22.       int px = player.x - GetViewportX(),py = player.y - GetViewportY();
  23.       Hotspot*h = Hotspot.GetAtScreenXY(px, py);
  24.       Object*o = Object.GetAtScreenXY(px, py);
  25.       if (h.ID > 0 ) {
  26.         if (player.ActiveInventory != null)
  27.         {
  28.           player.StopMoving();//These may be redundant
  29.           h.RunInteraction(eModeUseinv);
  30.         }
  31.         else
  32.         {
  33.           player.StopMoving();//These may be redundant
  34.           h.RunInteraction(eModeInteract);
  35.         }
  36.       }
  37.     }
  38. }
  39.  
« Last Edit: 22 Mar 2022, 23:07 by Stranga »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 1
« Reply #7 on: 22 Mar 2022, 23:34 »
if you hold down a movement key while interacting with a hotspot after the interaction completes the player is jolted in the direction of the key being held across the room. Seems to only happen if the game has entered a blocking sequence of some sort, maybe remembering key inputs during the hotspot interactions and playing them right after.

If it were in on_key_press, i would assume that maybe it does not process and clear the key buffer each frame during a blocking action.
But since the action keys are processed in rep-exec, i'm not certain. I will have to do some tests.
« Last Edit: 22 Mar 2022, 23:37 by Crimson Wizard »

Stranga

  • Check out my games via my website link!
    • I can help with making music
    • I can help with story design
Re: AGS 3.6.0 - Beta 1
« Reply #8 on: 23 Mar 2022, 00:09 »
Well, strangely I did convert the system to on_keypress and didn't seem to find that issue (besides the very jittery/slow/clunky movement of the player character). If I could convert it to run as smoothly as on repeat_exe I would to be honest but this still may cause other problems down the line, possibly for others. I did also notice that it halted an animation after moving to another room  and partly froze the game too whilst doing the same thing (Holding ANY keys down during interactions or cutscenes e.c.t)

Re: AGS 3.6.0 - Beta 1
« Reply #9 on: 23 Mar 2022, 17:01 »
Great to see a beta out - with all the new features, this was enough to push me over the edge into upgrading my project!

I'm seeing an autocomplete bug with this version, but since I did not use any earlier versions of 3.6.0 I can't say where/when it might have emerged.

Behaviour:
Autocomplete does not continue working past the first word in a variable under ... unknown conditions.
Example:
Code: Adventure Game Studio
  1. /// reactor pressure and temp constraints
  2. float ReactorMaxPressure = 1000.0; // a made-up number in kpa
  3. float ReactorMinPressure = 1.0;
  4. float ReactorMaxTemp = 1500.0; // a made-up number in *C
  5. float ReactorMinTemp = 1.0; // in *C
  6. float AmbientTemperature = 25.0; // SATP in *C
  7. float AmbientPressure = 100.0; // SATP in kPa
  8.  

Code: Adventure Game Studio
  1. function PlantSystemsToggleSysOps()
  2. {
  3.   Reactor...
  4. }
  5.  

When "Reactor" is entered, the autocomplete dropdown box correctly pops up and preselects ReactorMaxPressure. However, if I continue typing the variable name, "ReactorM..." the autocomplete box deselects ReactorMaxPressure and will not autocomplete with any variable name when I hit tab.

Workaround:
Code: Adventure Game Studio
  1. function PlantSystemsToggleSysOps()
  2. {
  3.     int anyTempVariable;
  4.     Reactor...
  5. }
  6.  

With the above code, the simple insertion of any new variable causes the autocomplete to work as expected for "ReactorM..." words.

Possible Cause (?):
I tested this behaviour throughout my script, and determined that this function definition causes autocomplete to fail:
Code: Adventure Game Studio
  1. int NormalizeFlowRateWithinRange(int flowRate)
  2. {
  3.   for (int i = 0; i < MAX_ANIM_SPEED_GROUPS; i++)
  4.   {
  5.     if (flowRate <= animationSpeedRanges[i])
  6.       return animationSpeedRanges[i];
  7.   }
  8. }
  9.  

In *any* function below that piece of code, autocomplete will no longer properly autocomplete the word "ReactorM". Any function above this function autocompletes properly. I cannot see anything obvious about the above function that would cause a problem with autocomplete. Even commenting-out the entire function does not help.

Let me know if I can provide any more detail. It's a strange bug.

eri0o

Re: AGS 3.6.0 - Beta 1
« Reply #10 on: 24 Mar 2022, 00:39 »
@Stranga
Spoiler: ShowHide

this Keyboard Movement code is around 20 lines of code at least different from the one in Ash Pines. Is anything different there?

I just got


Is this line EXACTLY:
Code: Adventure Game Studio
  1. ViewFrame* tmp = Game.GetViewFrame(player.View, player.Loop,  player.Frame);
Because if it is, this another bug, with I thought we had fixed...
https://github.com/adventuregamestudio/ags/issues/802


So I can reproduce Stranga's reported problem on the engine built for release but when I try to run it on a debugger I keep hitting the bug above under the spoiler. I can't figure any minimal test case that reproduces the error though, everything appears to work.

On Ash Pines what I get is the engine is running and I can see keypresses on the log, but since I can't attach the debugger I don't know if the IsKeyPressed is getting the correct result or not - the character doesn't move anymore. I unfortunately am too much in the dark to even be able to write a bug report.

Stranga

  • Check out my games via my website link!
    • I can help with making music
    • I can help with story design
Re: AGS 3.6.0 - Beta 1
« Reply #11 on: 24 Mar 2022, 00:47 »
@eri0o
Quote
this Keyboard Movement code is around 20 lines of code at least different from the one in Ash Pines. Is anything different there?

Yes, there's a small difference and it has to do with the number of views in that game. In Ash Pines, the player only has a left and right view rather than my latest/previous games where they have up, down, left, and right views.

Would you like to try a current demo game with your debugger? I can send you a build if you like?

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 1
« Reply #12 on: 24 Mar 2022, 03:24 »
When testing under debugger it may be a good idea to enable "Multitasking mode" either using script command or config setting. Without "miltitasking" mode the input buffers are cleared on switching in and out of the game window, which also happens when breakpoint is hit.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 1
« Reply #13 on: 25 Mar 2022, 22:10 »
Is this line EXACTLY:
Code: Adventure Game Studio
  1. ViewFrame* tmp = Game.GetViewFrame(player.View, player.Loop,  player.Frame);
Because if it is, this another bug, with I thought we had fixed...
https://github.com/adventuregamestudio/ags/issues/802


This is happening as a combination of 2 reasons.
1) Engine allows to set Character's Frame directly without checking for validity, not even a warning. This is a surprise to me.

2) The game script has a mistake:
Code: Adventure Game Studio
  1.           player.Frame = player.Frame+1;
  2.           if(tmp.LinkedAudio != null)
  3.           {
  4.             tmp.LinkedAudio.Play();
  5.             if(player.Frame >= Game.GetFrameCountForLoop(player.View,  player.Loop))
  6.               player.Frame = 1;
  7.           }
  8.  
if you notice, the player's frame range is only tested if linked audio is not null. Normally it should be checked always, outside of the LinkedAudio "if".

3) The question remaining is, why does this error happen only when the key was held down during blocking action, and not all the time.


UPDATE After fixing the above script error I was able to reproduce the problem Stranga was talking about: if i hold down a movement key during the blocking action, the character jumps across the screen after blocking action is over.

Code: Adventure Game Studio
  1.           player.Frame = player.Frame+1;
  2.           if(tmp.LinkedAudio != null)
  3.           {
  4.             tmp.LinkedAudio.Play();
  5.           }
  6.           if(player.Frame >= Game.GetFrameCountForLoop(player.View,  player.Loop))
  7.               player.Frame = 1;
  8.  
« Last Edit: 25 Mar 2022, 22:17 by Crimson Wizard »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 1
« Reply #14 on: 26 Mar 2022, 00:09 »
So, in regards to jumping after blocking action. After some debugging, it's confirmed that there are a lot of repeatedly_execute events get queued and then called at once as soon as blocking action ends. Basically, instead of 1 rep-exec, there's like 20 rep-execs called in a quick succession.

This may be related to some recent changes in the engine, because previously AGS did not let schedule more than 5 events at once and would simply quit the game with "internal error" if this happens. Removal of event queue limit is not a problem itself, but it seem to hide some other problem where it would keep accumulate rep-exec events when it really should not.

UPDATE:

This is the temp build with fix: https://cirrus-ci.com/task/6054112394477568
« Last Edit: 26 Mar 2022, 01:23 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 1
« Reply #15 on: 26 Mar 2022, 19:04 »
Thanks for putting this beta together!  I'm very excited to try it out, and I just updated from 3.5.1.14 to the build in the previous comment.

I've noticed a couple strange things with object animations:

1. When I play an object's animation as eRepeat, it plays once and then stops.

2. When I play an object's animation backwards, it plays the first few frames of the animation (i.e. the last few frames of the loop) backwards and then starts playing in forward motion again.  This occurs whether or not I explicitly specify the starting frame.

Code: Adventure Game Studio
  1. // context: loop 0 of view my_view has 12 frames
  2. // this appears to play frame id 11, then 10, then 9, then 10, then 11
  3. oObject.SetView(my_view, 0);
  4. oObject.Animate(0, 5, eOnce, eBlock, eBackwards);
  5.  
  6. // and this does the same thing
  7. oObject.SetView(my_view, 0, 11);
  8. oObject.Animate(0, 5, eOnce, eBlock, eBackwards, 11);
  9.  

Also, I noticed that the numerical values of internal enums (eBlock, eNoBlock, eForwards, eBackwards) have changed from AGS 3.5.1.  For example, instead of 0/1, eForwards and eBackwards are 1062/1063.  I'm assuming that's intended?
« Last Edit: 26 Mar 2022, 19:24 by greg »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 1
« Reply #16 on: 26 Mar 2022, 20:00 »
@greg, sorry for that! I've been adding something to animation commands, which will be announced for the next update, and there was one small mistake...

Here's a link to another fixed build (it will be available roughly 20 mins after posting):
https://cirrus-ci.com/task/6209775263285248

Quote
Also, I noticed that the numerical values of internal enums (eBlock, eNoBlock, eForwards, eBackwards) have changed from AGS 3.5.1.  For example, instead of 0/1, eForwards and eBackwards are 1062/1063.  I'm assuming that's intended?

These constants did not change at least since 3.2.1 (this is as far as we can look back into the code history), but I know that Animate functions also must accept 1 and 0 (or true and false) for Direction and Blocking parameters.
« Last Edit: 26 Mar 2022, 20:02 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 1
« Reply #17 on: 26 Mar 2022, 20:21 »
Thank you very much, CW!  That build fixed both object animation issues I had encountered.

Separately, I noticed that ch.PositionMs is now returning how long AudioChannel ch has been playing, not the position of the audio clip that's playing on ch.

Here's my test for this:

Code: Adventure Game Studio
  1. AudioChannel* ch = aMusTest.Play(eAudioPriorityHigh);
  2. // Msg("foo") is a simple function which prints "foo" to the screen.
  3. Msg(String.Format("%d", ch.PositionMs));  // This prints 0, as expected.
  4. // My gamespeed is 40, so each Wait(80) is roughly two seconds.
  5. Wait(80);
  6. Msg(String.Format("%d", ch.PositionMs));  // This prints ~2000, as expected
  7. Wait(80);
  8. ch.Seek(79500);
  9. Msg(String.Format("%d", ch.PositionMs));  // This prints ~4000, where I'd expect ~79500.
  10. Wait(80);
  11. Msg(String.Format("%d", ch.PositionMs));  // This prints ~6000, where I'd expect ~81500.
« Last Edit: 26 Mar 2022, 20:45 by greg »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 1
« Reply #18 on: 26 Mar 2022, 22:07 »
@greg, thank you for reporting; i now fixed couple of mistakes in both Seek and position reporting after seek. Besides wrong position report it also played one buffered chunk of previous position after Seek.

Here's goes another build:
https://cirrus-ci.com/task/6670891743444992

Re: AGS 3.6.0 - Beta 1
« Reply #19 on: 27 Mar 2022, 20:43 »
Thanks so much, CW!  That fixed the issues I was experiencing with GetPositionMs.

As I was testing further, I also noticed the following:

1. For audio clips of type MP3 and length < ~1.5 seconds, aClip.Play() plays the first 0.15-0.40 seconds of the sound and then stops.  In AGS 3.5.1, this occurred for MP3s under ~0.5 seconds, and my workaround was to convert to OGG.  In AGS 3.6, I'm observing it for MP3s up to 1.5 seconds.  This doesn't appear to affect MP3s over 2.5 seconds or OGGs.

2. The editor no longer automatically highlights matching braces as I type.  Instead, after typing the brace, I need to press Ctrl+B to highlight the corresponding brace.  Is that intended?

3. For the masks toggled by the Debug(2, n), is there a way to adjust their size (e.g. to make them full screen)?  I tried adjusting General Settings > Rooms > Default mask resolution, but it had no effect.
« Last Edit: 27 Mar 2022, 21:05 by greg »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 1
« Reply #20 on: 27 Mar 2022, 21:22 »
3. For the masks toggled by the Debug(2, n), is there a way to adjust their size (e.g. to make them full screen)?

I cannot guess what does this mean, are they not overlaying correctly? Could you post a screenshot?

I tried adjusting General Settings > Rooms > Default mask resolution, but it had no effect.

This setting means the mask's granularity relative to the room background, i.e. 1:1, 1:2 etc, the larger the second value is the less precise the mask is.
This affects every interaction with the mask: hotspot clicks, pathfinding on walkable area, and so on.
« Last Edit: 27 Mar 2022, 21:31 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 1
« Reply #21 on: 27 Mar 2022, 22:10 »
Quote
3. For the masks toggled by the Debug(2, n), is there a way to adjust their size (e.g. to make them full screen)?

I cannot guess what does this mean, are they not overlaying correctly? Could you post a screenshot?

Sure, here's a screenshot: https://drive.google.com/file/d/1HK2B1U6ct4WUo2w1x2lAr-zaZBPLsxga/view?usp=sharing

The mask is in the top-left quarter of the screen.  I'm trying to make it full-screen, as in 3.5.1.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 1
« Reply #22 on: 27 Mar 2022, 22:34 »
Sure, here's a screenshot: https://drive.google.com/file/d/1HK2B1U6ct4WUo2w1x2lAr-zaZBPLsxga/view?usp=sharing

The mask is in the top-left quarter of the screen.  I'm trying to make it full-screen, as in 3.5.1.

I'm thinking that this error happens if mask resolution in the room is 1:2, half of the background size, and engine forgets to scale the debug image to the room's size.
« Last Edit: 27 Mar 2022, 22:45 by Crimson Wizard »

Stranga

  • Check out my games via my website link!
    • I can help with making music
    • I can help with story design
Re: AGS 3.6.0 - Beta 1
« Reply #23 on: 27 Mar 2022, 23:53 »
Thanks, @CrimsonWizard for the fix and for finding that script mistake too, all fixed and working perfectly!

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 1
« Reply #24 on: 28 Mar 2022, 02:54 »
@greg, I think i fixed the debug overlay here:
https://cirrus-ci.com/task/4631982184333312

Re: AGS 3.6.0 - Beta 1
« Reply #25 on: 28 Mar 2022, 03:23 »
Quote
@greg, I think i fixed the debug overlay here:

Yep, that fixed the debug overlay issue. Thank you!

Hobbes

  • Swashbuckler
AGS 3.6.0 - Beta 1
« Reply #26 on: 31 Mar 2022, 15:29 »
Woohoo! Updated just now. Thank you so much for this! I've been quietly updating from every 3.6.0 alpha version and great to see we're in beta. My game's working & compiling great! (Mac M1 native even, very excited!)

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 2
« Reply #27 on: 01 Apr 2022, 00:23 »
Updated to Beta 2
(use download links in the first post)

Editor:
 - Fixed saving of 16-bit sprites with "Sprite storage optimization" enabled.

Script API:
 - Extended Button.Animate() to have blocking style, direction and starting frame parameters.

So now it is
Code: Adventure Game Studio
  1. Button.Animate(int view, int loop, int delay, RepeatStyle=eOnce, BlockingStyle=eNoBlock, Direction=eForwards, int frame=0);
Note that the default value for BlockingStyle is eNoBlock, unlike for characters and objects, because historically button animations were nonblocking.

Engine:
 - In the new key input mode, only key state is only updated once a game frame. This prevents situations when, for example, calling IsKeyPressed during one script callback may return different results without explicit engine updates (Wait calls) in between.
As one of the consequences, this means that the following code will no longer work:
Code: Adventure Game Studio
  1. while (!IsKeyPressed(eKeySpace)) { }
  2.  
And must be:
Code: Adventure Game Studio
  1. while (!IsKeyPressed(eKeySpace)) { Wait(1); }
  2.  

 - 24-bit wav PCM support, comes with the new sound library.
 - Fixed repeatedly execute callback was called numerous times in one frame right after any blocking action.
 - Fixed some mp3 sounds were not playing a bit of sound in the end.
 - Fixed AudioChannel.Position return value was incorrect right after successful Seek.
 - Fixed 1 extra chunk of sound from the old position could be played after Seek.
 - Fixed room debug overlays were not scaled properly if room masks resolution is other than 1:1.
 - Fixed missing log group letter id for "script" ('s') used in config and command line.
« Last Edit: 01 Apr 2022, 00:27 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 2
« Reply #28 on: 01 Apr 2022, 20:21 »
Excellent news. Thanks CW, eri0o and team!

Pajama Sam

  • Sam's The name
Re: AGS 3.6.0 - Beta 2
« Reply #29 on: 09 Apr 2022, 06:27 »
Is the number of objects per room increased in this version?

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 2
« Reply #30 on: 09 Apr 2022, 14:42 »
Is the number of objects per room increased in this version?

No, I would have noted that in the changes.

Maybe i could look into increasing it while this version is still in beta; but right now I'm busy on some perfomance improvements, so maybe later...
« Last Edit: 09 Apr 2022, 15:04 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 2
« Reply #31 on: 11 Apr 2022, 17:04 »
Found a new bug in 3.6.0b2 - labels no longer "pass through" clicks to GUI elements below (lower z-order), even though their "Enabled" and "Clickable" properties are set to false (you also get the same behaviour when Enabled is true). Demo project here. Drag away the label from the button to make the button function again. Drag label back over top of button to block clicks.
« Last Edit: 11 Apr 2022, 17:06 by vga256 »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 2
« Reply #32 on: 11 Apr 2022, 18:37 »
Found a new bug in 3.6.0b2 - labels no longer "pass through" clicks to GUI elements below (lower z-order), even though their "Enabled" and "Clickable" properties are set to false (you also get the same behaviour when Enabled is true).

Fixed, should be available as this temp build here (when it finishes building):
https://cirrus-ci.com/task/5006924272893952

Re: AGS 3.6.0 - Beta 2
« Reply #33 on: 11 Apr 2022, 19:26 »
Works great. Thanks for the quick fix CW.

Re: AGS 3.6.0 - Beta 2
« Reply #34 on: 15 Apr 2022, 17:11 »
Hi, I did test it works fine. Maybe you should add the mirror function under the hotspot options and the region sound property or options. Would do great. Thanks guys.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 2
« Reply #35 on: 15 Apr 2022, 17:23 »
Maybe you should add the mirror function under the hotspot options and the region sound property or options.

Please elaborate?

Re: AGS 3.6.0 - Beta 2
« Reply #36 on: 15 Apr 2022, 21:01 »
Hi, I mean maybe the under the hotspot options or region options (property window), there could be some functions to make a mirror from the hotspot. For example "İs hotspot a mirror? true / false" and "Which region number ?  Region number : 1". Of course inside the room the right hotspot and region should be selected.

And inside the region properities we may choose, if there is a walk sound for the specified region number, like "Walk sound : True/ False", "Character Name : cEgo" "Walk sound number: 1". Something like that. A different sound for each region, when character walk on those regions.

Thanks for considering.

Re: AGS 3.6.0 - Beta 2
« Reply #37 on: 15 Apr 2022, 22:15 »
Hi, I mean maybe the under the hotspot options or region options (property window), there could be some functions to make a mirror from the hotspot. For example "İs hotspot a mirror? true / false" and "Which region number ?  Region number : 1". Of course inside the room the right hotspot and region should be selected.

And inside the region properities we may choose, if there is a walk sound for the specified region number, like "Walk sound : True/ False", "Character Name : cEgo" "Walk sound number: 1". Something like that. A different sound for each region, when character walk on those regions.

Thanks for considering.

This seems like functionality that not be added in-engine, but via scripting. Recommendation: Add a Custom Property (-> Room -> Properties ... -> Edit Schema -> R-Click and Add New Property) called "IsMirror" or "Mirror" of Boolean type. Add a checkmark for Hotspots. Then this can be checked/set in your Room script via hHotspotWhatever.GetProperty("Mirror") and SetProperty("Mirror"). The same can be done for Walk sounds in specified Walkable Areas.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 2
« Reply #38 on: 15 Apr 2022, 22:27 »
Hi, I mean maybe the under the hotspot options or region options (property window), there could be some functions to make a mirror from the hotspot. For example "İs hotspot a mirror? true / false" and "Which region number ?  Region number : 1". Of course inside the room the right hotspot and region should be selected.

Are you speaking of making a visual effect that shows the character in a mirror?

This is of course not a problem of adding a property, but a much bigger problem of designing and coding such feature. Something like that has to be thoroughly planned first (what is expected from this function, how it is implemented technically, and so on). It's not even clear what should be shown in such "mirror", as the AGS rooms are not 3D, and engine has no idea about perspective, and objects opposing a "mirror".

Personally, I think in 2D games effects like that are better done with a script. Right now the mirror may be scripted, for example, using second character hiding under walk-behinds and showing in a certain gap. That's much easier to script such custom effect in a couple of rooms, rather than figuring out how to make a universal mirror function in the engine, that would suit everyone.


On the other hand, the region (or rather walkable area?) sounds seem like something that may be considered in the future, as right now game authors have to edit view frame sounds at runtime to achieve different walking sounds. Or at least something that would help to script this easier. Again, this is something that has to be thought through very well, there will be number of questions on how to do this, as sounds have to be played on particular animation frames only, and different sounds may be wanted for different characters.
« Last Edit: 15 Apr 2022, 22:45 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 2
« Reply #39 on: 15 Apr 2022, 23:11 »
Thanks Crimson Wizard.

Maybe the mirror plugin could be inserted somehow as a property option. But I think the AGS came a long way already.

Thanks for your efforts.

 ;)


Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #40 on: 16 Apr 2022, 06:44 »
Updated to Beta 3
(use download links in the first post)

Common:
 - Discontinued "Windows Game Explorer" support in both Editor and Engine.

Editor:
 - Editor will now create an empty spriteset file (acsprset.spr) if one is missing in the game project. Any existing sprite descriptions in the project will be kept, letting user to reimport these from sources.
 - Added "File -> Restore all sprites from sources" menu command.
 - Added "Apply" button on editor's Preferences dialog.
 - Fixed blank rooms not assigned a default mask resolution.

Script API:
 - Added GUIControl.Transparency property. This lets change individual transparency to any gui controls.
 - Made Overlay.Width and Height properties settable, that let you freely scale existing Overlay.
 - Added readonly Overlay.GraphicWidth and GraphicHeight properties that let read original overlay's graphic size (in exchange for Overlay.Width and Height).

Engine:
 - Engine now renders GUI controls as separate textures when using hardware accelerated renderers. This may significantly improve perfomance in the high-resolution games and games with large number of GUI elements on screen.
 - Fixed on_key_press not called sometimes.
 - Fixed special engine key combos not working if the new style key handling was on.
 - Fixed non-clickable controls stealing mouse clicks.
 - Fixed ListBox items drawn over scrollbar in gui clipping mode.
 - Fixed TextBox duplicating letter input.
 - Fixed 16-bit sprite pixel corruption in 32-bit games.

Linux:
 - Fixed engine failing to find game data in paths other than current working dir.
« Last Edit: 16 Apr 2022, 06:49 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 3
« Reply #41 on: 16 Apr 2022, 19:55 »
There appears to be a bug with b3, or a change in implementation that has rendered my BackgroundImages for GUIs to be completely transparent (or non-existent, not sure which). I can confirmed that all of my GUI windows have a proper BackgroundImage set. This was working fine with b2. Am I missing something obvious?

(FWIW - the Modem Dialer window uses a button with a background image as a background, not a GUI.BackgroundImage, which is why it appears correct)

Screenshot:
« Last Edit: 16 Apr 2022, 19:56 by vga256 »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #42 on: 16 Apr 2022, 19:58 »
There appears to be a bug with b3, or a change in implementation that has rendered my BackgroundImages for GUIs to be completely transparent (or non-existent, not sure which). I can confirmed that all of my GUI windows have a proper BackgroundImage set. This was working fine with b2. Am I missing something obvious?

(FWIW - the Modem Dialer window uses a button with a background image as a background, not a GUI.BackgroundImage, which is why it appears correct)

Screenshot:

Please, can you give have some info about the game: color depth, which renderer do you run, and so on?

EDIT: actually yes, it does not work and displays a black rectangle instead of the image. This version is not working, I will have to fix and re-release.

EDIT2 it happens with some GUI but not the others, I am not exactly sure why yet.
« Last Edit: 16 Apr 2022, 20:09 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 3
« Reply #43 on: 16 Apr 2022, 20:07 »
Game is in 32-bit mode (sprites are imported in 32 bit mode as well), and behaviour is consistent across all renderers (OpenGL/D3D9/SDL2).
GUI Alpha rendering style: proper alpha blending
GUI controls clip their contents: false
Pixel-perfect click detection: true
Sprite alpha rendering style: proper alpha blending
When player interface is disabled, GUIs should: Display normally

I re-imported the affected background images just in case there was a problem with the sprite file, but this had no effect. Background displays properly in-Editor.

Update: I have https://vga256.com/ags/test-noguibg.zip created a demo project for your convenience here which has a white background PNG image used for the GUI.
« Last Edit: 16 Apr 2022, 20:15 by vga256 »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #44 on: 16 Apr 2022, 20:13 »
This happens if the image has an alpha channel.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #45 on: 16 Apr 2022, 20:45 »
@vga256, here's the engine with a fix, please tell if it works:
https://www.dropbox.com/s/0lnc6banecf0nti/acwin--3.6.0-beta3-guifix.zip?dl=0

Re: AGS 3.6.0 - Beta 3
« Reply #46 on: 16 Apr 2022, 20:50 »
@vga256, here's the engine with a fix, please tell if it works:
https://www.dropbox.com/s/0lnc6banecf0nti/acwin--3.6.0-beta3-guifix.zip?dl=0

Yep, that fixed it. Thanks!

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #47 on: 16 Apr 2022, 20:55 »
We definitely need more testers. This mistake was made by a most recent change which I forgot to double check with all possible variants. Too bad that I dont have a good test game which would group similar functionality, like everything related to GUIs.
Or perhaps I should post temporary builds here to let someone try, instead of making a release?

Re: AGS 3.6.0 - Beta 3
« Reply #48 on: 16 Apr 2022, 21:10 »
Happy to test out new early 3.6.x builds for you as I am using it exclusively. (Or can just send you my current AGS project which is extremely GUI-heavy).

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #49 on: 16 Apr 2022, 22:09 »
Please note: the Beta 3 has been reuploaded with a fix

The download links are all the same. I apologize for inconvenience.

Did this mostly because this was found within 24 hours; for any further problems i'd be making new releases as proper.

Pajama Sam

  • Sam's The name
Re: AGS 3.6.0 - Beta 3
« Reply #50 on: 17 Apr 2022, 03:35 »
Not that I like to harp on this but do you think you might soon allow dragging folders in the sprite menu?If i'm being annoying just say the word and i'll zip my lip. :X

Hobbes

  • Swashbuckler
AGS 3.6.0 - Beta 3
« Reply #51 on: 17 Apr 2022, 03:52 »
Updated to latest beta yet again! So far, things seem to be running smoothly on my end. Once we're out of beta, I'm happy to compile an empty MacOS AGS (Silicon & Intel) application for people to stick their games into. I've got them right now, but not much use for the wider community I think, since we're in beta.

Keep up the great work! (As always)

eri0o

Re: AGS 3.6.0 - Beta 3
« Reply #52 on: 17 Apr 2022, 04:11 »
Hey Hobbes, can you test if the binary here works for you? https://cirrus-ci.com/task/6135298751987712 (it's the one named ags, the others are unreleased things for now)

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #53 on: 17 Apr 2022, 04:14 »
Not that I like to harp on this but do you think you might soon allow dragging folders in the sprite menu?

Do you mean dragging around the list, or drag & drop whole folders from the file explorer to import sprites?

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #54 on: 17 Apr 2022, 22:39 »
I just started porting my quite old game project from AGS 3.4 to 3.6b3.

It already compiles, but crashes with the following exception.
Since I replaced a lot of Viewports and System.ScreenHeights, I can't exactly tell you, what did cause this crash.

Code: [Select]
An exception 0xC0000094 occurred in ACWIN.EXE at EIP = 0x0050A95E; program pointer is +373, ACI version 3.6.0.23, gtags (663,20)


I hope it still somewhat helps.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #55 on: 17 Apr 2022, 23:25 »
Code: [Select]
An exception 0xC0000094 occurred in ACWIN.EXE at EIP = 0x0050A95E; program pointer is +373, ACI version 3.6.0.23, gtags (663,20)

0xC0000094 is "division by zero". "program pointer is +373" is around the gui controls drawing. I think "gtags" should contain ID.

Does it still crash? If yes, may I have a compiled game for a test?

EDIT: Hmm, the only suspicious division i could find is in Slider, when MaxValue - MinValue = 0
« Last Edit: 17 Apr 2022, 23:27 by Crimson Wizard »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #56 on: 17 Apr 2022, 23:40 »
I've just PM'ed the link to the project. It could also be very possible that I did something stupid, as I haven't spent much time porting the code yet.
Oh and the keyboard controls seem to be different now too. At least the arrow keys don't work anymore.
Thanks for looking into this.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #57 on: 18 Apr 2022, 00:00 »
I've just PM'ed the link to the project. It could also be very possible that I did something stupid, as I haven't spent much time porting the code yet.

The above is not a scripting mistake, but a engine error. Program should not crash like that even if script is wrong.

Oh and the keyboard controls seem to be different now too. At least the arrow keys don't work anymore.

If the "General Settings -> Backwards Compatibility -> Use old-style key handling" is set to true, then nothing should change; so there may be a engine bug too.

Pajama Sam

  • Sam's The name
Re: AGS 3.6.0 - Beta 3
« Reply #58 on: 18 Apr 2022, 02:27 »
Quote
Do you mean dragging around the list, or drag & drop whole folders from the file explorer to import sprites?
Yes ,I meant to say to drag and drop whole folders within  the sprite panel(as in to be able to organize the sprite folders).
« Last Edit: 18 Apr 2022, 16:30 by Pajama Sam »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #59 on: 18 Apr 2022, 04:39 »
Code: [Select]
An exception 0xC0000094 occurred in ACWIN.EXE at EIP = 0x0050A95E; program pointer is +373, ACI version 3.6.0.23, gtags (663,20)


So, this happens when any gui control has width or height = 0.
There's a temp fixed build here (installer and archive):
https://cirrus-ci.com/task/4575886656667648

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #60 on: 18 Apr 2022, 07:37 »
Thanks, this fixed it!
There's still a lot not working, but nothing crashes anymore :)
So  I guess it would be safe to port everything to 3.5 first and once it all works I move it over to 3.6 to actually identify bugs.


edit: yep, the game is also sort of broken in AGS 3.5. So I'll fix that first and report things here later.
« Last Edit: 18 Apr 2022, 10:44 by abstauber »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #61 on: 18 Apr 2022, 21:13 »
The new editor seems to have trouble switching themes when code is already being displayed.
This also happens with Visual Studio Dark.


Code: Adventure Game Studio
  1. ---------------------------
  2. Adventure Game Studio
  3. ---------------------------
  4. Something went wrong when trying to apply color theme AGS-Dracula-0.2. The editor will set the color theme back to the default theme and continue as normal, however it may not look right until the next time you restart the editor. See stack trace for more details.
  5.  
  6. System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
  7.  
  8.    bei AGS.Editor.ColorThemeJson.GetJToken(String id, JObject json)
  9.  
  10.    bei AGS.Editor.ColorThemeJson.DoTransform[T](String id, Func`2 transform)
  11.  
  12.    bei AGS.Editor.ColorThemeJson.GetColor(String id)
  13.  
  14.    bei AGS.Editor.ScintillaWrapper.LoadColorTheme(ColorTheme t)
  15.  
  16.    bei AGS.Editor.ColorThemes.Apply(Action`1 apply)
  17. ---------------------------
  18. OK  
  19. ---------------------------
  20.  

eri0o

Re: AGS 3.6.0 - Beta 3
« Reply #62 on: 18 Apr 2022, 22:44 »
making a fix for it...

Edit: it's here: https://cirrus-ci.com/task/6233116699262976
« Last Edit: 19 Apr 2022, 00:34 by eri0o »

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • Best Innovation Award Winner 2021, for contributions to the ready-to-use UI designs and elements that mimic the most iconic designs we all know and love, most notably Tumbleweed Verbs and 9-verb MI Style UI, as well as additional UI helper modules such as CustomDialogGUI and ButtonHelper.
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #63 on: 19 Apr 2022, 07:47 »
Nice, that was fast :)

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #64 on: 23 Apr 2022, 21:49 »
I'm getting the following error [trying to move Strangeland to 3.6.0:

Code: [Select]
Error: parsing "Rotta bezieht sich auf die Wortherkunft, die buchstäblich \"Fleisch erheben\" (oder \"wegnehmen\") bedeutet. Die Anspielung geht bei der Übersetzung etwas verloren: Der Vergnügungspark heißt im Englischen "\Carnival\" (\"Karneval\"), was im Deutschen lediglich Feierlichkeiten beschreibt, mit denen das Ende der Fastenzeit begangen wird." - Unrecognized escape sequence \C.
Version: AGS 3.6.0.23

System.ArgumentException: parsing "Rotta bezieht sich auf die Wortherkunft, die buchstäblich \"Fleisch erheben\" (oder \"wegnehmen\") bedeutet. Die Anspielung geht bei der Übersetzung etwas verloren: Der Vergnügungspark heißt im Englischen "\Carnival\" (\"Karneval\"), was im Deutschen lediglich Feierlichkeiten beschreibt, mit denen das Ende der Fastenzeit begangen wird." - Unrecognized escape sequence \C.
   at System.Text.RegularExpressions.RegexParser.ScanCharEscape()
   at System.Text.RegularExpressions.RegexParser.Unescape(String input)
   at System.Text.RegularExpressions.Regex.Unescape(String str)
   at AGS.Editor.Components.TranslationsComponent.CompileTranslation(Translation translation, CompileMessages errors)
   at AGS.Editor.Components.TranslationsComponent.AGSEditor_PreCompileGame(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreCompileGameHandler.Invoke(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.TestGame(Boolean withDebugger)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   at AGS.Editor.MainMenuManager.MenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Any thoughts?
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #65 on: 23 Apr 2022, 22:09 »
I'm getting the following error [trying to move Strangeland to 3.6.0:

The error message mentions: "Unrecognized escape sequence \C"

Here's the part of the text which seem to be causing the problem:
Quote
Vergnügungspark heißt im Englischen "\Carnival\" (\"Karneval\")


What is wrong is that it displays this as an exception, meaning program fails to catch this in time and display as a regular error message.
« Last Edit: 23 Apr 2022, 22:11 by Crimson Wizard »

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #66 on: 23 Apr 2022, 22:43 »
So, can I do anything to fix it myself?
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #67 on: 23 Apr 2022, 23:10 »
So, can I do anything to fix it myself?

From what I understand this seem to be a mistake in translation file (trs), perhaps you may search for the mentioned line and fix the incorrect escape sequence there.
« Last Edit: 23 Apr 2022, 23:13 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 3
« Reply #68 on: 24 Apr 2022, 00:35 »
I'm trying to port my game from 3.5.18 to 3.6.0 (Beta 3) so that I can port it to web.

I'm getting this error (and some of the sprites, inventory items and other characters are split). Also, some objects are drawn a bit off (like this mirror) but this is easy enough to move.


https://ibb.co/tHSsrNp

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00427447; program pointer is  3330, ACI version 3.6.0.23, gtags (2,71)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and contact the game author for support or post these details on the AGS Technical Forum.

in "room1.asc", line 51


Most versions of Windows allow you to press Ctrl C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK  
---------------------------

This is my line 51:
Code: [Select]
function oSuit_AnyClick()
{
  cGoby.Say("I'm waiting for a special occasion to wear this."); //51
  oSuit.Visible = false;
  player.AddInventory(iSuit);
}

Also, my sprites are imported very oddly. I can go through and replace but it seems tedious.

https://ibb.co/drkjc3h
« Last Edit: 24 Apr 2022, 01:44 by tilapisha »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #69 on: 24 Apr 2022, 00:49 »
I'm trying to port my game from 3.5.18 to 3.6.0 (Beta 3) so that I can port it to web.

I'm getting this error (and some of the sprites, inventory items and other characters are split). Also, some objects are drawn a bit off (like this mirror) but this is easy enough to move.

You were posting a link to repository with the game couple of days ago. Will I get these errors if I try the latest version?
"program pointer is  3330" refers to the character drawing, something may be wrong with the character view perhaps.

some of the sprites, inventory items and other characters are split

Could you specify which sprites exactly; does this happen in the editor or only in game?

EDIT: I tried your game from the repository, and it seems to run fine in the latest 3.6.0...
« Last Edit: 24 Apr 2022, 01:20 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 3
« Reply #70 on: 24 Apr 2022, 03:34 »
I fixed it by reimporting all of my sprites.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #71 on: 24 Apr 2022, 05:06 »
But there's nothing wrong there per se, and the translation works fine on 3.5.1.7.
3.6.0 seems to hate it for some reason I can't fathom.

Code: [Select]
Rotta bezieht sich auf die Wortherkunft, die buchstäblich \"Fleisch erheben\" (oder \"wegnehmen\") bedeutet. Die Anspielung geht bei der Übersetzung etwas verloren: Der Vergnügungspark heißt im Englischen "\Carnival\" (\"Karneval\"), was im Deutschen lediglich Feierlichkeiten beschreibt, mit denen das Ende der Fastenzeit begangen wird.
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #72 on: 24 Apr 2022, 05:12 »
But there's nothing wrong there per se, and the translation works fine on 3.5.1.7.
3.6.0 seems to hate it for some reason I can't fathom.

Hmm, sorry, probably I was not clear enough; following is a incorrect place:
Quote
Vergnügungspark heißt im Englischen "\Carnival\" (\"Karneval\")
This should be
Quote
Vergnügungspark heißt im Englischen \"Carnival\" (\"Karneval\")

The escape parsing rules (parsing \x combinations) became more strict in the new version.
« Last Edit: 24 Apr 2022, 05:21 by Crimson Wizard »

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #73 on: 25 Apr 2022, 03:53 »
Alright, we're past that, now a different issue has risen!

[proper alpha blending seems to be somewhat broken]
Specifically on UI Buttons, instead of them [their graphic, which is a usually a png with alpha transparency] being displayed, they're not [they are fully transparent, as if their sprite is 0].

Even if on the editor they are displayed properly.
No more military army stuff. I'm alive and back.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #74 on: 25 Apr 2022, 04:06 »
On a different note, I'm also now getting this exception.

https://i.ibb.co/sjsd0hf/image.png
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 3
« Reply #75 on: 25 Apr 2022, 09:37 »
[proper alpha blending seems to be somewhat broken]
Specifically on UI Buttons, instead of them [their graphic, which is a usually a png with alpha transparency] being displayed, they're not [they are fully transparent, as if their sprite is 0].

Please try this build:
https://cirrus-ci.com/task/6113420188581888

On a different note, I'm also now getting this exception.
https://i.ibb.co/sjsd0hf/image.png

Division by zero, while drawing some gui control (gtags mean GUI ID, iirc). There was a bug fixed recently, related to controls with zero size. Please try above build as well; if not, then this should be investigated further for more details.

PS. I will try posting a new proper update later today.
« Last Edit: 25 Apr 2022, 11:28 by Crimson Wizard »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #76 on: 25 Apr 2022, 12:42 »
Updated to Beta 4
(use download links in the first post)

Editor:
 - Fixed room editor was suggesting to save the modified room even if no changes were made.
 - Fixed room preview not updating after changing object properties.
 - Fixed changing theme when script editor is open causes error.
 - Fixed any errors during translation compilation were causing unhandled exception in the editor.

Engine:
 - Fixed sprites with alpha transparency and anti-aliased texts not displayed correctly on GUI.
 - Fixed crash when gui control has zero size.
 - Fixed potential crash when gui slider is less than 4 pixels wide or tall.

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

Re: AGS 3.6.0 - Beta 4
« Reply #77 on: 26 Apr 2022, 22:07 »
Can anyone else confirm if AudioChannel.Panning is not working for them with 3.6.0? Demo files here. Unless I've made some obvious basic mistake with scripting, I'm not getting any kind of audio panning regardless of the int (-100,100) passed to AudioChannel.Panning. Replicated the same behaviour in TweenPanning which uses this function as well.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #78 on: 27 Apr 2022, 05:24 »
The transparency issue still remains, the exception is solved so yay!
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #79 on: 27 Apr 2022, 06:39 »
The transparency issue still remains

Could you give more details about this issue? An example of sprite, the gui settings, etc?


Can anyone else confirm if AudioChannel.Panning is not working for them with 3.6.0? Demo files here. Unless I've made some obvious basic mistake with scripting, I'm not getting any kind of audio panning regardless of the int (-100,100) passed to AudioChannel.Panning. Replicated the same behaviour in TweenPanning which uses this function as well.

Yes, Panning is not working within the sound library again (not sure if it worked before).

EDIT: It's confirmed that with the new sound library the Panning does not work for stereo clips, only works for mono clips, allegedly according to the OpenAL specification.
We need to investigate of the available solutions.
Opened ticket: https://github.com/adventuregamestudio/ags/issues/1637

EDIT2 According to the OpenAL specs:
https://openal.org/documentation/OpenAL_Programmers_Guide.pdf (page 21)
Quote
Buffers containing more than one channel of data will be played without 3D spatialization.
This basically means that stereo wave is not positioned by OpenAL in 3D space, only mono wave is.
« Last Edit: 27 Apr 2022, 13:23 by Crimson Wizard »

eri0o

Re: AGS 3.6.0 - Beta 4
« Reply #80 on: 27 Apr 2022, 10:46 »
The library we are using is for 3D positional audio, I linked in the issue a discussion that explains it a bit more.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #81 on: 27 Apr 2022, 13:09 »


The sprite in question is this. Sprite 3819 is used as a normal graphic in a button. In general it seems to be weird because there are other UIs that appear on top of this UI [the top UIs get rendered [they are mostly transparent, but the UI that contains this button, doesn't really get rendered or is partially rendered].

I can take a video if it helps.
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #82 on: 27 Apr 2022, 13:19 »
I can take a video if it helps.

It would actually help if I could get this sprite (or any other sprite that causes this problem) and exact gui setup it's used on; this would let me investigate the situation closely.

EDIT: ok, since I can see the import settings, then perhaps i could make a sprite myself. But I'd really need to know GUI setup.
« Last Edit: 27 Apr 2022, 13:25 by Crimson Wizard »

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #83 on: 27 Apr 2022, 15:53 »
That'd be more complex to explain and would take more of your time [meaning we'd be lost in translation], I can rar the game files, if that helps? It's a big project in size.

EDIT: I could try thinning out the project, as well, so it's easier to send out, let me do that.
« Last Edit: 27 Apr 2022, 15:56 by Dualnames »
No more military army stuff. I'm alive and back.

eri0o

Re: AGS 3.6.0 - Beta 4
« Reply #84 on: 27 Apr 2022, 17:24 »
Can't you right click on the project explorer and simply export the GUI?

(And then load an empty project and import it and then place the resulting project here...)

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #85 on: 27 Apr 2022, 18:34 »
That'd be more complex to explain and would take more of your time [meaning we'd be lost in translation], I can rar the game files, if that helps? It's a big project in size.

EDIT: I could try thinning out the project, as well, so it's easier to send out, let me do that.

So, this is happening because button moves, and the latest engine has a mistake when it does not update the control's texture position, so it stays hidden behind the screen.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #86 on: 27 Apr 2022, 20:58 »
@Dualnames, please try this temp build:
https://cirrus-ci.com/task/5782450277187584

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #87 on: 28 Apr 2022, 05:08 »
That works on the testing build, checking the main build also works yay!
No more military army stuff. I'm alive and back.

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #88 on: 28 Apr 2022, 18:20 »
Hello! Loving the latest beta so far, although I've uncovered a pretty major bug. :(

I use several struct arrays where I store various data. One example: a struct containing characters and their view numbers for various costume changes. I propagate these structs at the beginning of the game by calling a function at game_start. ("setupCharacterInfo();"  in this example).

Filling up the structs with data works fine when the game first starts up, but if I load a saved game, the data just disappears. Calling the setup functions a second time under "eEventRestoreGame" fixes it, but I feel like this shouldn't be happening in the first place.

If you need any more information, please let me know!

-Dave


« Last Edit: 28 Apr 2022, 18:22 by Dave Gilbert »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #89 on: 28 Apr 2022, 18:25 »
Filling up the structs with data works fine when the game first starts up, but if I load a saved game, the data just disappears. Calling the setup functions a second time under "eEventRestoreGame" fixes it, but I feel like this shouldn't be happening in the first place.

Was that save made after you configured these structs in your script or earlier?

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #90 on: 28 Apr 2022, 18:26 »
I configure the structs on game_start, so definitely after.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #91 on: 28 Apr 2022, 20:17 »
So, we found that Strings in script are not saved properly.

Here's the fixed build:
https://cirrus-ci.com/task/5389912781357056

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 4
« Reply #92 on: 28 Apr 2022, 20:29 »
Thanks! That fixed the problem.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #93 on: 06 May 2022, 04:28 »
Updated to Beta 5
(use download links in the first post)

A bit unexpected, but this is suddenly a larger feature update, complementing improvements to Overlays in this version.
Additionally this update contains a way to set volume for the frame-linked sounds during animation (see below).
Normally this is not a good thing to add so much stuff while the version is already far in Beta, but some of these changes were in plans for 3.6.0 for a while now, and they appeared to be not too difficult to make. At the same time, I believe that's the last of the feature additions for 3.6.0 engine.

Editor:
 - Fixed extracting room template files (other than the blank template).
 - Fixed editor displaying unhandled exception if the room script which user is trying to open was missing. Instead it will now open a blank script.

Compiler:
 - Support using float literals when defining default values for function arguments.

Script API:
 - Extended all Animate() commands by adding "volume" parameter, that defines relative volume of the frame-linked sounds for the duration of this animation.
 - Added Character.AnimationVolume, defining relative volume of the frame-linked sounds.
 - Added Overlay.CreateRoomGraphical and CreateRoomTextual. Use these two functions to create "room overlays": that is - overlays that display a sprite inside the room, sorted among other room objects, characters and walk-behinds.
 - Added readonly Overlay.InRoom property that tells if this is a room or screen overlay.
 - Extended Overlay.CreateGraphical() with a new "clone" parameter that tells whether to assign a sprite index, or make a sprite's copy owned exclusively by this overlay. The former will save program memory but make overlay update if the sprite is edited later. The latter is meant primarily for backwards compatibility. Overlay.CreateRoomGraphical has the same param. Default is false (don't clone).
 - Added Overlay.Graphic property that lets you change overlay's sprite after it's created.

Engine:
 - Perfomance improvement to overlays: engine will not make a sprite copy when they are created whenever possible (non-dynamic sprites), or when told not to by the script command that creates a custom overlay.
 - When reporting script errors, engine will print callstack for all the active script "threads": for example, if there's Wait() function called and error happened in repeatedly_execute_always, then it will print both actual error's location, and Wait() call's location.
 - Added "load_latest_save" and "show_fps" options to config (in "[misc]" category).
 - Fixed overlay may fail to be created sometimes, if previously another overlay had been forcefully removed when changing rooms (this is an ancient bug which existed for many years).
 - Fixes GUI controls not getting redrawn in correct locations if they were moved at runtime.
 - Fixed script's String type could be stored in game saves with a wrong length.
 - Fixed Game.InputBox() duplicating key input if new key handling mode is active.



NOTES: On Overlays

So, from this update 3.6.0 allows to dynamically create overlays not only "on screen", among GUIs, but also inside rooms - among the characters and objects. Overlays still remain a simplistic kind of object that does not have any automated behavior, so it won't interact with anything inside the room, but it still may be sorted among other objects there by manually setting Overlay.ZOrder. So, for example, if you'd like room overlay to change its "baseline" along with its vertical position, you will have to do something like this in rep-exec:
Code: Adventure Game Studio
  1. over.ZOrder = over.Y + over.Height;
In overall, I believe that room overlays open new possibilities in making temporary visual effects in the game, and also may help to script custom game elements from ground up (as they have no additional functionality on them).

On overlay's sprite cloning. This may not be well known, but for "historical reasons" (tm) overlays were doing a copy of the sprite when created. This was fine while overlays were limited to 20 in previous versions, but now when they are unlimited this could become an annoyance. So now, firstly, engine may decide when it is safe to not do a sprite copy (normally - when using regular non-dynamic sprites), and secondly Overlay.CreateGraphical now has an additional parameter which tells whether to make a copy of the sprite or not (not by default). This parameter may be used for backwards compatibility with some old scripts, where dynamic sprites are used to create an overlay and then discarded.

After the above change, it now makes sense to have Overlay.Graphic property, similar to Object.Graphic etc. This changes the overlay's sprite without having to recreate overlay.
Note that there's no Animate function for them, but you may script one yourself, using timers, and changing Overlay.Graphic.

NOTES: On Animation volume

Previously there was no way to choose the playback volume of sounds linked to the animation frames. The only related property was Character.ScaleVolume.
Now there are two ways to do this. First of all, there's Character.AnimationVolume. It sets the default relative volume of any frame sounds. For example, here's a primitive example of how you can make the footsteps volume depend on the character's X position in room:
Code: Adventure Game Studio
  1. player.AnimationVolume = player.x * 100 / Room.Width;
Secondly, each Animate() function (for Button, Character and Object) now has a "volume" parameter. Passing -1 (default) will ignore this, but when a 0-100 value is passed, that value overrides the frame sound volume.

EDIT: hmm, i just realized that maybe Animate() should not override Character.AnimationVolume, but also be relative to it... According to the idea that character is "sound emitter" with it's volume and Animate() is playing an individual sequence, then the volume of the sequence should not be louder than the volume of the emitter?
« Last Edit: 06 May 2022, 12:40 by Crimson Wizard »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #94 on: 08 May 2022, 02:26 »
Started writing "Upgrade to 3.6.0" topic in the manual, in case someone needs an explanation on most noteable changes:
https://github.com/adventuregamestudio/ags-manual/wiki/UpgradeTo36
(work in progress)

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #95 on: 15 May 2022, 00:34 »
Hello! Noticing a problem with the searching feature.

Normally, when I do a search for a word or phrase in my script, I press "control-F", select "look in current project", and then press enter. I can click on the results and them I am taken to the point in the script where word/phrase resides.

However, it now only works properly when searching in a standard script. For dialog scripts (meaning dialog that is written in the dialog editor), it just opens up the dialog script without highlighting the search result. Here are examples:




Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #96 on: 16 May 2022, 20:21 »
Hello! Noticing a problem with the searching feature.

Normally, when I do a search for a word or phrase in my script, I press "control-F", select "look in current project", and then press enter. I can click on the results and them I am taken to the point in the script where word/phrase resides.

However, it now only works properly when searching in a standard script. For dialog scripts (meaning dialog that is written in the dialog editor), it just opens up the dialog script without highlighting the search result. Here are examples:


I tried this, and for me it finds the dialog line, but does not highlight it, just puts cursor there. Could you double check if that happens to you, or it does not even move to the line itself?

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #97 on: 16 May 2022, 21:41 »
Yes, you are correct. The cursor is put on the proper line, but when the script opens it is displayed at the beginning on the page. I have to press a key to jump down to where the cursor is.

Pajama Sam

  • Sam's The name
Re: AGS 3.6.0 - Beta 5
« Reply #98 on: 26 May 2022, 19:15 »
I've been encountering an error" Undefined token overplay".Overplay is a function and is imported in overplay.ash but when I call it sometimes it works and sometimes it doesn't.I don't think theres anything wrong with how I placed the script although I could be wrong.I also encountered this same error for another function a few days ago.After a while it seemed to just fix itself with no changes done to it.
heres the .scm scripts
https://www.filemail.com/d/khuayqkknjpyaol
« Last Edit: 26 May 2022, 19:23 by Pajama Sam »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #99 on: 26 May 2022, 20:19 »
I've been encountering an error" Undefined token overplay".Overplay is a function and is imported in overplay.ash but when I call it sometimes it works and sometimes it doesn't.I don't think theres anything wrong with how I placed the script although I could be wrong.I also encountered this same error for another function a few days ago.After a while it seemed to just fix itself with no changes done to it.
heres the .scm scripts
https://www.filemail.com/d/khuayqkknjpyaol

If this error happens during compilation, "Undefined token" means the script does not see the function. The usual case is that your module with function "overplay" is located below the module that tries to use it ("fishtank") in the list of modules. In AGS script modules can only see functions declared above them.
« Last Edit: 26 May 2022, 20:20 by Crimson Wizard »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #100 on: 26 May 2022, 21:02 »
About the Beta, I think we'll have another update soon, but because we haven't found any more critical bugs, and there are no more game features planned, we're taking time just doing less important fixes and improving some things.

Pajama Sam

  • Sam's The name
Re: AGS 3.6.0 - Beta 5
« Reply #101 on: 26 May 2022, 21:13 »
Quote
If this error happens during compilation, "Undefined token" means the script does not see the function. The usual case is that your module with function "overplay" is located below the module that tries to use it ("fishtank") in the list of modules. In AGS script modules can only see functions declared above them.
Quote
About the Beta, I think we'll have another update soon, but because we haven't found any more critical bugs, and there are no more game features planned, we're taking time just doing less important fixes and improving some things.
Oh ok.Thanks for letting me know. :)

Re: AGS 3.6.0 - Beta 5
« Reply #102 on: 28 May 2022, 16:41 »
Hi there !

I just tried the new version (beta 5), and I tried to change the text format in the general settings pannel : I switched from ANSII to UTF-8. As I'm french, with special characters like éàÉÈ I thought it was better do to that. But when I change the format, the game crashes during a function that "reads" some txt files. It seems the txt files can't be read, so the functions like ReadRawLineBack return an empty string (so it crashes in my function). These txt files are in UTF-8 format.

Any idea why it happens ?

eri0o

Re: AGS 3.6.0 - Beta 5
« Reply #103 on: 28 May 2022, 16:51 »
This is weird. Can you share a text file that causes the empty ReadRawLineBack ?


Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #105 on: 28 May 2022, 23:25 »
I just tried the new version (beta 5), and I tried to change the text format in the general settings pannel : I switched from ANSII to UTF-8. As I'm french, with special characters like éàÉÈ I thought it was better do to that. But when I change the format, the game crashes during a function that "reads" some txt files. It seems the txt files can't be read, so the functions like ReadRawLineBack return an empty string (so it crashes in my function). These txt files are in UTF-8 format.

I made a new test game in UTF-8 format, and tried your file, and it worked well. Please post a script that crashes?

Here's a simple script i used:
Code: Adventure Game Studio
  1. function room_AfterFadeIn()
  2. {
  3.         File *f = File.Open("test.txt",eFileRead);
  4.         if (f == null) return;
  5.         while (!f.EOF) {
  6.                 String s = f.ReadRawLineBack();
  7.                 Display("%s", s);
  8.         }
  9. }
  10.  

eri0o

Re: AGS 3.6.0 - Beta 5
« Reply #106 on: 28 May 2022, 23:45 »
My guess is the location of the text file is incorrect... Where are you placing this file?

Also if this is going to be an internal game file, you can now since 3.6.0 package the file inside the game package and also read from it. More on this here.

Re: AGS 3.6.0 - Beta 5
« Reply #107 on: 29 May 2022, 09:28 »
Hmm, the file is located in the savegame directory (so in windows 10 : "saved games/[my game's directory]".

Here is the function that needs to read the file to save the attribute of something in the game (like a character for example) when the game is launching :

Code: Adventure Game Studio
  1. File *f=File.Open("$SAVEGAMEDIR$/cartesinvasion.txt", eFileRead);
  2.   int c=1;
  3.   while (!f.EOF)
  4.   {
  5.     String s=f.ReadRawLineBack();
  6.     if (c==n)
  7.     {
  8.       String t="";
  9.       this.nom=LectureStringCustom(s, 1);
  10.       t=LectureStringCustom(s, 2);
  11.       this.famille=t.AsInt;
  12.       t=LectureStringCustom(s, 3);
  13.       this.valeur[0]=t.AsInt;
  14.       t=LectureStringCustom(s, 4);
  15.       this.typezombie[0]=t.AsInt;
  16.       t=LectureStringCustom(s, 5);
  17.       this.valeur[1]=t.AsInt;
  18.       t=LectureStringCustom(s, 6);
  19.       this.typezombie[1]=t.AsInt;
  20.       t=LectureStringCustom(s, 7);
  21.       this.valeur[2]=t.AsInt;
  22.       t=LectureStringCustom(s, 8);
  23.       this.typezombie[2]=t.AsInt;
  24.       t=LectureStringCustom(s, 9);
  25.       this.valeur[3]=t.AsInt;
  26.       t=LectureStringCustom(s, 10);
  27.       this.typezombie[3]=t.AsInt;
  28.       t=LectureStringCustom(s, 11);
  29.       if (t.AsInt==1) this.egouts=true;
  30.       else this.egouts=false;
  31.       t=LectureStringCustom(s, 12);
  32.       if (t.AsInt==1) this.reactivation=true;
  33.       else this.reactivation=false;
  34.       t=LectureStringCustom(s, 13);
  35.       if (t.AsInt==1) this.litsbleus=true;
  36.       else this.litsbleus=false;
  37.       t=LectureStringCustom(s, 14);
  38.       if (t.AsInt==1) this.litsverts=true;
  39.       else this.litsverts=false;
  40.     }
  41.     c++;
  42.   }
  43.   f.Close();

Here is the function that read the informations. Each information is separated in the file by a ";". So between each ";", there is 1 information.

Code: Adventure Game Studio
  1. String LectureStringCustom(String s, int pos)
  2. {
  3.   String e=";";
  4.   int r, rr;
  5.   String nouvelle;
  6.   for (int i=0 ; i<pos ; i++)
  7.   {
  8.     int p=s.IndexOf(e);
  9.     if (i==pos-2) r=p+1;
  10.     if (i==pos-1)
  11.     {
  12.       rr=p;
  13.       nouvelle=s.Substring(r, rr-r); // Error indicates : String.Substring : invalid length
  14.     }
  15.     s=s.ReplaceCharAt(p, 'm');
  16.  }
  17.  
  18.   return nouvelle;
  19. }

I have to say that before I tried AGS 3.6 beta 5 (I was before on AGS 3.6.0.15), everything was OK.

Any idea ? Thanks a lot for helping ;)

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 5
« Reply #108 on: 29 May 2022, 12:04 »
Code: Adventure Game Studio
  1. nouvelle=s.Substring(r, rr-r); // Error indicates : String.Substring : invalid length

So it fails at Substring?

I tested your code with random "n" to trigger "if (c==n)" condition, and there was no errors. I guess "n" means a line. Could you tell at which "n" it happens, does it occur at any or particular lines?

I need to narrow the situation down to know which exactly conditions cause this error.

EDIT: actually, I ran this code in a loop, from n = 0 to 500, and met no error... tried in both ASCII and UTF-8 mode.
« Last Edit: 29 May 2022, 13:46 by Crimson Wizard »

eri0o

Re: AGS 3.6.0 - Beta 5
« Reply #109 on: 29 May 2022, 13:48 »
While I also couldn't reproduce the error, I noticed the last line of the .txt is an empty line, so if that line is read and you don't notice there's no ; at all in the line perhaps there's some way it could fail in the code.

I would break the code in two parts, have a tried and tested csv parser and then use a result from that to move the data to the game object.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 6
« Reply #110 on: 29 May 2022, 19:24 »
Updated to Beta 6
(use download links in the first post)

Common features:
- Increased Room Objects limit to 256 (was 40). (This is as much as possible without changing game data format)

Editor:
- When creating new room objects they will now have their script names set to some default value.
- In sprite manager's "export all" dialog added "skip if local" option.
- In sprite manager's context menu added command "Create source files for all sprites with missing / external sources...".
- Fixed going to a "find all" result in dialog script did not highlight the found text, and sometimes did not scroll down to it.

Script API:
- Added InputType enum which defines input devices and lets create their sets as flags.
- Added WaitInput(), a more generic and extendable function that accepts a combination of flags telling which input types to wait for.
- All Wait* functions now return the reason they were skipped: a combination of InputType flag and a respective key or button code.

Engine:
 - Upgraded SDL_Sound library, presumably fixes some issues with MIDI sounds.
 - Improved file writing times (e.g. when doing a game save) by using buffered file stream. Initial tests showed 50% faster file writing.
 - Engine now shares the video texture data for all game objects on screen sharing same sprite. This improves perfomance in case there are multiple objects which use same image.
 - Made Animate() function's volume be relative to Character.AnimateVolume for characters.
 - Implemented debug key controls for calling a built-in save and restore game dialogs. These controls have to be set in user config as "save_game_key" and "restore_game_key" in "[override]" category. These may be used by testers if the game is missing a save function or one is bugged.
 - Added "cache_size" and "stream_threshold" options to config in "[sound]" category, they setup the rules for sound caching and choosing whether to load a clip fully into mem or stream one.
 - Fixed dialog script's "goto-previous" command not working if used from the first sub-topic run using "goto-dialog" (a very-very old bug).
 - Fixed renderer error occuring if room background frames are of different sizes.
 - Fixed game fps sped up if SetGameSpeed() is called repeatedly in game script.
 - Fixed Overlay.CreateRoomTextual() creating a screen overlay instead.
 - Fixed WFN fonts rendered with misplaced letters if the text is drawn with negative coordinates.
 - Fixed TheoraPlayer stopping too early on some videos.
 - Fixed sprite cache size was never set from config.
 - Fixed game not closing while window is minimized.
 - Fixed crash when quitting with error during restoring a save.
 - Fixed potential crash on exit on Windows when built in "release" configuration.




In regards to the WaitInput, and other Wait functions. Previously in this version we had a change that let them return the skip result like:
Quote
positive value means a key code, negative value means an inverted mouse code, and 0 means skipped by a timer or script command.
When planning on how a new input device could be supported (e.g. Gamepad, or joystick, etc), I realized that such approach was a mistake, and instead we now have this changed to using a combination of flags:
Code: Adventure Game Studio
  1. enum InputType
  2. {
  3.   eInputNone       = 0x00000000,
  4.   eInputKeyboard = 0x00020000,
  5.   eInputMouse     = 0x00040000,
  6.   eInputAny         = 0xFFFF0000
  7. };
  8.  
The Wait's return value now is a mix of a InputType and key/button code. To retrieve one or another you should be using bitwise operations.
Code: Adventure Game Studio
  1. int result = WaitMouseKey(1000);
  2. InputType how = result & eInputAny;
  3. int keycode = result & 0xFFFF;
  4.  
That's a bit complicated at the first glance, but lets to combine both values, and also easily add more devices to these return values.

The newest WaitInput also accepts a combination of InputType flags, so you can do this:
Code: Adventure Game Studio
  1. WaitInput(eInputTime + eInputKeyboard);
  2.  

When the gamepad, or other devices are supported inside the engine, this InputType enum will be expanded.



« Last Edit: 29 May 2022, 23:59 by Crimson Wizard »

eri0o

Re: AGS 3.6.0 - Beta 6
« Reply #111 on: 29 May 2022, 23:26 »
I had the impression any changes in Wait return value was done in 3.6 itself, is the need to return 0 when in time skip something that was present in 3.5.1?

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 6
« Reply #112 on: 29 May 2022, 23:34 »
I had the impression any changes in Wait return value was done in 3.6 itself, is the need to return 0 when in time skip something that was present in 3.5.1?

Yes, it was a historical behavior since the beginning to have return value 0 for timeout and non-0 for other, working similar to boolean; this was purposedly left untouched in 3.6.0.
« Last Edit: 29 May 2022, 23:37 by Crimson Wizard »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 6
« Reply #113 on: 29 May 2022, 23:58 »
I reuploaded the Beta 6 without eInputTime flag, so Wait functions are kept returning 0 for timeout as before.

Please download again (same links), if you've already installed Beta 6 earlier.

Re: AGS 3.6.0 - Beta 6
« Reply #114 on: 30 May 2022, 17:30 »
Hey there,

Something odd is going on when having two characters SayBackground at the same time.

Code: Adventure Game Studio
  1. function cRat_Look()
  2. {
  3.   if (Game.DoOnceOnly("ratlookat1")) {
  4.     player.SayBackground("Shoo, go away!");
  5.     cRat.SayBackground("?");
  6.   }
  7. }

This shuts down the game with a "appears not to have shut down properly error"

Update: actually this happens when any cCharacters.SayBackground, but works fine for player.SayBackground
« Last Edit: 30 May 2022, 17:34 by Pax Animo »
I'm a slow learner but I like to ask questions.

Re: AGS 3.6.0 - Beta 5
« Reply #115 on: 30 May 2022, 18:28 »
Code: Adventure Game Studio
  1. nouvelle=s.Substring(r, rr-r); // Error indicates : String.Substring : invalid length

So it fails at Substring?

I tested your code with random "n" to trigger "if (c==n)" condition, and there was no errors. I guess "n" means a line. Could you tell at which "n" it happens, does it occur at any or particular lines?

I need to narrow the situation down to know which exactly conditions cause this error.

EDIT: actually, I ran this code in a loop, from n = 0 to 500, and met no error... tried in both ASCII and UTF-8 mode.

So I debugged it and I found what happenned : in one of the file (the one who made the game crashing), there were some "É" characters. And this made the game crash during the substring function.

The thing is : why ? The file is in UTF-8, and the game too. Or I'm misundersting something ? (which is surely the main reason of my problems I think ;) ).

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 6
« Reply #116 on: 30 May 2022, 19:38 »
Hey there,

Something odd is going on when having two characters SayBackground at the same time.

There seem to be a bug there. There will be a temp build with a fix here in roughly 20-30 minutes:
https://cirrus-ci.com/task/5199731981811712
EDIT: ready


So I debugged it and I found what happenned : in one of the file (the one who made the game crashing), there were some "É" characters. And this made the game crash during the substring function.

Could you please post a file? I'd really prefer to test real case rather than trying to reproduce this by luck.
EDIT: well, i tried to put random É in the file, but nothing happened.

The thing is : why ? The file is in UTF-8, and the game too.

The file format does not have a direct relation to the game. File can be read differently, what matters is how it is read and what you do with the data in script. Whether engine works correctly too.
« Last Edit: 02 Jun 2022, 20:04 by Crimson Wizard »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #117 on: 03 Jun 2022, 21:04 »
Updated to Beta 7
(use download links in the first post)

Script API:
- Implemented `dialog_options_close` callback which is called when custom dialog options are removed from the screen. This allows to perform any required cleanup.
- Added `eEventEnterRoomAfterFadein` event for `on_event` callback, which corresponds to "enter after fade-in" room event.

Engine:
- Fixed rendering scaled up WFN fonts.
- Fixed crash occuring when background speech is removed (found by Pax Animo).

Re: AGS 3.6.0 - Beta 6
« Reply #118 on: 04 Jun 2022, 10:26 »
Hey there,

Something odd is going on when having two characters SayBackground at the same time.

There seem to be a bug there. There will be a temp build with a fix here in roughly 20-30 minutes:
https://cirrus-ci.com/task/5199731981811712
EDIT: ready


So I debugged it and I found what happenned : in one of the file (the one who made the game crashing), there were some "É" characters. And this made the game crash during the substring function.

Could you please post a file? I'd really prefer to test real case rather than trying to reproduce this by luck.
EDIT: well, i tried to put random É in the file, but nothing happened.

The thing is : why ? The file is in UTF-8, and the game too.

The file format does not have a direct relation to the game. File can be read differently, what matters is how it is read and what you do with the data in script. Whether engine works correctly too.

Thanks for helping !

Did you displayed the String (with the Display function) that you obtained each time with the ReadRawLineback function ? I remember that all the É characters were not correctly displayed (something like ^A"< you know when the character is not properly read).

I will send you my files later (something like tomorrow or monday, I don't have any time before). Remember that in my code, I use a function which locates the ";" characters, and extract the informations between two ";". So it could be that each É or È was putting a new ";" and so it breaks the code.

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #119 on: 04 Jun 2022, 12:38 »
Could you make a small project that reproduces this issue? I haven't been able to trigger any of the mentioned crash using either the script you posted or the file.

You previously said it crashes, now you are saying it displays incorrectly, does it crashes or does it displays incorrectly?

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #120 on: 04 Jun 2022, 14:35 »
Did you displayed the String (with the Display function) that you obtained each time with the ReadRawLineback function ? I remember that all the É characters were not correctly displayed (something like ^A"< you know when the character is not properly read).

I did not display anything, I used exactly the code that you posted earlier: https://www.adventuregamestudio.co.uk/forums/index.php?topic=59842.msg636646559#msg636646559
where you said that substring crashes, to test the crash. I added É characters to the file too, in random places. But it did not crash for me neither in UTF-8 nor ASCII game mode.
« Last Edit: 04 Jun 2022, 14:38 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 7
« Reply #121 on: 04 Jun 2022, 16:37 »
Yes, it crashed. And it displayed incorrectly :)

As you have seen, the files contains many lines (each line containing informations about 1 character, written each one between a ";"). When I displayed the text, I saw that each É or characters like that was badly displayed. I displayed the text at each occurence of my function, and at some point, it crashed (saying the error I mentionned before).

I changed the É with E, it worked. And then, I changed the E to É, and it worked too...!!

Well, it worked for one file. For another, the É are displayed in game by ^ .

Strange...?

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #122 on: 04 Jun 2022, 16:40 »
@Baguettator, these all may be separate problems. Crash is one problem, wrong displayed characters is another.
For example, in order to display correct characters you also need a correct font.

If you want us to look into this problem we need a test case, where there's a 1) game settings 2) script and 3) a file, that in combination cause the problem.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #123 on: 07 Jun 2022, 08:36 »
Save to file appears to be problematic. Namely that white thing shouldn't be there.

Specifically:



Here are the images: https://easyupload.io/e5x7f4


Code: Adventure Game Studio
  1.  
  2.    //Clearscreen is a dynamic sprite that grabs the screen as the Save UI opens, prior rather.
  3.   //both Screenshots[0] and HDSave are dynamic sprites [declared in global variables]
  4.  
  5.  
  6.     //SAVES A SMALL VERSION OF THE IMAGE
  7.     Screenshots[0]=DynamicSprite.CreateFromExistingSprite(GrabAutosaveScreen(), false);//even replacing GrabAutosaveScreen with a sprite number results in a broken BMP file.
  8.       Screenshots[0].Resize(61, 39);
  9.       Screenshots[0].SaveToFile(String.Format("$SAVEGAMEDIR$/save%d.bmp",setSlot));
  10.  
  11.       //SAVES A BIGGER VERSION OF THE IMAGE
  12.       if (HDSave!=null) HDSave.Delete();
  13.       HDSave=DynamicSprite.CreateFromExistingSprite(ClearScreen.Graphic, false);
  14.       HDSave.Resize(244, 167);
  15.       HDSave.SaveToFile(String.Format("$SAVEGAMEDIR$/saveHD%d.bmp",setSlot));
  16.  
  17.  
  18.  

This is not an issue in 3.5.0.26 or 3.5.1.13 afaik. The game's resolution is 640x480. And those are also the dimensions of Clearscreen DynamicSprite. Idk if it's because it's consecutive or what, I've tried a bunch of stuff, nothing seems to procure a non-broken image.

No more military army stuff. I'm alive and back.

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #124 on: 07 Jun 2022, 12:24 »
I know you said it's the save to file, but any chance you tried to show the screenshot on screen before saving? Like, just to confirm the screenshot feature is working, and it's just file saving that is wrong.

Edit: managed to reproduce, it appears it's only saving the file: https://github.com/adventuregamestudio/ags/issues/1681

It's a mystery to me because I don't readily detect any change in the functions used, this is the part of Allegro4 we did not remove... So it may be some interaction between these...

Edit2: @Dualnames, CW fixed here: https://cirrus-ci.com/task/5976995031941120
« Last Edit: 08 Jun 2022, 12:55 by eri0o »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #125 on: 10 Jun 2022, 10:20 »
Have anything tried running latest 3.6.0 on linux in fullscreen mode? Trying this on a linux virtual machine results in a completely black window with no video or audio or reaction to input, regardless of the chosen renderer; so I am wondering if that's vm or engine's problem.

Re: AGS 3.6.0 - Beta 7
« Reply #126 on: 12 Jun 2022, 12:25 »
Hi !

About my text problems, it seems that I fixed that (or it fixed itself), I didn't understand well what happenned, so maybe it was my fault, I don't know. If I encounter another similar problem, I will post it :)

I tried to change the game translation, and it seems that the texts don't update when the function Game.ChangeTranslation is called. For example, I change my game from french to english, nothing happenned (texts still in french), but when the mouse went on a button, suddenly its text changed to the english one. Labels were not translated and the mouse didn't do anything on them. Surely because their image doesn't update when mouse is on them (and buttons do update).

Is it a problem with the Beta 3.6.0.25 ?

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #127 on: 12 Jun 2022, 20:13 »
I tried to change the game translation, and it seems that the texts don't update when the function Game.ChangeTranslation is called. For example, I change my game from french to english, nothing happenned (texts still in french), but when the mouse went on a button, suddenly its text changed to the english one. Labels were not translated and the mouse didn't do anything on them. Surely because their image doesn't update when mouse is on them (and buttons do update).

Is it a problem with the Beta 3.6.0.25 ?

This sounds like a problem with control texture update; i thought that this was fixed long ago, but will look again.

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #128 on: 13 Jun 2022, 13:21 »
@Baguettator, when you ask about 3.6.0.25, this is the version you are using or the version you are considering to upgrade to?

Re: AGS 3.6.0 - Beta 7
« Reply #129 on: 13 Jun 2022, 13:37 »
@eri0o it's the version I'm using ! ;)

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #130 on: 13 Jun 2022, 15:32 »
I missed this problem, it exists even in 3.5.1, which is very unfortunate. So it has to be fixed there too, and a new patch must be released.

Re: AGS 3.6.0 - Beta 7
« Reply #131 on: 13 Jun 2022, 15:39 »
Before I was with 3.5.1 (not the last patch), and it worked perfectly for me. It's only since 3.6.0.25.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #132 on: 13 Jun 2022, 15:45 »
Before I was with 3.5.1 (not the last patch), and it worked perfectly for me. It's only since 3.6.0.25.

I just tested changing translation in the latest 3.5.1, and this bug is also present.
« Last Edit: 13 Jun 2022, 16:34 by Crimson Wizard »

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #133 on: 13 Jun 2022, 19:28 »
Is there a reason why changing one's OS settings from 24bit 48khz to 24bit 44khz would make an audio thing play properly (audio-crackling)?
I even tried rendering the file to 48 [it's originally at 44khz, and an ogg], but the issue i think lies outside the specific gamefile.

The same file plays fine outside of the engine. Is the default sample rate in-game set to 44?

No more military army stuff. I'm alive and back.

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #134 on: 13 Jun 2022, 19:37 »
Which os, which audio driver, which version... These would be needed. SDL2 in the end will use something to output sound.
« Last Edit: 13 Jun 2022, 19:40 by eri0o »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #135 on: 13 Jun 2022, 20:06 »
Is there a reason why changing one's OS settings from 24bit 48khz to 24bit 44khz would make an audio thing play properly (audio-crackling)?
I even tried rendering the file to 48 [it's originally at 44khz, and an ogg], but the issue i think lies outside the specific gamefile.

The same file plays fine outside of the engine. Is the default sample rate in-game set to 44?

For the reference, according to the library code, the default openal's context is 48 khz.
But indeed we need more information on what os, what settings do you change, which audio driver do you use, and so on.
Also, I did not quite catch which frequency worked and which did not from your explanation.
« Last Edit: 13 Jun 2022, 20:08 by Crimson Wizard »

Re: AGS 3.6.0 - Beta 7
« Reply #136 on: 13 Jun 2022, 20:53 »
I missed this problem, it exists even in 3.5.1, which is very unfortunate. So it has to be fixed there too, and a new patch must be released.
Strange, I used the change game translation function in AGS 3.5.1 for Another Museum and it works without problem.

Re: AGS 3.6.0 - Beta 7
« Reply #137 on: 13 Jun 2022, 21:11 »
Exactly as me,I used long ago and it worked perfectly !

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #138 on: 13 Jun 2022, 21:19 »
Is there a reason why changing one's OS settings from 24bit 48khz to 24bit 44khz would make an audio thing play properly (audio-crackling)?
I even tried rendering the file to 48 [it's originally at 44khz, and an ogg], but the issue i think lies outside the specific gamefile.

The same file plays fine outside of the engine. Is the default sample rate in-game set to 44?

For the reference, according to the library code, the default openal's context is 48 khz.
But indeed we need more information on what os, what settings do you change, which audio driver do you use, and so on.
Also, I did not quite catch which frequency worked and which did not from your explanation.

The 24bit 44khz in the OS settings works. OS is Windows 10, audio driver is default.
But I can ask for more info if we can be a bit more specific, on what else we need, I'm not sure if the end user is knowledgable. To my knowledge, no settings were changed in the game's setup. [so whatever the defaults are]
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #139 on: 13 Jun 2022, 21:51 »
The 24bit 44khz in the OS settings works. OS is Windows 10, audio driver is default.

Could you clarify what setting that is, just to be sure, because I don't remember ever using such setting, neither thought that an os setting could conflict with the program.
I found one on Windows 7 in sound devices, according to it I have 48khz set apparently. Changing to 44khz on my Windows 7 does not seem to make any difference.
I may try on Windows 10 virtual machine later (although idk how close it is to emulate this behavior).
« Last Edit: 13 Jun 2022, 21:55 by Crimson Wizard »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #140 on: 13 Jun 2022, 21:58 »
@Baguettator, the bug was introduced in AGS 3.5.1 Patch 3.
I think in order to be noticed, there have to be separate GUIs with text on screen. If you have only 1 gui displayed with a button which changes translation, then the whole gui gets redrawn as soon as the button is pressed, so text is redrawn with the new translation as well. But if you have multiple guis, then you will see that only one with a "change translation" button is changed, until you do something with others.

Here's a fixed temp build for 3.6.0:
https://cirrus-ci.com/task/5957467392704512
« Last Edit: 14 Jun 2022, 09:39 by Crimson Wizard »

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #141 on: 13 Jun 2022, 23:47 »
audio driver in my windows 10 machine, when I leave to default, is WASAPI, not sure if it's the same in the person of the case Dualnames mentions. I tried also directsound and winmm (Wave) and tried to vary the speakers default format for shared mode for sample rates and bit depth (not sure if this is where these are actually changed), but neither produced crackling.

@Dualnames, if the game is Strangeland, I am curious if could be a mix of the different things (ags and the plugin that uses SDL_mixer) accessing SDL2 audio backend.

Anyway, I would try using winsetup and then switching to directsound and seeing if this fixes it!
« Last Edit: 14 Jun 2022, 01:29 by eri0o »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #142 on: 14 Jun 2022, 00:03 »
audio driver in my windows 10 machine, when I leave to default, is WASAPI, not sure if it's the same in the person of the case Dualnames mentions

By the way, it's logged, so you may ask a player to run with logging and check the info.
Log is set in config as
Quote
[log]
file=info
and the log file may be found in %USERPROFILE%/Saved Games/Adventure Game Studio

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #143 on: 14 Jun 2022, 12:42 »
I will try that, meanwhile: https://steamcommunity.com/app/1346360/discussions/0/3416557114763335804/?tscn=1655196272
This kind of a weird issue, I'm not sure I understand the problem here, to fully answer this.

@eri0o: No, this is not about Strangeland, this is about Old Skies.
No more military army stuff. I'm alive and back.

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #144 on: 14 Jun 2022, 13:01 »
damn, about the mouse issue the person mentions, it's probably because the person is used to the 144MHz monitor.

AGS runs game and graphics in the same sequence, so either it would need to render separately (in different threads), or separate this just for the mouse somehow, perhaps using the OS mouse if it's available - but keeping the existing approach if it's not, or doing this by a setting, I don't believe every platform will allow to override system cursor graphics, like mobile probably won't.

There's SDL_Cursor, so perhaps we could use SDL_CreateColorCursor, but not sure what that will entail, because then the lifetime of the cursor sprite is disconnected from the game graphics. Probably would need an issue on github to track this, but in essence, this is a new feature since I think the allegro ags version was using in engine rendered cursor - not sure if this is true in really older versions, since I remember at a point there was an issue of duplicated cursors, but there wasn't 144Hz monitors back then too.
« Last Edit: 14 Jun 2022, 13:07 by eri0o »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #145 on: 14 Jun 2022, 14:04 »
AGS runs game and graphics in the same sequence, so either it would need to render separately (in different threads), or separate this just for the mouse somehow, perhaps using the OS mouse if it's available - but keeping the existing approach if it's not, or doing this by a setting, I don't believe every platform will allow to override system cursor graphics, like mobile probably won't.

There's SDL_Cursor, so perhaps we could use SDL_CreateColorCursor, but not sure what that will entail, because then the lifetime of the cursor sprite is disconnected from the game graphics.

EDIT: scrapped previous post.

Do i understand correctly that this is about "hardware cursors", which do not depend on game's own rendering?
« Last Edit: 14 Jun 2022, 14:37 by Crimson Wizard »

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #146 on: 14 Jun 2022, 14:13 »
Meanwhile regarding the audio:

Here's an mp4 recording that showcases the problem.
https://drive.google.com/file/d/18aGJbJisQdNvLuBzX6ujDfzNGzj7vPnE/view?usp=sharing

Here is the log:
http://primordia-game.com/Files0/ags.log

If this is missing key information do let me know of parameters for --log that are needed to show proper inf!
No more military army stuff. I'm alive and back.

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #147 on: 14 Jun 2022, 14:30 »
For the audio, did changing to direct sound changed anything?

For the mouse, I opened a feature request to track this on GitHub, so it's easier to follow and report experiments there. I also was very specific about system cursors instead of going the rendering route, if that road proves not a good one, than closing and going the other is a possibility, but I was worried about the size of scope of the other approach.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #148 on: 14 Jun 2022, 14:53 »
Meanwhile regarding the audio:

Here's an mp4 recording that showcases the problem.
https://drive.google.com/file/d/18aGJbJisQdNvLuBzX6ujDfzNGzj7vPnE/view?usp=sharing

EDIT: Ah, sorry, nevermind again.
The problem is in sound cracking, correct? The sounds overall are not distorted or anything (it seems).
« Last Edit: 14 Jun 2022, 14:55 by Crimson Wizard »

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #149 on: 14 Jun 2022, 15:02 »
The problem is speech, music, sound anything audio related crackles [I had the person test everything with everything else muted, crackle appears in all audio types/categories]

Edit: The only thing that makes it disappear is setting the OS Settings to be 24bit 44khz. [That's in the audio-device settings]
Edit: And yes, only crackling, no sound distortion.
« Last Edit: 14 Jun 2022, 15:11 by Dualnames »
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #150 on: 14 Jun 2022, 15:29 »
@Dualnames, have they tried different audio drivers?

The selection is now available in winsetup, on advanced tab.


Snarky

  • Global Moderator
  • Global Moderator
  • Mittens Lord
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #151 on: 14 Jun 2022, 15:38 »
https://steamcommunity.com/app/1346360/discussions/0/3416557114763335804/?tscn=1655196272
This kind of a weird issue, I'm not sure I understand the problem here, to fully answer this.

Christ, the whining! "Nausea" because the cursor updates at 40 fps. (roll)

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #152 on: 14 Jun 2022, 16:14 »
About the audio, I found an open bug report in SDL2 issue tracker that looks suspicious: https://github.com/libsdl-org/SDL/issues/5538

(also more info in https://github.com/diasurgical/devilutionX/issues/1390 , it seems the WINMM (Wave) audio driver from sdl2 should bypass this issue at the cost of a bit of latency, I imagine it's negligible for 99% of adventures. No one tested direct sound though)

@Dualnames, my suggestion would be figuring out the person's hardware and drivers and open an issue on our GitHub with all of this information to track. Possibly the end solution would come from upstream if turns out these are the same issues.

(And of course, changing the audio driver like CW showed, trying directsound and Wave and seeing if any of those solves the issue. Curious stuff if it's resampling related like in SDL2 bug report, since Wasapi used to not support resampling, but is theoretically supporting resampling now since a Win10 update. Looking for this, it seems this is not supported on WASAPI still in some cases...)
« Last Edit: 14 Jun 2022, 17:42 by eri0o »

Re: AGS 3.6.0 - Beta 7
« Reply #153 on: 14 Jun 2022, 16:35 »
Well done!  (nod)
_______________________________________ ____________________

Re: AGS 3.6.0 - Beta 7
« Reply #154 on: 14 Jun 2022, 17:02 »
@Crimson Wizard : Thanks for the fix, I will try it in a proper release :)

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #155 on: 14 Jun 2022, 22:53 »
No other options fix the issue, we tried em all.

I had this issue on my implementation of SDL for Strangeland, specifically on the backbuffer [meaning when the sounds start/loop] so I forwarded 1 bitrate ahead [4092 samples]. Not sure if that helps in any way. I also primarily used SDL mixer for the audio things.
No more military army stuff. I'm alive and back.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #156 on: 14 Jun 2022, 22:53 »
https://steamcommunity.com/app/1346360/discussions/0/3416557114763335804/?tscn=1655196272
This kind of a weird issue, I'm not sure I understand the problem here, to fully answer this.

Christ, the whining! "Nausea" because the cursor updates at 40 fps. (roll)

Old Skies actually runs at 60 fps, same as Unavowed.
No more military army stuff. I'm alive and back.

Snarky

  • Global Moderator
  • Global Moderator
  • Mittens Lord
  • Private Insultant
    • Best Innovation Award Winner 2018, for his numerous additions to the AGS open source ecosystem including the new Awards Ceremony client and modules
    • Snarky worked on one or more games that won an AGS Award!
    •  
    • Snarky worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #157 on: 15 Jun 2022, 07:19 »
Looking at the other posts of the person reporting this, it seems to be something of an idiosyncratic obsession. Adventure games generally don't require quick mouse movements or reaction times, so while it might be nice to refresh the cursor more frequently (though that also seems to open up a vast new scope for bugs, if the cursor isn't where the script thinks it is/was), it should hardly be a high priority. I mean, plenty of people play shooters just fine in 60fps.

Using the OS cursor strikes me as very undesirable unless you fully control its appearance, and at that point you're back to needing to hook into the script (e.g. to vary the cursor depending on mouse button input or mouseover).

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #158 on: 16 Jun 2022, 16:23 »
Another user just reported the "crackling audio" bug. He said the "It is a very typical noise when, for example, the source and playback device do not have the same sampling rate." The sounds for Old Skies (and all our games for the last 16 years) are exported at 44100kz, and most PCs are set to play at 48000 by default, but it's never been a problem before.

edit: The user tested Blackwell Epiphany and did not encounter the problem, so it is probably something introduced in a later version of AGS.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #159 on: 16 Jun 2022, 16:27 »
This user's OS is Windows 10, and his soundcard is "Soundblaster ZxR" and he's using "Voicemeeter Potatoe" for sound controls [whatever that means].
EDIT: 2nd case [the one reported by Dave, also Blackwell Epiphany is on 3.5.1.13 so naturally the issue is not there]
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #160 on: 17 Jun 2022, 17:14 »
Bump.

Have anything tried running latest 3.6.0 on linux in fullscreen mode? Trying this on a linux virtual machine results in a completely black window with no video or audio or reaction to input, regardless of the chosen renderer; so I am wondering if that's vm or engine's problem.

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #161 on: 17 Jun 2022, 23:51 »
I booted from a live USB on Ubuntu 22.04, and installed the .deb from the GitHub release. It did not install sdl2, but I manually installed it - I may have installed the deb wrong though.

But anyway, I went to try some games. The game works (no black screen), but whenever it exits, it's giving me the following error on command line:
corrupted double-linked lists
Aborted (core dumped)

Other than this, the window is weird, like, when I move it it's drawing tracks on the screen... It may be something about Nouveau, but I need to figure how to install Ubuntu in this computer without losing my windows drive before I can install the real Nvidia driver on this machine.

Oh, right, full screen works fine.
« Last Edit: 17 Jun 2022, 23:53 by eri0o »

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #162 on: 18 Jun 2022, 02:20 »
Do textboxes support unicode? Meaning can I write something in a textbox, and provided the font exists, have it displayed properly? What i mean specifically, is let's say i have a font on a textbox that displays greek characters, can i write in greek in the game on said textbox or no?
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #163 on: 18 Jun 2022, 05:51 »
Do textboxes support unicode? Meaning can I write something in a textbox, and provided the font exists, have it displayed properly? What i mean specifically, is let's say i have a font on a textbox that displays greek characters, can i write in greek in the game on said textbox or no?

It should, if I remember correctly.

If you are scripting a custom textbox (using a label or drawing surface), then you should utilize the new "on_text_input" callback, as "on_key_press" cannot handle full unicode range:
https://github.com/adventuregamestudio/ags-manual/wiki/Globalfunctions_Event#on_text_input

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #164 on: 18 Jun 2022, 11:53 »
That's awesome, one problem however, even though I have it set to false, which means the new key should be enabled.

Code: Adventure Game Studio
  1. function on_text_input(int ch)
  2. {
  3. QuitGame(0);
  4. }


This callback never gets executed, unless it needs to be in globalscript. I assume me pressing any key on a textbox would trigger this.
EDIT: Even in globalscript it doesn't.
« Last Edit: 18 Jun 2022, 12:00 by Dualnames »
No more military army stuff. I'm alive and back.

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #165 on: 18 Jun 2022, 12:13 »
Did you enable it in General Settings?

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #166 on: 18 Jun 2022, 12:54 »
Yes. If we're talking about the same thing!
No more military army stuff. I'm alive and back.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #167 on: 18 Jun 2022, 12:59 »
Also meanwhile a user of Old Skies, is running into this error:

Initializing audio
SDL : ERROR: DEBUG: Audio target 'dsound' not available
Failed to initialize audio backend: Audio target 'dsound' not available
Audio is disabled

That's as much as I can gather.
"Dunno if it has a name, it was packed with my old headset from Beyerdynamics.   Or is it just some sort of converter? I have no idea from such things.  It's still weird for me though that it only happens on this AGS version as it seems?"


Whereas, they are using an external soundcard connected via USB on their PC. Tried a bunch of settings on the audio device, but no luck."
No more military army stuff. I'm alive and back.

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #168 on: 18 Jun 2022, 13:03 »
Can you tell which Operating System? And how it's being run? Also, dsound is not a default, they may have set it through a config or they have a SDL environment variable that is hijacking the default.

Btw, Native Linux doesn't run with our SDL2 I think, it will run with the sdl2 from Steam. At least I remember in my Linux computer Steam injected an environment variable that did this redirect. This is important when trying to figure out a bug in SDL.

Edit: sdl2 will accept dsound now in it's next release: https://github.com/libsdl-org/SDL/issues/5818
« Last Edit: 19 Jun 2022, 02:45 by eri0o »

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #169 on: 18 Jun 2022, 13:13 »
This callback never gets executed, unless it needs to be in globalscript. I assume me pressing any key on a textbox would trigger this.

No, it does not trigger by the textbox, as textbox steals the key presses. As I mentioned, you should be using that If you are scripting a custom textbox (using a label or drawing surface) (not using default one).
« Last Edit: 18 Jun 2022, 13:17 by Crimson Wizard »

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #170 on: 18 Jun 2022, 13:34 »
The log is the same with "default" set on audio device, it reverts to "directsound"

pasting their acsetup.cfg
Code: Adventure Game Studio
  1. [graphics]
  2. driver=OGL
  3. filter=StdScale
  4. fullscreen=desktop
  5. game_scale_fs=proportional
  6. game_scale_win=round
  7. refresh=0
  8. render_at_screenres=0
  9. vsync=0
  10. window=default
  11. windowed=0
  12. [language]
  13. translation=
  14. [misc]
  15. antialias=1
  16. cachemax=131072
  17. shared_data_dir=
  18. user_data_dir=
  19. [mouse]
  20. auto_lock=0
  21. speed=1.5
  22. [sound]
  23. driver=
  24. enabled=1
  25. usespeech=1
  26.  
« Last Edit: 18 Jun 2022, 13:37 by Dualnames »
No more military army stuff. I'm alive and back.

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #171 on: 18 Jun 2022, 14:24 »
Meanwhile on the "on_text_input(int ch)" front, it seems to work, but it's not capturing all keys. Specifically, for example greek alphabet/happens partially on korean too.

Code: Adventure Game Studio
  1. function on_text_input(int ch)
  2. {
  3. player.SayBackground(String.Format("%d",ch));
  4. }
  5.  

Shows nothing on the majority of the key presses. For instance typing "αβγο" which would be A->B->G->O doesn't show any number on that say command.
Thoughts?

No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #172 on: 18 Jun 2022, 15:21 »
Meanwhile on the "on_text_input(int ch)" front, it seems to work, but it's not capturing all keys. Specifically, for example greek alphabet/happens partially on korean too.

Code: Adventure Game Studio
  1. function on_text_input(int ch)
  2. {
  3. player.SayBackground(String.Format("%d",ch));
  4. }
  5.  

Shows nothing on the majority of the key presses. For instance typing "αβγο" which would be A->B->G->O doesn't show any number on that say command.

I would have to make a test game and investigate this.
Could you tell which keyboard layout do you use on your system?

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #173 on: 18 Jun 2022, 16:01 »
qwerty, I've installed Greek and Korean, and used both mine and the onscreen keyboard, windows 10.
No more military army stuff. I'm alive and back.

eri0o

Re: AGS 3.6.0 - Beta 7
« Reply #174 on: 18 Jun 2022, 23:18 »
Meanwhile on the "on_text_input(int ch)" front, it seems to work, but it's not capturing all keys. Specifically, for example greek alphabet/happens partially on korean too.

Code: Adventure Game Studio
  1. function on_text_input(int ch)
  2. {
  3. player.SayBackground(String.Format("%d",ch));
  4. }
  5.  

Shows nothing on the majority of the key presses. For instance typing "αβγο" which would be A->B->G->O doesn't show any number on that say command.
Thoughts?

I set here to greek and got 913, 914, 915 and 927 forΑΒΓΟ, and then 945, 946, 947 and 959 for αβγο. Below the keyboard I used in Win10. Is this the one you have set?

Spoiler: ShowHide

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #175 on: 19 Jun 2022, 07:48 »
@Dualnames, also, to double check, since I cannot remember if you mentioned if the game is set to unicode mode:
- General Settings -> Text format -> should be Unicode
WARNING: if it's not, make sure to make a backup of your game, because switching to unicode will reencode and resave most game files.

if you're using translations, they all also need to have a utf-8 Encoding option in TRS, because translations switch the engine between ascii and utf-8 modes for backwards compatibility.
(actually, I wonder if i should disable this if game is already utf-8, as it's difficult to imagine why you would use ascii translation in a unicode game, other than by mistake)

More detailed info here:
https://adventuregamestudio.github.io/ags-manual/UpgradeTo36.html#unicode-support
« Last Edit: 19 Jun 2022, 07:50 by Crimson Wizard »

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #176 on: 19 Jun 2022, 11:17 »
@eri0o Yes!

@CrimsonWizard Also yes, it's already set there.

Does the script API and compatibility need to be at 3.6.0? It's set to 3.5.1 atm.

EDIT: eri0o if it's small can u send me over that project where u tested the thingie, to see if it works on my end? If it does, it's an error on my end, if it doesn't there's something else.
« Last Edit: 19 Jun 2022, 11:20 by Dualnames »
No more military army stuff. I'm alive and back.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #177 on: 19 Jun 2022, 11:30 »
Does the script API and compatibility need to be at 3.6.0? It's set to 3.5.1 atm.

Hmm, no, I don't think that matters. Unicode mode lets it have proper codes, and "Use old key input mode" (true or false) defines whether on_text_input is called at all.

What about text display, will it show up correctly if you just display the string of Greek/Korean text on screen?

Dualnames

  • AGS Baker
  • Rottwheelers
  • Pretty Badass
    • Lifetime Achievement Award Winner
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #178 on: 19 Jun 2022, 11:32 »
Yes, everything else works perfect! It works when it replaces english text [via the translation] it also works if i type greek characters into a label on the editor as well.
No more military army stuff. I'm alive and back.

Re: AGS 3.6.0 - Beta 7
« Reply #179 on: 19 Jun 2022, 13:27 »
Hi again ! I created a new translation file (in the editor), and I saw that the texts inside it were badly displayed. Each éèÉ etc... was displayed badly.

I'm still using the Unicode format. Any idea ? I never got such problems before (I'm using AGS 3.6.0.25)

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #180 on: 19 Jun 2022, 13:32 »
Hi again ! I created a new translation file (in the editor), and I saw that the texts inside it were badly displayed. Each éèÉ etc... was displayed badly.

How is the file saved (what encoding), does your text editor have options to display in different encodings and which is active?

Re: AGS 3.6.0 - Beta 7
« Reply #181 on: 19 Jun 2022, 13:34 »
It seems that my file is in UTF-8. I use Notepad (I don't know if it's the same name in english, it's the basic program in Windows).

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #182 on: 19 Jun 2022, 14:18 »
It seems that my file is in UTF-8. I use Notepad (I don't know if it's the same name in english, it's the basic program in Windows).

Is your game itself made in unicode format, where are these texts coming from (script, properties)?
Could you upload a translation file, just to understand what we are talking about?

Re: AGS 3.6.0 - Beta 7
« Reply #183 on: 19 Jun 2022, 14:47 »
Well, I repeated the operation, and... it worked ?!

Will look if it happens again. I don't what hapened before...! Sorry :(

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #184 on: 19 Jun 2022, 15:07 »
I actually recommend using Notepad++, i believe it works better than regular windows notepad.

SinSin

  • 15 years and counting!
    • I can help with backgrounds
    • I can help with play testing
    • I can help with voice acting
    • SinSin worked on one or more games that won an AGS Award!
    •  
    • SinSin worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #185 on: 19 Jun 2022, 21:32 »
Congrats to all who are a part of this 👏
Currently working on a project!

Re: AGS 3.6.0 - Beta 7
« Reply #186 on: 21 Jun 2022, 18:29 »
@Crimson Wizard : are you going to update properly AGS 3.6 soon ? Or I have to use your fix you gave me before ?

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 7
« Reply #187 on: 21 Jun 2022, 18:40 »
@Crimson Wizard : are you going to update properly AGS 3.6 soon ? Or I have to use your fix you gave me before ?

You could use a "temp build" with a fix, as it is exactly same program, only in between "official" versions.

The next update will be exclusively bug fixes, I think it will happen later on this week.

Re: AGS 3.6.0 - Beta 7
« Reply #188 on: 21 Jun 2022, 20:58 »
Bump.

Have anything tried running latest 3.6.0 on linux in fullscreen mode? Trying this on a linux virtual machine results in a completely black window with no video or audio or reaction to input, regardless of the chosen renderer; so I am wondering if that's vm or engine's problem.

I'm not sure if this is still relevant or if I fully understood the question- I compiled the Tumbleweed demo with some mp3 music included in AGS-3.6.0.27-Beta7 for Windows and ran it under Kubuntu 20.04 system in fullscreen mode and everything went smoothly..

If it would help to test anything else in Kubuntu, let me know.
How much wood would a wood chuck chuck if a wood chuck could chuck wood?

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 8
« Reply #189 on: 22 Jun 2022, 01:51 »
Updated to Beta 8
(use download links in the first post)

Editor:
- Added "Help" option to the editor pane's tab context menu.
- Dialog scripts now too can open help topics for keywords or script functions under cursor on F1.
- Fixed not showing correct help topics for several panels on F1.

Engine:
- Added "multitasking" option to config in "[misc]" category, that defines the starting multitasking mode (may later be changed by SetMultitaskingMode in script).
- Added stubs for agsshell plugin (a contemporary cross-platform variant of ags_shell).
- Fixed characters switching to a wrong loop unnecessarily if a current walking directional loop does not have as many frames as the previous one (regression since 3.6.0.6).
- Fixed GUI controls don't update immediately when game translation changes.
- Fixed saving of dynamic sprites and screenshots to a file (or a savegame).
- Fixed certain OGG clips stuck in loading forever.
- Fixed sound clips getting stuck in a playback state near the end if their size is a multiple of 65536.
- Fixed some clips reporting a large negative number as their length (should report 0 instead if it cannot calculate one for whatever reason)
- Fixed multitasking mode persisting if the game was switched from windowed to real fullscreen mode (even though it's not supposed to work in exclusive fullscreen).
- Fixed Direct3D renderer not able to restore an exclusive fullscreen mode after switching out from the game window.
- Fixed game not reacting to system close commands when stuck in script, which made it impossible to close the "hanging" game by usual means (other than terminating the process).
- Fixed number of occasional crash cases on game exit.
« Last Edit: 22 Jun 2022, 03:59 by Crimson Wizard »

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 8
« Reply #190 on: 22 Jun 2022, 15:03 »
Quote
- Dialog scripts now too can open help topics for keywords or script functions under cursor on F1.

Nothing to add but "Yessssssssssss!" Been hoping for this one! Thanks!

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 8
« Reply #191 on: 23 Jun 2022, 14:16 »
So, unfortunately there was still an annoying sound bug in the recent update, related to crossfading tracks; I'll be releasing a next update quite soon, maybe in the end of this week (want to wait for a couple of days more to see if there are more problems found). Meanwhile there's this temporary build with fixes:

https://cirrus-ci.com/task/4541835971395584

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 8
« Reply #192 on: 25 Jun 2022, 18:54 »
Am I imagining things, or have someone reported a mouse not moving in fullscreen on Linux a short while ago?

I've reinstalled a newer build on Ubuntu on a virtual machine, and the previous problem of fullscreen not displaying anything is gone, but now I have a different issue: the mouse cursor not moving. Curiously enough, mouse clicks (and keys) work. This is fixed by alt-tabbing out and back. Could be something related to vm though, as it sometimes has issues with mouse grab.

Crimson Wizard

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS 3.6.0 - Beta 9
« Reply #193 on: 28 Jun 2022, 03:20 »
Updated to Beta 9
(use download links in the first post)

Engine:
 - Fixed a script linking problem in games made with 3.6.0 alpha which used Button.Animate() with new parameters.
 - Fixed MP3 sounds not reporting their length properly.
 - Fixed sound clips not stopping by command if they had a crossfade enabled.
 - Fixed scheduled sound fadeout effect was not cancelled by skipping a cutscene (a very old bug from early 3.*).
 - Fixed false positive detection of a script hung in a do..while loop that could stop the game.

Android:
 - Fixed AGS Player (universal launcher) crashing when launching any game (regression since 3.6.0.18).
 - In AGS Player fixed Credits option not showing anything.

Re: AGS 3.6.0 - Beta 9
« Reply #194 on: 28 Jun 2022, 10:20 »
Hi there ! I playtested my game, and I thought about some things :

Suggestions :

- Would it be possible to make "Slider_OnClick" functions to allow 2 parameters like "Buttons_OnClick" functions ? (so "Slider_OnClick(GUIControl *control, MouseButton *button"). If it's not a big problem, it will allow to simplify the code when we make our own sliders and arrows, gathering all of these controls into 1 function (and not 3). At least for me, it would be great :)

- Any way to add a parameter for list boxes that allow to "cut" the text of the items if they are too long (out of the listbox) ? And without "changing" the real text of these items (like the items are always the full text, but the listbox displays only what it fits into the box). Could be nice to allow a true/false option for this.

Problems :

- it seems that the "_" symbol doesn't allow to correctly find the "keyword" we are writing into the editor. For example, if I have to write into the editor my variable "is_bright", when I write "is_", it should appear in the list and select my variable (so then I just press enter and it's done). I mean for "autocompletion". Since 3.6, it doesn't understand the "_" symbol. Maybe other symbols do the same problem, I don't know.

- When I write "int p=player.Room", the word "Room" becomes in blue, because it's like the editor considers that we are talking about the struct "Room". Normally, it should stay in black, because it's not the struct, but the part of the "player" struct.

I hope my english is well understable