AGS 3.4.1 - RC 3 (new release candidate)

Started by Crimson Wizard, Sun 09/04/2017 22:02:10

Previous topic - Next topic

Crimson Wizard

AGS 3.4.1 - RC3 released
Current release number: 3.4.1.10





Released: 12th December 2017

Previous stable version: AGS 3.4.0 forum thread


This release is brought to you by:

- Alan v. Drake
- ChamberOfFear
- Crimson Wizard
- Gurok
- monkey0506
- Ryan O'Connor (one bug fix contribution)
- Scorpiorus (improvements to plugin drawing system)


What is new in 3.4.1

Common features:
- Upgraded Windows version of AGS with Allegro v4.4 library (previously v4.2).
- Implemented "RenderAtScreenResolution" game setting. When enabled, characters and objects are scaled in screen pixels rather than game pixels. (NOTE: it was always enabled for Direct3D in the past, but now you can set it to your liking)
- Implemented VerticalOffset and LineSpacing properties for fonts.
- Removed limit on Dialog Topics (was 500 topics per game).
- Removed length limit on the names of Inventory, GUI and GUI Controls.
- Removed length limit on the names of Hotspots and Objects.
- Removed length limit on event handler names.

Editor:
- Removed legacy game compiler.
- Raw compiled game data is now saved in "Compiled\Data" folder, as opposed to just "Compiled".
- The speech.vox file is now not recompiled if game is quick-run (using F5). Engine is supposed to find newer files in the Speech folder.
- Editor can now import games older than 2.72, and newer too (3.*) if you have extracted data files from compiled executable.
- ScriptAPIVersion and ScriptCompatibilityLevel settings now have "Highest" option, which is meant for automatically enabling newest script API when upgrading old project in a newer editor.
- Added new "Default Setup" pane, which works similarily to "General Settings" and lets you configure default values for game setup.
- Added "Font Height (pixels)" readonly property to the Font's pane, which works for both WFN and TTF fonts and may be used as a reference.
- Made Editor correctly detect modern versions of MS Windows for display on About dialog and when sending anonymous statistics.
- New application icon to comply with 3.4.0 splash screen.
- Fixed crash when importing old games which have extended editor version string saved in the project files.
- Fixed unhandled exception occuring when user types "#undef", "#ifdef" or "#ifndef" on the last line of the script.
- Fixed #ifver and #ifnver not working properly if version number had only one component (major version).
- Few improvements to the game compilation made in hope to reduce occasional data corruption.

Script:
- Fixed local variables not working in the switch's case expressions.
- Fixed Strings in switch, making them compare by value again.
- Fixed compiler mistakes caused by the use of objects of empty type (that is - struct without any variables in it).
- Fixed few cases of possible compiler crashing when there is an unfinished statement in the end of the script.

Script API:
- A new parameter StopMovementStyle is added to following functions: LockView, LockViewAligned, LockViewFrame, LockViewOffset, UnlockView. This parameter can be eStopMoving (default) or eKeepMoving.
- DynamicSprite.CreateFromFile and SaveToFile now support path tokens and comply to the new file path rules (no writing files to the game's installation directory).
- Added missing readonly properties to get Lighting/Tinting parameters for Character and Object: HasExplicitLight, HasExplicitTint, LightLevel, TintBlue, TintGreen, TintRed, TintSaturation, TintLuminance.
- Added Mouse.SelectPreviousMode() and Mouse.IsModeEnabled(CursorMode) functions.
- Added readonly properties to get Button's animation state: Button.Animating, Button.Frame, Button.Loop, Button.View.
- Added GetFontHeight(FontType) and GetFontLineSpacing(FontType) functions.
- Added setter for System.Windowed property, letting to change it at runtime, switching between windowed and fullscreen modes.
- Added System.RenderAtScreenResolution property to change sprite rendering mode at runtime.

Engine:
- Added OpenGL renderer to Windows version.
- Added support for switching between fullscreen and windowed modes at runtime using Alt+Enter key combination.
- All supported hardware-accelerated graphic drivers (Direct3D and OpenGL) now run every game in 32-bit display mode by default, and convert game's graphics on load if that is required. This fixes loss of green hue precision in 16-bit games and allows to run 8-bit games, although latter is only partially supported: there are color mismatches and dynamic palette cycling is not working.
- Partial support for plugins drawing on screen for hardware-accelerated renderers (Direct3D, OpenGL).
- Added support for global configuration file, which works as configuration for all games and overrides default game's config file. Individual game user's config overrides global one in its turn. Global config's location is platform-dependent (this feature is currently disabled on Windows).
- Implemented separate config option for game's shared data path, to keep it distinct from user-defined saves path.
- Engine saves last Windowed and RenderAtScreenResolution mode states to the user config file.
- Engine no longer writes and reads gamma level in saves, meaning that gamma keeps its current value when restoring a saved game.
- Removed arbitrary limit on number of sprites rendered at the same time for hardware-accelerated renderers (Direct3D and OpenGL) (was 75), and another limit imposed on drawing entries for all drivers (was 200).
- Engine now tries to get voice files from the Speech folder first, if one exists, and speech.vox later when quick-run from the Editor.
- Fixed speech portrait was displayed below GUI, contrary to speech text.
- Fixed ShakeScreen command was causing graphic artifacts when game is run with software renderer.
- Fixed calling Character.ChangeView during idle animation results in new view being animated.
- Fixed Speech.SkipStyle getter return value for eSkipTime case.
- Fixed Speech.VoiceMode not returning correct values when speech.vox is not enabled/present.
- Fixed AdjustVolumeWithScaling character's property not working with the new audio system.
- Fixed volume drop was not applied to audio clips which begin playing during speech voice-over.
- Fixed Game.SetAudioTypeSpeechVolumeDrop did not affect currently playing clips until next voice-over begins.
- Fixed Game.TranslationFilename returning "default" instead of empty string if no translation is set.
- Fixed engine was trying to locate "My Documents" folder on Windows Vista and higher even though it did not need it, and reporting internal error if such folder was not found, even though "Saved Games" folder is used instead.
- Properly toggle console upon play.debug_mode variable change in script.
- Added missing stubs for agsjoy plugin.

WinSetup:
- Fixed display mode selection was missing certain items.




KNOWN ISSUES, TODOs and other notes (to be updated)

- Need to make mobile ports (Android, iOS) work with this version.
- When using Direct3D, game misses 1 bottom row and 1 rightmost column of pixels of game image when "Render sprites at screen resolution" is OFF. This also might cause slight image distortion.
NOTE: there's a suspicion that that is a bug in Microsoft's Direct3D driver since Windows 7.
- When running game in OpenGL fullscreen system cursor is visible when over black borders.

Crimson Wizard

I had to reupload the whole thing, finding that Editor was not properly built and could cause crash when running game for test.

If you have downloaded this recently, please download/install again.

abstauber

Thanks for the effort! I haven't experienced any problems yet, all my projects compile and run fine so far.
I also already updated the 9-verbs MI Style template.
http://shatten.sonores.de/wp-content/uploads/2017/04/9-verb-MI-style_154.zip

Dave Gilbert


abstauber

#4
Found a bug triggered by Art of Dying 1.1.
I'm pretty sure, that this didn't happen in 3.4.0

Unfortunately the sourcecode of Art of Dying is currently gone for good. But I still might have a copy at home which I can upload later on.

---------------------------
Adventure Game Studio
---------------------------
An internal error has occurred. Please note down the following information.
If the problem persists, post the details on the AGS Technical Forum.
(ACI version 3.4.1.3)

Error: SpriteCache::removeOldest: Attempted to remove sprite 64 that does not exist

---------------------------
OK   
---------------------------


The error message is right, there is no sprite 64. But I also haven't found evidence that the ever code refers to sprite 64. There is also no GUI, View or anything refering to a sprite 64.

Edit: I've manually added a dummy sprite at slot 64, now it is complaining about sprite 65.

Crimson Wizard

Quote from: abstauber on Wed 12/04/2017 09:51:33
The error message is right, there is no sprite 64. But I also haven't found evidence that the ever code refers to sprite 64. There is also no GUI, View or anything refering to a sprite 64.

Edit: I've manually added a dummy sprite at slot 64, now it is complaining about sprite 65.
It could be dynamic sprite?

I need more details about script and how to reproduce this.

abstauber

As I was about to prepare an upload for further investigations, I deleted the compiled folder and guess what: the error is gone.

Maybe the compiled resource files got corrupted somehow during the upgrade from 3.4.0 to 3.4.1? On the other hand I'm upgrading this project since 2014 so the corruption might have happened a long time ago.

I suppose, there's nothing to worry about.


Crimson Wizard

It may also happen that game was only partially rebuilt, and some rooms kept old compiled scripts while script modules got updated. This may result in various glitches, like wrong script function being called instead of intended one.

It is necessary to completely rebuild project (Build -> Rebuild all files) after you upgraded to another version of AGS.

Deletion of Compiled folder also forces full rebuild.

NicolaGs

I don't know if it's an expected behaviour or not, but my native screen resolution is not available aymore with the latest engine version (beta 3 : 3.4.1.3).
With betas 1 and 2 : I've got the "desktop native resolution" available at the top of the list.
With beta 3 : "desktop native resolution" is unavailable and the available resolutions don't fit my screen resolution (it's 1600x900 and I got 1440x900 as the closest choice).
My first game : I Want Out!

Crimson Wizard

#9
Quote from: NicolaGs on Wed 10/05/2017 23:03:07
I don't know if it's an expected behaviour or not, but my native screen resolution is not available aymore with the latest engine version (beta 3 : 3.4.1.3).
With betas 1 and 2 : I've got the "desktop native resolution" available at the top of the list.
With beta 3 : "desktop native resolution" is unavailable and the available resolutions don't fit my screen resolution (it's 1600x900 and I got 1440x900 as the closest choice).

Something that I changed in Beta 3 is that winsetup no longer shows "desktop resolution" and "native game resolution" choices without testing if they are actually supported by graphics driver first. I did this after I found that it can display "native game" size (320x200) although such mode is not supported by gfx card.

You may try running game with "--log" argument from command line. In the "%USERPROFILE%/Saved Games/.ags" there will be "ags.log". AGS writes all detected gfx modes there on startup.
We need to compare these with the list shown in winsetup.



EDIT:
Another thing that you could try. Go to "%USERPROFILE%/Saved Games/<Your game name>/" and modify acsetup.cfg by hand.
Make sure following options are set:
Quote
[graphics]
screen_def = explicit
screen_width = 1600
screen_height = 900

Then run the game, press Ctrl+Alt+V in game to check what resolution was actually initialized.


The question is whether there is a bug in winsetup, bug in engine, or Direct3D simply does not support that resolution on your system.

NicolaGs

#10
Thanks for your reply.

Here's what I got in the ags.log :

Code: ags

Initializing resolution settings
Game native resolution: 320 x 200 (32 bit)
Device display resolution: 1600 x 900
Game settings: windowed = no, screen def: explicit, screen size: 1440 x 900, match device ratio: ignore, game scale: max_round
Built library path: d3d9.dll
Using graphics factory: D3D9
Created graphics driver: Direct3D 9
Supported gfx modes (32-bit): 
	320x200;320x240;400x300;512x384;640x400;640x480;800x600;1024x768;
	1152x864;1280x600;1280x720;1280x768;1280x800;1360x768;1366x768;1440x900;
	1600x900;
Attempting to find nearest supported resolution for screen size 1440 x 900 (32-bit) fullscreen
Attempt to switch gfx mode to 1440 x 900 (32-bit) fullscreen
Succeeded. Using gfx mode 1440 x 900 (32-bit) fullscreen


And here are the available choices I see in the winsetup interface :
Code: ags

Native game resolution (320x200)
320x240
400x300
512x384
640x400
800x600
1024x768
1152x864
1280x600
1360x768
1440x900	


And so, the following choices are only present in the log:
Code: ags

640x480
1280x720
1280x768
1280x800
1366x768
1600x900

Which is odd, because they are quite common standard resolutions...


When I modify %USERPROFILE%/Saved Games/<my name>, by replacing 1440 by 1600, the game runs fine and ctrl-V reports 1600x900 as expected.

So I would guess it's a Winsetup issue... ?

Edit : I tested the very latest version with OpenGL support ; the issue is the same...
My first game : I Want Out!

Crimson Wizard

Thank you, there is clearly some mistake in setup program, and I have an idea of what that could be...

NicolaGs

Thank you...

I came across another issue (sorry !) :

When using Allegro/DX5 + Stretch to fit screen (or Stretch to fit screen (preserving aspect ratio) + Run in a window, the game runs fullscreen.
When you set Max round multiplier, it runs correctly in a window.
My first game : I Want Out!

Alan v.Drake

Could it be that the multiplier matches your screen resolution? IIRC allegro used to run borderless fullscreen if the windowed window is the same size.

- Alan

NicolaGs

#14
Quote from: Alan v.Drake on Fri 12/05/2017 19:15:04
Could it be that the multiplier matches your screen resolution?
No, it's not :
Game resolution : 320x200
Screen resolution : 1600x900
Scaled resolution (with stretch to fit screen preserving aspect ratio) : 1406x879

Edit : ...and, logically, when it switches fullscreen, there's a black frame around the game screen...
My first game : I Want Out!

Crimson Wizard

NicolaGs, could you post log for these stretch cases, same as you did before?

NicolaGs

Here it is :

The Settings used:
Code: ags

Driver : Allegro/DX5
Run in a window instead of fullscreen
Scaling : Stretch to fit screen (preserve aspect ratio)


Here's the log's video section :
Code: ags

Initializing resolution settings
Game native resolution: 320 x 200 (32 bit)
Device display resolution: 1600 x 900
Game settings: windowed = yes, screen def: scaling, screen size: 320 x 240, match device ratio: ignore, game scale: proportional
Using graphics factory: DX5
Created graphics driver: Allegro/DX5
Supported gfx modes (32-bit): 
	320x200;320x240;400x300;512x384;640x400;640x480;800x600;1024x768;
	1152x864;1280x600;1280x720;1280x768;1280x800;1360x768;1366x768;1440x900;
	1600x900;
Attempting to find nearest supported resolution for screen size 1406 x 879 (32-bit) windowed
Attempt to switch gfx mode to 1406 x 879 (32-bit) windowed
Failed to init gfx mode. Unable to find a suitable graphics driver
Attempt to switch gfx mode to 1600 x 900 (32-bit) windowed
Failed to init gfx mode. Resolution not supported
Attempting to find nearest supported resolution for screen size 1600 x 900 (32-bit) fullscreen
Attempt to switch gfx mode to 1600 x 900 (32-bit) fullscreen
Succeeded. Using gfx mode 1600 x 900 (32-bit) fullscreen
Render frame set, render dest (160, 50, 1439, 849 : 1280 x 800)


The game is displayed fullscreen with a black frame around it (so, not stretched to the screen resolution...)

The culprit seems to be there :
Code: ags

Attempt to switch gfx mode to 1406 x 879 (32-bit) windowed
Failed to init gfx mode. Unable to find a suitable graphics driver
Attempt to switch gfx mode to 1600 x 900 (32-bit) windowed
Failed to init gfx mode. Resolution not supported


By contrast, the same settings but with OpenGL driver give :
Code: ags

Attempt to switch gfx mode to 1406 x 879 (32-bit) windowed
Succeeded. Using gfx mode 1406 x 879 (32-bit) windowed
My first game : I Want Out!

Gurok

#17
Hi,

Apologies for duplicating the display mode bug in the other thread.

I noticed another bug that seems to be common to 3.4.1 builds of acwin.exe. I'm testing with a 320x200 game and DirectX 9 in windowed mode. Row 199 (the last row) appears to be clipped to one pixel. The same is true for column 319.

See here: http://i.imgur.com/pPl016H.png

This doesn't happen with DirectDraw.
[img]http://7d4iqnx.gif;rWRLUuw.gi

Moresco

Not sure if this counts as a bug or anything, but when using DirectX 3D9, you can indeed switch using alt+enter, but only if you use the left alt key. Using the right alt key, which is how I prefer it in most games, does nothing.  Can that be fixed?

Also when using the Allegro driver alt-enter doesn't work, it attempts to switch to a window but then jumps back to fullscreen followed by the cursor "painting" in the graphics from a black screen.
::: Mastodon :::

Crimson Wizard

#19
@Gurok, can you confirm that clipping and strange row/column duplication occurs only if "Render sprites at screen resolution" is off? Both of those issues seem to relate to drawing on backbuffer texture before scaling to whole screen. I am looking into that now.
EDIT: actually, OpenGL seem to be missing top and right row in either case. Its top as opposed to bottom maybe because OpenGL's screen coordinates are inverted.



Quote from: Moresco on Mon 15/05/2017 11:26:31
Not sure if this counts as a bug or anything, but when using DirectX 3D9, you can indeed switch using alt+enter, but only if you use the left alt key. Using the right alt key, which is how I prefer it in most games, does nothing.  Can that be fixed?
Yes, missed the right alt key.

Quote from: Moresco on Mon 15/05/2017 11:26:31
Also when using the Allegro driver alt-enter doesn't work, it attempts to switch to a window but then jumps back to fullscreen followed by the cursor "painting" in the graphics from a black screen.
I cannot tell why it does not stay in window. Maybe there is a problem initializing certain window modes. That renderer works worse and worse with every new Windows update. Or maybe the window size is selected wrong. Can you enable log, like I explained to NicolaGs several posts above, and record your switching actions?

I fixed the cursor painting bug though, this was simply because screen was not repainted after mode switches.

SMF spam blocked by CleanTalk