Adventure Game Studio | Forums

AGS Support => AGS Engine & Editor Releases => Topic started by: Crimson Wizard on Sat 05/11/2016 20:03:37

Title: AGS 3.4.0 - Patch 1
Post by: Crimson Wizard on Sat 05/11/2016 20:03:37
AGS 3.4.0 - Patch 1 released
Current release number: 3.4.0.13

*** Download as installer *** (http://www.adventuregamestudio.co.uk/releases/finals/AGS-3.4.0-P1/AGS-3.4.0-P1.exe)
*** Download as ZIP archive *** (http://www.adventuregamestudio.co.uk/releases/finals/AGS-3.4.0-P1/AGS-3.4.0-P1.zip)
--- NO-MP3 engine variant --- (http://www.adventuregamestudio.co.uk/releases/finals/AGS-3.4.0-P1/AGS-3.4.0-P1-noMP3.zip)
Linux build package as ZIP archive (https://github.com/adventuregamestudio/ags/releases/download/v.3.4.0.13/AGS.3.4.0.13.Editor.Linux.Pack.zip)



AGS source code central repository (https://github.com/adventuregamestudio/ags)
Debug symbols database (for analysing crash dumps) (http://www.adventuregamestudio.co.uk/releases/finals/AGS-3.4.0-P1/AGS-3.4.0-P1-PDB.zip)



Released: 5th November 2016

Previous stable version: AGS 3.3.5 forum thread (http://www.adventuregamestudio.co.uk/forums/index.php?topic=53920.0)


A minute of attention for those who did not have a chance to check 3.4.0 during its development:
AGS 3.4.0 contains a big load of changes, which may take a while to explore. The following (read-only) topic is created to make getting used to it easier:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=52499.0

Also, please, read "Upgrading to AGS 3.4" topic in the manual that comes with this version. It contains important information on most notable new features and few potential problems you may encounter when upgrading older projects.

Another important note on upgrading your project to latest 3.4.0 (read under spoiler):
Spoiler

AGS 3.4.0 now has a "Script API version" and "Script compatibility level" switches, which determine a range of built-in script functions you may use in your game (also called Script API).
"Script API Version" defines the TOP limit, or the latest version of scripting your game uses.
"Script compatibility level" defines the BOTTOM limit, or which OLD functions should still be available.

When you upgrade your game project from the older versions (3.3.* and lower), the Editor automatically sets "Script compatibility level" corresponding to the version of AGS this project was last saved in. This is done for backward compatibility. But you can change that anytime. Be prepared, however, that you may have to fix certain parts of your script. Usually necessary fixes are limited to renaming functions. Also, it is suggested to do "Rebuild all files" after you change any of those two switches.
[close]



Changes in the Patch 1:

Editor:
- Fixed #if(n)ver preprocessor directive failed to properly compare versions if the current and required versions have different number of digits.

Engine:
- Returned support for some older config options related to graphics mode, so that the engine would be able to use old config files.
- Fixed graphics mode initialization failure in certain less common setup cases, such as when requested window size was larger than current desktop resolution, or when the final mode appeared smaller than the precalculated one.
- Fixed couple of memory leaks occuring when saved game is restored.
- Fixed rare crash when restoring a game while having unreleased DrawingSurface pointers.
- Fixed compilation in C++11 mode.

WinSetup:
- Fixed "native game resolution" mode choice was not properly restored when loading config file.



What is new in 3.4.0

Common features:
- Added support for building game for multiple platforms (Windows and Linux options are maintained now).
- Added custom game resolutions.
- Added extended WFN font support (up to 256 characters).
- Made custom property values modifiable at runtime.
- Removed limit on custom properties number (was 30 properties per project), increased maximal property name and value length.
- Removed limit on GUI Control number (was 30 per GUI), increased maximal control name length.
- Removed limit on script modules number (was 50).
- Added Locked property to room Objects.
- Added Padding property for TextWindow GUI.

Editor features:
- New splash screen.
- Exposed Clickable property for room Objects in the Editor.
- Exposed TintLuminance property for room Regions in the Editor.
- Added "Close all tabs" command for the pane's context menu.
- Added Preferences option "Prompt dialog on closing multiple tabs".
- The sprite editor now highlights drop targets when you drag sprites around.

Editor Plugin API:
- Exposed GUI Panes to plugin API.

Engine features:
- Added support for any runtime display resolution (now restricted only by your system specifics).
- Added support for vertical sync in Direct3D rendering mode.
- Made engine try to use all implemented graphic renderers in the order of priority, if user selection failed to initialize.
- Rised default sprite cache limit for desktop platforms to 100 MB (was 20).
- Game writes latest translation and mouse speed setting to config file on exit.

Scripting features:
- Added managed user structs; although currently limited to containing only non-pointer variables in them.
- Added support for dynamic arrays in non-managed structs.
THERE ARE KNOWN ISSUES:
Spoiler

It was found that dynamic arrays in struct do not work when you make an array of those struct, for example:
Code (ags) Select

struct MyStruct
{
    int dynamic_array[];
};

MyStruct single_object; // <--- this will work
MyStruct arr_of_structs[10]; // <--- this won't work

Such array caused troubles which were too complicated to fix in time, and require more time to investigate. A decision was made to block creation of arrays of structs, containing dynamic arrays. If you try to declare one in your script you will get an error. Hopefully this restriction will be raised in the future updates.
[close]
- Added support for dynamic array as return value of the struct's member function.
- Added support for static extender functions.
- Added "do..while" kind of loop, in addition to previously existing "while".
- Added "for" operator and related loop construct.
- Added "switch" and "case" operators and related branching construct.
- Added "break" and "continue" operators working in any loop or switch.
- Added missing compound assignment operators (*=, /=, and so on).
- Made preprocessor macros usable in definition of another macro.
- Added "#region" and "#endregion" preprocessor commands.

Script API:
- Added Script API version switch to the project's General Settings. For every supported API version a "SCRIPT_API_vXXX" macro is introduced, where XXX are version numbers.
- Added Script Compatibility Level switch to General Settings. For every compatible version a "SCRIPT_COMPAT_vXXX" macro is introduced.
- Added AudioChannel.Speed property.
- Added CharacterDirection enum and optional "direction" parameter for Character.ChangeRoom().
- Added Character.FaceDirection().
- Added Character.DestinationX and Character.DestinationY properties.
- Added RunActiveOption() and Update() member functions to the DialogOptionsRenderingInfo type.
- Extended Dialog Options API: added support for dialog_options_repexec() and dialog_options_key_press() functions to improve handling of the custom dialog options; added related compatibility project option and support for "NEW_DIALOGOPTS_API" macro in scripts.
- Added game.dialog_options_highlight_color variable.
- Added File.Seek() function and File.Position property.
- Added IsInteractionAvailable() method to Hotspot, Object and Character types.
- Added Game.AudioClipCount property and Game.AudioClips[n] array.
- Added Game.IsPluginLoaded().
- Added GUIControl.ZOrder property.
- Added GUI.Click() and Button.Click() functions which call OnClick event handler of corresponding GUI or button.
- Added GUI.ProcessClick() function that processes click on GUI only, similarily to how old ProcessClick processed click on room objects only.
- Added Mouse.Click() function to simulate mouse click on screen.
- Added Room.GetProperty() to substitute global GetRoomProperty().
- Added Room.ProcessClick() to substitute global ProcessClick().
- Added SetProperty() and SetTextProperty() functions to Room, InventoryItem, Hotspot, Object and Character types.
- Added optional "luminance" parameter to Region.Tint() and Region.TintLuminance readonly property.
- Added SetAmbientLightLevel() to set global light level for anything in the room.
- Added Character.SetLightLevel() and Object.SetLightLevel() functions to set individual light levels. Negative light levels can be used in 8-bit games to produce darkening effect.
- Added System.RuntimeInfo property which returns a short description of current graphics mode, scaling filter and enabled game resources.

Editor bug fixes:
- Fixed Undo history was deleted when an Editor panel changes its docked state.
- Fixed crashes under certain circumstances when a script editor is closed.
- Fixed crash if selecting a character without a normal view in the room editor.
- Fixed Ctrl+Tab did not work for the first time when cycling through opened editor tabs.
- Fixed "Go to Line..." command did not always move cursor to correct line. Also, do not select that line.
- Made the project completely rebuild itself whenever "Enable Debug Mode" value in the General Settings differs from the setting used for the last build, to prevent inconsistency in compiled scripts.
- Fixed a crash when trying to run game setup from the Editor while "Compiled" folder does not exist.
- Fixed project items could sometimes get incorrectly arranged inside the folder.
- Fixed writing faulty timestamps in project file on some occasions that could spoil usage of file versioning control.
- Fixed Help window positioning on multi-monitor desktop.
- Fixed error in autocomplete occuring when there is a single-line comment in the end of the script.
- Fixed incorrect compiler parsing of a static function call inside array index brackets.
- Fixed compilation of struct member functions having name identical to existing global function.
- Fixed compilation of structs having members with names identical to non-basic types, global variables and game entities (such as characters, GUI, etc).
- Corrected few error messages related to struct's function declaration.
- Fixed compiler reporting errors as "runtime errors" under certain circumstances.

Engine bug fixes:
- Fixed result of using transparency parameter of the DrawingSurface.DrawImage() in 32-bit games when drawing opaque sprites over surfaces with alpha channel.
- Fixed DynamicSprite.CopyTransparencyMask() was overwriting magic transparent pixels on destination with alpha values from mask.
- Fixed the speech portrait position was not adjusted for character walking between its lines, when BasedOnCharacterPosition portrait placement is used.
- Fixed occasional pathfinding failure on straight lines with complex walkable areas.
- Fixed using '[' special character in Display-like commands discarded all of the backslashes before it (e.g. "\\[" should now print \[ as expected).
- Fixed WAVE audio not looping after restoring a game
- Fixed a bug that caused MP3 clip continuously increase its base volume if the directional volume modifier was applied.
- Fixed queued audio clips did not update their volume when default audio type volume changes.

WinSetup:
- Added support for "default_translation_name" option in the "[language]" section of the config file.





Thanks to everyone who contributed to and tested this version!



Title: Re: AGS 3.4.0 - Patch 1
Post by: Cassiebsg on Sun 06/11/2016 10:36:30
Thanks for you hard work... (nod)

I seem to have a limit... thought most limits had been removed. :-\
Any change to get a bump up on the objects limit? Or do I need to go the dynamic sprite/character solution?

EDIT: Okay I found a "workaround" by reusing 1 object with different animations, since the player is interacting with hotspots and never can see these objects animating at the same time anyway. ;)
Title: Re: AGS 3.4.0 - Patch 1
Post by: cat on Wed 09/11/2016 08:32:25
I tried the new version with the installer yesterday. During installation (all standard settings but I didn't install the demo game) there was an additional popup for installation (was this for the VS redistributable stuff?) that got stuck and didn't go away. Only after a veeeery long time there was a message that no connection could be established. After that I got a message that I should restart my computer which I didn't do at that moment. AGS was installed and working, though.
When I finally rebooted the system, it crashed (nice Win10 error screen with ASCII :-( ). The PC was automatically restarted and AGS seemed to work again, but weird installer issues...
Title: Re: AGS 3.4.0 - Patch 1
Post by: Gord10 on Fri 11/11/2016 21:08:08
I started using the new version for my jam game.

However, I was confused by website (http://www.adventuregamestudio.co.uk/site/ags/) which says 3.4.1, instead of 3.4.0.
Title: Re: AGS 3.4.0 - Patch 1
Post by: Crimson Wizard on Fri 11/11/2016 21:44:25
Quote from: Gord10 on Fri 11/11/2016 21:08:08
I started using the new version for my jam game.

However, I was confused by website (http://www.adventuregamestudio.co.uk/site/ags/) which says 3.4.1, instead of 3.4.0.
That's a typo... will fix it.
Title: Re: AGS 3.4.0 - Patch 1
Post by: Cassiebsg on Sun 20/11/2016 21:57:01
Is there a problem in using "goto-dialog" in this version?
Was play testing my game and noticed a script that did not run when it was suppose to... that kind of messed up my game. I fixed it by deleting the goto command and adding a dialog.Star(); script command instead.

Or was it me that used it wrong? (and thus, maybe the bug is still there?) :-\

I seem to recall having issues with the goto-dialog in my latest MAGS )Out of Gas) too. Ended up doing the same as the above to make things work.
Title: Re: AGS 3.4.0 - Patch 1
Post by: Crimson Wizard on Mon 21/11/2016 08:37:38
Quote from: Cassiebsg on Sun 20/11/2016 21:57:01
Is there a problem in using "goto-dialog" in this version?
Was play testing my game and noticed a script that did not run when it was suppose to... that kind of messed up my game. I fixed it by deleting the goto command and adding a dialog.Star(); script command instead.

Or was it me that used it wrong? (and thus, maybe the bug is still there?) :-\

I seem to recall having issues with the goto-dialog in my latest MAGS )Out of Gas) too. Ended up doing the same as the above to make things work.

I cannot answer questions like these. We would need an actual test case: at the very least the dialog script that does not work as expected.
Unless you are saying that "goto-dialog" command does not work at all?
Title: Re: AGS 3.4.0 - Patch 1
Post by: Radiant on Mon 21/11/2016 08:43:05
I've got a few people testing Heroine's Quest in the latest master branch build of AGS. So far they don't report anything regarding goto-dialog.
Title: Re: AGS 3.4.0 - Patch 1
Post by: Cassiebsg on Mon 21/11/2016 15:25:55
CW, was just a question, if it's working fine for others then it's just probably me that screwed it up.
Title: Re: AGS 3.4.0 - Patch 1
Post by: MiteWiseacreLives! on Tue 06/12/2016 18:05:19
Hey I'm getting an error after making adjustments to a sprite in default editor, saving it, then I copy it to clipboard and re-import it.
AGS throws an error when i go to save, something to do with losing the  backup sprite file.
I sent a bug report.
Quote

AGS.Types.AGSEditorException: Unable to create the backup sprite file. Make sure the backup sprite file is not read-only ---> AGS.Types.AGSEditorException: Unable to create the backup sprite file. Make sure the backup sprite file is not read-only
   at save_game(Boolean compressSprites)
   at AGS.Native.NativeMethods.SaveGame(Game game)
   at AGS.Editor.NativeProxy.SaveGame(Game game)
   at AGS.Editor.AGSEditor.SaveGameFilesProcess(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.AGSEditor.SaveGameFiles()
   at AGS.Editor.Components.FileCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.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.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 AGS.Editor.ToolStripExtended.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)


Edit: OK so I thought this was new to this version because I've never seen it before.. then i did a forum search and rebooting your computer seems to be the fix. ???  go figure, windows 10 locking files? I don't know.
Edit2: So this became an ongoing issue.. the best fix I've found is to run AGS as an administrator, seems to be working so far.
Title: Re: AGS 3.4.0 - Patch 1
Post by: MiteWiseacreLives! on Thu 08/12/2016 06:41:38
Can someone help me with this issue?
I was able to move ahead running AGS as an admin, but now that no longer works.
I get the crash when after importing sprites I attempt to save, and lose all the sprite images.
Title: Re: AGS 3.4.0 - Patch 1
Post by: Crimson Wizard on Thu 08/12/2016 08:33:31
Quote from: MiteWiseacreLives! on Thu 08/12/2016 06:41:38
Can someone help me with this issue?
I was able to move ahead running AGS as an admin, but now that no longer works.
I get the crash when after importing sprites I attempt to save, and lose all the sprite images.
Where is your game folder located?
Title: Re: AGS 3.4.0 - Patch 1
Post by: MiteWiseacreLives! on Thu 08/12/2016 08:46:02
H:\mags2016\
It's on my secondary drive the hdd
Title: Re: AGS 3.4.0 - Patch 1
Post by: Crimson Wizard on Thu 08/12/2016 08:57:06
I believe AGS should not crash simply because it cannot write backup. I will look into this.
Title: Re: AGS 3.4.0 - Patch 1
Post by: greg on Sun 22/01/2017 00:46:49
Hello!  I've been coding away in the latest patch of 3.4.0, and it's amazing.  For example, "Replace sprite(s) from source" is INCREDIBLE.  I just discovered this command, and it's already saved me hours.

In the message below, I've documented some bugs, strange behavior, and undocumented behaviors I've found.  I've managed to work around all of these, so I don't require any assistance.  I just wanted to add them to your bug list for future releases.

Thanks!
Greg

I. Bugs:

1. In the editor, "Find next" (F3) doesn't respect the case-sensitivity specifed during the original "Find" (Ctrl+F).

2. In the editor, when you use "Add all sprites from folder," the last directory you added-all-sprites from doesn't persist in the file explorer window on subsequent calls to "Add all sprites from folder."  Namely:

When you add sprites to a view one-by-one (i.e. double click a frame, navigate to directory foo, and select a sprite in that directory), the last folder you loaded a sprite from persists.  That is, when you one-by-one-add the next sprite, the file explorer window is already showing folder foo.  This is great.

However, when you add sprites to a view by right-clicking a frame and selecting "Add all sprites from folder," the folder selection doesn't persist.  That is, when you next select "Add all sprites from folder" (even if it's immediately after your last "Add all sprites from folder"), the file explorer window doesn't show the folder where you last added-all-sprites from, but rather the folder that you last one-by-one-added sprites from.

3. Switch statements on strings don't seem to work.  The manual suggests that they should, but the following function returns null, not the expected value of aBgCASU1004:

AudioClip* get_bgclip(String stringId) {
  String string_test = "test";
  switch (string_test) {
    case "test": return aBgCASU1004;
  }

  return null;
}

II. Strange Behavior

4. When running the game at a "high" game speed (i.e. 360), the performance of the game veers dramatically.  For example, when a character walked across the screen, the walk would play normally, then slow down, the snap back to the normal speed.  I was able to reproduce this on various machines, all of which were modern and powerful.  When I set the game speed back to the default (i.e. 40), the problem went away.

Is this expected, and/or is there a maximum recommended game speed?

5. My game was saved in an automatically sync'd-to-cloud location (i.e. OneDrive), and a room file became corrupted as I saved it in the editor.  I fixed the immediate problem by restoring it from backup, but is it recommended not to save games in OneDrive, Dropbox, or other sync'd-to-cloud locations?

In case you're interested in the corruption, I've included the error messages below.

III. Undocumented Behavior.  I'd suggest adding these to the documentation:

6. In addition to the cases listed in the manual (Character.Walk() and Character.Move()), Character.Moving is set to "true" when Character.x, Character.y, or Character.z variables are manually changed or when the character is turning (e.g. any of the character.Face*() commands).

7. When Character.SpeechView is disabled (i.e. set to -1), while the character is speaking, no animation is played and Character.SpeechView is set to 0.

PS: Here is the error information for the corruption in #5.  The message claims it's an "old room format"; however, I was able to edit the room within the editor until the corruption occurred.  (If you'd like them, I have copies of the corrupt and non-corrupt crm file.)

Error: Load_room: old room format. Please upgrade the room.
Version: AGS 3.4.0.13

AGS.Types.AGSEditorException: Load_room: old room format. Please upgrade the room.
   at ThrowManagedException(SByte* message)
   at load_room_file(SByte* )
   at load_crm_file(UnloadedRoom roomToLoad)
   at AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)
   at AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   at AGS.Editor.Components.RoomsComponent.LoadDifferentRoom(UnloadedRoom newRoom)
   at AGS.Editor.Components.RoomsComponent.LoadRoom(String controlID)
   at AGS.Editor.Components.RoomsComponent.ItemCommandClick(String controlID)
   at AGS.Editor.Components.BaseComponentWithFolders`2.CommandClick(String controlID)
   at AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   at AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.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)
Title: Re: AGS 3.4.0 - Patch 1
Post by: Dave Gilbert on Wed 25/01/2017 00:06:06
I can't speak for everybody, but I've been working almost exclusively in my dropbox folder for almost a decade and I've never had any problems with it.
Title: Re: AGS 3.4.0 - Patch 1
Post by: Crimson Wizard on Wed 25/01/2017 01:26:17
There seem to happen a room corruption occasionally (I've seen couple of reports before), but the cause of it is unknown.
The error message reports of a failure when loading the room, but how did it become corrupted in the first place is not easy to diagnose.
Title: Re: AGS 3.4.0 - Patch 1
Post by: greg on Sun 29/01/2017 20:23:24
Noted, and thanks!