AGS 3.3.5 - Patch 4

Started by Crimson Wizard, Tue 26/07/2016 18:12:55

Previous topic - Next topic

Crimson Wizard

AGS 3.3.5 - Patch 4 released



Released: 26th July 2016

Previous version: AGS 3.3.4 forum thread



Please, read the information under "spoiler" if you are new to 3.3.5 before using it
Spoiler

Since 3.3.5 AGS does not allow to write any files into other path rather than "$SAVEGAMEDIR$"
(personal user saves directory) or "$APPDATADIR$" (all-users game data directory). If you attempt to open
file for writing using relative path without location tag, the filepath will be automatically remapped to
$APPDATADIR$ location.

Because of that, for backwards compatibility reasons, when you try to open file for reading using relative path
without location tag, AGS will first look for that file in $APPDATADIR$, and only if no matching file is
found there, then the game installation directory will be checked.

To force opening file in the game installation directory (for reading) a new location tag was introduced:
"$INSTALLDIR$". When using this tag you will explicitly tell AGS to look in and only in the game's
installation directory. However, if you try opening file for writing at such location, that will result in
failure.

Players are now allowed to set up their own custom path in game setup, where the game
saves & data will be written. This is done in the game setup program.
This works as if $SAVEGAMEDIR$ and $APPDATADIR$ were redirected to custom location.
Redirection is done internally by the engine, you do not need to add anything to your game scripts to make it work.

Conceptually, AGS is gradually leaning towards using only "symbols of file locations" rather than actual,
explicit locations on the filesystem.

Furthermore, game setup will now write config file into game saves location, rather than game's installation directory.
If config file is present in the game installation folder, then it is used as "default" read-only config file.
The config in saves folder overrides default one.
This way it should be totally safe to install AGS games into C:/Program Files, without having administrative rights.
[close]
Also check "Upgrading to AGS 3.3" AND "Upgrading to AGS 3.3.5" topics in the manual that comes with this version. They contain important information on few potential problems you may encounter.



Changes in the Patch 4:

Compiler:
- Fixed crash occuring when there is an incomplete declaration in the end of script.

Engine:
- Engine will fall back to using default system paths if it failed using player-defined custom save path for any reason.
- Fixed engine displaying same warning twice if the loaded game was compiled for higher version of AGS.

WinSetup:
- Only let player choose actually existing folders for custom save paths.


Changes in the Patch 3:

Engine:
- Fixed "datafile" config option was ignored.
- Fixed "datadir" config option was never used when searching for possible game location
  (this was broken for several years!).
- Fixed Game.FileName property return empty string.
- Fixed built-in console making Direct3D9 graphics driver crash in 16-bit games.

Templates updated:
Reverted Verb Coin template to version 1.7.2, because the newer 2.0.0 version is bugged and it is not known if it can be correctly used at all.


Changes in the Patch 2 (relevant for Linux users mainly):
Engine:
- Fixed program compilation on big-endian systems.
- Fixed program compilation with GCC 6.


Changes in the Patch 1:

Engine:
- Added support for $INSTALLDIR$ location tag in the filepaths used in the script.
- Fixed game could not find files in the current directory when run from the Editor.

WinSetup:
- Fixed error that could occur if choosed custom save path contained "%" symbol.
- Read correct game's resolution from game data instead of config file.
- Do not write all default config contents to user config, save only options that are set by setup program.


Changes since version 3.3.4:

Editor Features:
- Path to resource's (sprite, audio) source file is now saved as relative one if the file is
  located inside game project's folder.
- Removed arbitrary limit of the script imports (was 50000).
- Script allows struct member qualifiers to be in any order.
- Better detection of integer constants overflow in script.
- Removed arbitrary limit of integer default value of +/-32000. Integer values are now limited
  by correct 32-bit values (-2147483648 to 2147483647).
- Support for negative constants in enums.
- Better folding markers and indentation guides in script editor.

Editor Bug Fixes:
- Fixed compiler crash if unknown keyword used after "readonly".
- Fixed compiler did not properly report incorrect type of dynamic array in function declaration.
- Fixed compiler did not report proper type name in case of syntax error sometimes.
- Fixed mouse cursor flicker above the script editor.

Engine Features:
- Removed unconfigurable mouse cursor's acceleration (Windows).
- Support for mouse cursor speed control (works in fullscreen mode only by defau;t): may be defined in configuration and changed in script.
- A config option for keeping consistent cursor speed relative to user's desktop resolution.
- Support for locking mouse inside window: automatic lock is enabled in configuration, and user
  may use Ctrl+Alt combination to lock/release mouse at any time.
- Restricted writing game files to special system directories
  (game is forbidden to write files into installation directiory or by absolute path).
  For old games unsafe paths are remapped.
- Support for player defined saves & game file directory.
- -v/--version command line argument makes engine display its version and bail.

Engine Bug Fixes:
- Fixed crash if screenshot is taken while game window was minimized or moving.
- Fixed alpha blend did not work properly for speech portrait if blinking frame did not have alpha channel.
- Fixed Display and Say script commands were displaying text for minimal amount of time under certain conditions.
- Fixed legacy audio functions did not start digital music playback if MIDI driver failed to initialize.
- Fixed game was run in smallest possible window if graphics driver failed to initialize fullscreen mode.
- Fixed "--help" command line argument not working all times depending on its order.
- Fixed engine did not always properly closed application window when running debug build.

Script API:
- Supported late_repeatedly_execute_always() callback in script, called after game has updated, but
  before it is drawn.
- Added Mouse.ControlEnabled (readonly) and Mouse.Speed properties.
- Added System.HasInputFocus property which tells if game currently has focus or runs at background.

Cosmetics & convenience:
- Clarified disabled MIDI option name in WinSetup.
- Extended information displayed if graphics driver failed to initialize.
- Clarified error messages for running unsupported games.


Templates updated:
Empty and Default Game templates were converted to 32-bit ones. You may still downgrade them to 16 and 8-bit after creating the game project of course.
Default Game template has its save system fixed, as explained in this thread.

Klytos

I'm not sure if this is a bug or I'm just missing something (which is entirely possible).

I just upgraded a project from 3.3.0 to 3.3.5. This project uses extensive dialog trees and DisplayTopBar commands for non-portrait minor characters. Same as we did with Quest for Infamy. In 3.3.0 this worked fine, I reinstalled 3.3.0 and confirmed that it works. The dialog script for one of these characters starts like this...

Code: ags
@S  // Dialog startup entry point
ego: &157 Hello there!
  DisplayTopBar(25, 14, 16, "Beekeeper", "&8071 Hello, sir! How are you?");
return


In game it will say the ego line, then for the topbar line just display a zero "0".

If I duplicate the TopBar line so the code looks like this...

Code: ags
@S  // Dialog startup entry point
ego: &157 Hello there!
  DisplayTopBar(25, 14, 16, "Beekeeper", "&8071 Hello, sir! How are you?");
  DisplayTopBar(25, 14, 16, "Beekeeper", "&8071 Hello, sir! How are you?");
return


It display the ego line, the same "0" as before, then the correct "Hello, sir!" line.

If I throw a Wait(1); after the ego line in the original example, it works fine.

Any thoughts?

Crimson Wizard

#2
Quote from: Klytos on Thu 11/08/2016 13:26:18
I just upgraded a project from 3.3.0 to 3.3.5. This project uses extensive dialog trees and DisplayTopBar commands for non-portrait minor characters. Same as we did with Quest for Infamy. In 3.3.0 this worked fine, I reinstalled 3.3.0 and confirmed that it works. The dialog script for one of these characters starts like this...

Code: ags
@S  // Dialog startup entry point
ego: &157 Hello there!
  DisplayTopBar(25, 14, 16, "Beekeeper", "&8071 Hello, sir! How are you?");
return


In game it will say the ego line, then for the topbar line just display a zero "0".

At first I did had a suspicion that this may be related to something I had changed in the engine during 3.3.5 development, but so far I found nothing wrong, and when I test your script in 3.3.5 it works without problem. So there should probably be some additional conditions to make this issue reproduce.

And the fact that second line works correct or Wait fixes it makes it more puzzling.

I have couple of questions: does it occur for you if you just make a default project and insert this dialog there?
Also, will same problem occur if you put these lines in common script (not dialog)?
Did you try to run the game without voice over?

Klytos

Quote from: Crimson Wizard on Thu 11/08/2016 17:07:54
At first I did had a suspicion that this may be related to something I had changed in the engine during 3.3.5 development, but so far I found nothing wrong, and when I test your script in 3.3.5 it works without problem. So there should probably be some additional conditions to make this issue reproduce.

And the fact that second line works correct or Wait fixes it makes it more puzzling.

I have couple of questions: does it occur for you if you just make a default project and insert this dialog there?
Also, will same problem occur if you put these lines in common script (not dialog)?
Did you try to run the game without voice over?

I just had a chance to check all this.

No, it doesn't occur when I do this in a new (default) project. Therefore I assume there must be a trigger somewhere in the game that's causing this.
Yes, the same problem occurs if I put this into the normal room script (changing the ego: to cEgo.Say)
Yes, I attempted to run without voice but no difference.

I also did a clean install of 3.3.5 just in case.

Crimson Wizard

#4
Klytos, is this acceptable for you to PM me your working project to let me run engine under debugger with your game to see what's going on? That's just that I fear that it will take much time to deduce which conditions cause this.

Klytos


Crimson Wizard

Yes, there is a pretty old mistake in AGS 3.3.* (about couple years old or more, I think) that started to surface only now after some further changes were made.

It is difficult to tell exactly, but I think it is caused by normal Display box while there are any text variadic function (Character.Say, Display, String.Format) called anywhere in repeatedly_execute at the same time. The text sent into Display() is being overwritten by something that happens in the game's main loop. This is why calling Wait helped, I guess.

Here's a temporary engine download link, I will be preparing a proper patched release shortly.
http://teamcity.bigbluecup.org/repository/download/AdventureGameStudio_EngineRelease/13187:id/engine.zip
NO-mp3 variant:
http://teamcity.bigbluecup.org/repository/download/AdventureGameStudio_EngineReleaseNoMp3/13188:id/engine-no-mp3.zip

Crimson Wizard

#7
I just found a terrible thing, there are 3.4.0 templates distributed with the latest 3.3.5 patch (4), because our build server is not set up to distinguish these (it just takes the top template version).
We will be fixing this in following days. As a workaround you may take templates from the previous 3.3.5 patch:
http://www.adventuregamestudio.co.uk/releases/finals/AGS-3.3.5-P2-P3/AGS-3.3.5.zip

SMF spam blocked by CleanTalk