Author Topic: AGS 3.4.1 - Beta 4 -- new unstable version  (Read 1487 times)  Share 

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
AGS 3.4.1 - Beta 4 -- new unstable version
« on: 09 Apr 2017, 22:02 »
AGS 3.4.1 - Beta 4 released
Current release number: 3.4.1.4




ACHTUNG!
This is a BETA version of AGS 3.4.1.
It may be not very stable. Use at your own risk. Please back up any games before opening them in this version of AGS.
If you save your project, your game will NOT be able to open in previous versions.


Released: 22th May 2017

Current stable version: AGS 3.4.0 forum thread


This release is brought to you by:

- Alan v. Drake
- ChamberOfFear
- Crimson Wizard
- Gurok
- monkey0506


This version is almost feature-frozen, but it may still take some time to polish and add a minor thing or two. Any kind of major addition will have to go into future version(s).

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 limit on the script names of Dialog Topics, Inventory Items, GUI and GUI Controls, as well as GUI event function names.

Editor:
 - Removed legacy game compiler.
 - Raw compiled game data is now saved in "Compiled\Data" folder, as opposed to just "Compiled".
 - 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 #ifver and #ifnver not working properly if version number had only one component (major version).

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).

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.

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.
 - 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.
 - Implemented separate config option for game's shared data path, to keep it distinct from user-defined saves path.
 - 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).
 - 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 Game.TranslationFilename returning "default" instead of empty string if no translation is set.

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



Please keep in mind that this version requires extensive testing before considered stable.

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

- Need to update Manual.
- Need to test demo game and all distributed templates for correct work.
- Need to test that mobile ports work with this version.
- Direct3D renderer clips 1 bottom row and 1 rightmost column of pixels of game image when "Render sprites at screen resolution" is OFF.
- When running game in OpenGL fullscreen system cursor is visible when over black borders.
« Last Edit: 22 May 2017, 15:41 by Crimson Wizard »

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #1 on: 09 Apr 2017, 22:51 »
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

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
  • abstauber worked on a game that was nominated for an AGS Award!abstauber worked on a game that won an AGS Award!
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #2 on: 11 Apr 2017, 10:33 »
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

  • Mittens Vassal
  • AGS Baker
  • Hi. My name is FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
  • Dave Gilbert worked on a game that was nominated for an AGS Award!Dave Gilbert worked on a game that won an AGS Award!
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #3 on: 11 Apr 2017, 15:34 »
Awesome! Downloading now...

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
  • abstauber worked on a game that was nominated for an AGS Award!abstauber worked on a game that won an AGS Award!
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #4 on: 12 Apr 2017, 09:51 »
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.
« Last Edit: 12 Apr 2017, 10:10 by abstauber »

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #5 on: 12 Apr 2017, 10:11 »
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

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
  • abstauber worked on a game that was nominated for an AGS Award!abstauber worked on a game that won an AGS Award!
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #6 on: 12 Apr 2017, 10:32 »
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

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #7 on: 12 Apr 2017, 10:43 »
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

  • Going nowhere fast
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #8 on: 10 May 2017, 23:03 »
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).

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #9 on: 10 May 2017, 23:31 »
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.
« Last Edit: 11 May 2017, 16:46 by Crimson Wizard »

NicolaGs

  • Going nowhere fast
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #10 on: 11 May 2017, 17:22 »
Thanks for your reply.

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

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

And here are the available choices I see in the winsetup interface :
Code: Adventure Game Studio
  1. Native game resolution (320x200)
  2. 320x240
  3. 400x300
  4. 512x384
  5. 640x400
  6. 800x600
  7. 1024x768
  8. 1152x864
  9. 1280x600
  10. 1360x768
  11. 1440x900       
  12.  

And so, the following choices are only present in the log:
Code: Adventure Game Studio
  1. 640x480
  2. 1280x720
  3. 1280x768
  4. 1280x800
  5. 1366x768
  6. 1600x900
  7.  
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...
« Last Edit: 11 May 2017, 17:26 by NicolaGs »

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #11 on: 11 May 2017, 17:28 »
Thank you, there is clearly some mistake in setup program, and I have an idea of what that could be...

NicolaGs

  • Going nowhere fast
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #12 on: 11 May 2017, 17:42 »
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.

Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #13 on: 12 May 2017, 19:15 »
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

  • Going nowhere fast
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #14 on: 12 May 2017, 21:03 »
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...
« Last Edit: 12 May 2017, 21:27 by NicolaGs »

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #15 on: 12 May 2017, 22:56 »
NicolaGs, could you post log for these stretch cases, same as you did before?

NicolaGs

  • Going nowhere fast
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #16 on: 13 May 2017, 08:53 »
Here it is :

The Settings used:
Code: Adventure Game Studio
  1. Driver : Allegro/DX5
  2. Run in a window instead of fullscreen
  3. Scaling : Stretch to fit screen (preserve aspect ratio)

Here's the log's video section :
Code: Adventure Game Studio
  1. Initializing resolution settings
  2. Game native resolution: 320 x 200 (32 bit)
  3. Device display resolution: 1600 x 900
  4. Game settings: windowed = yes, screen def: scaling, screen size: 320 x 240, match device ratio: ignore, game scale: proportional
  5. Using graphics factory: DX5
  6. Created graphics driver: Allegro/DX5
  7. Supported gfx modes (32-bit):
  8.         320x200;320x240;400x300;512x384;640x400;640x480;800x600;1024x768;
  9.         1152x864;1280x600;1280x720;1280x768;1280x800;1360x768;1366x768;1440x900;
  10.         1600x900;
  11. Attempting to find nearest supported resolution for screen size 1406 x 879 (32-bit) windowed
  12. Attempt to switch gfx mode to 1406 x 879 (32-bit) windowed
  13. Failed to init gfx mode. Unable to find a suitable graphics driver
  14. Attempt to switch gfx mode to 1600 x 900 (32-bit) windowed
  15. Failed to init gfx mode. Resolution not supported
  16. Attempting to find nearest supported resolution for screen size 1600 x 900 (32-bit) fullscreen
  17. Attempt to switch gfx mode to 1600 x 900 (32-bit) fullscreen
  18. Succeeded. Using gfx mode 1600 x 900 (32-bit) fullscreen
  19. 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: Adventure Game Studio
  1. Attempt to switch gfx mode to 1406 x 879 (32-bit) windowed
  2. Failed to init gfx mode. Unable to find a suitable graphics driver
  3. Attempt to switch gfx mode to 1600 x 900 (32-bit) windowed
  4. Failed to init gfx mode. Resolution not supported

By contrast, the same settings but with OpenGL driver give :
Code: Adventure Game Studio
  1. Attempt to switch gfx mode to 1406 x 879 (32-bit) windowed
  2. Succeeded. Using gfx mode 1406 x 879 (32-bit) windowed

Gurok

  • Rottwheelers
  • When life hands you lemons, combine them with the mop
    • I can help with AGS tutoring
    •  
    • Best Innovation Award Winner 2016, for improving and extending the AGS scripting language
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
  • Gurok worked on a game that was nominated for an AGS Award!Gurok worked on a game that won an AGS Award!
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #17 on: 13 May 2017, 11:57 »
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.
« Last Edit: 13 May 2017, 12:03 by Gurok »

Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #18 on: 15 May 2017, 11:26 »
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.

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS 3.4.1 - Beta 3 -- new unstable version
« Reply #19 on: 16 May 2017, 00:30 »
@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.



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.

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.
« Last Edit: 16 May 2017, 00:43 by Crimson Wizard »