AGS 3.4.0 - RC2 (Release candidate)

Started by Crimson Wizard, Sun 19/06/2016 23:27:16

Previous topic - Next topic

Crimson Wizard

AGS 3.4.0 (RC2) released







Released: 22th August 2016

Previous stable version: AGS 3.3.5 forum thread


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]



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

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.


TODO
- The Manual was updated, but needs a little rereading/testing.
- Some of the game templates should be properly updated, although they could be used with minor amount of manual fixes.
- Demo Game should be tested and probably upgraded to 3.4.0.



Mehrdad

Great!!!!
Nice job CW . Thanks for your hard works
My official site: http://www.pershaland.com/

Mehrdad

I have two computers as Win 10 and Win 8.1 . Win 10 is ok but on Win8.1 I have this error when I run game . (compiled to exe is OK too)
My graphic card is  nVidia GT220

Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0059D5C0 ; program pointer is +379, ACI version 3.4.0.8, gtags (3,22)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.
------------------------------------------

What can I do?
My official site: http://www.pershaland.com/

Crimson Wizard

#3
Quote from: Mehrdad on Mon 20/06/2016 12:18:46
What can I do?
Could you upload CrashInfo***.dmp? It should appear in your game's folder.
What graphic renderer are you using?
NOTE: this is somehow related to drawing GUI controls.

Mehrdad

#4
Quote from: Crimson Wizard on Mon 20/06/2016 12:25:29
Quote from: Mehrdad on Mon 20/06/2016 12:18:46
What can I do?
Could you upload CrashInfo***.dmp? It should appear in your game's folder.
What graphic renderer are you using?
NOTE: this is somehow related to drawing GUI controls.

Yes of course.Here you are:
https://www.dropbox.com/s/jnqofb9tsqrafe0/CrashInfo.3.4.0.8.dmp?dl=0
My resolution is 640X360 and run in the windows 1280X720 . Both have same massage.
My official site: http://www.pershaland.com/

Crimson Wizard

Did this start to occur after you updated to most recent 3.4.0 version (and which you had before?), or after you added something to your game?

Mehrdad

Quote from: Crimson Wizard on Mon 20/06/2016 12:54:00
Did this start to occur after you updated to most recent 3.4.0 version (and which you had before?), or after you added something to your game?
I used 3.4.0.7 and everything was OK.
My official site: http://www.pershaland.com/

Crimson Wizard

#7
The minimal crash dumps AGS is currently writing are of little help in this situation, for it gives too little information. I was thinking about changing this before...
As an experiment, here is a 3.4.0.8 compatible build that is supposed to write detailed information:
http://www.mediafire.com/download/vj05s0s08001ita/acwin-3.4.0.8--bigger-crashdump.zip

You need acwin.exe from this archive. Could you replace this in your latest AGS installation, rebuild and rerun your game, then upload new crash dump?
NOTE: the dump file is supposed to be significantly larger, although it is hard to predict how much larger, that depends both on the game, and how far in the game the crash occurs.

E: Hmm, I tested this on some "advanced" game, and I got 160 MB file... or 40 MB when archived.
I will have to try some variants to choose better settings for dump writing.
Of course it is not like games crash with unhandled exception every day so that could be a variant for exceptional cases (no pun intended).

Mehrdad

It's very strange... First time of run it works perfect. Even I compiled it and was successful .But second time of run I have this error:

Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0059D0D0 ; program pointer is +379, ACI version 3.4.0.8, gtags (3,22)

CW . crash info is more than 120 MB now.Is it normal? I compress it with winrar and get 32MB . Did you really want it? Because my internet is very slow for upload
My official site: http://www.pershaland.com/

Crimson Wizard

#9
Quote from: Mehrdad on Mon 20/06/2016 15:31:30
CW . crash info is more than 120 MB now.Is it normal? I compress it with winrar and get 32MB . Did you really want it? Because my internet is very slow for upload
Sorry, better not for now, maybe I will find a better way to do this.
First I will research optimal settings for the dump.

E: The error sais: "gtags (3,22)". This means that error occurs when trying to draw GUI number 3, and control number with z-order of 22. I think it is Inventory Window (from the dump contents). Also, the crash is somehow related to drawing translucent sprite (with alpha channel probably?)
Hopefully this will define area to search what is going on.

Mehrdad

Quote from: Crimson Wizard on Mon 20/06/2016 15:33:58
Quote from: Mehrdad on Mon 20/06/2016 15:31:30
CW . crash info is more than 120 MB now.Is it normal? I compress it with winrar and get 32MB . Did you really want it? Because my internet is very slow for upload
Sorry, better not for now, maybe I will find a better way to do this.
First I will research optimal settings for the dump.

E: The error sais: "gtags (3,22)". This means that error occurs when trying to draw GUI number 3, and control number with z-order of 22. I think it is Inventory Window (from the dump contents). Also, the crash is somehow related to drawing translucent sprite (with alpha channel probably?)
Hopefully this will define area to search what is going on.

OK. Problem solved.Thanks so much CW for guide . I had a ZOrder = 1 for GUI 8 in global script.This Gui is fade to transparent as you said right . I removed it and it works perfect now. But why it wasn't this error in previous versions?  And why it works in my another computer with different graphic card and Win 10?
My official site: http://www.pershaland.com/

Crimson Wizard

Quote from: Mehrdad on Mon 20/06/2016 16:06:57
OK. Problem solved.Thanks so much CW for guide . I had a ZOrder = 1 for GUI 8 in global script.This Gui is fade to transparent as you said right . I removed it and it works perfect now. But why it wasn't this error in previous versions?  And why it works in my another computer with different graphic card and Win 10?

Hmm... either I interpret these GUI numbers wrong, or the crash cause was complicated, so it happened because of one GUI, but the actual error occured when another got to be drawn.

Anyway, this is impossible to answer on these questions without some kind of test setup. Can you give some information on what was drawn on screen and how that fading GUI was configured?
Like, was it only GUI on screen, were there any controls on that GUI, and so on?
How easily this error can be reproduced - will it return if you put GUI 8 back?

Mehrdad

Quote from: Crimson Wizard on Mon 20/06/2016 16:14:20
Quote from: Mehrdad on Mon 20/06/2016 16:06:57
OK. Problem solved.Thanks so much CW for guide . I had a ZOrder = 1 for GUI 8 in global script.This Gui is fade to transparent as you said right . I removed it and it works perfect now. But why it wasn't this error in previous versions?  And why it works in my another computer with different graphic card and Win 10?

Hmm... either I interpret these GUI numbers wrong, or the crash cause was complicated, so it happened because of one GUI, but the actual error occured when another got to be drawn.

Anyway, this is impossible to answer on these questions without some kind of test setup. Can you give some information on what was drawn on screen and how that fading GUI was configured?
Like, was it only GUI on screen, were there any controls on that GUI, and so on?
How easily this error can be reproduced - will it return if you put GUI 8 back?

Yes sure . It's a complete black GUI for deactivate control game and it appear with fade in as below code.BackP is name of GUI (GUI 8)

Code: ags
function Button4_OnClick(GUIControl *control, MouseButton button)
{

    BackP.ZOrder =1;
    BackP.Visible = true;  
    BackP.Transparency = 55;
    Wait(1);
    BackP.Transparency = 45;
    Wait(1);
    BackP.Transparency = 40;
    Wait(1);
    BackP.Transparency = 35;
    Wait(1);
    BackP.Transparency = 30;
    Wait(1);
    BackP.Transparency = 25;
    Wait(1);
    BackP.Transparency = 20;
    Wait(1);
    BackP.Transparency = 15;
    Wait(1);
    BackP.Transparency = 10;
    Wait(1);
    BackP.Transparency = 5;
    Wait(1);
    BackP.Transparency = 0;
    Wait(1);
    BackP.Visible = false;
    QuitGame(0);
}

 
My official site: http://www.pershaland.com/

Crimson Wizard

I have a weird feeling of deja vu now, like I've seen very similar error a while ago... I will try to create a small test game that does this.

Still, can you elaborate, are there any other GUIs on screen, behind that fading GUI?

Mehrdad

Quote from: Crimson Wizard on Mon 20/06/2016 16:34:30
Still, can you elaborate, are there any other GUIs on screen, behind that fading GUI?

Yes. This button (button 4 in up code) is "yes" for quit game . When appear quit game I have a quit GUI (GUI 9) with 2 button : yes and no. This GUI is complete over screen . In back I have BlackP GUI that I said and it goto fade to black for deactivate control game. 
My official site: http://www.pershaland.com/

Crimson Wizard

Quote from: Mehrdad on Mon 20/06/2016 16:49:02
Quote from: Crimson Wizard on Mon 20/06/2016 16:34:30
Still, can you elaborate, are there any other GUIs on screen, behind that fading GUI?

Yes. This button (button 4 in up code) is "yes" for quit game . When appear quit game I have a quit GUI (GUI 9) with 2 button : yes and no. This GUI is complete over screen . In back I have BlackP GUI that I said and it goto fade to black for deactivate control game. 

I cannot reproduce this problem with the primitive test that does just what you described above (and uses that script). There might be something more to what is causing it.
Could you for, example, comment all that script and then start uncommenting line after line to see at which point it crashes?

Mehrdad

Quote from: Crimson Wizard on Mon 20/06/2016 18:10:35
Quote from: Mehrdad on Mon 20/06/2016 16:49:02
Quote from: Crimson Wizard on Mon 20/06/2016 16:34:30
Still, can you elaborate, are there any other GUIs on screen, behind that fading GUI?

Yes. This button (button 4 in up code) is "yes" for quit game . When appear quit game I have a quit GUI (GUI 9) with 2 button : yes and no. This GUI is complete over screen . In back I have BlackP GUI that I said and it goto fade to black for deactivate control game. 

I cannot reproduce this problem with the primitive test that does just what you described above (and uses that script). There might be something more to what is causing it.
Could you for, example, comment all that script and then start uncommenting line after line to see at which point it crashes?
Problem is in line 4:
BackP.ZOrder =1;
I tested another lines. Wasn't any problem. When I remove this line isn't any crash.
My official site: http://www.pershaland.com/

Mehrdad

I tested many parameters yesterday and today too .I disabled transparency parameters without ZOrder and works fine too .I guess problem is relative to graphic card . My older computer have GT220 and didn't update anymore (I tried it today). My newer computer haven't problem.
CW . Did you had any main change for graphic play in 3.4.0.8 ? 
My official site: http://www.pershaland.com/

Crimson Wizard

#18
Quote from: Mehrdad on Tue 21/06/2016 12:32:52Did you had any main change for graphic play in 3.4.0.8 ? 
The thing is that I have not...
The changes since 3.4.0.7 are listed here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=53510.msg636537977#msg636537977

Unless it has something to do with sprite cache defaults... which is a random thought, but you may try lowering it down to 20 MB in setup and seeing if that changes anything.

Crimson Wizard

Uploaded Linux build package for this version: https://github.com/adventuregamestudio/ags/releases/download/v.3.4.0.8/AGS.3.4.0.8.Editor.Linux.Pack.zip
(Unpack and put "Linux" folder to where you installed AGS Editor)

SMF spam blocked by CleanTalk