AGS 3.4.1

Started by Crimson Wizard, Sat 23/12/2017 20:49:22

Previous topic - Next topic

Crimson Wizard

AGS 3.4.1 released
Current release number: 3.4.1.11





Released: 23th 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 (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 may be visible when over black borders.

NicolaGs

My first game : I Want Out!

Snarky

Congratulations on the new release to all the contributors!
Thanks for an excellent Christmas present for all AGSers.

arj0n

Thanx team!
Great Christmas present indeed! :)

Chicky

Most excellent, thank you for all your continued efforts team! This release is great.

necros

Hi, where can we get latest runtime exe?

Crimson Wizard

Quote from: necros on Thu 04/01/2018 22:31:20
Hi, where can we get latest runtime exe?
You can download the ZIP file from the first post and get acwin.exe from there. Or use No-MP3 download link for exe without mp3 support.

morganw

I wasn't sure if it was intentional or not, but the download links here:
http://www.adventuregamestudio.co.uk/site/ags/
...still have the previous stable version linked.

Crimson Wizard

Quote from: morganw on Fri 05/01/2018 20:23:22
I wasn't sure if it was intentional or not, but the download links here:
http://www.adventuregamestudio.co.uk/site/ags/
...still have the previous stable version linked.

Whoops, I forgot to update them.

Crimson Wizard

#9
Is it true that OpenGL does not minimize when you alt+tab from fullscreen mode? Does anyone remember if this was always like this?

Also, it looks like there is some sort of "glowing" border around game in OpenGL, it is visible even during fade-out.

Also, now Direct3D crashes almost always when you alt+tab from fullscreen, saying "Present failed".

NicolaGs

Quote from: Crimson Wizard on Sat 06/01/2018 14:45:36
Is it true that OpenGL does not minimize when you alt+tab from fullscreen mode? Does anyone remember if this was always like this?
Following our discussion on another thread, I investigated that possible Alt+Tab issue and I was about to report this exact same problem.
When in fullscreen, neither alt+tab nor Windows_key+D seem to work.
In fact, they do (focus is lost), but the game stays on screen.

QuoteAlso, now Direct3D crashes almost always when you alt+tab from fullscreen, saying "Present failed".
I discoverd that too atm... Crash with this message :
Code: ags
IDirect3DSurface9::Present failed

And I guess this present has nothing to do with last Xmas...
My first game : I Want Out!

Crimson Wizard

"Present" is an operation that displays prepared video buffer on screen.
This error may happen on many occasions, but in earlier versions it did not make it crash, just skipped and went on.

Looks like something is broken in this release.

NicolaGs

Quote from: Crimson Wizard on Sat 06/01/2018 14:45:36Also, it looks like there is some sort of "glowing" border around game in OpenGL, it is visible even during fade-out.
I saw this on Youtube videos but thought it was a video capture or encoding issue...
My first game : I Want Out!

Crimson Wizard

#13
Quote from: NicolaGs on Sat 06/01/2018 15:18:49
Quote from: Crimson Wizard on Sat 06/01/2018 14:45:36Also, it looks like there is some sort of "glowing" border around game in OpenGL, it is visible even during fade-out.
I saw this on Youtube videos but thought it was a video capture or encoding issue...

This only happens if "Smooth scaled sprites" is enabled. This is because program mistakenly counts the "fade effect" as a in-game sprite and "anti-aliases" its borders (or whatever OpenGL does in that case).

Crimson Wizard

I have this small patch here (unofficial for now):
https://www.dropbox.com/s/1qazws3bwr741q9/acwin--3.4.1-pre-patch1.zip?dl=0

* no longer crashes with "IDirect3DSurface9::Present failed" when you alt+tab from fullscreen Direct3D.
* now minimizes OpenGL fullscreen mode when you alt+tab from it.
* now the fade-out effects in OpenGL don't have "glowing" at the screen borders.

Privateer Puddin'

Sterling work! Thanks for taking a look at those bits.

NicolaGs

Thanks, CW.
I tested this ACWIN build and...

Quote from: Crimson Wizard on Wed 10/01/2018 23:59:35
* no longer crashes with "IDirect3DSurface9::Present failed" when you alt+tab from fullscreen Direct3D.
Yes, this fix works for D3D...

Quote* now minimizes OpenGL fullscreen mode when you alt+tab from it.
No. Not on my end at least. The game image stays on screen. The "windows" cursor appears on it but I'm not able to access the Windows environment... I'm forced to use ctrl-alt-del and then cancel to find that the game is minimized...
But, I already reported an issue with alt-enter not going to windowed mode correctly for me with OpenGL. I suspect it's a related issue.

Quote* now the fade-out effects in OpenGL don't have "glowing" at the screen borders.
Can't say because I did not see this effect myself before on my PCs...
My first game : I Want Out!

m0ds

What tips are there for building games through the Linux output, please, that fail because there is no "Linux" variant of plugins ie agsblend.dll ? (I can't quite remember the specific error wording at time of writing, something like "there is no linux equivalent, continue building?")

In this instance I think that particular plugin is non-critical, it's just there to minimize screen tearing or such. Of course, I'd rather it could build through Linux mode and keep these plugins in it. Should I contact the author? What if it is a critical plugin (integral to the structure/build of the game etc)

Well, I'm just looking for advice on the best practices, thank you!

Crimson Wizard

#18
Quote from: MJL on Fri 12/01/2018 19:08:42
What tips are there for building games through the Linux output, please, that fail because there is no "Linux" variant of plugins ie agsblend.dll ? (I can't quite remember the specific error wording at time of writing, something like "there is no linux equivalent, continue building?")

In this instance I think that particular plugin is non-critical, it's just there to minimize screen tearing or such. Of course, I'd rather it could build through Linux mode and keep these plugins in it. Should I contact the author? What if it is a critical plugin (integral to the structure/build of the game etc)

Well, I'm just looking for advice on the best practices, thank you!

There are two separate issues here: compiling Linux version and running something compiled (even if for Windows) using Linux port.

Regarding compiling, this is a problematic case, because, unfortunately, AGS does not provide a way to turn some plugins off for particular build. So you will have that warning ("no Linux equivalent for plugin") all the time, sorry, unless you provide Linux plugin or turn Linux compilation off (except when you actually need it).

Regarding running, Linux port has some plugins integrated, I think AGSblend is one of them. So if you run the game on Linux, and engine won't find distinct plugin file, it will fallback to using integrated version.

Now, ideally, a plugin should be open sourced, and built for Linux (the *.so file), just like they are built for Windows (*.dll).
In particular, AGSBlend is open sourced and available at our repository: https://github.com/adventuregamestudio/ags/tree/master/Plugins/agsblend
It even has a Makefile for linux, although I never tried building it myself.


To address the case of non-critical plugins. Unfortunately also, if you are using plugin API in script, game won't run without it, at all, because it requires all the API referenced in script to be implemented somehow.
If there is absolutely no way for you to get Linux version of plugin, then there are two possible ways:

1) Compile a separate version of the game without plugin (with plugin functions commented out or disabled with #ifdef/ifndef commands in script).
2) Create a plugin stub - that is a plugin that exports exactly same script API, but does nothing.

m0ds

Thanks, I'll give that another go soon.

One other thing, can I check, at what point was a command called "switch" added please? Cos this has interfered with old code where we have ints called switch. Though I think I've fixed it by renaming our "switch" int to "switches", fingers crossed.

SMF spam blocked by CleanTalk