Adventure Game Studio

AGS Development => Editor Development => Topic started by: Crimson Wizard on Thu 04/04/2013 19:16:28

Title: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Thu 04/04/2013 19:16:28
AGS 3.3.0 Release Candidate
*** Download here *** (http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-rc1.exe)
*** Download as ZIP archive *** (http://www.adventuregamestudio.co.uk/betas/AGS_3_3_0-rc1.zip)
*** NO-MP3 engine variant *** (http://www.adventuregamestudio.co.uk/betas/acwin_3.3.0_rc1_nomp3.zip)

Older versions (http://www.adventuregamestudio.co.uk/betas/)

Debug symbol database (for developers only) (http://www.adventuregamestudio.co.uk/betas/PDB_3_3_0_rc1.zip)


3.3.0 RC was released 27th January 2014



--------------------------------------------------
General
--------------------------------------------------


- Increased maximal Font number from 15 to 30.
- Added "Translated" property to ListBox gui control, which forces engine to translate ListBox items. Default is True. Set to False if you are using ListBox for listing savegames. NOTE: when older projects are imported, it is set to False automatically.
- Proper alpha blender for blending two 32-bit sprites with alpha channels. Added new option for gui alpha blending which turns the proper blender on. Option is named "Multiplied Translucence, Blend Source Color" - because that's what it does (better name anyone?). The old "AdditiveOpacity" option is renamed to "Additive Opacity, Copy Source Color". The default for new projects is "Multiplied Translucence, Blend Source Color". For the use of the blender in general cases (such as DrawingSurface.DrawImage function) a new setting is added in "Visual" group, named "Sprite alpha rendering style", which may be set to "Improved".
Also fixed inventory items and cursor crosshair with alpha channel not being drawn properly.
- Added new property to the DialogOptionsRenderingInfo class:
Spoiler

Code (ags) Select

/// Should the drawing surface have alpha channel
bool DialogOptionsRenderingInfo.HasAlphaChannel;

[close]
This property must be set it in "dialog_options_get_dimensions" function, the one where you normally define size and position of the drawing surface. Default is False.
- Added new function to the Dialog class:
Spoiler

Code (ags) Select

/// Manually marks whether the option was chosen before or not.
void Dialog.SetHasOptionBeenChosen(int option, bool chosen);

[close]
- Added extra constant to enum eKeyCode:
Spoiler

Code (ags) Select

eKeyNone // self-explanatory

[close]
- Added two more options for the Skip speech style: "skip by key only" and "skip by mouse only" (no timer).
- Introducing enum SkipSpeechStyle.
Defines how player may skip speech:
Spoiler

Code (ags) Select

  eSkipKeyMouseTime ,
  eSkipKeyTime,
  eSkipTime,
  eSkipKeyMouse,
  eSkipMouseTime,
  eSkipKey,
  eSkipMouse

[close]
- Introducing class Speech:
Spoiler

Code (ags) Select

  /// Stop speech animation this number of game loops before speech ends (text mode only)
  int  Speech.AnimationStopTimeMargin;
  /// Enables/disables the custom speech portrait placement.
  bool Speech.CustomPortraitPlacement;
  /// Gets/sets extra time the speech will always stay on screen after its common time runs out
  int  Speech.DisplayPostTimeMs;
  /// Gets/sets global speech animation delay (if using global setting).
  int  Speech.GlobalSpeechAnimationDelay;
  /// Gets/sets speech portrait x offset relative to screen side.
  int  Speech.PortraitXOffset;
  /// Gets/sets speech portrait y position.
  int  Speech.PortraitY;
  /// Gets/sets special key which can skip speech text.
  eKeyCode Speech.SkipKey;
  /// Gets/sets how the player can skip speech lines.
  SkipSpeechStyle Speech.SkipStyle;
  /// Gets/sets the style in which speech is displayed.
  eSpeechStyle Speech.Style;
  /// Gets/sets how text in message boxes and Sierra-style speech is aligned.
  Alignment Speech.TextAlignment;
  /// Gets/sets whether speech animation delay should use global setting (or Character setting).
  bool Speech.UseGlobalSpeechAnimationDelay;
  /// Gets/sets whether voice and/or text are used in the game.
  eVoiceMode Speech.VoiceMode;

[close]
- SetMusicMasterVolume() legacy script function now accepts volume values between -210 and 100 respectively (was between 0 and 100); this may be used as a workaround for guaranteed music mute if you imported old project and do not want to convert to new audio system;


** WARNING **
Following functions and variables are now deprecated. If you have any of them in script you will likely receive compilation errors.
Either turn Backwards Compatibility mode in Global Settings ("Enforce object-based scripting" setting), or consider using corresponding property from Speech class.
Spoiler

Code (ags) Select

void SetVoiceMode(eVoiceMode);        // use Speech.VoiceMode
void SetSkipSpeech(int skipFlag);     // use Speech.SkipStyle
void SetSpeechStyle(eSpeechStyle);    // use Speech.Style

int game.close_mouth_end_speech_time; // use Speech.AnimationStopTimeMargin
int game.speech_text_align;           // use Speech.TextAlignment
int game.skip_speech_specific_key;    // use Speech.SkipKey
int game.talkanim_speed;              // use Speech.GlobalSpeechAnimationDelay

[close]

--------------------------------------------------
Editor
--------------------------------------------------


Docking Panels.
Every panel in the editor window (such as Project Tree, Property window, sprite editor and so forth) may now be dragged from their initial position and dropped on a new place, aligned to side of screen or other panels. Panels may be joined in tabbed groups, pinned to make them stay on screen, or unpinned to make them hide when they aren't used (leaving their tab visible).
There is a new "Window" menu to control all the windows.
The layout of the panels is saved when closing AGS (to Layout.xml file), and restored when opening AGS (not including the project's documents).

Video Tutorial on using Docking Panels (http://www.youtube.com/watch?v=o6jjOmBB5gQ)

Folders:
You may now create folders for characters, dialogs, inventory items, guis, rooms, scripts and views.
Added new menu items for all folders to move up/down, and the ability to drag/drop files to be before other files.

For scripts:
- Script and header files are now combined into one and can be expanded/collapsed, similar to room settings & script.
- Removed the menu option to move files up/down, this can now be done with normal drag/drop (and not only for scripts).
- Removed the "exclude script" option.
- The order of the scripts (for script dependencies) is the same as it was before, a script can use all the scripts
above it.

For rooms:
- The "Sort room by number" now sorts within folders.

Find all usages:
Added a menu item to find all usages for characters, dialogs, views, inventory items and global variables.
It won't actually find scripts that use the character id (or dialog/view id), just scripts that use the actual script name of that specific object.
(http://i.imgur.com/x0aLP.png)

Navigate (in tree):
Added a menu item for almost all document tabs, to navigate to their node on the project tree (can be useful for large projects).
(http://i.imgur.com/4kJX7.png)

Goto Line:
In script editor, pressing Ctrl+G will now open the "Goto line" dialog, you can select a line number and the editor will jump to that line. Since "Ctrl+G" was already used as a shortcut to open the global script, that shortcut is replaced with Ctrl+Shift+G (and also replaced the shortcut to open the global header from Ctrl+H to Ctrl+Shift+H for consistency).
(http://i.imgur.com/fD5r5.png)

Reload sprite from source:
In Sprite Manager right-click on a sprite and choose "Replace sprite(s) from source" command. This will re-import all the selected sprites from their source images, given they are kept in their original location.

Minor additions:
- The "Old-style game-wide speech animation speed" game setting (in "Backwards compatibility" group) is replaced with two settings in "Dialog" group: "Use game-wide speech animation delay" (true/false) and "Game-wide speech animation delay" (value).
- Added a "browse" button to the "Create in folder" field in the Start New Game wizard.
- Sprite Import window is now resizable.
- Force the intellisense cache refresh before showing autocomplete list.

Editor Plugin API
- Added property for getting playable character.
- Added property for getting ScriptsAndHeaders collection.
- Added methods for refreshing project's tree.
- Added method for refreshing property grid.
- Added methods for controlling output panel.

Bug fixes:
- Editor no longer allows to create more game items than engine supports (fonts, cursors, dialogs and inventory items), which could result in crashes in Editor or running game.
- Fixed incorrect selection of a new sprite, imported while the "Select sprite" dialog is open.
- Fixed sprite lookup in folders, differing only by name case;
- Set last script's save time at the save end rather than before the save, in case file writing takes significant time.
- Fixed overlapping labels in the Editor Preferences dialog.
- Fixed "savegameindex[]" array was declared with incorrect size in script (20, while it must be 50).


--------------------------------------------------
Engine
--------------------------------------------------


Ports:
There are now following several engine ports. While they are not included with this package, they may be counted as a part of 3.3.0 release too. For more information on how to install them and play games please visit following forum threads:

Linux Version (http://www.adventuregamestudio.co.uk/forums/index.php?topic=46152.0)
Android Version (http://www.adventuregamestudio.co.uk/forums/index.php?topic=44768.0)
iOS Version (http://www.adventuregamestudio.co.uk/forums/index.php?topic=46040.0)
PSP Version (http://www.adventuregamestudio.co.uk/forums/index.php?topic=43998.0)

You may also check JJS's Daily builds here: http://jjs.at/daily/

WinSetup was changed:
- Removed "Replay" option, for it was unused for years.
- Moved all secondary options to "Advanced" section.

Backward Compatibility:
Engine is now able to run AGS games from version 2.50 and higher. This was done mainly for ports users, because they cannot run games in their original form, but Windows users may find this useful too. For example, you may now run many older games with new setup settings (such as Direct3D renderer and scaling filters).
How to do this:
1. Go to AGS program folder and find 'acwin.exe' file. This is a pure engine program (without any game attached).
2. Copy this acwin.exe to the game's folder (where you have corresponding game's *.exe).
3. You cannot use original winsetup.exe to run new setup, because that will run original game setup. Therefore you should run acwin.exe with "--setup" parameter. This may be done from command line. If you don't know how to use command line in Windows (and don't want to bother learning  :tongue:) download this batch file: http://www.mediafire.com/view/?66373m22i8pa6b8.
Simply put it to the same game folder and run every time you want to change new setup settings.
For the curios ones: the batch file is just a text with few Windows commands, it runs acwin.exe, sending it "--setup" parameter string.
4. Run acwin.exe to run the game on the new engine.
Most games allow to know the current engine version by pressing Ctrl+V. New engine is version 3.3.0.1150, if you see this in the version info, this means you did everything correctly. Also, new engine writes a log file when it runs a game (see below).

More scaling filters:
Added x5, x6, x7 and extreme one x8 nearest neighbour filters. Direct 3D renderer may use both normal and anti-aliased variants of those.
Added "Max nearest-neighbour filter" option to filter list in winsetup. If this option is selected, AGS will choose the maximal possible scaling filter your graphics driver supports.

Log output
Engine can now write down a log file when running the game. The feature has limited use currently, but the file may sometimes contain useful information if any errors or unexpected behavior happened in game.
Logging is enabled either by setup file, by putting this line under "[misc]" category:
Code (text) Select
log=1
or "--log" to command line; also "--no-log" overrides setup file and disables logging.
Log file is called "ags.log" and it is saved in "Users<Name>Saved Games.ags" on Vista, Win7 and Win8, and in "Documents and Settings<Username>My DocumentsMy Saved Games.ags" on WinXP.
Other platforms have their respected paths, e.g. Linux will write to "$HOME/.ags".

Improvements
- Improved character walking at 60%-80% scaling.
- Game.ChangeTranslation() script function no longer causes game to quit if the translation file belongs to different game or has unknown format.
- The game automatically fallbacks to Software graphics driver if the Hardware one could not run or initialize gfx mode for any reason.
- Threaded audio support. This feature has both pros and drawbacks, and is not currently recommended to be used for your project on desktop platforms by default. You may enable it by manually adding an option in "sound" section of acsetup.cfg:
Code (text) Select

[sound]
threaded = 1

Threaded audio may sometimes increase perfomance on low-end systems, but reportedly causes audio desync with the rest of the game on particular systems (such as WinXP): this also makes it not fully compatible with Pamela lip-sync feature at this moment.
- Added two "overriding" options for game config:
Code (text) Select

[override]
multitasking=0/1
os=dos/win/linux/mac

* Multitasking - overrides game's multitasking mode. Useful if game has lengthy unskippable sequences. Keep in mind that this will lock game in the given mode and make it ignore script commands that change it.
* Os - overrides System.OperatingSystem return value. Useful for ports when game disables some feature for the system because it thinks it's not supported.
- For every "long" command line argument the traditional GNU form (--arg) is supported, for example "--windowed", "--letterbox", etc.
- Windows version of the engine will now write crash dump on "out of memory error" to help diagnose the situation if this occured due bug in the engine.

Bug fixes
- Fixed side-borders that were not applied properly at newer (larger) widescreen resolutions.
- Fixed crash that occured when ListBox.GetItemAtLocation() is called from repeatedly_execute_always() just before the list box is about to be drawn on screen for the first time.
- Fixed custom dialog options clickable area by correcting its horizontal coordinate range.
- Fixed error which took place when user restored a game saved with background music playing, in case the music is not found in resources anymore.
- Fixed audio behavior during cutscenes (error caused audio volume to reset to default). Also AudioChannel.Volume will now return correct value when called from skipped cutscene.
- Stopped play.close_mouth_end_speech_time variable from making effect in voice mode and Sierra-style speech (which it wasn't supposed to do).
- Fixed return value of the AudioChannel.PositionMs for MOD/XM clips;
- Fixed division by zero which occured if there was a 1px tall walkable area (a precisely straight horizontal line) with vector scaling applied.
- Fixed OGG speech ending prematurely if the audio file size is a multiple of 32 KB.

AGS Source code
All here: https://github.com/adventuregamestudio


Reporting bugs
Since this is still beta, please report any problems right in this thread.
When doing so, provide following information:
1. Version of AGS.
If you run engine port, the date of build, or date of last source change - if you were building engine yourself from the sources.
2. What OS do you run AGS on.
3. What game(s) you had problems with (if you were running a game with the new engine).
4. IMPORTANT. Please, explain what were you doing and what happened. Don't say "it does not work", say "I pressed this button and it did this instead of that", or "I run that game and it crashed in the first room", etc. Don't be afraid of being verbose, sometimes the answers are in little details.
5. If you had any error messages in the editor or running the game, please mention them by copying their text. On Windows - if a standard Windows message box appeared, it is still possible to copy the text to clipboard by hitting Ctrl+C (even though the text is not visibly selected, it should still able to copy - this is how it works for message boxes).
6. If you had any errors in game, which is available in public (i.e. not your project), please keep a saved game made somewhere close to the problematic moment, so that we could use it to see what you saw.
7. If you had a crash running Windows version of the engine, and there was a message box telling you - "An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums." - please find a CrashInfo***.dmp file in the game folder and keep it somewhere for a while (we may use it to know details of the crash).[/code]
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Thu 04/04/2013 20:11:04
Awesome job Crim! And everyone else! Thanks for all your hard work. Its well appreciated. Just a little note, if you are looking for an updated version of AGS (V 3.30) for Android, check out this thread: http://www.adventuregamestudio.co.uk/forums/index.php?topic=44768.msg636449832#msg636449832

Maybe later tonight I may do a build to include the changes from today. Either way, these are daily/semi-daily builds. Last one was compiled on 4/3/13. Again, I take no credit for the port. I am simply downloading from the Git and Compiling the engine for everyone.

Thanks Again CW, CJ, JJS, Tzachs and everyone else I am forgetting!
Title: Re: AGS 3.3.0 Beta Release
Post by: selmiak on Thu 04/04/2013 22:54:05
So, will importing a game made with one of the previous versions into 3.3.0 make it impossible to open it again in an older version?

Quote from: Crimson Wizard on Thu 04/04/2013 19:16:28
(http://i.imgur.com/x0aLP.png)
This looks really cool. What could be really usefull would be the option to rename Character and rename all Usages in Scripts.
Also for all other objects and hotspots and whatnot, especially audiofiles. I rename audiofiles like I change my socks. Actually even more.

Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 04/04/2013 23:11:02
Quote from: selmiak on Thu 04/04/2013 22:54:05
So, will importing a game made with one of the previous versions into 3.3.0 make it impossible to open it again in an older version?
I am afraid that yes, there is some change to project format (probably related to folders feature, tzachs should know better).
But there might be ways to downgrade project in critical need. The project file is just an XML document, one could learn the differences between two formats and edit the project manually.
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Fri 05/04/2013 11:47:07
Well done, open source team!

I'll definitely download and start playing with this beta over the next few days. The editor improvements sound class! (I also second Selmiak's call for a project-wide rename feature. I change my mind about variable names constantly, and always worry about breaking references.)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 05/04/2013 12:16:49
Quote from: Snarky on Fri 05/04/2013 11:47:07
I'll definitely download and start playing with this beta over the next few days. The editor improvements sound class! (I also second Selmiak's call for a project-wide rename feature. I change my mind about variable names constantly, and always worry about breaking references.)
Yes, I too would support this; if Tzach or someone else could do that in reasonable time, we could add it to 3.3.0, otherwise it may be planned for next release.

Other than that, I would like to have Calin's "reload sprite from source" feature added here.
Title: Re: AGS 3.3.0 Beta Release
Post by: selmiak on Fri 05/04/2013 15:33:33
Quote from: Crimson Wizard on Fri 05/04/2013 12:16:49
Other than that, I would like to have Calin's "reload sprite from source" feature added here.

+1

better wait a bit more for the final release and have it in than waiting even longer for the next editor version that might have it in :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Peder 🚀 on Sat 06/04/2013 10:57:04
Here's a mirror: http://agsarchives.com/download/e/latest-beta
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Sat 06/04/2013 11:22:55
Quote from: Snarky on Fri 05/04/2013 11:47:07
(I also second Selmiak's call for a project-wide rename feature. I change my mind about variable names constantly, and always worry about breaking references.)

Well, you have project wide "Replace All" which is pretty close to rename (if you use long and descriptive names then 90% of the time it will work every time)... Rename is harder to program since you have to know the context of what you're renaming and there are a lot of edge cases.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Sat 06/04/2013 13:14:35
Wow, great! I'll definitely try that one.

About renaming: I had to rename a character once (with 3.2.1) and search-replaced it all over the project. However, this didn't get me the occurencies in the dialog topics. I only found that one later on :( Could this be included in the search?
Title: Re: AGS 3.3.0 Beta Release
Post by: Stee on Sat 06/04/2013 15:18:16
Great stuff guys!!

another mirror here

http://steecampbell.co.uk/AGS/AGS-3.3.0.exe
Title: Re: AGS 3.3.0 Beta Release
Post by: Cerno on Sat 06/04/2013 21:06:07
Great news!

I am especially thrilled about the subfolder extensions (I know, the little things), finally I can stop naming my dialogs dPrlgBlahBlah (Prlg for Prologue) to organize them. Neato!

Thanks to everyone who had a hand in this.

Quote from: selmiak on Fri 05/04/2013 15:33:33
Quote from: Crimson Wizard on Fri 05/04/2013 12:16:49
Other than that, I would like to have Calin's "reload sprite from source" feature added here.
+1
+1 as well. This would be so helpful for replacing whole animations. :)
Title: Re: AGS 3.3.0 Beta Release
Post by: AGA on Sat 06/04/2013 21:36:26
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0.exe. I'll PM you with details on how to upload yourself.
Title: Re: AGS 3.3.0 Beta Release
Post by: Igor Hardy on Sun 07/04/2013 10:07:33
The new engine... Could anyone that tested a number of games with it, tell me how its performance compares to the old one?

Has the way the graphics are rendered/displayed/interpreted changed in any significant way?
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Sun 07/04/2013 12:00:39
Quote from: cat on Sat 06/04/2013 13:14:35
About renaming: I had to rename a character once (with 3.2.1) and search-replaced it all over the project. However, this didn't get me the occurencies in the dialog topics. I only found that one later on :( Could this be included in the search?
Yes, dialogs are included in this (and the previous) version.
Title: Re: AGS 3.3.0 Beta Release
Post by: bush_monkey on Sun 07/04/2013 12:22:24
I just converted my game from V2.7 to 3.2! I'm glad I did this as this new beta version sounds awesome. Downloading now.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Sun 07/04/2013 20:54:36
Just Tried Running the Supergirl Game from 2005 (Using AGS 2.62 it seems) and I got this(Note, the game works perfectly with AGS for Android):
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x004181C7 ; program pointer is +3330, ACI version 3.3.0.1130, gtags (0,1)

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.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------


Thoughts on that? Thanks. And yes, I know, SuperGirl.... LOL I am using Win 7 64 Bit btw... Here is the download for the game if you need it: http://adventurestockpile.com/sg.zip


ONE MORE EDIT:

When I run ACWIN --Setup, and then save and run the configuration, it gives me the following error message as well: Unable to determine startup path: GetShortPathNameW failed. The specified game file might be missing. Then it runs the game and thats when the message above pops up.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 07/04/2013 22:29:45
DiPerla, one question: what is in the folder with the game? Are there any extra files, like acsprset.spr for example?
The error place is very similar to what happens when you have special editor files in the same directory with the game. The engine loads sprite data from standalone acsprset.spr instead of one, packed in game, and fails to find proper sprites.
That's my guess, but please give me some info.
I was able to run game up to first room without any problems.

Regarding second problem, what is the path to game's folder?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 07/04/2013 22:38:35
Quote from: Ascovel on Sun 07/04/2013 10:07:33
The new engine... Could anyone that tested a number of games with it, tell me how its performance compares to the old one?

Has the way the graphics are rendered/displayed/interpreted changed in any significant way?

Oops, somehow missed this one.
Graphics changed in no way since 3.2.1.
Regarding perfomance, it may be slightly slower on script heavy games, but the difference is almost negligible on PC, we had some issues on PSP related to this. If that still would be problem, I think it is possible to increase the speed, just did not want to spend time on this without actual need.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Mon 08/04/2013 12:38:56
Yeah, you were right CW. However, just so you know, even though the game works and runs flawlessly, I am still getting the "Unable to determine startup path: GetShortPathNameW failed. The specified game file might be missing. " But once I click ok, it goes to the game and runs well.
Title: Re: AGS 3.3.0 Beta Release
Post by: JJS on Mon 08/04/2013 12:48:02
You are running the game by just typing "acwin" instead of "acwin.exe", right? This is a way in which I can reproduce the GetShortPathNameW message.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Mon 08/04/2013 13:29:49
Yep, you are right JJS. I didn't really think it would make a difference, atleast not from the command line, to include the .exe into the command. But, yep, that did it. Thanks.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 08/04/2013 13:50:08
Well, that GetShortPath issue should be fixed of course.
Title: Re: AGS 3.3.0 Beta Release
Post by: DoorKnobHandle on Mon 08/04/2013 22:54:26
Oh I haven't posted here yet! You guys rock! I'm not going to lie, I was starting to doubt any productive group-effort would come from the AGS code release - but never count out the AGS devs! This is really awesome and promising!
Title: Re: AGS 3.3.0 Beta Release
Post by: Dhelayan on Tue 09/04/2013 23:00:31
It's great that work on AGS continues, and i have a few ideas on how to improve the editor.
Currently i use AGS Draconian r7 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=44502.0 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=44502.0))for making my games. I mostly use it because it has a dark color scheme for the script editor. Makes it easier on the eyes when editing lots of code.

Another reason is, some commands have been extended in Draconian it seems..In there, i can just use "eDirectionDown" if i want to have characters face a direction. The new AGS 3.3.0 gives me just an error when i try to use it, and the manual also doesnt mention it..

If the functionality extensions of Draconian and 3.3.0 could be merged, that would be my dream build of AGS XD
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Tue 09/04/2013 23:15:27
I don't know how Draconian does it, but you can easily script a FaceDirection extender function:

Code (AGS) Select

//new module header
enum FacingDirection
{
  eDirectionLeft,
  eDirectionRight,
  eDirectionUp,
  eDirectionDown
};

import void FaceDirection(this Character*, FacingDirection dir);

// new module script
void FaceDirection(this Character*, FacingDirection dir)
{
  if(dir == eDirectionLeft) this.FaceLocation(this.x-1, this.y, eNoBlock);
  else if(dir == eDirectionRight) this.FaceLocation(this.x+1, this.y, eNoBlock);
  else if(dir == eDirectionUp) this.FaceLocation(this.x, this.y-1, eNoBlock);
  else if(dir == eDirectionDown) this.FaceLocation(this.x, this.y+1, eNoBlock);
}
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 09/04/2013 23:20:22
Well, it was planned long ago to copy some of the Draconian features, but postponed until some more urgent things are done. I am sure we will do this eventually.
Regarding the theme - I like dark one more too, but I believe there should be a theme selection rather than hard-coded one. Hopefully this will be resolved somehow.

Quote from: Snarky on Tue 09/04/2013 23:15:27
I don't know how Draconian does it, but you can easily script a FaceDirection extender function:
This is not exactly what Draconian edition does. It has extended Character.ChangeRoom function which makes character face direction after being transported to other room. This still may be done by scripting, but there's no way to do this well enough, because one would have to split this action in two parts (before room change and after room change).
Title: Re: AGS 3.3.0 Beta Release
Post by: LimpingFish on Wed 10/04/2013 02:20:13
Downloading...now!

Well done to all involved. ;-D
Title: Re: AGS 3.3.0 Beta Release
Post by: dbuske on Wed 10/04/2013 17:05:21
Tried it and found it wouldn't even start up.
Windows Vista
Title: Re: AGS 3.3.0 Beta Release
Post by: AGA on Wed 10/04/2013 17:32:59
Quote from: dbuske on Wed 10/04/2013 17:05:21
Tried it and found it wouldn't even start up.
Windows Vista

Runs fine on Windows 8 Pro x64, in comparison.  My (admittedly very simple) game also compiled and runs fine.

The installer will only allow me to install to Program Files though.  Didn't see anyone else mention this.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGA on Wed 10/04/2013 18:48:57
Oh, and I notice the editor is still connecting to the Internet.  Is it still reporting to clientstats.php, or is this just a version checking thing at this point?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 10/04/2013 20:49:11
Quote from: dbuske on Wed 10/04/2013 17:05:21
Tried it and found it wouldn't even start up.
Windows Vista
Hi dbuske.
Can you please give more information?
First of all, was it the installer that did not work, or the editor?
Second, were there any error messages, or you were starting the executable and nothing happened?

BTW, have anyone else tried it on previous Win version, like Vista and XP?

UPD: Ok, I tried it on my old laptop with Vista Home Premium SP1, no problems found.
I will need some details on what goes on in your case.

Quote from: AGA on Wed 10/04/2013 17:32:59
The installer will only allow me to install to Program Files though.
Hmm, I'll check this out, might be wrong option in the installer script.
UPD: I was able to install to "C:\Games\Adventure Game Studio 3.3.0\" and "D:\try\Adventure Game Studio 3.3.0" on Win 7. Might that be an issue specific to Win 8? How does it not allowing you to install - does not it accept other path on related setup page, or it shows any errors when file copying starts?

Regarding client stats and version checking - this is something beyond my knowledge at this moment. But I think it won't be a problem to figure out. Question is, should it behave like that now or not?
Title: Re: AGS 3.3.0 Beta Release
Post by: AGA on Wed 10/04/2013 23:31:20
Quote from: Crimson Wizard on Wed 10/04/2013 20:49:11
Quote from: AGA on Wed 10/04/2013 17:32:59
The installer will only allow me to install to Program Files though.
Hmm, I'll check this out, might be wrong option in the installer script.
UPD: I was able to install to "C:\Games\Adventure Game Studio 3.3.0\" and "D:\try\Adventure Game Studio 3.3.0" on Win 7. Might that be an issue specific to Win 8? How does it not allowing you to install - does not it accept other path on related setup page, or it shows any errors when file copying starts?

Um, ignore this.  I was being really dumb and trying to set the Start Menu entry title to E:\Adventure Game Studio\.  PEBKAC (http://en.wikipedia.org/wiki/PEBKAC)!

Quote from: Crimson Wizard on Wed 10/04/2013 20:49:11
Regarding client stats and version checking - this is something beyond my knowledge at this moment. But I think it won't be a problem to figure out. Question is, should it behave like that now or not?

This doesn't seem to have been stored in the database for a while now.  I guess it depends whether you lot want to collect usage data about the new version, really.  I'm happy to support that if you want it, but I don't have any need for it personally.  It's very straightforward, the PHP script just gets POSTED (http://php.net/manual/en/reserved.variables.post.php) a few variables with the relevant data and it's stuck into the database.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Fri 12/04/2013 17:21:35
Just downloaded the new version and tried a few things. Here is a short list of stuff I noticed:

*) "Start new game" wizard->Create in folder section: Please add a button to browse and select a folder (like the browse button in Preferences->New game directory)
*) I love docking the panels <3
*) Hooray for resizable search result windows
*) Not sure why, but "Quit" of 9-verb template reads "QuitätÖ" for me
*) Preferences->Sprite editor: The label text overlaps the first radio button
*) Make sure to update the helpfile before the release, now there is still version 3.2.1
*) Help->Visit the AGS forums: Wrong link
*) Help->Check for updates does not work

Edit: I know I'm repeating myself, but I still don't have the rights to view items in the project tracker...
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 12/04/2013 18:47:11
Quote from: cat on Fri 12/04/2013 17:21:35
*) "Start new game" wizard->Create in folder section: Please add a button to browse and select a folder (like the browse button in Preferences->New game directory)
Hah, something I wanted to have too for a very long time. :)

Quote from: cat on Fri 12/04/2013 17:21:35
*) Not sure why, but "Quit" of 9-verb template reads "QuitätÖ" for me
Ah, right, I noticed that too, since 3.2.1. We need to ask Abstauber about updating template.

Quote from: cat on Fri 12/04/2013 17:21:35
*) Help->Visit the AGS forums: Wrong link
Whoops. Missing last 's'.

Quote from: cat on Fri 12/04/2013 17:21:35
Edit: I know I'm repeating myself, but I still don't have the rights to view items in the project tracker...
Ahh :( this is something above my head.
There's a permissions setup in the tracker, it lists "AGSer", "AGS Baker" and "Mittens Vassal" (the member groups you belong to) in the "Regular Members" permission group. That group has all common rights.
Did you try to log-off and re-login, for instance? Clean cookies maybe?
Title: Re: AGS 3.3.0 Beta Release
Post by: AGA on Fri 12/04/2013 19:11:57
As I said, there's no obvious (or non obvious!) reason why cat might not have access.  All AGS users (AGSer user group) should have basic access!
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Fri 12/04/2013 19:22:47
I deleted the adventuregamestudio cookies and logged on again (with an error message after log on, but after refresh I could access the forum) but no luck with the tracker :(
Title: Re: AGS 3.3.0 Beta Release
Post by: AGA on Fri 12/04/2013 19:48:10
Exactly what happens when you go to http://www.adventuregamestudio.co.uk/forums/index.php?action=projects (http://www.adventuregamestudio.co.uk/forums/index.php?action=projects)?  A screenshot might help.

I tried giving my test forums account exactly the same permissions as you, and it can see the tracker!
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Fri 12/04/2013 20:06:16
With the link you gave me here I just see the forums. When I click the "Projects" link on top, I see the various categories (looks the same in IE, where I'm not logged in).
When I click on Editor for example, in IE it works, but in Firefox, where I'm logged in, I see this (hide tags to preserve layout):
Spoiler

(http://cat.agser.me/stuff/NoIssueTracker.png)
[close]

When I click on any of the links to an issue, I get this error message:

An Error Has Occurred!
You are not allowed to view issues of this project.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGA on Fri 12/04/2013 20:23:34
I even made you a special cat membergroup all of your own.  Did that change anything?

It's quite likely of course that more users than just you are being affected by this.  It's just that you actually want to visit the tracker, while not everyone does.
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Fri 12/04/2013 21:15:46
Quote from: cat on Fri 12/04/2013 20:06:16
With the link you gave me here I just see the forums.

That, at least, has a simple explanation. The ? at the end of the sentence gets included in the URL.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Sat 13/04/2013 07:22:17
Yes, it works now! :-D Thanks AGA, now I don't have to bother Crimson with PMs anymore ;)
Title: Re: AGS 3.3.0 Beta Release
Post by: AGA on Sat 13/04/2013 10:51:56
Still work?  I hid the 'cat' membergroup, hopefully that didn't make a difference?
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Sat 13/04/2013 16:21:43
Yes, still working  :)
Title: Re: AGS 3.3.0 Beta Release
Post by: DoorKnobHandle on Sat 13/04/2013 19:50:28
BUG REPORT: Clicking "Find usage" on the automatically generated VIEW1 says "No usage found" but when I try and delete it, it (rightfully) complains about being the normal view for the, also automatically generated, EGO character.

BUG REPORT: Importing a sprite, creating a room object, clicking the "..." in the image property, picking the imported sprite doesn't actually change the image property. It leaves it at the default value (0) and hides the object properties in a rather weird fashion.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Sat 13/04/2013 22:22:04
Another BUG: Whenever I edit a script file and then save the game or run it, the editor tells me that the script was modified by an outside editor. When I click ok to reload, it crashes the Editor.
Title: Re: AGS 3.3.0 Beta Release
Post by: DoorKnobHandle on Sat 13/04/2013 22:28:07
FWIW, that does not happen on my end, Joseph!
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 13/04/2013 22:39:44
Quote from: Joseph DiPerla on Sat 13/04/2013 22:22:04
Another BUG: Whenever I edit a script file and then save the game or run it, the editor tells me that the script was modified by an outside editor. When I click ok to reload, it crashes the Editor.
Is there any error message? If there is, please post the contents.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Sun 14/04/2013 01:09:36
The first message that appears when I edit a script file and then save it:

The File SCRIPTNAME.asc has been modified externally. Do you want to reload it?

When I hit yes, it would just crash, no error message. The funny thing is, Last night I was able to reproduce it every time, even after restarting my pc. For some reason, now, it wont crash. However, it still brings up the message above, which is still pretty annoying for every time I save a script. I do not know if this makes a difference, but the game I am working on was built with AGS 2.62 first, then I brought it into 2.72 and then 3.0 and finally 3.30. I figured I would mention that, but I don't think it really makes a difference that it does that because I started a new game and tried to edit the text file and it did the same thing.
Title: Re: AGS 3.3.0 Beta Release
Post by: DBoyWheeler on Sun 14/04/2013 01:50:29
Meh, I think I'll wait till the final cleaned-up release before downloading it.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Sun 14/04/2013 20:54:45
Quote from: DoorKnobHandle on Sat 13/04/2013 19:50:28
BUG REPORT: Clicking "Find usage" on the automatically generated VIEW1 says "No usage found" but when I try and delete it, it (rightfully) complains about being the normal view for the, also automatically generated, EGO character.
Currently "Find all usages" find the usages in the scripts (including dialogs).
I'll think of how to add other types of existing links for future releases.

Quote
BUG REPORT: Importing a sprite, creating a room object, clicking the "..." in the image property, picking the imported sprite doesn't actually change the image property. It leaves it at the default value (0) and hides the object properties in a rather weird fashion.
That's my bad, issue is now fixed in git.

Quote from: Joseph DiPerla on Sat 13/04/2013 22:22:04
Another BUG: Whenever I edit a script file and then save the game or run it, the editor tells me that the script was modified by an outside editor. When I click ok to reload, it crashes the Editor.
My only theory is this (of why the message was shown):
When the editor gets an event from the OS that a file was changed, it doesn't know if it is changed externally or from within the application.
So it does the distinction by marking each script with the last time that it started an internal save, and then when it gets the event it checks if two seconds have elapsed from the last save time.
So, if for some reason saving the script from the editor takes you more than two seconds it would think it was changed externally even though it wasn't.
Maybe you have a very big script file? Or work with a very slow hard drive?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 14/04/2013 21:39:20
Quote from: tzachs on Sun 14/04/2013 20:54:45
When the editor gets an event from the OS that a file was changed, it doesn't know if it is changed externally or from within the application.
So it does the distinction by marking each script with the last time that it started an internal save, and then when it gets the event it checks if two seconds have elapsed from the last save time.
Why not mark the end of writing?
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Mon 15/04/2013 11:23:47
Yes, but first I want Joseph to confirm that this is really the issue, I don't want to fix something if it's not broken (maybe CJ had a reason to program it like that, I don't want to needlessly break something).
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Mon 15/04/2013 14:47:38
tzachs, I sent you a pm with a link. That link will reproduce it once you turn it into a new project. It did on mine. Hope that helps a bit. But as I said, it happens even with a brand new project from scratch. Maybe its just my system? I could try and reproduce a video for you if you would like.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Tue 16/04/2013 22:01:16
It didn't reproduce to me, so I guess it's related to your computer.
As CW suggested I changed the mark time of the save to be just before releasing the file.
I commited this change to git.
Please use it and see if it solved the issue for you.

In other news, I'm going away on a three weeks vacation (New Zealand, yay!), so I won't be able to help out with bugs in the near future..
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Wed 17/04/2013 00:10:35
Hey tzachs. I compiled the new Git upload. Still giving me that issue. It most likely is an issue on my system then. Oh well. Thanks for Trying.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 17/04/2013 00:28:53
Quote from: Joseph DiPerla on Wed 17/04/2013 00:10:35
Hey tzachs. I compiled the new Git upload. Still giving me that issue. It most likely is an issue on my system then.
Does this happen if you use 3.2.1?
I believe we should eventually find the root of this problem, even if it happens only on some systems.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Wed 17/04/2013 01:53:50
Quote from: Crimson Wizard on Wed 17/04/2013 00:28:53
Quote from: Joseph DiPerla on Wed 17/04/2013 00:10:35
Hey tzachs. I compiled the new Git upload. Still giving me that issue. It most likely is an issue on my system then.
Does this happen if you use 3.2.1?
I believe we should eventually find the root of this problem, even if it happens only on some systems.

Yes, it does. Sorry. :(
Title: Re: AGS 3.3.0 Beta Release
Post by: Khris on Fri 19/04/2013 10:43:03
Some small bugs regarding the script editor:
1) Occasionally, the editor will be much smaller than the available window space.

2) I switch tabs a lot using Ctrl-Tab. Pressing it twice will basically update the auto-complete list, and I use this all the time. Now, only every other Ctrl-Tab seems to register. And whenever it fails, it looks like a tab in the background still has focus because pasting something doesn't end up in the open editor tab but in one in the background. Clicking in the open editor fixes this, of course.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 23/04/2013 10:41:24
I was able to reproduce same (or similar) error as DiPerla reported.
This happens almost every time, but on certain machine. I am not yet sure what difference causes this, but I have access to this machine almost every day, so chances are I may find out more; plus I run it under debugger.

OS is Windows 7 Ultimate N SP1.

First time I open the script, change something and save normally. The next time I make any change to that script and try to save, the message box appears, telling that script was modified outside the editor, asking me if I want to update it. When I hit "Yes", error occurs:

QuoteA first chance exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll

Additional information: Cross-thread operation not valid: Control 'scintillaControl1' accessed from a thread other than the thread it was created on.

Stack trace:
Quote
   System.Windows.Forms.dll!System.Windows.Forms.Control.Handle.get() + 0xc4 bytes   
>   AGS.Controls.dll!Scintilla.ScintillaControl.SendMessageDirect(uint msg = 2140, System.IntPtr wParam = 0, System.IntPtr lParam = 0) Line 684 + 0xe bytes   C#
   AGS.Controls.dll!Scintilla.ScintillaControl.SendMessageDirect(uint msg = 2140) Line 711 + 0xf bytes   C#
   AGS.Controls.dll!Scintilla.ScintillaControl.IsReadOnly.get() Line 625 + 0xd bytes   C#
   AGSEditor.exe!AGS.Editor.ScintillaWrapper.SetText(string newText, bool clearModified = true) Line 451 + 0x11 bytes   C#
   AGSEditor.exe!AGS.Editor.ScintillaWrapper.SetText(string newText) Line 441 + 0xd bytes   C#
   AGSEditor.exe!AGS.Editor.ScriptEditor.PromptUserThatFileHasChangedExternally() Line 206 + 0x2c bytes   C#
   AGSEditor.exe!AGS.Editor.ScriptEditor.Events_FileChangedInGameFolder(string fileName = "guiscript.asc") Line 230 + 0x8 bytes   C#
   AGSEditor.exe!AGS.Editor.EditorEvents.OnFileChangedInGameFolder(string fileName = "guiscript.asc") Line 108 + 0x11 bytes   C#
   AGSEditor.exe!AGS.Editor.AGSEditor._fileWatcher_Changed(object sender = {System.IO.FileSystemWatcher}, System.IO.FileSystemEventArgs e = {System.IO.FileSystemEventArgs}) Line 728 + 0x22 bytes   C#
   System.dll!System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs e) + 0x84 bytes   
   System.dll!System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(int action, string name) + 0xa1 bytes   
   System.dll!System.IO.FileSystemWatcher.CompletionStatusChanged(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* overlappedPointer = 0x02a2d650) + 0x39d bytes   
   mscorlib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP) + 0x54 bytes   
   kernel32.dll!@BaseThreadInitThunk@12()  + 0x12 bytes   
   ntdll.dll!___RtlUserThreadStart@8()  + 0x27 bytes   
   ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes   

The line is:
Code (C#) Select

m.HWnd = Handle;




UPD: I sort of found out why it causes this "different thread" error.
It looks like the "Script was changed" message box is actually created on different thread! I may simply ignore that message, click back on editor and continue to edit script, and every time I save more message boxes will pop up.

So, what we have here is two separate issues:
1. The message box on other thread (or non-modal).
2. The faulty changes detection.
Title: Re: AGS 3.3.0 Beta Release
Post by: TheMagician on Sat 27/04/2013 19:15:45
First post in a while - for the first update in a while :)

It's great to see things moving forward. Thanks to everyone involved.

Title: Re: AGS 3.3.0 Beta Release
Post by: Calin Leafshade on Sat 25/05/2013 07:33:02
This version seems to crash when using the Lua plugin and the project has a GUI.

I'm assuming this is because the GUI storage has been changed and the lua plugin is trying to access something that is no longer there.

the error is:


---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00456A84 ; program pointer is -23, ACI version 3.3.0.1130, gtags (0,0)

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.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------


Any insights?
Title: Re: AGS 3.3.0 Beta Release
Post by: JJS on Sat 25/05/2013 08:50:28
Quote from: Calin Leafshade on Sat 25/05/2013 07:33:02This version seems to crash when using the Lua plugin and the project has a GUI.
The issue is probably fixed with this commit (https://github.com/adventuregamestudio/ags/commit/57dba594c78417bea63c504e7bfb4604e9248126).
Title: Re: AGS 3.3.0 Beta Release
Post by: Calin Leafshade on Sat 25/05/2013 10:47:33
Tried the latest daily build and that seems to have fixed it, thanks.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 25/05/2013 14:35:00
Quote from: Calin Leafshade on Sat 25/05/2013 07:33:02
I'm assuming this is because the GUI storage has been changed and the lua plugin is trying to access something that is no longer there.
No, storage did not change, that was my intent not to change any serialized format before next version (3.3.1 or whatever).
The "translated" flag for ListBox is kept in the general Gui Object flags variable (which still has some free bits), and the global GUI alpha rendering option is an int, which may be used as enum.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 25/05/2013 18:07:51
AGS 3.3.0 BETA 2 released (engine version 3.3.0.1132)
-------------------------------------------------------
Changes from BETA 1:

Features:
- Added "Translated" property to ListBox gui control, which forces engine to translate ListBox items. Default is True. Set to False if you are using ListBox for listing savegames. NOTE: when older projects are imported, it is set to False automatically.
- Added new option for gui alpha blending which mixes alpha values and blends GUI Control color with regard to its alpha. Option is named "Multiplied Translucence, Blend Source Color" - because that's what it does (better name anyone?). The old "AdditiveOpacity" option is renamed to "Additive Opacity, Copy Source Color". The default for new projects is "Multiplied Translucence, Blend Source Color".
Also fixed inventory items with alpha channel not being drawn properly.
- Added "Reload sprite from source" command to Sprite Manager's context menu (by Calin Leafshade).

Bug fixes:
- Fixed incorrect selection of a new sprite, imported while the "Select sprite" dialog is open.
- Set last script's save time at the save end rather than before the save, in case file writing takes significant time.
- Fixed new script created without focusing on naming the script (which does not let to type in script name right away).
- Fixed context menu which did not appear when user right clicks on a script with a dot in their name.
- Fixed AGS "char" type treating its value as "signed" instead of "unsigned" (bug introduced in 3.3.0 beta 1)
- Numerous port fixes and optimizations by JJS.


Download links (also updated at first page):
Official: http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0.exe
Mirror: http://www.mediafire.com/download/e15ehe97l425lh6/AGS-3.3.0.exe
Title: Re: AGS 3.3.0 Beta Release
Post by: Billbis on Sat 25/05/2013 18:20:56
Quote from: Crimson WizardAlso fixed inventory items with alpha channel not being drawn properly.
Hourra! :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 30/05/2013 11:14:01
tzachs, it appears that setting script save time at the end of the file writing made things worse.

The problem is that file change now is being detected even before file writing finishes, and it uses previously remembered save time. By reverting this change I got rid of the error I was having.

Thinking on DiPerla's problem though, I decided to emulate long file opening time by simply putting "Sleep" call in the script writing function. This led to similar results.
I am thinking that this may be solved by introducing new variable set to a name of a script we are about to write and reset when file writing has ended.
When file changes are checked, this file should be ignored.
What do you think?

E: To clarify, I mean set the serialized script name before opening file, and set script save time after writing.
EE: Or rather not the script name, but add a "IsBeingSaved" flag to script object. This will work even if several scripts are saved at the same time.


Other thing. I noticed there's now an annoying blinking in the script window when the script's "modified" state changes, i.e.:
- first edit is made to the text;
- the changes are fully Undo-ed;
- script is saved.
It looks like panel is repositioned and/or repainted.
Title: Re: AGS 3.3.0 Beta Release
Post by: Monsieur OUXX on Fri 31/05/2013 10:18:03
BUG REPORT : Quick launch icon

I just installed 3.3.0 from http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0.exe
I checked "create quick launch icon". I have XP home edition (in French)
An icon does get created in the Quick Launch bar, but it doesn't have the AGS icon (instead it has Windows' generic "program" icon), it's called "My Program", and points to "C:\Program Files\Adventure Game Studio 3.3.0\MyProg.exe".

It seems to me that someone forgot to change the default settings of the installer designer.



BUG REPORT : file modified externally

Every now and then (actually, way too often not to be incredibly annoying), I get the following message when I hit Ctrl+S to save the game:
"The file <script file on which I'm working> has been modified externally. Do you want to reload it?" <Yes> <No>
However I'm just working with the regular embedded Editor.
Whenever I press "Yes", the file gets reloaded and... the cursor skips back to the first line.  :angry:

I have no idea what could cause this, but my system is a bit slow: Could the syntax highlighter's execution thread be a bit too slow to update the contents of the text window (the one containing the source code), thus messing up with the timestamps, and thus causing another AGS thread to believe that someone else modified the files?


BUG REPORT : crash caused by conflicting pop-up window
Unfortunately I don't have the crash report for that, but I suspect this is a side effect of the previous bug (above). When there are two pop-up windows conflicting to be displayed at the same time, it causes the whole Editor to throw an exception and kinda crash (I wrote "kinda" because the Editor doesn't completely crash, you can pretend nothign happened and continue working)
Title: Re: AGS 3.3.0 Beta Release
Post by: Dhelayan on Sat 01/06/2013 14:37:34
Quote from: Monsieur OUXX on Fri 31/05/2013 10:18:03
BUG REPORT : file modified externally

Every now and then (actually, way too often not to be incredibly annoying), I get the following message when I hit Ctrl+S to save the game:
"The file <script file on which I'm working> has been modified externally. Do you want to reload it?" <Yes> <No>
However I'm just working with the regular embedded Editor.
Whenever I press "Yes", the file gets reloaded and... the cursor skips back to the first line.  :angry:

I have no idea what could cause this, but my system is a bit slow: Could the syntax highlighter's execution thread be a bit too slow to update the contents of the text window (the one containing the source code), thus messing up with the timestamps, and thus causing another AGS thread to believe that someone else modified the files?

I can confirm that bug! I have a pretty fast machine, no idea if that changes anything..But i have the same message everytime i update the GlobalScript and start the game
Title: Re: AGS 3.3.0 Beta Release
Post by: Stee on Sat 01/06/2013 19:34:32
beta 2 re-mirrored here: http://steecampbell.co.uk/AGS/AGS-3.3.0.exe
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 02/06/2013 13:50:13
Quote from: Dhelayan on Sat 01/06/2013 14:37:34
Quote from: Monsieur OUXX on Fri 31/05/2013 10:18:03
BUG REPORT : file modified externally
I can confirm that bug! I have a pretty fast machine, no idea if that changes anything..But i have the same message everytime i update the GlobalScript and start the game

That was the bug I was writing one post above :).
Sorry! We will fix this soon and upload new version.

tzachs, if you are reading this, are you planning on fixing this or left it for me?
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Sun 02/06/2013 19:53:07
Other than bug fixes, are there any outstanding items for this release to be made official?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 03/06/2013 07:17:56
Quote from: monkey_05_06 on Sun 02/06/2013 19:53:07
Other than bug fixes, are there any outstanding items for this release to be made official?
Lol, good question (although not sure which fixes are that).
I think whole release planning went wrong and bit silly. So I'll just be adding more stuff for some more time until there's more new content. There are few good features being under development right away, planned for next version, but we may as well finish them and put everything in 3.3.0.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 05/06/2013 10:22:43
New bug, a "funny" one.
Adding or removing ONE symbol in unmodified script and then saving makes the cursor reposition to the beginning of the file.
This happens only if only ONE symbol is added or removed before saving. It does not happen if I select a symbol and replace it with another.

Does not occur in 3.2.1.

PS. I will upload a version with fixed "file changed externally" problem soon.
Title: Re: AGS 3.3.0 Beta Release
Post by: frybread on Thu 06/06/2013 04:55:16
I signed up to thank you guys for keeping AGS alive.  This is legendary software, and you are legends for working on it.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 06/06/2013 18:40:22
AGS 3.3.0 BETA 3 released (engine version unmodified - 3.3.0.1132)
-------------------------------------------------------
This is a Hot-Fix for Beta 2.

Bug fixes:
- Fixed improper detection of external script modifications which would trigger when script is saved in the editor.
- Fixed Editor's quick-launch icon (in program setup).

Download links (also updated at first page):
Official: http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta3.exe

I would like to know if that fixed DiPerla's problem with scripts too.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 09/06/2013 12:45:31
I would like to hear people's opinion on something.

In parallel to the updates to this Beta I was working further on rewriting parts of the engine, and in latest state this parallel branch of development is potentially capable of having some or all of the limits removed + some interesting features added, such as changing Custom Properties at runtime.
So, question is, should I put it to this Beta or leave for the next release. Thing is that this newer version of the code has significant changes, and totally new savedgame format. Which means that applying those changes to the 3.3 beta will increase the test period required to become sure it is stable enough to release officially.

In other words, do you think that this Beta in its current state has enough new features to be wanted as a final release (perhaps, with few more minor improvements), or you'd rather wait more to get more stuff?


E: Of course, nothing prevents people from using those Beta versions to make their games (I know few do already), but most will be reluctant to do so.
Title: Re: AGS 3.3.0 Beta Release
Post by: Stee on Sun 09/06/2013 13:34:54
I know I will probably get out voted on this, but I think it should be postponed to the next beta. Things like a new save game format are features that could potentially destroy backwards compatibility.

To me the features you are outlining in your parallel branch sound like major changes that would require a major revision release (ie 3.4.0). I'd rather see some more smaller enhancements to 3.3.0 so that we can have a new final build that everyone can use, and some more magic features in the parallel branch. To be honest I think there has been enough visible changes on the editor side (unfortunately the side most people would notice) to warrant 3.3.0 feature complete.

There's nothing stopping you from releasing another beta the minute you have a Release Candidate  :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 09/06/2013 13:45:45
Quote from: Stee on Sun 09/06/2013 13:34:54
Things like a new save game format are features that could potentially destroy backwards compatibility.
Well, this one is not the issue. The engine we have now can load old games as far as of version 2.5, and I left the code which loads 3.2.1 savegames to make it easier for port users to move to the new version.

Quote from: Stee on Sun 09/06/2013 13:34:54
There's nothing stopping you from releasing another beta the minute you have a Release Candidate  :)
Right.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Sun 09/06/2013 14:38:30
Given that the latest official release (by official I mean AGS 3.2.1 which is what the website points to) was more than two years ago (Apr 11) I say to wait with new features and concentrate on getting this baby out.
If you compare to the version from two years ago, I believe we have enough new features to justify a release.

Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Sun 09/06/2013 16:18:35
Quote from: Crimson Wizard on Sun 09/06/2013 12:45:31
...having some or all of the limits removed + some interesting features added, such as changing Custom Properties at runtime.

Big yes from me...I would even pay for that! :-D
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 09/06/2013 16:24:26
Quote from: General_Knox on Sun 09/06/2013 16:18:35
Quote from: Crimson Wizard on Sun 09/06/2013 12:45:31
...having some or all of the limits removed + some interesting features added, such as changing Custom Properties at runtime.

Big yes from me...I would even pay for that! :-D

But, hey, you could become the first 3.4 alpha tester as soon as those changes are ready, what about this? ;)
I should repeat, my question is not whether I should work on that (because I am working on these features anyway), my question was should I put them in this current beta.
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Mon 10/06/2013 05:14:33
I'd personally vote to put those features into this beta...perhaps a poll could be made? :)
Title: Re: AGS 3.3.0 Beta Release
Post by: MiteWiseacreLives! on Mon 10/06/2013 07:59:22
On the topic of features, I can't seem to get the reload sprite form source thing to work. I presume the onboard manual hasn't been updated to help explain the new featues? So far its been pretty good for me,
Quote
Bug fixes:
- Fixed improper detection of external script modifications which would trigger when script is saved in the editor.

this has been a bit annoying.. is it safe to download the hotfix if I'm in the middle of a game?
Thanks guys!
Title: Re: AGS 3.3.0 Beta Release
Post by: Calin Leafshade on Mon 10/06/2013 08:05:21
If the new changes are at beta state then they should be included in the beta. If they are basically feature complete and work fine (excepting unforeseen bugs) then they should be included.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 10/06/2013 08:23:15
@MiteWiseacreLives, yes, the manual is yet to be updated. I'll do that when I have final list of new features for this version.

Quote from: MiteWiseacreLives! on Mon 10/06/2013 07:59:22
I can't seem to get the reload sprite form source thing to work.
Please, be a little more specific: do you mean you can't find this option or it fails to work?
The option is in sprite manager's context menu, you select sprite(s), right-click and choose "Replace sprite(s) from source..."

E: I missed one thing though: this command is placed in a wrong section IMO, it should go next to other "Replace from" commands, but it is one section below. I think I will fix this.

Quote from: MiteWiseacreLives! on Mon 10/06/2013 07:59:22
Quote
Bug fixes:
- Fixed improper detection of external script modifications which would trigger when script is saved in the editor.

this has been a bit annoying.. is it safe to download the hotfix if I'm in the middle of a game?
It should be safe. The changes have effect on how editor work, they do not alter game data.
Actually, it is best intent that every new beta version is compatible with previous ones. But still, since it is beta and has on-going changes, it makes sense to backup your game every time you install new version.


Quote from: Calin Leafshade on Mon 10/06/2013 08:05:21
If the new changes are at beta state then they should be included in the beta. If they are basically feature complete and work fine (excepting unforeseen bugs) then they should be included.
No, they are rather alpha...
Title: Re: AGS 3.3.0 Beta Release
Post by: MiteWiseacreLives! on Tue 11/06/2013 01:38:40
Sorry 'bout that..
when I attempt to test the feature, I use "Replace sprite(s) from source..." and I get this message.
QuoteSprite ## does not have a source file. It may have been tile imported.
have tried a few different scenarios, wonder if I am doing something wrong. Not tile imported, just cropped from a bitmap that hasn't been moved.
Thanks.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Tue 11/06/2013 05:22:16
Cropping likely results in the same issue. Test it on a regular sprite.
Title: Re: AGS 3.3.0 Beta Release
Post by: MiteWiseacreLives! on Tue 11/06/2013 05:22:43
I am occasionally getting this error, seems to be liked to syntax errors in global header as I attempt to run  ???
Spoiler

Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Version: AGS 3.3.0.1132

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at load_room_file(SByte* )
   at load_crm_file(UnloadedRoom roomToLoad)
   at AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)
   at AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   at AGS.Editor.Components.RoomsComponent.RecompileAnyRoomsWhereTheScriptHasChanged(CompileMessages errors, Boolean rebuildAll)
   at AGS.Editor.Components.RoomsComponent.AGSEditor_PreCompileGame(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreCompileGameHandler.Invoke(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.TestGame(Boolean withDebugger)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at AGS.Editor.ToolStripExtended.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[close]
Title: Re: AGS 3.3.0 Beta Release
Post by: MiteWiseacreLives! on Tue 11/06/2013 05:24:46
@ Ryan,
do you mean to import the entire image, not a selection (I might be dumb...)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 11/06/2013 08:15:06
Quote from: MiteWiseacreLives! on Tue 11/06/2013 05:24:46
@ Ryan,
do you mean to import the entire image, not a selection (I might be dumb...)
Unfortunately at this moment AGS keeps information about source file only, not the cropped/tile dimensions, therefore it is impossible to restore a sprite that was imported as a tile and/or cropped.
I will look into this and check how easy that would be to extend this functionality; hopefully Calin (being feature author) would be able to do the same.

Quote from: MiteWiseacreLives! on Tue 11/06/2013 05:22:43
I am occasionally getting this error, seems to be liked to syntax errors in global header as I attempt to run  ???
Is this totally random or you know the steps that lead to the error? Do you mean this happens when you run the game while having errors in script?
Title: Re: AGS 3.3.0 Beta Release
Post by: MiteWiseacreLives! on Tue 11/06/2013 08:25:52
I believe it's when I run the debugger while I have a messed up function declaration in the global header (the variable didn't match the function in global script, I think)

Thanks, CW, I get how it works now. But adding that feature would be really helpful the way I create sprites  :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 11/06/2013 08:43:34
Quote from: MiteWiseacreLives! on Tue 11/06/2013 08:25:52
I believe it's when I run the debugger while I have a messed up function declaration in the global header (the variable didn't match the function in global script, I think)

Hmm, can you post an example (the function that does not match and how it is used)?
Title: Re: AGS 3.3.0 Beta Release
Post by: Calin Leafshade on Tue 11/06/2013 09:12:34
Quote from: Crimson Wizard on Tue 11/06/2013 08:15:06
hopefully Calin (being feature author) would be able to do the same.

Yes, I will do this. The only reason I didn't do so to begin with was that I wanted to get out a version for Ali ASAP and those changes would require more testing since they require additions to the project file and further error trapping.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ghost on Tue 11/06/2013 18:37:14
Quote from: Stee on Sun 09/06/2013 13:34:54
I think it should be postponed to the next beta.

I second that. It's thrilling to have a new version of AGS and I am impressed how nice the changes work. Play it safe, let us getting used to a small number of stable, working new features.

This is a user's opinion, though I think I know how thrilling it must be for a developer to show off the new stuff ;)
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Wed 12/06/2013 09:09:57
Since this is becoming more and more popular: Should there maybe be a template with left-right-click GUI?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 12/06/2013 11:36:29
Quote from: cat on Wed 12/06/2013 09:09:57
Since this is becoming more and more popular: Should there maybe be a template with left-right-click GUI?
I asked Khris to make one. :).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 12/06/2013 12:25:12
People, did anyone have a thought that "Create Folder" menu items should follow "Create Item" in project tree, not precede them?
I make a lot of test games now, and it is really annoying, every time I want to create Character or a GUI I create a folder instead, because my hand instinctively chooses first item in context menu :-\.
Title: Re: AGS 3.3.0 Beta Release
Post by: Calin Leafshade on Wed 12/06/2013 12:27:30
Yes, agreed.

That annoys the shit out of me.
Title: Re: AGS 3.3.0 Beta Release
Post by: Eric on Wed 12/06/2013 17:23:09
Quote from: cat on Wed 12/06/2013 09:09:57
Since this is becoming more and more popular: Should there maybe be a template with left-right-click GUI?

Does this mean Broken Sword- or BaSS-style system? If so, yes please.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 13/06/2013 10:03:43
A serious bug found:

When compiling a game, the characters are enumerated according to their visual position in the project list, instead of their ID numbers. This breaks setting player character in the editor and, presumably, any script commands that use character ID. Using character script names work as intended.

It is currently not known if same behavior applies to other enumerated items, such as Views, Rooms, etc.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Fri 14/06/2013 13:20:11
Should be fixed now in git (also the folder is now last in the menu and not first).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 22/06/2013 10:14:56
AGS 3.3.0 BETA 4 released (engine version 3.3.0.1134)
-------------------------------------------------------
Changes from BETA 3:

Features:
- Custom speech portrait screen offsets for Sierra-style speech (requested by Radiant):
Code (ags) Select

   game.speech_portrait_placement = 1; // enable custom offsets
   game.speech_portrait_x = 10; // set custom x offset from corresponding screen border (in pixels)
   game.speech_portrait_y = 20; // set custom y offset from the screen top border (in pixels)
   game.speech_portrait_placement = 0; // disable custom offsets

- Added a "browse" ("...") button to the "Create in folder" field in the Start New Game wizard.

Bug fixes:
- Improved engine perfomance (actually - restored it to about the level of AGS 3.2, so this may be considered a bug fix).
- Fixed bug in the game compilation (regression) that assigned wrong IDs to game objects if their order was changed in the project tree.
- Repositioned number of context menu items (usability fix): "New Folder" items are now positioned after "New item" and "Import existing..."; "Replace sprite(s) from source" now positioned in proper option group.
- Resized "Editor Preferences" dialog to fix label text overlapping issue.

Download links (also updated at first page):
Official: http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta4.exe


Unless more bugs are found, all is left is to correct the manual text to reflect new changes. Then the Release Candidate may be released.
E: Oh, right, I am also thinking about adding BASS template: http://www.adventuregamestudio.co.uk/forums/index.php?topic=48441.0
Title: Re: AGS 3.3.0 Beta Release
Post by: Ghost on Sat 22/06/2013 11:13:05
Not sure how popular this still is, but can we have the old "zip file" back? I really liked the way you did NOT have to install AGS from an exe setup  (nod)

Other than that the new version is all sorts of awesome, and I must thank you all for making it happen. Lots of useful changes!
Title: Re: AGS 3.3.0 Beta Release
Post by: Shane 'ProgZmax' Stevens on Sat 22/06/2013 19:59:15
I'm getting an error when trying to import wiz's agsjoy.dll functions into this version:

expected variable or function after import, not 'Joystick'

for line: import Joystick* joy;

This was compiling just fine previously.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 22/06/2013 21:35:39
Quote from: Shane 'ProgZmax' Stevens on Sat 22/06/2013 19:59:15
I'm getting an error when trying to import wiz's agsjoy.dll functions into this version:

expected variable or function after import, not 'Joystick'

for line: import Joystick* joy;

This was compiling just fine previously.

That's... very strange. I don't recall any changes in the script compiler.
I am going to check what causes the problem right away.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 22/06/2013 23:05:41
IMPORTANT ANNOUNCEMENT
I found a nasty bug in the Beta 4 (text messages were displayed with wrong text color), fixed it and re-uploaded the build. Please, download again.

I also provided a zip archive, as Ghost requested. If you have any previous AGS installed (even 3.2.1), you can copy the archive contents over:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta4.zip


@ProgZMax, unfortunately I was unable to reproduce the bug you mentioned.
I took the joystick demo game, and put this in the GlobalScript.asc:
Code (ags) Select

Joystick *joy2;
export joy2;

(I had to name it joy2, because room scripts alredy use "joy" variable)
Then I put this in GlobalScript.ash:
Code (ags) Select

import Joystick *joy2;


Everything compiled fine.
Can you give more details about your script?
E: Maybe you simply forgot to put agsjoy.dll into the editor folder? This is only thing that comes to mind at the moment.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Sun 23/06/2013 06:31:24
Quote from: Crimson Wizard on Sat 22/06/2013 10:14:56
   game.speech_portrait_placement = 1; // enable custom offsets
I haven't had the chance to check this out, but is this what I think you've done. Instead of adding a new built-in enum, you've done the "unspeakable" mess of using an int that doesn't help the programmer in anyway to know what they're reading? I don't agree with this at all. Just my 2 cents.

Magic numbers (https://en.wikipedia.org/wiki/Magic_number_(programming)) should be avoided in programming. Especially in a widely used program. CJ was bad at this too.

Or was this meant as a boolean? If so, the variable name is a little misleading. (edit: now that I've read it again, it most certainly must be boolean - very misleading name indeed)

Edit again: I suggest:
Code (ags) Select
game.speech_portrait_manual_placement
To be similar to other AGS variables like Character.ManualScaling, etc.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 23/06/2013 12:06:25
Yes, I was wrong... I'll redo that to a property.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Sun 23/06/2013 17:38:35
Quote from: Crimson Wizard on Sun 23/06/2013 12:06:25
I'll redo that to a property.
What do you mean by that? (I'm not too knowledgeable with programming terms)

The other option is to do it this route:
Code (ags) Select
game.speechPortrait_setPosition(int x, int y)  // which also enables "manual positioning"
game.speechPortrait_disableManualPositioning()  // to disable it and revert to AGS hardcoded placement


I'm not too agreeable with the disableManualPositioning(), but it is certainly clear and to the point.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 23/06/2013 17:45:35
Quote from: Ryan Timothy on Sun 23/06/2013 17:38:35
Quote from: Crimson Wizard on Sun 23/06/2013 12:06:25
I'll redo that to a property.
What do you mean by that? (I'm not too knowledgeable with programming terms)
I mean something like
Code (ags) Select

boolean Game.EnableSpeechPortraitOffsets;
int     Game.SpeechPortraitOffsetX;
int     Game.SpeechPortraitOffsetY;


On other hand I can be brave and introduce whole new class:
Code (ags) Select

bool SierraSpeechStyle.ManualPortraitPosition;

The drawback of the latter will be that it will stand out as a unique example of "speech style" class in whole AGS scripting language.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Sun 23/06/2013 17:48:47
Ooo I like the idea of there being the option of an offset of what AGS's hardcoded positioning will be. BUT, there should still be a manual X,Y so that you don't have to adjust via math or anything.

Edit: I prefer:
Code (ags) Select
PortraitSpeechStyle.ManualPosition(int x, int y);
Drop the "Sierra" from the name.

Or rather:
Code (ags) Select
SpeechStylePortrait.ManualPosition(int x, int y);
That way if you ever added more SpeechStyles, it's easier to find them with autocomplete.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 23/06/2013 17:50:28
Quote from: Ryan Timothy on Sun 23/06/2013 17:48:47
BUT, there should still be a manual X,Y so that you don't have to adjust via math or anything.
Uh, can you elaborate?
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Sun 23/06/2013 17:55:35
Quote from: Crimson Wizard on Sun 23/06/2013 17:50:28
Uh, can you elaborate?
You were speaking of the offsets as actually being offsets, yes? Like whatever AGS currently automatically assigns as the position for the Portrait, the offset just adds to that? Otherwise it isn't an offset, it's strictly an X,Y position.

Code (ags) Select
int     Game.SpeechPortraitOffsetX;
int     Game.SpeechPortraitOffsetY;
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 23/06/2013 17:58:59
Quote from: Ryan Timothy on Sun 23/06/2013 17:55:35
You were speaking of the offsets as actually being offsets, yes? Like whatever AGS currently automatically assigns as the position for the Portrait, the offset just adds to that? Otherwise it isn't an offset, it's strictly an X,Y position.
Well, I added that as a response to Radiant's request. We discussed this a bit and came to a conclusion that setting offsets from screen border would be enough.
Currently it works in such a way that the manual offsets fully override automatic placement. Y offset explicitly defines the Y coordinate of the portrait's top line on screen, while the X offset is relative to the left or right screen border, depending on whether the portrait is displayed as "left-side" or "right-side".
In other words, X offset is a distance from screen border to nearest portrait side.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Sun 23/06/2013 18:01:51
Oh OK. Makes sense. So X would be an Offset while Y would be a Position. Unless there's a "top-side" or "bottom-side" as well. Just saying. (laugh)
Title: Re: AGS 3.3.0 Beta Release
Post by: Herooftime1000 on Mon 24/06/2013 01:54:04
What are the chances that you can include a way to use Pamela with Lucasarts speech?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 24/06/2013 07:59:01
Quote from: Herooftime1000 on Mon 24/06/2013 01:54:04
What are the chances that you can include a way to use Pamela with Lucasarts speech?
I don't even know what Pamela is. :)

Anyway, that depends on how time-consuming that would be to do. There is a number of factors. First, I hoped to release this version as soon as possible, because it takes too long already (it's been 2 years since last official AGS release). Second, I have a number of tasks with high priority that I'd really want to complete. I am struggling to find time to work on these :(. Perhaps someone else would like to work on this Pamela thing? in which case it is theoretically possible to release an update, like version 3.3.1, a bit later.
Title: Re: AGS 3.3.0 Beta Release
Post by: Calin Leafshade on Mon 24/06/2013 08:26:09
It should actually be very simple since the tech already exists in ags to do it for speech portraits.

Just make it change the character frame instead of the speech portrait frame and you're golden.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 24/06/2013 08:58:37
Well, I found this "voice lip sync" in code... the engine code is messy at the speech part. Can anyway provide any small project to test how lipsync works? I never did that lipsync thing myself.
Title: Re: AGS 3.3.0 Beta Release
Post by: Shane 'ProgZmax' Stevens on Mon 24/06/2013 09:28:54
Well, I haven't changed anything between builds, I literally just loaded it up in the final to make sure it was still working since the March build so there must be something it's doing differently.  You might try placing it in a script other than global (I have mine in customcontrols.asc/.h):

Joystick *joy;
export joy;

import Joystick *joy;


Same error I listed before.  It's not recognizing Joystick as a proper function from the agsjoy.dll which is in the editor folder and the game folder.

Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Mon 24/06/2013 19:12:12
Quote from: Ryan Timothy on Sun 23/06/2013 06:31:24
Quote from: Crimson Wizard on Sat 22/06/2013 10:14:56
   game.speech_portrait_placement = 1; // enable custom offsets
I haven't had the chance to check this out, but is this what I think you've done. Instead of adding a new built-in enum, you've done the "unspeakable" mess of using an int that doesn't help the programmer in anyway to know what they're reading? I don't agree with this at all. Just my 2 cents.

I'm glad to see that we can finally agree on something Ryan. :P I was actually going to say that the whole idea of adding things to the game instance as opposed to the Game structure goes directly against what CJ was working toward with OO-izing AGS. I've said it before, but there is no reason to do something wrong now just because "it's easy to fix later".

Quote from: Crimson Wizard on Sun 23/06/2013 17:45:35something like

Code (ags) Select
bool Game.EnableSpeechPortraitOffsets;

This is better, but properties shouldn't be named this way. "Enable" is an action, which is indicative of a function. Further, it implies that there should be an opposing function to "Disable" and a function to check "IsEnabled". The proper way of naming properties should be more like an adjective (describing the current state) rather than a verb (action):

Code (ags) Select
bool Game.SpeechPortraitOffsetsEnabled;

This is consistent with other built-in properties, and makes it clear that it is a property describing (and by being writable, changing) the current state.

Although, really, is this particular property even necessary? After reading the discussion about how it's implemented, it seems reasonable to have it, but I agree with Ryan's logic that the offset properties themselves are named misleadingly.

@ProgZ: I know this is probably obvious, but it has to be asked. Is the plugin enabled in the project tree? If it's not enabled then its script header won't be added to the built-in headers, and Joystick won't be registered as a type. This would perfectly describe what you are experiencing.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 24/06/2013 19:30:11
Quote from: monkey_05_06 on Mon 24/06/2013 19:12:12The proper way of naming properties should be more like an adjective (describing the current state) rather than a verb (action):

Code (ags) Select
bool Game.SpeechPortraitOffsetsEnabled;

This is consistent with other built-in properties, and makes it clear that it is a property describing (and by being writable, changing) the current state.

Although, really, is this particular property even necessary? After reading the discussion about how it's implemented, it seems reasonable to have it, but I agree with Ryan's logic that the offset properties themselves are named misleadingly.

I am not sure what to choose, hesitating between -
SpeechStyle.*
SpeechStylePortrait.*
SpeechStyleSirra.*
also it may be set by properties, or function.

There's no certain plans for the future of speech styles, so this feels like a random selection.



E: I was trying to figure out how engine may let user to customize speech styles, and I thought it is possible to make it similar to custom dialog options rendering: you make an instance of some SpeechStyle class and few functions with built-in names, like start_speech, render_speech etc, that take SpeechStyle pointer to your object as parameter.
In such case it should be SpeechStyle with few built-in properties and array of custom properties (similar to characters etc).
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Mon 24/06/2013 19:54:22
Don't get me wrong, functions are useful where functions are what's needed. But in the particular example above, a single property was able to sufficiently replace three parameterless functions.

As to structurizing the speech styles, I agree that it should be kept fairly generic, but are custom speech rendering methods really a priority request? I don't know that I've ever actually even seen it requested.

The exact naming isn't necessarily that important, as long as it accurately reflects what it does. For example (pseudo-code):

Code (ags) Select
Speech.Style = eSpeechSierra; // SpeechStyle Speech.Style
Speech.TextGUI = gTextwindow; // GUI* Speech.TextGUI
Speech.TextAlign = eAlignLeft; // Alignment Speech.TextAlign
Speech.PortraitAlign = eAlignRight; // Alignment Speech.PortraitAlign
Speech.PortraitX = 50; // int Speech.PortraitX
Speech.PortraitY = 100; // int Speech.PortraitY
// etc.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 24/06/2013 20:06:51
Quote from: monkey_05_06 on Mon 24/06/2013 19:54:22
But in the particular example above, a single property was able to sufficiently replace three parameterless functions.
This left me puzzled. Which property and "parameterless functions" are that?

Quote from: monkey_05_06 on Mon 24/06/2013 19:54:22
but are custom speech rendering methods really a priority request? I don't know that I've ever actually even seen it requested.
No, they aren't priority, I am just trying to think in advance... I don't like it when user API is changed too often.
Regarding requests, there are numerous times when people were struggling to implement custom speech in their own way, and had troubles, for example, with playing voices. If custom speech styles were implemented, they could use standard Character.Say functions with custom speech rendering/behavior.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Mon 24/06/2013 20:26:30
Quote from: Crimson Wizard on Mon 24/06/2013 20:06:51
Quote from: monkey_05_06 on Mon 24/06/2013 19:54:22
But in the particular example above, a single property was able to sufficiently replace three parameterless functions.
This left me puzzled. Which property and "parameterless functions" are that?

Uh... like I said, in the example above... Game.SpeechPortraitOffsetsEnabled (a property) would effectively replace three functions (Game.EnableSpeechPortraitOffsets(), Game.DisableSpeechPortraitOffsets(), Game.AreSpeechPortraitOffsetsEnabled()).

Quote from: Crimson Wizard on Mon 24/06/2013 20:06:51I don't like it when user API is changed too often.

Which is ironic given your predisposition to implement new changes the pre-AGS 2.7 (a.k.a., "wrong") way now in hope of changing them later (based on the rationale that it will be "easy") in favor of implementing them in the post-2.7 ("right") way in the first place. ;)

Quote from: Crimson Wizard on Mon 24/06/2013 20:06:51Regarding requests, there are numerous times when people were struggling to implement custom speech in their own way, and had troubles, for example, with playing voices. If custom speech styles were implemented, they could use standard Character.Say functions with custom speech rendering/behavior.

Again...

Quote from: monkey_05_06 on Mon 24/06/2013 19:54:22I don't know that I've ever actually even seen it requested.

Where are these "numerous times" that people have "[struggled] to implement custom speech in their own way"? Off the top of my head, I can't honestly think of a single example. You mentioned playing voices... I don't understand. Voice speech is a built-in feature...
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 24/06/2013 20:36:56
Quote from: monkey_05_06 on Mon 24/06/2013 20:26:30
Quote from: Crimson Wizard on Mon 24/06/2013 20:06:51I don't like it when user API is changed too often.

Which is ironic given your predisposition to implement new changes the pre-AGS 2.7 (a.k.a., "wrong") way now in hope of changing them later (based on the rationale that it will be "easy") in favor of implementing them in the post-2.7 ("right") way in the first place. ;)

No...
There's already a certain style existing, which may be bad, but it does exist. If we add a new property or function of same (bad) style we will increase the amount of "bad" elements, but we will keep the language in the same form. If then we decide to rework the language, we may plan it thoroughly and split all those functions and properties to separate classes.
If, however, we add those elements in a new style, we have to decide which class/namespace they go, which may be difficult for we do not have a thorough plan about those classes yet. This may require to change their syntax/naming again later.
That's the simple reason I am reluctant to do this.
Okay, this might be my personal psychological issue... I won't deny that. :p

Quote from: monkey_05_06 on Mon 24/06/2013 20:26:30
Quote from: Crimson Wizard on Mon 24/06/2013 20:06:51Regarding requests, there are numerous times when people were struggling to implement custom speech in their own way, and had troubles, for example, with playing voices. If custom speech styles were implemented, they could use standard Character.Say functions with custom speech rendering/behavior.

Again...

Quote from: monkey_05_06 on Mon 24/06/2013 19:54:22I don't know that I've ever actually even seen it requested.

Where are these "numerous times" that people have "[struggled] to implement custom speech in their own way"? Off the top of my head, I can't honestly think of a single example. You mentioned playing voices... I don't understand. Voice speech is a built-in feature...

Oh, come on.
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48244.msg636457955#msg636457955
That's one asked 15 days ago. Sorry, I won't search for more, but such topics appear every now and then.
Also custom speech (as it is made now) makes it difficult to use Dialogs: you have to call your custom functions from dialog scripts instead of using common dialog syntax.
Title: Re: AGS 3.3.0 Beta Release
Post by: Shane 'ProgZmax' Stevens on Mon 24/06/2013 20:50:26
monkey- yeah, that was it.  I'm not sure why the newer ags didn't have the dll loaded for the project, though.  Thanks.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 25/06/2013 21:20:02
Since I am on it, this is what I am planning to add to script api:

Code (ags) Select

enum SkipSpeech {
  eSkipKeyMouseTime = 0,
  eSkipKeyTime      = 1,
  eSkipTime         = 2,
  eSkipKeyMouse     = 3,
  eSkipMouseTime    = 4
};
 
managed struct Speech {
  /// Enables/disables the custom speech portrait placement.
  import static attribute bool         CustomPortraitPlacement;
  /// Gets/sets speech portrait x offset relative to screen side.
  import static attribute int          PortraitXOffset;
  /// Gets/sets speech portrait y position.
  import static attribute int          PortraitY;
  /// Gets/sets special key which can skip speech text.
  import static attribute eKeyCode     SkipKey;
  /// Gets/sets how the player can skip speech lines.
  import static attribute SkipSpeech   SkipStyle;
  /// Gets/sets the style in which speech is displayed.
  import static attribute eSpeechStyle Style;
  /// Gets/sets how text in message boxes and Sierra-style speech is aligned.
  import static attribute Alignment    TextAlignment;
  /// Gets/sets whether voice and/or text are used in the game.
  import static attribute eVoiceMode   VoiceMode;
};


I should probably also put global functions/variables I am replacing with these properties under "#ifndef STRICT" to disable them unless backward compatible mode is enabled.

E: I can't make TextGUI right now, the related code is bit more complicated than I expected. Engine has TWO text window ids, which may be the same or different, and are used in different cases...
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Wed 26/06/2013 23:36:01
Curious question, will there be an internal Set script for PortraitXOffset or PortraitY which turns CustomPortraitPlacement to true? In case I'm being misunderstood, I meant that whenever you change the PortraitXOffset or PortraitY, have it change CustomPortraitPlacement to true. It sounds like a good idea to me, but I'm not 100% certain if you agree.

Also another question. What is the SkipKey for? In case someone wants a very specific Speech style, where for example, you can only hit Enter to skip the text? Overall I suppose it isn't a terrible idea.

Also let me direct you to this thread (http://www.adventuregamestudio.co.uk/forums/index.php?topic=48518). I was going to type it in here but decided a separate thread makes more sense.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 26/06/2013 23:49:01
Quote from: Ryan Timothy on Wed 26/06/2013 23:36:01
Curious question, will there be an internal Set script for PortraitXOffset or PortraitY which turns CustomPortraitPlacement to true? In case I'm being misunderstood, I meant that whenever you change the PortraitXOffset or PortraitY, have it change CustomPortraitPlacement to true. It sounds like a good idea to me, but I'm not 100% certain if you agree.
Hmm, that sounds reasonable, but I am unsure... I mean, obviously user won't set those properties without intent to use them, but what if he will like to prepare them beforehand and enable later?
Well, anyway, that's easy to add.
And, yes, "attribute" tag automatically creates get/set methods using provided property name. Property (attribute) itself does not contain any data.

Quote from: Ryan Timothy on Wed 26/06/2013 23:36:01
Also another question. What is the SkipKey for? In case someone wants a very specific Speech style, where for example, you can only hit Enter to skip the text?
Yes, exactly.
Also, it is not my invention, this is the replacement for "game.skip_speech_specific_key" variable.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Wed 26/06/2013 23:51:21
Quote from: Crimson Wizard on Wed 26/06/2013 23:49:01
Also, it is not my invention, this is the replacement for "game.skip_speech_specific_key" variable.
Oh wow. Learn something new about AGS everyday. You've done your homework.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 30/06/2013 21:05:43
AGS 3.3.0 BETA 5 released (engine version 3.3.0.1136)
-------------------------------------------------------
Changes from BETA 4:

Features:
- Introducing new Speech class to the AGS Script with several static properties replacing old-style global functions and variables.
Spoiler

Added extra constant to enum eKeyCode:
Code (ags) Select

eNoKey // self-explanatory

Introducing enum SkipSpeech.
Defines how player may skip speech:
Code (ags) Select

  eSkipKeyMouseTime,
  eSkipKeyTime,
  eSkipTime,
  eSkipKeyMouse,
  eSkipMouseTime

Introducing class Speech:
Code (ags) Select

  /// Enables/disables the custom speech portrait placement.
  bool Speech.CustomPortraitPlacement;
  /// Gets/sets speech portrait x offset relative to screen side.
  int  Speech.PortraitXOffset;
  /// Gets/sets speech portrait y position.
  int  Speech.PortraitY;
  /// Gets/sets special key which can skip speech text.
  eKeyCode Speech.SkipKey;
  /// Gets/sets how the player can skip speech lines.
  SkipSpeech Speech.SkipStyle;
  /// Gets/sets the style in which speech is displayed.
  eSpeechStyle Speech.Style;
  /// Gets/sets how text in message boxes and Sierra-style speech is aligned.
  Alignment Speech.TextAlignment;
  /// Gets/sets whether voice and/or text are used in the game.
  eVoiceMode Speech.VoiceMode;

[close]


** WARNING **
Following functions and variables are now deprecated. If you have any of them in script you will likely receive compilation errors.
Either turn Backwards Compatibility mode in Global Settings, or consider using corresponding property from Speech class.
Spoiler

Code (ags) Select

void SetVoiceMode(eVoiceMode);       // use Speech.VoiceMode
void SetSkipSpeech(int skipFlag);    // use Speech.SkipSpeech
void SetSpeechStyle(eSpeechStyle);   // use Speech.Style

int game.speech_text_align;          // use Speech.TextAlignment
int game.skip_speech_specific_key;   // use Speech.SkipKey

(introduced in 3.3.0 beta 4)
int game.speech_portrait_placement;  // use Speech.CustomPortraitPlacement
int game.speech_portrait_x;          // use Speech.PortraitXOffset
int game.speech_portrait_y;          // use Speech.PortraitY

[close]

Bug fixes:
- Fixed crash when displaying certain styles of text windows (regression).

Download links (also updated at first page):
Official: http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta5.exe
ZIP:
Official: http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta5.zip


Still need to find time to update manual, also waiting for corrected BASS template from Ghost.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Sun 30/06/2013 21:14:32
Very nice as usual!!! Thanks CW.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Tue 02/07/2013 05:06:33
eNoKey doesn't follow the naming convention of every other member of the same enumerated class. Every built-in enum that deals with a set of data groups the enum values together by a common naming convention due to the fact that AGS enums are stupidly injected into the global namespace. IMO something like "eKeyNone" would better follow the example of the existing built-in enums. Please feel free to share opinions on this.

I was going to say that the SkipSpeech enum wasn't needed, but I was thinking of the CutsceneSkipType enum, which doesn't exactly match the skip styles offered by/to speech. Might it be worthwhile to normalize these skip styles and then provide a common enum "SkipType" or "SkipStyle"?

Still harping on naming conventions (because it actually does matter), I'll comment to the "old" vs "new" convention issue by pointing out that CJ was the one who initiated the change. He left AGScript in a halfway-OO state that really is, I believe, the underlying issue. Ultimately the goal was, is, and should be to finish what CJ started in OO-izing the language (or in the case that AGScript were ever scrapped, the "framework"). This is the reason why I insist that anything new should follow the new style. If you disagree, well you're the one implementing all this while I'm busy trying to figure out a way of creating a virtual clone method returning by reference.

On that same note, CJ actually did a horrible job naming the built-in enums. If I counted right, at least 6 of the 25+ built-in enums start with an 'e' prefix, whereas the rest don't. This is just confusing and frustrating rather than helping identify the enum types as such. I think we should decide on one convention or the other, and fix it sooner rather than later.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 02/07/2013 08:16:10
Quote from: monkey_05_06 on Tue 02/07/2013 05:06:33
eNoKey doesn't follow the naming convention of every other member of the same enumerated class.
Yes, that's true... but it was a deliberate choice.
When I first made eKeyNone I paid attention that it appears in the middle of the autocomplete list; also its compliance with other key enums make it not stand out at it should be, being a special value. IMHO.

Quote from: monkey_05_06 on Tue 02/07/2013 05:06:33
I was going to say that the SkipSpeech enum wasn't needed, but I was thinking of the CutsceneSkipType enum, which doesn't exactly match the skip styles offered by/to speech. Might it be worthwhile to normalize these skip styles and then provide a common enum "SkipType" or "SkipStyle"?
Might be, but I don't know how to do this. Some of them options are not fit for other style: e.g. "skip by time" is non-sensical for Cutscenes, while "skip by escape" may be implemented as "skip by key" + special skip key for Speech.

Quote from: monkey_05_06 on Tue 02/07/2013 05:06:33
Ultimately the goal was, is, and should be to finish what CJ started in OO-izing the language This is the reason why I insist that anything new should follow the new style. If you disagree,
Of course I don't disagree. It's just what I said: I can't (=do not want) to do this without proper plan. That's why I was intending to limit these changes to minimum. This addition I made with portraits - it went slightly off my plans, I made it just because I was asked and it seemed a pretty easy thing to do.
(Meanwhile you can make your new script convention, I promise to try not break anything else in there ;))

Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Tue 02/07/2013 19:59:42
I just got a crash with AGS Editor .NET (Build 3.3.0.1132) ** BETA VERSION ** (that's Beta 4 I think). I sent an error report, does this actually work? Who gets them?

Edit: Now the game/engine crashed when debugging, but no error message.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 02/07/2013 20:24:05
Quote from: cat on Tue 02/07/2013 19:59:42
I just got a crash with AGS Editor .NET (Build 3.3.0.1132) ** BETA VERSION ** (that's Beta 4 I think). I sent an error report, does this actually work? Who gets them?
I think only AGA can tell where they go...
Regarding crash, can you tell any details? There was a bug in BETA 4 related to text messages (Display command) that could cause crash; I know for sure that it happened with DisplayTopBar.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Tue 02/07/2013 20:49:02
It was when I created a new room. Or when I wanted to open the newly created room? I don't remember and didn't write it down because I sent the error report. Is there maybe a logfile made?

The debugging stuck was when I was having a scripting problem and got an exception. I had to force-close the Studio in Taskmanager.

Should I get BETA 5?
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Wed 03/07/2013 02:58:52
Quote from: Crimson Wizard on Tue 02/07/2013 08:16:10
Quote from: monkey_05_06 on Tue 02/07/2013 05:06:33
eNoKey doesn't follow the naming convention of every other member of the same enumerated class.
Yes, that's true... but it was a deliberate choice.
When I first made eKeyNone I paid attention that it appears in the middle of the autocomplete list; also its compliance with other key enums make it not stand out at it should be, being a special value. IMHO.

Seeing as (AFAIK) the autocomplete list is alphabetically sorted, wouldn't eNoKey actually be just as bad, being at the end of the list? As far as "standing out" because it's a "special value", I don't particularly agree with this. Just because on_key_press wouldn't be called with eKeyNone doesn't mean (IMO) that the naming convention should be thrown out the window. If we were to provide enum values for Left Shift, Right Shift, Left Ctrl, Right Ctrl, Alt, and Gr Alt, should those enums be given totally unrelated names? I think that we should provide eKey* enum values for all of these, and just add an additional note that eKeyNone is never called by on_key_press. In fact, it might make sense to allow IsKeyPressed(eKeyNone) to verify that no keys are currently pressed. Or perhaps an alternate function, but I think the usage makes sense (and follows the existing usage pattern).

Quote from: Crimson Wizard on Tue 02/07/2013 08:16:10
Quote from: monkey_05_06 on Tue 02/07/2013 05:06:33
I was going to say that the SkipSpeech enum wasn't needed, but I was thinking of the CutsceneSkipType enum, which doesn't exactly match the skip styles offered by/to speech. Might it be worthwhile to normalize these skip styles and then provide a common enum "SkipType" or "SkipStyle"?
Might be, but I don't know how to do this. Some of them options are not fit for other style: e.g. "skip by time" is non-sensical for Cutscenes, while "skip by escape" may be implemented as "skip by key" + special skip key for Speech.

Well I see no reason to only allow cutscenes to be skipped by Escape. I think that's a logical default, but it could be made assignable. I agree that "skip by time" would be a nonsensical name for skipping cutscenes. I'm not fixated on this, it was just a passing thought. If we can't decide on a reasonable way of combining them, then just skip it. :P

Quote from: Crimson Wizard on Tue 02/07/2013 08:16:10
Quote from: monkey_05_06 on Tue 02/07/2013 05:06:33
Ultimately the goal was, is, and should be to finish what CJ started in OO-izing the language This is the reason why I insist that anything new should follow the new style. If you disagree,
Of course I don't disagree.

Yeah, yeah, I know. ;) I just think it would be better to "upgrade" as we go instead of trying to do the entire thing in one step. We can tweak it if we need to...I mean this is a learning experience for everyone. But again, you're the one implementing it, not me. So do what you're comfortable with. :P
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 03/07/2013 13:50:43
Quote from: cat on Tue 02/07/2013 19:59:42
Edit: Now the game/engine crashed when debugging, but no error message.

Aaaargh! Don't know how I missed this, but the breakpoint system is disabled on the engine side. And the Editor does not expect this turn of events and continues to wait for response endlessly. That's why it gets "frozen" as soon as you set a break point in script.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Wed 03/07/2013 14:05:14
Is this going to be reenabled? Without object inspection this feature was not as useful as it could be, but useful nonetheless.
If not, it might be a good idea to disable it in the editor, too.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 03/07/2013 14:15:35
Quote from: cat on Wed 03/07/2013 14:05:14
Is this going to be reenabled? Without object inspection this feature was not as useful as it could be, but useful nonetheless.
If not, it might be a good idea to disable it in the editor, too.
Of course this is going to be reenabled! This seem to be an old hack made when the engine was ported to mobile platforms.
Title: Re: AGS 3.3.0 Beta Release
Post by: MiteWiseacreLives! on Wed 03/07/2013 16:47:40
Built my MAGS game with 3.3.01, had crashes similar to what Cat described. It had to do with switching between rooms, very sporadic and couldn't pinpoint it (mostly after a long stretch of work though). I began to think I had some bad memory issues on my old computer, so I didn't post.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 03/07/2013 18:10:18
Do any of you have a crash dump maybe?
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Wed 03/07/2013 19:51:43
Quote from: Crimson Wizard on Wed 03/07/2013 18:10:18
Do any of you have a crash dump maybe?

Where do I find it? Or do you mean the text of the messagebox?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 03/07/2013 20:46:30
Quote from: cat on Wed 03/07/2013 19:51:43
Quote from: Crimson Wizard on Wed 03/07/2013 18:10:18
Do any of you have a crash dump maybe?

Where do I find it? Or do you mean the text of the messagebox?
If there was one created is should be either in compiled game folder, or, if you ran the game from editor, in the game folder (near Game.agf).
File is called something like "CrashInfo***.dmp".

E: I will also need to know precise version of the engine. Either check in agsgame.log (created in same folder) or Ctrl+V in game.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Wed 03/07/2013 21:19:59
Just had another crash, this time while clicking the "Run" button. Then I closed the Editor and opened it again and I could start without problems.

Version from last agsgame.log: ACI version 3.3.0.1134

Errormessage:

Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Version: AGS 3.3.0.1132

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at load_room_file(SByte* )
   at load_crm_file(UnloadedRoom roomToLoad)
   at AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)
   at AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   at AGS.Editor.Components.RoomsComponent.RecompileAnyRoomsWhereTheScriptHasChanged(CompileMessages errors, Boolean rebuildAll)
   at AGS.Editor.Components.RoomsComponent.AGSEditor_PreCompileGame(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreCompileGameHandler.Invoke(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.TestGame(Boolean withDebugger)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at AGS.Editor.ToolStripExtended.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 03/07/2013 21:24:56
This is something serious :(.
Can you send me your game project so that I could look under debugger?
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Wed 03/07/2013 21:49:38
This is my OROW project, so not until the voting results are revealed  :)

Also it doesn't always happen. After restarting the Editor I started the game several times without problems... I don't know how to reproduce the issue.

Edit: I have a small wish for the editor: Would it be possible to enable the search window shortcut also when a non-code window is open? Sometimes I want to find code usages of a gui control without opening a random code file first...
Title: Re: AGS 3.3.0 Beta Release
Post by: MiteWiseacreLives! on Thu 04/07/2013 02:34:40
My experience has been identical to cat s .. when i get home i'll look for crash dumps and contact you. no prob if you want my project.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 06/07/2013 19:26:33
I still wish I had some information on those crashes before making next build.
Any ideas on which sequence of actions cause it?
Maybe some project that crashes often?
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Sun 07/07/2013 15:45:00
I upgraded to Beta5 two days ago I think, and had no crashes. But that doesn't mean anything I guess. I'll keep you informed about any issues I have.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 07/07/2013 21:58:41
Quote from: cat on Sun 07/07/2013 15:45:00
I upgraded to Beta5 two days ago I think, and had no crashes. But that doesn't mean anything I guess. I'll keep you informed about any issues I have.
I hope it won't cause any problems with OROW participation. ;)
Title: Re: AGS 3.3.0 Beta Release
Post by: MiteWiseacreLives! on Mon 08/07/2013 06:47:11
Can't find any dump files, I will pay attention to what I'm doing going foreword. Most crashes occurred after running for a couple hours, attempting to open another room while one is still open (you get the 'do you want to close this room' message) then it encounters the error. I can still save, and nothing gets lost??
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Mon 08/07/2013 20:45:27
Bug report: I moved the explorer tree to the right side. The next time I started the editor, it had disappeared. (I'm not sure whether it didn't show up at all, or had turned into a tab I didn't notice.) I turned off and on the properties, and it came back.

I'm using the zip-file distribution of the latest build.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ghost on Mon 08/07/2013 22:37:27
Starting a new game in Beta5, using Default template, gives the following error right after the project is created:
Error (Line 19) Undefined token 'SetVoiceMode'.
Like Snarky, I am using the latest zip.

Clearly not an AGS bug, just an error in GlobalScript, and easy to fix, but should be cleaned up  (nod)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 08/07/2013 22:38:46
Quote from: Ghost on Mon 08/07/2013 22:37:27
Error (Line 19) Undefined token 'SetVoiceMode'.

Read the "warning" section please: http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636460071#msg636460071

Yes, I will have to update templates.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ghost on Mon 08/07/2013 22:42:12
Quote from: Crimson Wizard on Mon 08/07/2013 22:38:46
Read the "warning" section please: http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636460071#msg636460071

I did read that warning, but it's the default template that includes those lines and throws the error.
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Mon 08/07/2013 23:16:54
I'm also having troubles with the debugger, though I'm not sure whether it's an issue with this beta or with AGS in general. I've set a breakpoint, the game pauses, but when I try to "step into" (the statement is just "int i = 0;" so there's not much "in" there to go to -- shouldn't there also be a "step over" option?), the game and editor both freeze.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 08/07/2013 23:19:23
Yes, I am aware of this. http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636460420#msg636460420
Should be fixed in the next update.
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Mon 08/07/2013 23:26:18
Guess I should have paid better attention to the thread! Thanks, CW!
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Wed 10/07/2013 10:17:46
One general thing I noticed is that the Intellisense is still buggy.

The cache is neither reliably refreshed when saving nor when compiling and sometimes it's also wrong. For example, when I have a function oMyObject_Interact inside the function Intellisense doesn't show me oMyObject but only all function names that start with oMyObject. It happens only sometimes but it's really annoying. However, I remember I  had such problems also with older AGS versions.
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Thu 11/07/2013 00:07:18
Quote from: cat on Wed 10/07/2013 10:17:46
One general thing I noticed is that the Intellisense is still buggy.

The cache is neither reliably refreshed when saving nor when compiling and sometimes it's also wrong. For example, when I have a function oMyObject_Interact inside the function Intellisense doesn't show me oMyObject but only all function names that start with oMyObject. It happens only sometimes but it's really annoying. However, I remember I  had such problems also with older AGS versions.

+1

Tabbing between script windows doesn't (reliably) work, either. Closing and restarting the editor seems to refresh most of them, but some of my custom structs don't seem to get added to the suggestion/autocomplete whatever I do. In this screenshot (click for fullscreen), partyChar is an instance of a custom type: AtbCharacter, but when I type the period I don't get any Intellisense suggestions for the members and methods it has.

(http://i.imgur.com/g4rT6Qn.png) (http://imgur.com/g4rT6Qn.png)

The other reason for the screenshot is that I'm having a problem with the docking panels. I've arranged my editor as shown, and I want any scripts, GUIs, rooms, etc. to open as new tabs in the big part of the window when I double-click them in the project tree. However, I find that they very often open new tabs next to the "Output" tab, or new panels below it. This is not consistent, but I don't understand the pattern to it (it's not as simple as them going to whatever panel was most recently in focus). It might have something to do with running the game through the debugger; I also experienced the project tree spontaneously turning into a minuscule floating window that I couldn't interact with.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Thu 11/07/2013 05:56:34
I was going to suggest that the reason you're not getting any autocomplete for the struct members may be that it doesn't detect local structs (e.g., a struct defined in a script file rather than a header file), but if that were the case then the struct name also wouldn't be highlighted, so it looks like from that screenshot that the struct is defined in a header after all...?

CJ himself has made note that the autocomplete feature is somewhat of a mess. Not sure what needs to be done to fix it honestly, but as I recall there was a question of when the autocomplete cache should be updated. I'm not really sure what the best answer to that question would be, but I agree that it should update more frequently than not. Also, there is a huge (IMO) issue relating to the "Script" object (editor source) not staying in-sync with the Scintilla control, making it extremely difficult to accurately tell what text is currently in a script file if the editor for that file is open. For example, (IIRC) if you modify a script (in the script editor) and then do a "Find all usages of" before the script is saved, the wrong line numbers are returned (and may even return non-existent references, and miss newly added ones).
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Thu 11/07/2013 07:52:06
Yes, the struct is defined in a header (for one of the other scripts above, specifically AtbClasses). The code compiles and runs correctly, it's just IntelliSense that doesn't work.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Thu 11/07/2013 08:29:23
I understand that IntelliSense is not updated as you type, but at least when compiling it should be done.

Oh, and I had the dockingpanel issue too. I rearranged the panels and then it did work again.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Thu 11/07/2013 12:56:48
I believe it should be updated whenever you hit enter or possibly even when you type a semicolon.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Fri 12/07/2013 09:26:48
Quote from: cat on Wed 10/07/2013 10:17:46
One general thing I noticed is that the Intellisense is still buggy.

The cache is neither reliably refreshed when saving nor when compiling and sometimes it's also wrong. For example, when I have a function oMyObject_Interact inside the function Intellisense doesn't show me oMyObject but only all function names that start with oMyObject. It happens only sometimes but it's really annoying. However, I remember I  had such problems also with older AGS versions.
So I looked a bit at the code. To quote CJ's comment inside:
// This class is a bit of a mess ... autocomplete is out of control!!  8-0

So I've commited a fix to git, and now autocomplete will refresh from the modified script every time before showing it.
I hope it won't hurt performance on very large scripts, on my scripts you didn't even notice it...
I'm not claiming it will fix everything, if switching between tabs didn't help then probably neither would this.

Quote from: Snarky on Thu 11/07/2013 00:07:18
The other reason for the screenshot is that I'm having a problem with the docking panels. I've arranged my editor as shown, and I want any scripts, GUIs, rooms, etc. to open as new tabs in the big part of the window when I double-click them in the project tree. However, I find that they very often open new tabs next to the "Output" tab, or new panels below it. This is not consistent, but I don't understand the pattern to it (it's not as simple as them going to whatever panel was most recently in focus). It might have something to do with running the game through the debugger; I also experienced the project tree spontaneously turning into a minuscule floating window that I couldn't interact with.
I tried to reproduce your issue, but couldn't. I tried various crazy things but the scripts always appeared as new tabs on the big window.
My guess is that it's related to something else you did that you didn't write about.

Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 12/07/2013 09:41:27
Tzachs' perhaps you could look into this problem:
I tried to reproduce what Snarky was telling about dissapearing panels. Undock a panel (e.g. project tree) and move it so that it's half beyond main application window. Then close app. Next time I loaded a project in the editor it displayed an error. I tried second time, and project was opened but the project tree was missing:
Quote
An error occurred whilst trying to load your game. The error was:

Cannot access a disposed object.
Object name: 'TreeView'.

If you cannot resolve the error, please post on the AGS Technical Forum for assistance.

Error details: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'TreeView'.
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.TreeView.CreateHandle()
   at System.Windows.Forms.Control.get_Handle()
   at System.Windows.Forms.TreeNode.get_State()
   at System.Windows.Forms.TreeNode.get_IsExpanded()
   at System.Windows.Forms.TreeNode.Remove(Boolean notify)
   at System.Windows.Forms.TreeNode.Clear()
   at System.Windows.Forms.TreeNodeCollection.Clear()
   at AGS.Editor.ProjectTree.RemoveAllChildNodes(IEditorComponent plugin, String parentID) in D:\Projects\AGS\GITHUB_develop\ags\Editor\AGS.Editor\GUI\ProjectTree.cs:line 146
   at AGS.Editor.Components.BaseComponentWithFolders`2.RePopulateTreeView() in D:\Projects\AGS\GITHUB_develop\ags\Editor\AGS.Editor\Components\BaseComponentWithFolders.cs:line 455
   at AGS.Editor.Components.AudioComponent.RefreshDataFromGame() in D:\Projects\AGS\GITHUB_develop\ags\Editor\AGS.Editor\Components\AudioComponent.cs:line 358
   at AGS.Editor.ComponentController.NotifyDataRefreshNeeded() in D:\Projects\AGS\GITHUB_develop\ags\Editor\AGS.Editor\ComponentController.cs:line 131
   at AGS.Editor.ApplicationController._events_RefreshAllComponentsFromGame() in D:\Projects\AGS\GITHUB_develop\ags\Editor\AGS.Editor\ApplicationController.cs:line 63
   at AGS.Editor.EditorEvents.OnRefreshAllComponentsFromGame() in D:\Projects\AGS\GITHUB_develop\ags\Editor\AGS.Editor\EditorEvents.cs:line 82
   at AGS.Editor.AGSEditor.RefreshEditorAfterGameLoad(Game newGame) in D:\Projects\AGS\GITHUB_develop\ags\Editor\AGS.Editor\AGSEditor.cs:line 677
   at AGS.Editor.Tasks.LoadGameFromDisk(String gameToLoad, Boolean interactive) in D:\Projects\AGS\GITHUB_develop\ags\Editor\AGS.Editor\Tasks.cs:line 135
   at AGS.Editor.InteractiveTasks.LoadGameFromDisk(String gameToLoad) in D:\Projects\AGS\GITHUB_develop\ags\Editor\AGS.Editor\InteractiveTasks.cs:line 55
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Fri 12/07/2013 15:01:04
Fixed.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 14/07/2013 19:34:07
AGS 3.3.0 BETA 6 released (engine version 3.3.0.1140)
-------------------------------------------------------
This is primarily bug fixing update.
Changes from BETA 5:

Features:
- Renamed eNoKey to eKeyNone in AGSScript.
- An update to Editor PluginAPI by monkey_05_06. Unfortunately I don't know what it does  :-[, I hope he will make an explanation.
- Refreshing auto-complete cache with modified script text before showing auto-complete list (by tzachs).

Bug fixes:
- Fixed setting breakpoints while debugging game in Editor caused Editor to freeze indefinitely.
- Fixed panel layout in Editor not restoring properly if the panel was left beyond main application window when exiting last time.
- Fixed desktop versions of the engine having lower default Sprite cache size than usual.


Download links (also updated at first page):
Official: http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta6.exe
ZIP:
Official: http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta6.zip


I was a bit distracted lately, maybe there is someone who would like to help to test and update game templates to ensure they load well in 3.3.0?
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Sun 14/07/2013 23:19:37
The editor plugin API updates were just a couple of usability fixes that I came across in developing the Interfacer plugin. I had to use reflection to access some data that should simply have been available via the API, so now it is.

I added IAGSEditor.Components to give plugin authors access to the built-in components, not just the one(s) they are adding themselves. This could be useful for plugin authors wanting to implement a visual script editor, or add some extended features to the room editor.

I added the interface IRePopulatableComponent to mark components which can have their children repopulated (such as the Scripts component), and give a way for the plugin author to repopulate said component.

I also added events Game.GUIAddedOrRemoved and Game.GUIControlAddedOrRemoved to notify plugin authors when these items are being updated. For the Interfacer plugin I am using this to help maintain an updated list of these items (because I am caching other data in relation to them).

I'm not aware of many existing editor plugins, but if there are any other features missing from the editor plugin API, I will definitely look into adding them.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 15/07/2013 00:54:15
Quote from: monkey_05_06 on Sun 14/07/2013 23:19:37
I'm not aware of many existing editor plugins, but if there are any other features missing from the editor plugin API, I will definitely look into adding them.

You may want to look into suggestion tracker:
http://www.adventuregamestudio.co.uk/forums/index.php?project=5;area=issues;category=33
Title: Re: AGS 3.3.0 Beta Release
Post by: adm244 on Mon 15/07/2013 15:29:26
Crimson Wizard, AGS threw an unhandled error when I pasted text from clipboard. I'm not sure why it's happened, I restarted an AGS and pasted the same text without problem.
Screen: http://imageshack.us/a/img822/7012/c4tb.png
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 15/07/2013 15:31:51
Quote from: adm244 on Mon 15/07/2013 15:29:26
Crimson Wizard, AGS threw an unhandled error when I pasted text from clipboard. I'm not sure why it's happened, I restarted an AGS and pasted the same text without problem.
Screen: http://imageshack.us/a/img822/7012/c4tb.png

Erm, you know you can use Copy/Paste to copy error text to the forum, right?

On my work, we sometimes get screenshots of errors put into MS Word documents... but I still haven't get used to this. :)

E: On other hand, the text editor on that screenshot, was it looking like that before you pasted or it became like that after?
Title: Re: AGS 3.3.0 Beta Release
Post by: adm244 on Mon 15/07/2013 18:01:57
Quote from: Crimson Wizard on Mon 15/07/2013 15:31:51
Erm, you know you can use Copy/Paste to copy error text to the forum, right?
Ooops... My mistake (roll)
Quote from: Crimson Wizard on Mon 15/07/2013 15:31:51
E: On other hand, the text editor on that screenshot, was it looking like that before you pasted or it became like that after?
It started looks ugly after the error has occurred.
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Tue 16/07/2013 05:18:11
Quote from: Crimson Wizard on Mon 15/07/2013 15:31:51
Erm, you know you can use Copy/Paste to copy error text to the forum, right?
Perhaps adding a Copy button to that error report form. It would help with issues like this or no one copying it at all, and it's a simple addition. ;)
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Wed 17/07/2013 10:02:32
Beta6 weirdness:

This happened as I was just minding my own business, editing code in another tab, and clicked over to this one. It had been fine before.

(http://i.imgur.com/TMyb1dD.png) (http://imgur.com/TMyb1dD.png)

Tabbing back and forth made no difference. By closing the tab and opening it again I got the full-size editing window back. The editor worked fine apart from this.
Title: Re: AGS 3.3.0 Beta Release
Post by: Calin Leafshade on Wed 17/07/2013 12:18:36
"struct cannot be passed as a parameter"

Story of my AGS life right there.
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Wed 17/07/2013 12:29:39
Yeah, I was coding last night, went to bed, and in my sleep came up with this great idea for how to refactor my code to save a ton of space/effort. Tried it out this morning, and of course...  :~(
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Wed 17/07/2013 21:00:08
Serialization techniques are not uncommon in computer programming, and if properly implemented can still be quite fast (although there's always a loss of speed in comparison to direct memory access). Or depending on your needs you may be able to use managed instances and then provide a "Load" function that copies the managed instance into a local variable (and "Save" to write it back). There's dozens of techniques you can use to circumnavigate the globe while the drill to dig straight through to China is being built.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 17/07/2013 21:12:23
Quote from: monkey_05_06 on Wed 17/07/2013 21:00:08There's dozens of techniques you can use to circumnavigate the globe while the drill to dig straight through to China is being built.
I already know what Calin's answer will be 
Spoiler
use Lua
[close]
:=
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Wed 17/07/2013 21:42:11
Quote from: monkey_05_06 on Wed 17/07/2013 21:00:08
Serialization techniques are not uncommon in computer programming, and if properly implemented can still be quite fast (although there's always a loss of speed in comparison to direct memory access). Or depending on your needs you may be able to use managed instances and then provide a "Load" function that copies the managed instance into a local variable (and "Save" to write it back). There's dozens of techniques you can use to circumnavigate the globe while the drill to dig straight through to China is being built.

All of which takes time to write, bloats the code with workarounds that have little to do with what you're actually trying to achieve, is hard to maintain if you need to make changes to the data structure, and can lead to hard-to-track-down bugs (e.g. if you add another field to your struct but forget to update the Save/Load routines).

It's doable, sure, but it's a fucking pain in the ass.

Having to work around the lack of pointers to custom structs has made the battle system I'm working on take probably twice as much code and four times as much work as it otherwise would have. It's led to monstrosities like:

Code (AGS) Select
String spellName = AtbSpellList[CombatUnitList[actionArray[action].actor].spellInventory[actionArray[action].toolUsed]].name;

For something that would otherwise probably have looked something like this:

Code (AGS) Select
String spellName = action.spellUsed.name;

If we could all agree on what standard language to replace it with, I'd be all for ripping out AGS Script.
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Thu 18/07/2013 10:45:25
Another bug. This one crashes the editor (well, it keeps running, but I can't save the project, it just makes it crash again):

(http://i.imgur.com/mIiMtNn.png) (http://imgur.com/mIiMtNn.png)

QuoteError: Index was outside the bounds of the array.
Version: AGS 3.3.0.1140

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at AGS.CScript.Compiler.FastString.get_Item(Int32 index)
   at AGS.Editor.AutoComplete.AdjustFunctionListForExtenderFunction(List`1 structs, List`1& functionList, FastString& script)
   at AGS.Editor.AutoComplete.ConstructCache(Script scriptToCache, Boolean isBackgroundThread)
   at AGS.Editor.ScriptEditor.scintilla_OnBeforeShowingAutoComplete(Object sender, EventArgs e)
   at AGS.Editor.ScintillaWrapper.ShowAutoComplete(Int32 charsTyped, String autoCompleteList)
   at AGS.Editor.ScintillaWrapper.ShowAutoCompleteIfAppropriate(Int32 minimumLength)
   at AGS.Editor.ScintillaWrapper.OnUpdateUI(Object sender, EventArgs e)
   at Scintilla.ScintillaControl.DispatchScintillaEvent(SCNotification notification)
   at Scintilla.ScintillaControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Happens as I'm trying to type "(this Dialog*)" after entering the first three letters "Dia" (though in the screenshot I had time to add a typo). Even if I close the editor, restart, and try again, it still crashes. Perhaps the project is corrupted? Here it is in case it's needed for examination: https://www.dropbox.com/s/2uy1xb3u5bn0z8q/testcursor-crash.rar
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Thu 18/07/2013 22:28:34
Quote from: Snarky on Thu 18/07/2013 10:45:25
Another bug. This one crashes the editor (well, it keeps running, but I can't save the project, it just makes it crash again):

Fixed.
Quite funny actually, I wrote the exact script like you and it didn't reproduce. Then I loaded your project, added the extender and still it didn't reproduce.
But then I tried it again, only without pressing 'Enter', then it reproduced... The bug was when the extender function is at the very end of the file.

Edit: Also added a possible fix for the weird docking issue (possible since I can't actually reproduce it).
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Fri 19/07/2013 18:49:33
Thanks for the fix(es) tzachs!
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Sat 20/07/2013 12:17:52
I wanted to import an old demo I downloaded (http://www.adventuregamestudio.co.uk/forums/index.php?topic=26922.0 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=26922.0)). It was not possible to import it directly, so I downloaded AGS 2.72 and opened and saved the game there. When opening the game now in AGS 3.3.0 and performing the conversion, I got this error (sorry text was not selectable, had to take screenshot)
(http://cat.agser.me/stuff/editor_error_import.png)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 22/07/2013 08:13:06
Ok, I am going to look into this.

Quote from: cat on Sat 20/07/2013 12:17:52sorry text was not selectable, had to take screenshot
Something I learnt only couple of years ago, - and probably this is not quite obvious and therefore not well known - you still can copy text from standard message boxes in Windows by simply pressing Ctrl+C (without selecting text). It will go to clipboard as a whole.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGA on Mon 22/07/2013 08:28:33
Quote from: Crimson Wizard on Mon 22/07/2013 08:13:06
Something I learnt only couple of years ago, - and probably this is not quite obvious and therefore not well known - you still can copy text from standard message boxes in Windows by simply pressing Ctrl+C (without selecting text). It will go to clipboard as a whole.

Usually.  For some reason it doesn't always seem to work.  Perhaps there's a way of disabling it if the programmer really wants to?
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Mon 22/07/2013 08:29:31
Ah, didn't know that. I'll do that next time.

Btw, I managed to copy the module code from the old project and paste it in a new one, so for me this issue is not important anymore. I'll release the converted and enhanced module soon.
However, it might be a good idea to check if this issue happens with other projects as well.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 22/07/2013 08:31:19
Quote from: AGA on Mon 22/07/2013 08:28:33
Usually.  For some reason it doesn't always seem to work.  Perhaps there's a way of disabling it if the programmer really wants to?
I think it is a default behavior for the message boxes, displayed by default WinAPI implementation. If the program has its own message box implementation, it may work totally different of course.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 22/07/2013 10:22:00
Ok, I found what's wrong with that import. Things are pretty bad, actually, the whole old game import feature is broken, since 3.2.2 beta :( (about a year ago). I will talk with tzachs about this.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Wed 24/07/2013 20:27:11
Ok, I fixed it, I just hope I didn't screw up anything else in the process..  :-\
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 24/07/2013 21:51:56
I will test this more on the incoming weekends and make a new Beta.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Sat 27/07/2013 13:06:33
I had the exception again when starting my game with the "Run" button:

Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Version: AGS 3.3.0.1136

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at load_room_file(SByte* )
   at load_crm_file(UnloadedRoom roomToLoad)
   at AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)
   at AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   at AGS.Editor.Components.RoomsComponent.RecompileAnyRoomsWhereTheScriptHasChanged(CompileMessages errors, Boolean rebuildAll)
   at AGS.Editor.Components.RoomsComponent.AGSEditor_PreCompileGame(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreCompileGameHandler.Invoke(PreCompileGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.TestGame(Boolean withDebugger)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at AGS.Editor.ToolStripExtended.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Is some pointer playing crazy?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 27/07/2013 13:23:32
...maybe data was accessed beyond buffer.
Problem is this may be related to certain features or combination of features you use.
Was there any crash dump created in project folder (or AGS program folder)?
If not, can I have your game project to do some tests?
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Sat 27/07/2013 13:30:13
No crash dump. I'll prepare a package for you.

Since this is open source, where can I find the code for
Code (AGS) Select

at load_room_file(SByte* )
at load_crm_file(UnloadedRoom roomToLoad)
at AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)


I'm in no way a C++ developer, but I could try to do a small code review so see if I find something...
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 27/07/2013 13:45:38
load_room_file is in Editor/AGS.Native/agsnative.cpp.

The code there is generally unrefactored, and pretty messed up (in the sense of style), so beware.
The call stack indicates that this happened when room was recompiling due the change in global script or custom module. Don't know if that may give any hint though.



UPD: tzachs, I noticied that from Beta 6 the Project Explorer panel is missing when the editor starts for the first time (Layout.xml was not yet saved).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 27/07/2013 17:34:26
Found bug related to panels.

When the room is recompiled the room editor is closed.
Because of new panel system it now works differently: the panel the room editor was opened on hides, but the room still stays marked as "opened" in the project tree (colored icon).
More, if you unpin the room editor's panel and make it a floating window, it will dissapear when compiled too, but it will stay in the Windows list. Being reopened, it does not have a room image on it, just a plain grey rectangle. When you open same room again by double-clicking  in the project tree, a new panel is opened instead.

How to reproduce:
1. Open any existing room.
2. Drag it away and place as a floating panel somewhere on screen.
3. Select "Build" - "Rebuild all files". The room panel will hide, but room is still marked as "being edited" in the project tree.
4. Open "Window" menu. You will see Room N window still exists, just not visible. Click it to reveal the panel.
5. Open same room by double-clicking on it in the project tree. It will open on the new panel.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Sat 27/07/2013 20:45:18
Quote from: Crimson Wizard on Sat 27/07/2013 13:45:38
UPD: tzachs, I noticied that from Beta 6 the Project Explorer panel is missing when the editor starts for the first time (Layout.xml was not yet saved).
This didn't reproduce for me.
Did you perhaps delete the file from AGS executable folder? The xml file is not loaded from there anymore. It was an issue for people installing on program files, since then it requires administrator permissions to save the file. So the file moved to the app data folder, according to Windows best practices. I did make a fix though, it was saved to the Roaming folder, instead to Local\AGS folder.

Quote
Found bug related to panels.
...
Fixed.
Title: Re: AGS 3.3.0 Beta Release
Post by: MiteWiseacreLives! on Thu 01/08/2013 07:35:03
I am not sure it this is the right spot for editor suggestions.. But, I would like to see the "Import Sprite" window become adjustable in size. Sometimes when trying to grab larger than the window sprites, I have to monkey around a fair bit. Anyone else agree?
Title: Re: AGS 3.3.0 Beta Release
Post by: kconan on Thu 08/08/2013 03:18:50
Quote from: MiteWiseacreLives! on Thu 01/08/2013 07:35:03
I am not sure it this is the right spot for editor suggestions.. But, I would like to see the "Import Sprite" window become adjustable in size. Sometimes when trying to grab larger than the window sprites, I have to monkey around a fair bit. Anyone else agree?

Agreed.  I'd like to see the window bigger or sizeable.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Sun 25/08/2013 11:09:23
Just wanted to drop this here. I frequently get the following crash in 3.3.0 beta when double-clicking to open a room file. It typically happens only after the editor has already been open for a while and I have been editing scripts, importing sprites, and so forth. If you need any more info, let me know.


QuoteA problem has occured, and AGS does not know how to deal with it. Please help us to improve AGS by using the "Send Error Report" button to send this error information to the AGS website for investigation.

Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Version: AGS 3.3.0.1140

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at load_room_file(SByte* )
   at load_crm_file(UnloadedRoom roomToLoad)
   at AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)
   at AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   at AGS.Editor.Components.RoomsComponent.LoadDifferentRoom(UnloadedRoom newRoom)
   at AGS.Editor.Components.RoomsComponent.LoadRoom(String controlID)
   at AGS.Editor.Components.RoomsComponent.ItemCommandClick(String controlID)
   at AGS.Editor.Components.BaseComponentWithFolders`2.CommandClick(String controlID)
   at AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   at AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Another bug I have noticed: Create two separate folders in the Sprite Manager and give them identical names (let's call both folders "GFX"). Import images into sprite slots 1, 2, and 3 in the first folder and into slots 4, 5, and 6 in the second folder. Next, create a view/loop in the "Views" editor and for frames 0, 1, and 2, use sprite slots 4, 5, and 6 from the second folder.

Now, double-click on any frame in that loop to open the Sprite Manager. Instead of opening in the second "GFX" folder and highlighting the relevant sprite, as it should, it instead opens the first "GFX" folder and highlights nothing. It actually doesn't matter if the identical folder name is a sub-folder - AGS will always find the first instance of the folder name and open it, regardless of whether it's the right one. (The same bug also occurs when clicking the "Image" button for a room object sprite or on GUIs).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 25/08/2013 11:38:00
Hi guys, I am sorry, I was leaving a city for some time and could not do everything I wanted before I left. Now I am back.

Last time I was trying to find the cause of this crash during room loading. The one AGD2 just reported looks like precisely the one reported by cat some time ago, and it seem to be the only serious problem found in AGS at the moment (which is still unfixed).
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Thu 29/08/2013 18:33:41
I'm not sure if I should post this here, but I've come across a few errors while migrating my game from 3.2.1 + AGS Draconian r7 to 3.3/3.4 (worked OK before with AGS 3.2.1 + AGS Draconian r7)
(http://i40.tinypic.com/2myvx5i.png)

I get that error when I try to use any custom extender function for the mouse..."void UseNormalCursors(this Mouse*)", for example.

It doesn't matter what is inside that function (even if I comment out the contents I still get that error). Right now the only way I can get the game to run is by commenting out the call to that function //mouse.UseNormalCursors();...the only thing is, I'm using similar functions like that everywhere and the game crashes everytime I used them.

Also, "gamma in windowed mode" no longer seems to work (System.Gamma = sldGamma.Value;). I'm guessing because the Draconian changes haven't been added yet?

**Im using AGSBlend and Custom Properties Helper Plugin(which I can finally remove since we now have no custom property limits in 3.4 :))

Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 29/08/2013 20:41:26
We were planning to add some (if not all) of Draconian changes months ago, but still did not get to that, sorry :-/.
(Well, 256-char WFN font support is already there).
Me or Alan should just find time to look through them, copy and test results.
EDIT: Hmm... I think I know what I'll be doing on these weekends :tongue:

Regarding extender function, this is not good at all. I'll check this very soon.
EDIT2: Ok, I found what's wrong; interesting thing is that it errored only for very limited set of types (not Character, Object, etc), that's why I did not notice this before.
I'll be making a new builds for 3.3.0 and 3.4 alpha soon.
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Thu 29/08/2013 21:36:46
Oh wow...that was fast!

:grin:
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 29/08/2013 21:44:07
Yes... silly mistakes are often easy to fix :tongue:

BTW, that error message was put there by me for safety reasons, to make sure that the script runs properly. Only I marked one legal case as an illegal one, so it triggered in your script.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 31/08/2013 17:05:21
Quote from: kconan on Thu 08/08/2013 03:18:50
Quote from: MiteWiseacreLives! on Thu 01/08/2013 07:35:03
I am not sure it this is the right spot for editor suggestions.. But, I would like to see the "Import Sprite" window become adjustable in size. Sometimes when trying to grab larger than the window sprites, I have to monkey around a fair bit. Anyone else agree?

Agreed.  I'd like to see the window bigger or sizeable.

Okay, making it sizeable for the next release.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 05/09/2013 19:54:53
AGS 3.3.0 BETA 7 released (engine version 3.3.0.1142)
-------------------------------------------------------
First of all, I added a temporary log file that will be written every time a room is loaded in the editor. Unfortunately I was unable to find out what caused the reported crash, so I hope if that happens again it will be at least possible to tell at which point it does.
The file named "agsnative.log" is created in your "My Documents\AGS" (or "<Username>\Documents\AGS") folder (this is done so to make it work under Win7/Vista in case you installed AGS on drive C).

-------------------------------------------------------
Changes from BETA 6:

Features:
- Renamed SkipSpeechType to SkipSpeechStyle (please, fix your scripts if you are using this class);
- Added two more options for the Skip speech style:
   * Skip by keyboard only (no timer) - eSkipKey,
   * Skip by mouse only (no timer) - eSkipMouse;
Now there is a full set of possible choices for this setting. Also corrected option descriptions in the game settings to make them correspond to the actual meaning of the choice.
- Sprite Import window is now resizable.

Bug fixes:
- Fixed the broken game project import (regression).
- Fixed broken dialog script compilation (regression).
- Fixed error in the savedgame loading routine which occured when loading persistent Overlays (regression). Previously created savedgames should still be usable with this version, for this fix only changes engine reaction to certain data.
- Fixed extender functions added for certain types (Mouse, System) were not correctly recognized by script interpreter (regression).
- Fixed crash that occured when ListBox.GetItemAtLocation() is called from repeatedly_execute_always() just before the list box is about to be drawn on screen for the first time.
- Moved the Layout.xml file from AppData\Roaming to AppData\Local\AGS.
- Fixed crash when auto complete is running on an extender function which is in the end of the file.
- Possible fix for docking ruined on tab switch.
- Fixed room panel was still in "Windows" menu with "loaded" icon displayed in tree after rebuilding all files.
- Fixed Editor allowed to create more game items than engine supports, which could cause crashes in Editor or Engine.


Download links (also updated at first page):
EXE:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta7.exe
ZIP:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta7.zip
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Fri 06/09/2013 02:47:06
I'm getting this error now when trying to use that mouse extender function:

Error: Error running function 'on_mouse_click':
Error: internal error: undefined value pushed to stack
Code (ags) Select

void EnableAllModes(this Mouse*)
{
  //enable all mouse modes...
  int i;
  while (i < Game.MouseCursorCount)
  {
    if (mouse.EnableMode(modeList[i]) == false) mouse.EnableMode(modeList[i]);
    i++;
  }
}




(Oh, and is there a way to save/load or lock/unlock our current pane layout?) :=
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 06/09/2013 08:59:29
@General_Knox, this part of your function does not make much sense:
Code (ags) Select

if (mouse.EnableMode(modeList[i]) == false) mouse.EnableMode(modeList[i]);


Mouse.EnableMode does not return anything (useful) (it may return 0 always, or random value, but details are not so important).
This seem to be a Editor/compiler issue: the "EnableMode" function is declared as "void", but it is assumed to return integer... This is very bad, because, in fact, EnableMode returns void (aka "nothing") in the engine.
The 3.2.1 and earlier versions AGS let this through, but the new engine is bit more restrictive (this helps to find errors in script). Compiler should be changed appropriately.

I am wondering what do you want to do here in this function. At the moment that line may be simply replaced by:
Code (ags) Select

mouse.EnableMode(modeList[i]);

This will do the same.

As for fixing the error, I suppose it is not an engine bug, but a compiler's one. It should not let to use "void" in the expressions like that.
I am not yet sure if the engine needs a "backwards-compatible" fix to cover such cases (in case such expressions were used in older games). I might add it if we find out it causes troubles with any of the existing games running on a new engine.
Although I would be really reluctant to do so, because this will practically "legalize" undefined behavior in script.

EDIT: I found an interesting thing. It appears that compiler DOES usually restrict using void return values, for example:
Code (ags) Select

bool result = mouse.EnableMode(modeList[i]);

or
Code (ags) Select

function a(bool b)
{
}
<...>
a(mouse.EnableMode(modeList[i]));

Those script examples will cause compiler error.

However, using void return value as an argument to any operator is compiled without errors!
Code (ags) Select

bool b = mouse.EnableMode(modeList[i]) == false;
int a = mouse.EnableMode(modeList[i]) + 1;
etc






Quote
(Oh, and is there a way to save/load or lock/unlock our current pane layout?)
Hmm, did you try dragging them around?
Check this video tutorial: http://www.youtube.com/watch?v=o6jjOmBB5gQ
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Fri 06/09/2013 17:37:10
Quote from: Crimson Wizard on Fri 06/09/2013 08:59:29
The 3.2.1 and earlier versions AGS let this through, but the new engine is bit more restrictive (this helps to find errors in script). Compiler should be changed appropriately.
Ah I didn't know that! You're right, now it works when I remove the line that doesn't make sense (keeping it just at mouse.EnableMode(modeList) works). I mainly used "void" cause Monkey was using it and well, he's cool.

Quote from: Crimson Wizard on Fri 06/09/2013 08:59:29
As for fixing the error, I suppose it is not an engine bug, but a compiler's one. It should not let to use "void" in the expressions like that.
Ok, so should I use "function" instead of "void" for EnableAllModes()?

PS: Thanks Crimson for explaining how it all works, I learnt something today! :smiley:

EDIT: I can drag the panels around fine, I was just wondering if there way a way to lock them in place incase we move them by accident (or save the layout so we can load it again later)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 06/09/2013 18:04:46
Quote from: General_Knox on Fri 06/09/2013 17:37:10
Quote from: Crimson Wizard on Fri 06/09/2013 08:59:29
As for fixing the error, I suppose it is not an engine bug, but a compiler's one. It should not let to use "void" in the expressions like that.
Ok, so should I use "function" instead of "void" for EnableAllModes()?
I don't think so, why? Void is perfectly correct type, just do not try to use the "void" return value in an expression, like you did with "EnableMode".
In fact, I'd tell not to use "function" at all. But the habit might be too strong. :)

Quote from: General_Knox on Fri 06/09/2013 17:37:10
EDIT: I can drag the panels around fine, I was just wondering if there way a way to lock them in place incase we move them by accident (or save the layout so we can load it again later)
When you drag panels over different regions of the window you'll see "docking" icons. By draggin & dropping a panel on that icon you'll lock the panel on that place. Video displays how it is done.
Regarding saving layout: I think I am starting to understand what you mean. You are speaking of layout presets that you may save/load from menu? I think you better ask tzachs about this, he was implementing those panels.
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Fri 06/09/2013 18:21:37
Yes, thats what I meant! Ill ask him if we can have a save/load layout, or like a "lock icon" on the panels so they no longer move, even if you attempt to drag them (like how we can lock buttons in place on a GUI). Thanks!
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Sat 07/09/2013 18:28:08
Adding a "lock" feature is a bit tricky since we're using a third party api (dockpanel suite) and they handle moving the panels. I guess it can be done, will need to check if their API allows for it (and if it doesn't we'll need to contribute to their open source project which complicates things...).

Adding save/load layout feature should be easy enough, and I'll probably add it once 3.3 ships (currently I stopped development of new features until 3.3 is out of beta).

Currently, AGS saves its layout on exit and loads it at startup, so as a workaround you can set your desired layout, close AGS, copy the layout.xml file (it should be located at %userprofile%\AppData\Local\AGS) to a backup and put it back when you want to reload it.
Title: Re: AGS 3.3.0 Beta Release
Post by: Sledgy on Sun 08/09/2013 16:24:05
Who has 3.2.1 (build 111) source?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 08/09/2013 16:28:10
Quote from: Sledgy on Sun 08/09/2013 16:24:05
Who has 3.2.1 (build 111) source?
The CJ's SVN was here: https://svn.adventuregamestudio.co.uk:7743/svn/ags/trunk
But I believe it has a different address now (if it still exists), because there is no "adventuregamestudio.co.uk" anymore. :undecided:

Here I uploaded the one I have on my HD: http://www.mediafire.com/download/337kfddf8dm4eks/Pumaman_AGS.zip
I believe it has no modifications.
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Tue 10/09/2013 03:15:50
Moved question here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=48948.0 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=48948.0)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 10/09/2013 08:27:07
Quote from: General_Knox on Tue 10/09/2013 03:15:50I searched the forums and it looks like (to quote Subspark in a PM) AGS does it's own internal mouse averaging and smoothing procedures and that this was likely to compound precision issues with any system/hardware settings underneath.

I was wondering, is this something that is really complicated/too long to perhaps look into and have possibly fixed for a not-too-distant future release? To quote Subspark again, it looks like there would be 2 things to happen in order for that to be fixed: upgrading the AGS pathfinder (it calculates in 4:3 aspect regardless of the wider 16:10 runtime mode), and perhaps make the internal mouse processing going on in the engine an optional feature (not hard compiled into our games).

I think I saw this mouse problem myself; I thought it is related to the coordinates scaling AGS does to mouse cursor position. This is most noticeable with custom display resolution build, when the 4:3 game is proportionally stretched to large wide-screen window. Now when I read that thread I am a bit confused. Are there two problems, the second being lack of hardware acceleration support? I wasn't aware of this, and I do not even know where to start looking.
I think this problem deserves its own thread BTW (and it is an Engine problem, not Editor's).

I was planning to look into both mouse and pathfinder issues naturally since I am working on custom resolutions now. But I have no certain forecast.
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Tue 10/09/2013 17:24:01
Ah crap ok I wasnt sure where to put it...perhaps someone can move it in its own thread? :-D
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Wed 11/09/2013 01:52:30
Ok I moved the post to the right thread, sorry about that :sad:
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Wed 11/09/2013 03:27:43
I'd like to point out that the thread this conversation started in was this one (http://www.adventuregamestudio.co.uk/forums/index.php?topic=47666.msg636467172#msg636467172).
Also I believe Crimson had meant he actually wanted to see the png files themselves as well.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Sat 14/09/2013 14:36:52
Looks like the widths of the columns in the Output window cannot be changed. I had to copy the text to the clipboard to be able to read the text. Same goes for findresults.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 17/09/2013 13:01:28
How stable is beta7 so far? Is it likely to be an RC?

I'm asking because I would like to use 3.3 for a big game release (i.e. Heroine's Quest). On that note, would it be possible to fix the following bug: In a game with Sierra-style portraits and a voice pack, the amount of time that the portrait runs its mouth animation depends on the length of the text string, whereas it should instead depend on the length of the voice sample (even though the amount of time the text box is visible IS dependent on the length of the voice sample). Pretty please with sugar on top?

And something that's been bugging me about the 3.X line is that the keyboard shortcut control-1 to open script #1 (and ^2, ^3 etc, and shift-control-1 for script header 1) that used to be in AGS2.7 no longer exists. Would it be hard to put that back?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 17/09/2013 13:21:44
Quote from: Radiant on Tue 17/09/2013 13:01:28
How stable is beta7 so far? Is it likely to be an RC?

I'm asking because I would like to use 3.3 for a big game release (i.e. Heroine's Quest).
Engine seem to be stable enough, at least as stable as previous 3.2.1, as it seems.
But I would hope the game be beta-tested first?
Editor has at least one crash issue (which does not seem to corrupt any data though). I am currently trying to track it down.

Quote from: Radiant on Tue 17/09/2013 13:01:28
On that note, would it be possible to fix the following bug: In a game with Sierra-style portraits and a voice pack, the amount of time that the portrait runs its mouth animation depends on the length of the text string, whereas it should instead depend on the length of the voice sample
I will look into this, but can't give any promises regarding time; the speech logic in AGS is messy.

Quote from: Radiant on Tue 17/09/2013 13:01:28
And something that's been bugging me about the 3.X line is that the keyboard shortcut control-1 to open script #1 (and ^2, ^3 etc, and shift-control-1 for script header 1) that used to be in AGS2.7 no longer exists. Would it be hard to put that back?
Hmm, what IS "script #1"? I am afraid that with current folder system (where scripts could be arranged in folders) this enumeration is pretty much nonsensical. What others think about this?
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Tue 17/09/2013 20:09:50
Even though the scripts can be placed in folders, the compiler still treats them from a top-down perspective. Having these shortcuts makes perfect sense, I wasn't even aware they were removed. Even if the compiler were changed to allow forward declaration (or rather, allow proper linkage for a reference to a forward declared but as yet undefined item), the shortcuts would still be just as useful.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 17/09/2013 20:19:35
Quote from: monkey_05_06 on Tue 17/09/2013 20:09:50
Even though the scripts can be placed in folders, the compiler still treats them from a top-down perspective. Having these shortcuts makes perfect sense, I wasn't even aware they were removed. Even if the compiler were changed to allow forward declaration (or rather, allow proper linkage for a reference to a forward declared but as yet undefined item), the shortcuts would still be just as useful.

Okay. Maybe tzachs will do this? ;)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 18/09/2013 09:42:44
Also, this may be an important issue: several people report (http://www.adventuregamestudio.co.uk/forums/index.php?topic=48907.0) bugs in the ordering (of characters/walkbehinds/objects) when using DirectX 9, especially when two of them have the same baseline.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 18/09/2013 17:20:32
Quote from: Crimson Wizard on Tue 17/09/2013 13:21:44
But I would hope the game be beta-tested first?
Yes, testing is currently in progress under AGS3.2.1.

QuoteI will look into this, but can't give any promises regarding time; the speech logic in AGS is messy.
Thank you :D

A related question is whether the dialog, if it advances automatically, does so when the sound file is finished playing, or whether there's a slightly pause in between for reasons of clarity.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 18/09/2013 17:51:00
Final request for this beta (and sorry to bother you with so many last-minute issues), I would really appreciate a counterpart to Dialog.HasOptionBeenChosen() that allows the programmer to manually set or reset this flag, in particular to clear it when an NPC has new information available.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 19/09/2013 19:34:40
It looks like I finally reproduced the crash on room load!

Steps:
1. Open a room with some existing objects for editing.
2. Create a new object.
3. Save room.
4. Open different room (or build a game).
5. Crash.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Thu 19/09/2013 20:20:52
Confirmed (kind of):

I opened a room, added an object saved it. No crash.
Opened other room, added object, clicked on first room to open it, got message box if I want to save -> crash!

Spoiler
Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Version: AGS 3.3.0.1142

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at load_room_file(SByte* )
   at load_crm_file(UnloadedRoom roomToLoad)
   at AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)
   at AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   at AGS.Editor.Components.RoomsComponent.LoadDifferentRoom(UnloadedRoom newRoom)
   at AGS.Editor.Components.RoomsComponent.LoadRoom(String controlID)
   at AGS.Editor.Components.RoomsComponent.ItemCommandClick(String controlID)
   at AGS.Editor.Components.BaseComponentWithFolders`2.CommandClick(String controlID)
   at AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   at AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
[close]

Where do I find the additional logfile that should be written with the lastest AGS version?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 19/09/2013 20:26:39
Quote from: cat on Thu 19/09/2013 20:20:52
Where do I find the additional logfile that should be written with the lastest AGS version?
Should be in "my documents/ags/agsnative.log" or "user/documents/ags/agsnative.log" depending on Windows version.

But I think I found what's causing this.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Thu 19/09/2013 20:42:40
Hm, I can't find the folder :( but as long as you know what is causing the problem...
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Sat 21/09/2013 22:13:31
Quote from: Radiant on Wed 18/09/2013 17:51:00
Final request for this beta (and sorry to bother you with so many last-minute issues), I would really appreciate a counterpart to Dialog.HasOptionBeenChosen() that allows the programmer to manually set or reset this flag, in particular to clear it when an NPC has new information available.

Just saw this - you can use this module I made as a workaround: http://www.adventuregamestudio.co.uk/forums/index.php?topic=46332.0 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=46332.0)
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Mon 23/09/2013 03:30:51
Yeah, I can't find the agsnative.log file or directory either. In any event, nice job on tracking this down! It's exactly the same crash I experienced many times over. I've been able to consistently replicate it by following cat's method above. The project I was working on had me adding new objects between rooms frequently so I ran into it quite a bit.

By the way, any chance of addressing that issue I mentioned in my previous post? The quirk where having two identically-named sprite folders in the Sprite Manager will always cause AGS to jump to the first folder instance when trying to change a sprite via GUI, room object, View frame etc. (Meaning that when the Sprite Manager opens, it highlights a different sprite/folder than the one it should.)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 23/09/2013 12:06:08
Meh, looks like I screwed with that log file. Good thing it wasn't needed in the end.

Quote from: AGD2 on Mon 23/09/2013 03:30:51
By the way, any chance of addressing that issue I mentioned in my previous post? The quirk where having two identically-named sprite folders in the Sprite Manager will always cause AGS to jump to the first folder instance when trying to change a sprite via GUI, room object, View frame etc. (Meaning that when the Sprite Manager opens, it highlights a different sprite/folder than the one it should.)
Hmm, I cannot reproduce this, it works correct for me. I even tried making same loop having sprites from both folders, and when I double-click a frame, it opens correct sprite folder and highlights correct sprite.
Maybe there's something else behind your problem?
Have anyone else seen such behavior?

As a side-note, why does AGS allow to create subfolders with identical names under same parent?! Looks like something overlooked, in my opinion.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 24/09/2013 09:03:25
Quote from: cat on Sat 14/09/2013 14:36:52
Looks like the widths of the columns in the Output window cannot be changed. I had to copy the text to the clipboard to be able to read the text. Same goes for findresults.

Interesting; when the ListView is on docked panel, its column header becomes invisible. When I drag them and make them floating windows, the column header reappears and I can change column widths.

E: On further investigation I found that every dockable window has an extra margin at the top. It looks like it is left for the dragging "handle". Output and Find Results windows don't have these margins, and the dragging handle simply covers the column headers. Should be easy to fix, I guess.

EE: I wonder, though, why do Weifen Luo's docking panels require a premade padding? MSVS docking panels, for instance, do not require any preserved space, they seem to increase panel's size and add a drag handle similarly how window title is added.

EEE: Found a minor bug with "Find Usage" command: http://www.adventuregamestudio.co.uk/forums/index.php?issue=431.0
Title: Re: AGS 3.3.0 Beta Release
Post by: Intangible on Tue 24/09/2013 23:23:01
I'm not sure if this is the right place to ask this, but is there an approximate time frame for when we should expect a general release of AGS 3.3.0? I'm planning to start some new projects soon, but if I can save myself a conversion by putting them off for a few weeks I don't mind. If we're talking months, though, I'll probably just go ahead with the current release and convert later. :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 24/09/2013 23:44:26
Quote from: Intangible on Tue 24/09/2013 23:23:01
I'm not sure if this is the right place to ask this, but is there an approximate time frame for when we should expect a general release of AGS 3.3.0?
I hoped to put couple more things in there which may take about a week. Then it will be a "release candidate" version, I think.
Anyway, there should not be anything that could prevent you from upgrading from beta to final release.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Wed 25/09/2013 03:54:16
Here's a small test project I made with 3.3.0 beta 7 to demonstrate the issue.

Download Here (http://www.himalayastudios.com/scratch/TestProject.rar)

Open it in the editor and look in the Sprite Manager. You'll see I have created 3 new folders: SlotA, SlotB, and SlotA (again).

Go to the Views section and open the view called vTestView. There are two loops, each with 3 frames. Loop 0/frame 0 displays sprite slot 10 (from the first SlotA folder). And Loop 1/frame 0 displays sprite slot 11 (from the second SlotA folder).

If you double-click on Loop 0/Frame 0, it will open up the sprite manager and highlight the correct sprite in slot 11 (first SlotA folder). However, if you double-click on Loop 1/Frame 0, the Sprite Manager will open up the first SlotA folder instead of the second one, and no sprites will be highlighted.

In room 1, I also added an object with sprite slot 13 (from the second SlotA folder) to object 0. If you click to change the sprite number, it will make the Sprite Manager open the first SlotA folder and no sprites will be highlighted.

--EDIT--

QuoteImproved walking at 60%-80% zoom when using AdjustSpeedWithScaling and MovementLinkedToAnimation;

Also, was this feature from the Draconian edition, ever implemented into 3.3.0 ? If not, any chance of including that in the RC? Thanks!
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 25/09/2013 09:33:36
Quote from: AGD2 on Wed 25/09/2013 03:54:16
Here's a small test project I made with 3.3.0 beta 7 to demonstrate the issue.

Download Here (http://www.himalayastudios.com/scratch/TestProject.rar)

Open it in the editor and look in the Sprite Manager. You'll see I have created 3 new folders: SlotA, SlotB, and SlotA (again).

Ohhh. No, there aren't two "SlotA" folders. There are two different folders: "SlotA" and "slotA". :D
Ironically, it works well with both of them having names in same case, but does not work with them having same name in different cases.
Anyway: fixed!


Regarding other requests: I did not set myself a deadline, I just would not want to start time-consuming tasks for 3.3.0. Otherwise this will become an endless process :(. And some most people don't like it when the version is "in development", they look for "official releases".
I'll check how much time will these things may take to implement.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 26/09/2013 12:55:59
People with good english, anyone?
I am remaking one old parameter into OO-style property, and cannot invent a proper name. :)

Original name is a bit misleading: game.close_mouth_end_speech_time.
What it does: it stops speech animation N game ticks before the speech is supposed to end (i.e. automatic text removal).
So right now I am trying to figure out how to say that in short. Something like "StopAnimationBy(sp?)Time". Or maybe "AnimationEndMargin"...
Any ideas?
Title: Re: AGS 3.3.0 Beta Release
Post by: Ryan Timothy B on Thu 26/09/2013 13:45:48
SpeechAnimationEndTime ?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 26/09/2013 13:51:30
Could you please elaborate: suppose that for a line, the automatic text removal is after 3000 milliseconds, and I set this variable to 500 milliseconds. Would the speech portrait then be shown for 3500 ms (3000 ms speaking, 500 ms closed mouth), or for 3000 ms (2500 ms speaking, 500 ms closed mouth)?

Also, the documentation says that this doesn't work in voice mode; I think it would be useful in voice mode as well to allow for a gap between individual lines.

But to answer your question, I think SpeechAnimationMargin would catch the meaning well.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 26/09/2013 14:34:26
Quote from: Radiant on Thu 26/09/2013 13:51:30
Could you please elaborate: suppose that for a line, the automatic text removal is after 3000 milliseconds, and I set this variable to 500 milliseconds. Would the speech portrait then be shown for 3500 ms (3000 ms speaking, 500 ms closed mouth), or for 3000 ms (2500 ms speaking, 500 ms closed mouth)?
This option does not change automatic speech removal time. It only sets a time point at which the speech animation ends (T-minus). So, in your example:
The text & portrait will be displayed 3000 ms, but animation will play only 2500 ms.

Quote from: Radiant on Thu 26/09/2013 13:51:30
Also, the documentation says that this doesn't work in voice mode; I think it would be useful in voice mode as well to allow for a gap between individual lines.
Thing is that at the moment this all is totally irrelevant to voice mode, because there's no precalculated removal timer in voice mode (sort of a problem actually), so it is not known beforehand when the speech will end.
But even if the timer will take voice sound length as a reference, setting this parameter will make speech animation stop before voice finishes.

Perhaps this may have sense for some peculiar effects, but first the whole thing needs to be altered to allow timer use voice length as a reference.
Title: Re: AGS 3.3.0 Beta Release
Post by: MiteWiseacreLives! on Thu 26/09/2013 14:37:07
SpeechAnimationTimeout ?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 26/09/2013 15:18:17
Quote from: Crimson Wizard on Thu 26/09/2013 14:34:26
This option does not change automatic speech removal time. It only sets a time point at which the speech animation ends (T-minus). So, in your example:
The text & portrait will be displayed 3000 ms, but animation will play only 2500 ms.
Thanks. And I see that this makes no sense with voiced speech, and I don't see much of a reason to implement it for voices.
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Thu 26/09/2013 15:37:56
But couldn't it be argued that a setting to provide "padding" after the speech animation would serve the same purpose, and could support both voiced and unvoiced cases?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 26/09/2013 16:03:52
Okay, let me show this in graphical way :).


Hypothetically, there are three processes, run in parallel:
(http://img824.imageshack.us/img824/6455/ssmf.png)

Periods:
A - Portrait & text displayed on screen, but speech is not "played" (main timer not set and no voice).
B - Speech started playing, but special speech animation not started yet.
C - Animation stopped, but speech still playing (voice still plays at this point!)
D - Speech stopped playing, but both portrait & text are still shown.

At this moment, AGS only supports setting period C. This is done using aforementioned game.close_mouth_end_speech_time.

Radiant is asking to add something to set period D (I am working on this).
Title: Re: AGS 3.3.0 Beta Release
Post by: festilligambe on Thu 26/09/2013 16:46:06
perhaps something like SpeechAnimationDuration  but it would only represent the length of the animation but I like that it rhymes.  Could also use term
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Thu 26/09/2013 17:32:15
And I'm saying if you can set D, you don't really need C, because C doesn't work when you have voice, and when you don't have voice the only thing that matters is C+D. So you can just get rid of C and always use D.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 26/09/2013 18:04:09
Quote from: Snarky on Thu 26/09/2013 17:32:15
And I'm saying if you can set D, you don't really need C, because C doesn't work when you have voice, and when you don't have voice the only thing that matters is C+D. So you can just get rid of C and always use D.
Hmm... this makes sense. I need to think about this.


EDIT: uhhh, it just that we cannot fully get rid of C, because, well, backwards compatibility.

EDIT2: By the way, I somehow forgot to mention: Radiant, you should set game.close_mouth_end_speech_time = 0, - this will fix the first of your speech problems (speech animation ending prematurely). Because it is 10 (game ticks) by default. And, that is 10 ticks not from the voice file end, but from text timer end, which is different (may be shorter). Yeah, it is pretty messed up there.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 26/09/2013 19:07:52
I agree with Snarky.

It's true that you can't fully get rid of it, but you could leave it a deprecated (and I'm betting, almost never used) game.foo variable, and then add a spiffy new function for D.

(edit) And thanks, I'll go do that.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 26/09/2013 19:25:14
Actually, I find it very strange that I don't remember anyone complaining about portrait animation ending too soon.
Perhaps that is because usually voice is faster than text reading timer?
I searched forums, and found only few mentioning of this var, most of them were feature announcements by CJ (in the new version threads).

Thing is that this variable ought to be adjusted if the voice is on, otherwise there will always be a chance that such problem arises.

EDIT:
It looks like the Lucas-arts style speech explicitly ignores close_mouth_end_speech_time in case voice is playing. Should add same fix for Sierra speech, since, as Snarky pointed out, this setting has no sense using with voice anyway.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 30/09/2013 15:28:40
Well, the default is pretty close to zero, so it's probably not all that noticeable.

Plus I'd expect that most adventure games have their text speed set to "clickable" anyway.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 30/09/2013 22:24:47
AGS 3.3.0 BETA 8 released (engine version 3.3.0.1144)
-------------------------------------------------------
Hopefully, the last Beta before the Release Candidate. Unless bugs are found, my only TODO is updating documentation.

-------------------------------------------------------
Changes from BETA 7:

Features:
- Increased maximal Font number from 15 to 30;
- Proper alpha blender for blending two 32-bit sprites with alpha channels. Used for:
  a) GUI controls
  b) Cursor crosshair sprite
  c) DrawingSurface.DrawImage()
  For gui set "Visual: GUI alpha rendering style" setting to "Multiplied Translucence, Blend Colors".
  For the last two ones set "Visual: Sprite alpha rendering style" setting to "Improved".
- Improved character walking at 60%-80% scaling (courtesy of Alan v. Drake).
- New function in the Dialog class:
Code (ags) Select

/// Manually marks whether the option was chosen before or not.
void SetHasOptionBeenChosen(int option, bool chosen);

- New properties in the Speech class:
Code (ags) Select

/// Stop speech animation this number of game loops before speech ends (text mode only)
int             AnimationStopTimeMargin;
/// Gets/sets extra time the speech will always stay on screen after its common time runs out
int             DisplayPostTimeMs;


** WARNING **
Deprecated one variable from "game" object:
Code (ags) Select

int game.close_mouth_end_speech_time; // use Speech.AnimationStopTimeMargin


Compatibility:
- Properly handle null Strings passed into various formatting functions (Display, etc) for games built with AGS 3.1.2 and lower:
  In older versions of AGS engine printed "(null)" in such case; AGS 3.2 and higher raises error.
(This change is mainly important for the users of AGS ports, who cannot run originally built games)

Bug fixes:
- Fixed crash in the Editor, that occured when user added or deleted objects in room, then loaded another room (regression);
- Fixed "Output", "Call Stack" and "Find Results" panes, which had a pane's drag handle overlay the report table's header when in docked position;
- Fixed sprite lookup in folders, differing only by name case;
- Fixed text color for WFN fonts (regression);
- Fixed error which took place when user restored a game saved with background music playing, in case the music is not found in resources anymore;
- Fixed audio behavior during cutscenes (error caused audio volume to reset to default). Also AudioChannel.Volume will now return correct value when called from skipped cutscene.
- Fixed play.close_mouth_end_speech_time variable from making effect in voice mode and Sierra-style speech (which it wasn't supposed to do).


Templates:
- Fixed "Default Game" template to be compatible with 3.3.0;
- Updated "MI 9 verbs" template by abstauber;
- Added "Lightweight BASS" template by Ghost.

Download links (also updated at first page):
EXE:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta8.exe
ZIP:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta8.zip
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 01/10/2013 00:02:10
Thank you very much, that's highly useful. Downloading now!

Could you let me know about the issue we discussed in PM, about speech with a voice pack animation time depending on the length of the text string, instead of on the length of the voice sample?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 01/10/2013 00:15:43
Quote from: Radiant on Tue 01/10/2013 00:02:10
Could you let me know about the issue we discussed in PM, about speech with a voice pack animation time depending on the length of the text string, instead of on the length of the voice sample?

It is already fixed in this release:

Quote
- Fixed play.close_mouth_end_speech_time variable from making effect in voice mode and Sierra-style speech (which it wasn't supposed to do).

(That could be also fixed earlier by setting this variable to 0)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 01/10/2013 00:25:33
I was under the impression that the timeout depended on the length of the string (rather than the length of the voice file, as expected). This is separate from the close_mouth_end variable. Unless I've misunderstood the issue? The problem we're having in beta is that if the voice actor speaks slowly, then the text will timeout earlier than he is done speaking: the portrait is visible for (#letters in the string * some amount of frames), instead of for (the amount of milliseconds the OGG file plays). Please advice.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 01/10/2013 00:31:21
EDIT: Hmm, no, I was thinking about different thing... I should look into this again.
EDIT2: Sorry, I am a bit sleepy right now. For some reason I thought I fixed that ... maybe I did? Heh. Better check it.
EDIT AGAIN: Erm, I think this actually should have work properly in 3.2.1. Are you sure it is the problem you are getting?
Whenever I tested the speech, the text & portrait stayed until voice ends. It is animation that could be stopped too early.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Tue 01/10/2013 02:55:32
Just looking at the first post of this thread... AGS 3.3.0 has come a long way. Nice job guys!
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 01/10/2013 08:33:38
@Radiant:
I was half-asleep when writing last posts here yesterday. Now when I am awake, I clearly remember, that the text and portrait were never removed before voice clip has finished.

In PM you wrote:
Quote
The issue is as follows. In a game with Sierra-style portraits (not the full-screen type) and a voice pack and standard SetSkipSpeech timeout, currently the portrait animation plays for an amount of time based on the length of the text string, whereas the portrait is visible (in still frame with closed mouth) for the amount of time the voice sample plays.
Meaning (if I understood correctly): the text & portrait remain visible, but animation stops too early.
If this is the case, it is indeed fixed with the latest beta.
And, yes, this was caused by "play.close_mouth_end_speech_time": because it caused animation to stop by 10 game loops (by default) before the text timer runs out (which could run out before voice stops).

If you are getting different problem, that is - portrait dissapears before voice has finished - this is something I never experienced in AGS, and might be something completely different...
Please, clarify, what is happening?
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 01/10/2013 10:43:18
Excellent work, CW! This just keeps getting better. Thanks a lot for the improved character walking at 60%-80% scaling addition, too.

Here's a short list of things I've noticed with beta 8. With issues 1 and 2 below, I'm not sure if they relate to the recent GUI alpha blending fixes, or whether they're a different issue all together. But I thought I'd post them here regardless.

1) When a TTF font with anti-aliased edges is displayed (on a label or otherwise) over a 32-bit alpha-blended GUI background graphic, which has transparent areas of varying levels of opacity -- the TTF font becomes jagged where it's drawn over areas of the GUI graphic that are closer to fully transparent. The more transparency in an area of the graphic, the more jagged the font looks. See the image below for example:

(http://www.himalayastudios.com/scratch/GUI_TTF_Aliasing_Glitch.png)

This tooltip GUI image fades towards transparency at the left and right edges. As you can see, the sections of the TTF font at the left and right sides have no anti-aliasing around the edges.

Here's a png of the tooltip GUI graphic if you want to test it out yourself:

(http://www.himalayastudios.com/scratch/Tooltip_GUI.png)


2) Using DrawingSurface / DrawString to draw an anti-aliased TTF font over an inventory item graphic in the inventory window causes the parts of the font that are drawn over 'solid' areas of the sprite to be drawn correctly, while parts of the TTF font that are displayed over a transparent/semi-transparent area of the inventory graphic appear jagged and aliased.

(http://www.himalayastudios.com/scratch/Inventory_TTF_Aliasing_Glitch.png)


3) I noticed that SetCharacterIdle seems to be ignored and character idle animations do not play.


--EDIT--

4) Character animations also seem to be broken. Whenever EGO tries to perform a blocking animation, the game flicks up his start and end frame from the animation's loop (as if StartCutscene() had been called), and all the frames in-between seem to be skipped.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 01/10/2013 17:32:18
Yes, I made a very small typo in the code, that broke character animation timing. Please, delay using this build. I'll reupload fixed version as soon as I check out that problem with string drawing.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 01/10/2013 18:41:12
Another thing I just realized is that in the last image I posted above, all of the inventory items displayed in the window have jagged outer edges, despite the sprites having anti-aliased edges. In 3.3.0 beta 8, I selected these settings:

GUI alpha rendering style: Multiplied Translucence, Blend Source Color
Sprite alpha rendering style: Proper Alpha Blending

But as you can see in the above screenshot, the inventory items still have jagged pixels surrounding them when displayed in the inventory box. They're being displayed over a 32-bit GUI background image which doesn't have an alpha channel.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 01/10/2013 19:00:45
AGD2, I cannot figure out how to get same results as you have. Regardless of what I try, I get something different. Maybe I am doing something wrong...

Can you explain which combination of Guis/Gui Controls/sprites are in use there?
Maybe it is possible for you to send me some kind of demo version, or one-room version of your game, which would have those guis?


EDIT: Hmm, I was able to reproduce such effect, but it looks the same both in 3.2.1 and 3.3.0. It happens if I have a GUI background image without alpha channel and with magic pink areas. In such case the text on the label becomes not anti-aliased when drawn over those pink areas... That's the only thing I found so far.

One more question: did it work correct for you in 3.2.1 (or whichever version of AGS have you used), and with which settings?
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 01/10/2013 22:19:56
I can upload a demonstration project for you if you still need to see it.

And yes, this glitch happened in 3.2.1 and earlier. It has never worked properly in AGS, but as I mentioned above, I wasn't sure if the recent improvements you made to alpha blended graphics and GUIs were meant to fix this issue too (considering it's also GUI and alpha-channel related).

--EDIT--

Ah, another bug I found:  If you have a script open and type something into it and test/compile the game (CTRL+F5, F7, or whatnot), if you receive a compile error in the editor's output window and the game fails to run, it seems you can  no longer use CTRL-Z to undo any of your script changes in the still opened script (which was possible in 3.2.1).
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 01/10/2013 22:25:26
Upon reflection, I think this should solve our voice issues. I'll let you know asap if the other team members confirm this (after a new build from my side). Thanks!
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 01/10/2013 22:44:15
Well, I want to clarify: in current situation I want to make sure that I did not break anything at first place, and secondly, that features I recently added really work.

(Yeah, I already know I broke animations, will fix them soon)

Quote from: AGD2 on Tue 01/10/2013 22:19:56
I can upload a demonstration project for you if you still need to see it.
If you can, it will be great. As I said, I am a bit lost trying to guess which combination of sprites/guis lead to that behavior. Can you just PM me a link, if you don't want to put it on public?

Quote from: AGD2 on Tue 01/10/2013 22:19:56
And yes, this glitch happened in 3.2.1 and earlier. It has never worked properly in AGS, but as I mentioned above, I wasn't sure if the recent improvements you made to alpha blended graphics and GUIs were meant to fix this issue too (considering it's also GUI and alpha-channel related).
Well, there are two cases: 1) the inventory items and 2) text output. The inventory items were supposed to work with the latest changes, if set up properly, so I'd wish to get to the bottom of this.
Regarding text output, it is more complicated. All text is rendered by different methods, than common images. WFN fonts are drawn by the AGS itself (so it is possible to tweak these), but TTF fonts are drawn by Allegro library, and I guess that dealing with them will require some research first.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 01/10/2013 23:30:07
Thanks for the explanation. Had a feeling the TTF issue might have been something different.

Anyhow, I've PM'd you with a demonstration project which illustrates all of the graphical issues I mentioned in my posts above.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 02/10/2013 09:53:54
I built an engine with character animations fixed:
http://www.mediafire.com/download/z8wppg9rczxyrf7/acwin.exe
Just replace the one in AGS program folder.

I'll replace the whole beta 8 package after looking into the alpha blending problem.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 02/10/2013 12:37:37
@AGD2,
PMed you regarding inventory items (it was simply wrong DynamicSprite format).
Regarding TTF label, at this moment I can only suggest doing usual hack: put the label on fully transparent gui (background color = 0, no image), and position original tooltip gui with translucent background under.
This is what I get:

[imgzoom]http://img844.imageshack.us/img844/5230/p4c6.png[/imgzoom]
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Wed 02/10/2013 16:30:39
Thanks! I can confirm that it all works as intended now. I'll try that hack for the tooltip bar/label as well.

Sorry for not being more thorough about where to find the relevant code. I was in a rush to get it uploaded, and I didn't actually script that section myself, so I wasn't overly familiar with it. ;)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 03/10/2013 11:08:01
I'm curious, would it be hard to implement close_mouth_end_speech_time (or its new form) for voice samples? I'm asking because it turns out that many voice samples have a bit of blank pause at the end, so stopping the mouth animation 250 ms before the sample ends might actually make sense. Possibly there's a simple library function that returns the length in ms of a voice sample?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 03/10/2013 13:45:58
I found an issue with AGS 3.3.0. When importing a game from earlier versions of AGS, the script breaks on function calls like "GUIOn (TITLE)", whereas in 3.2.1 this worked fine. Apparently the code expects "GUIOn (gGTitle.ID)" now, although I'm not sure why. Could you please check this?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 03/10/2013 18:34:30
OK, I reuploaded Beta 8 with character animation fixed. Please, download again (same link).
There is one extra thing I wanted to add, related to text windows blending, but that takes a little longer.

Quote from: Radiant on Thu 03/10/2013 11:08:01
I'm curious, would it be hard to implement close_mouth_end_speech_time (or its new form) for voice samples?
Possibly there's a simple library function that returns the length in ms of a voice sample?
Yes, maybe. (err, I mean - maybe not - not very hard; and yes - there's a function that returns sound length)

Quote from: Radiant on Thu 03/10/2013 13:45:58
I found an issue with AGS 3.3.0. When importing a game from earlier versions of AGS, the script breaks on function calls like "GUIOn (TITLE)", whereas in 3.2.1 this worked fine. Apparently the code expects "GUIOn (gGTitle.ID)" now, although I'm not sure why. Could you please check this?
Do you import game from 2.72?
I found a quirky bug: it appears that all gui names have an extra "G" added to them after import: so instead of gTitle you would have gGTitle.
Similarly the TITLE is GTITLE now.
(Or rather an original "g" becomes "G" and then a new "g" prefix is added)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 03/10/2013 18:42:23
Yes, I did. Could you please do something about this quirky bug? :)

(and if it's not very hard to make the close_mouth_end_speech work with voice samples, we'd highly appreciate it too!)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 03/10/2013 22:11:07
Quote from: Radiant on Thu 03/10/2013 18:42:23
Yes, I did. Could you please do something about this quirky bug? :)

Please, try to update this dll in AGS folder:
http://www.mediafire.com/download/8ypv9jha4jjg8b4/AGS.Native.dll
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 03/10/2013 22:23:39
That worked, thanks.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 03/10/2013 22:46:08
Sorry to bother you, but there appear to be some other glitches with this build.

Game.SetAudioTypeVolume (eAudioTypeAmbientSound, x, eVolExistingAndFuture) doesn't work; ambient sounds are played at their normal volume regardless of this function call.

Game.SetAudioTypeVolume (eAudioTypeMusic, x, eVolExistingAndFuture) works but resets itself to full whenever a new room is entered. The same applies to eAudioTypeSound. Furthermore, both volumes reset to their normal (maximum) value as soon as speech begins, presumably since I've done Game.SetAudioTypeSpeechVolumeDrop (eAudioTypeSound, 0) at the startup of the game (the volume is set later as the result of moving a GUI Slider).

SetSpeechVolume (x) works, but if x == 0 then the speech is still audible, if very very soft. Mostly, it is noticeable to the player that something is being said.

Speech.PortraitY doesn't appear to do anything.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 03/10/2013 22:48:37
Quote from: Radiant on Thu 03/10/2013 22:46:08
Speech.PortraitY doesn't appear to do anything.
First of all, set Speech.CustomPortraitPlacement = true;
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 03/10/2013 22:52:18
Aha! I had forgotten about that part. Thanks, that works.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 03/10/2013 23:22:56
Quote from: Radiant on Thu 03/10/2013 22:46:08
Game.SetAudioTypeVolume (eAudioTypeAmbientSound, x, eVolExistingAndFuture) doesn't work; ambient sounds are played at their normal volume regardless of this function call.
There might be some difference of how audio types were differentiated in 2.72 and with newer audio system (since 3.2). I think that PlayAmbientSound (if that is what you use) does not really make a sound clip "ambient" in the AudioType sense. Instead, your particular sound clip must have a "Ambient" type set in its properties (or put into corresponding Audio folder with such property).
It also seems (from the quick glance into the code) that "old way" ambient sounds are controlled by SetSoundVolume, and only by that.

Actually, the new Audio System may be the main issue when upgrading to 3.2 and higher, you might need to spend some time adjusting your script to it. :(

Quote from: Radiant on Thu 03/10/2013 22:46:08
Game.SetAudioTypeVolume (eAudioTypeMusic, x, eVolExistingAndFuture) works but resets itself to full whenever a new room is entered. The same applies to eAudioTypeSound. Furthermore, both volumes reset to their normal (maximum) value as soon as speech begins, presumably since I've done Game.SetAudioTypeSpeechVolumeDrop (eAudioTypeSound, 0) at the startup of the game (the volume is set later as the result of moving a GUI Slider).
This is strange, I don't experience such behavior... Maybe this is related to which script commands do you use to play music and sound...

Quote from: Radiant on Thu 03/10/2013 22:46:08
SetSpeechVolume (x) works, but if x == 0 then the speech is still audible, if very very soft. Mostly, it is noticeable to the player that something is being said.
I can confirm this. It happens in 3.2.1 as well...


E: Now that I think about this, the demo you sent me before was done in 3.2.1 already? The sounds and music volumes seem to work properly there. Did you use different ways of setting them? Or it is the script that worked in 3.2.1 does not work in 3.3.0 anymore?
I am a bit lost, if you tried your game in 3.2.1 before, why are you upgrading from 2.72 again?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 03/10/2013 23:37:23
Thank you for your response. May I make the feature request that if SpeechVolume is zero, speech is simply not played at all? It makes sense for players to try to disable speech by dragging the volume slider to zero.
(EDIT) Wait, never mind, I can fix that in code using SetVoiceMode ().

I can confirm that "old style ambients" are not affected by Game.SetAudioTypeVolume (eAudioTypeSound) either, and that using SetSoundVolume() does affect both regular sounds and old ambients, and that this function does not reset when changing rooms. Odd.

Regarding music, the only 'volume' commands in my script are as follows:


function game_start () {
  SetMusicMasterVolume        (80);
  game.speech_music_drop        = 0;
  Game.SetAudioTypeSpeechVolumeDrop (eAudioTypeAmbientSound, 0);
  Game.SetAudioTypeSpeechVolumeDrop (eAudioTypeSound,        0);
  Game.SetAudioTypeSpeechVolumeDrop (eAudioTypeMusic,        0);
  Game.SetAudioTypeVolume           (eAudioTypeMusic,       80, eVolExistingAndFuture);
  SetMusicRepeat              (1);
}

function interface_click (int interface, int button) {
  if (interface == CONTROLS) {
    if (button == 9) {
      Game.SetAudioTypeVolume (eAudioTypeMusic,        GetSliderValue (CONTROLS, 9),  eVolExistingAndFuture);
    }
  }
}


Then I play music with the PlayMusic(n) command. I note that simply invoking PlayMusic like that resets the volume (and indeed, it is called when I enter a new room). Is perhaps the issue that I'm using an old-style PlayMusic command with a new-style SetAudioTypeVolume command?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 03/10/2013 23:44:29
Further investigation shows that setting System.Volume does work and doesn't reset when changing rooms, but it affects music and sound and speech all at the same time...
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 03/10/2013 23:49:32
Yes, messing old-style and new-style audio is not a good idea.

The PlayMusic calculates new music volume based on play.music_master_volume and room's music volume (old-style room property). It simply ignores new settings (AudioType volume).
This is done for compatibility with old games which did not know such settings.

I suggest you use either old music commands and settings, or only new ones, in most cases.



E: YUCK! Radiant's new avatar caught me off-guard. :tongue:
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Fri 04/10/2013 00:04:14
Ok, that's fair. I'm curious if there's some way to address the AudioClips as an array, e.g. music[30].Play() rather than aMusic30.Play()?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Fri 04/10/2013 00:16:30
Alternatively, I may just go back to using SetMusicMasterVolume() because my only issue with that was that it doesn't go down to zero. As you posted earlier,

Code (cpp) Select

void SetMusicMasterVolume(int newvol) {
    if ((newvol<0) | (newvol>100))
        quit("!SetMusicMasterVolume: invalid volume - must be from 0-100");
    play.music_master_volume=newvol+60;
    update_music_volume();
}


I suppose the ugly but effective workaround would be to change "if (newvol<0)" to "if (newvol < -60)" :grin:   Then again, I don't think many people are interested in dragging a music volume to zero.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 04/10/2013 00:17:02
Quote from: Radiant on Fri 04/10/2013 00:04:14
Ok, that's fair. I'm curious if there's some way to address the AudioClips as an array, e.g. music[30].Play() rather than aMusic30.Play()?
Yes, it is a problem of new audio system...
Perhaps there might be a trick to deal with PlayMusic (I wonder will that work if you will set music master volume simultaneously with SetAudioTypeVolume?) Or maybe not???.
Other than that, you'll have to manually create and fill in a global array of music clips. Like:
Code (ags) Select

AudioClip *MusicClips[100];

function game_start()
{
   MusicClips[0] = aMusic1;
   MusicClips[1] = aMusic2;
   // etc
}

Then you can use them:
Code (ags) Select

MusicClips[30].Play();
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Fri 04/10/2013 05:57:45
This is getting off-topic, but the engine is already keeping track of all of the audio clips in an array. Is there any practical reason why this shouldn't be exposed to the user? Something like Game.AudioClips[] + Game.AudioClipCount would be extremely trivial to include. It might be worth considering introducing an Audio type, but I dunno. That's another topic. :P

Quote from: Radiant on Fri 04/10/2013 00:16:30Then again, I don't think many people are interested in dragging a music volume to zero.

I'd say that depends on the game and the player. I've played plenty of games with the audio completely muted while listening to my own music playlists. If the game has voice acting then I'm probably less likely to do that, but it can depend quite a bit on my mood as well. :P
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Fri 04/10/2013 08:28:38
Quote from: monkey_05_06 on Fri 04/10/2013 05:57:45
This is getting off-topic, but the engine is already keeping track of all of the audio clips in an array. Is there any practical reason why this shouldn't be exposed to the user? Something like Game.AudioClips[] + Game.AudioClipCount would be extremely trivial to include.
That would be nice to have :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 04/10/2013 12:17:49
Quote from: monkey_05_06 on Fri 04/10/2013 05:57:45
This is getting off-topic, but the engine is already keeping track of all of the audio clips in an array. Is there any practical reason why this shouldn't be exposed to the user? Something like Game.AudioClips[] + Game.AudioClipCount would be extremely trivial to include.

Hey, this actually works :).

Problem still is, though, that AGS editor does not let user to explicitly set audio clip's numeric id. This is all based on the order of import, therefore only relatively usable.

Also, AGSScript compiler fails to properly parse line like "Game.AudioClips[ i ].Play()":
Quote
room1.asc(17): Error (line 17): must have an instance of the struct to access a non-static member
This works:
Code (ags) Select

AudioClip *clip = Game.AudioClips[i];
clip.Play();


In theory, you could have:
Code (ags) Select

AudioChannel *PlayMusicNew(int index)
{
  AudioClip *clip = Game.AudioClips[index];
  return clip.Play();
}


Still, consider the problem with ids I mentioned above.
Well, let's continue this discussion somewhere else.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Fri 04/10/2013 12:30:37
It's actually a long-standing issue in the compiler. If I knew what I was doing I'd love to see it fixed. :P

With no knowledge of what I'm talking about, I'd say that modifying the editor to allow assigning IDs for AudioClips should be relatively simple. But that's without looking at the code at all. I could take a look though and see what it would take. I gather this is something you want to go ahead and implement? There's some other information about the clips that the engine is keeping track of. Don't remember what...I was looking at it...before. :D
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 04/10/2013 12:38:02
Quote from: monkey_05_06 on Fri 04/10/2013 12:30:37
With no knowledge of what I'm talking about, I'd say that modifying the editor to allow assigning IDs for AudioClips should be relatively simple. But that's without looking at the code at all. I could take a look though and see what it would take. I gather this is something you want to go ahead and implement?
Not sure I want to do this right away.
To keep things logical, we might as well allow to change id for other items, and this sounds like a serious change to editor gui.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Fri 04/10/2013 13:00:54
You can already change the IDs of sprites :)

Practically speaking, it'd be sufficient (for our project, at least) if importing a file named "Music###.ogg" automatically gives it ID ### in the editor (unless that ID is already taken, of course). I suppose a workable way of doing it would be to add a field 'ID#' to the properties, that rejects being changed to an ID that is already taken.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sat 05/10/2013 11:03:19
Hm... I've created a test build of HQ on AGS3.3, and it turns out the music is really jumpy on Windows 8 machines, whereas in AGS3.2 it worked fine. This is not caused by system load or by antivirus software, and doesn't seem to occur on Win7 or on XP. Possibly this is because of the new music routines?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 06/10/2013 18:57:11
And we've got a crash.

Relevant code is:
  if (action == 97) {
    FadeOut        (4);
    RawClearScreen (0); // crash on this line
    GUIOff         (BONUS);
    Wait           (1);
    FadeIn         (64);
    RestartGame    ();
  }

Exception 0xc0000005, at EIP 0x0043bd77, prog ptr +6, 3.3.0.1144, gtags 45, 7. I can send you a crash.dmp file if you think it helps.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 06/10/2013 19:20:30
Quote from: Radiant on Sun 06/10/2013 18:57:11
And we've got a crash.

Oops.
Fixed acwin.exe:
http://www.mediafire.com/download/9cxx8j4x7eg1g5v/acwin.exe

There will be Beta 9 in a short while, with few more additions.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 06/10/2013 19:27:59
Thank you very much. Could you perhaps advice us on thw Win8 music issue please?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 06/10/2013 20:09:18
Quote from: Radiant on Sun 06/10/2013 19:27:59
Thank you very much. Could you perhaps advice us on thw Win8 music issue please?
Audio is a part of AGS I did not investigate much yet.
Here I built an engine version with multithreaded audio disabled:
http://www.mediafire.com/download/f8gfo28hf1fzdka/acwin_no_threaded_audio.zip
Perhaps you could try to use it instead and see if that changes anything.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Sun 06/10/2013 20:28:23
Crimson Wizard, was anything ever looked into regarding the issue with Pamela lip-syncing not working with speech files when multithreaded audio is enabled?

If not, could you make multithreading an option which the game developer can set? I have over 5,000 lip-synched lines and the multithreading murders every one of them. :~(
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 06/10/2013 20:40:34
Quote from: AGD2 on Sun 06/10/2013 20:28:23
Crimson Wizard, was anything ever looked into regarding the issue with Pamela lip-syncing not working with speech files when multithreaded audio is enabled?

If not, could you make multithreading an option which the game developer can set? I have over 5,000 lip-synched lines and the multithreading murders every one of them. :~(

Err... I wasn't aware of this at all (also I never tested nor played a game with Pamela lip-sync, so I vaguely know how this works).
Audio multithreading was originally made for some of the mobile ports to speed them up a bit. I guess this lipsync incompatibility was overlooked.
Yes, I guess it would be proper to add such setting, since it breaks things.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Sun 06/10/2013 22:35:28
In AGS's "Lip sync" tab, you specify which Pamela phonemes (mouth positions) should correspond to each frame in your character's talking view. In other words, each phoneme frame represents a unique sound a person makes while talking. You can assign more than one phoneme to a view frame. Below is a list of all the phonemes Pamela uses, and how I have personally set them up in the AGS "Lip Sync" tab:

0 (Mouth Closed): ZH/None
1 (A Frame): AY0/AY1/AY2/AA0/AA1/AA2/AH0/AH1/AH2/AE0/AE1/AE2
2 (W Frame): W/OW0/OW1/OW2/OY0/OY1/OY2/UW0/UW1/UW2
3 (E, C, & K frame): EH0/EH1/EH2/CH/ER0/ER1/ER2/EY0/EY1/EY2/G/K/R/Y/HH
4 (S & Z frame): S/Z/IH0/IH1/IH2/IY0/IY1/IY2/SH
5 (F & V frame): F/V
6 (T & N frame): T/TH/D/DH/JH/N/NG
7 (L & TH frame): L
8 (O & U frame): AO0/AO1/AO2/AW0/AW1/AW2/UH0/UH1/UH2
9 (B, M, & P frame): B/M/P

It doesn't really matter how you set them up, this just shows how I've done it, and it covers every single phoneme used in Pamela. For each of these 9 frames, you'd create a speech graphic for your character's dialog portrait in Photoshop (or similar) with his mouth in that visual position.

Next, you open a WAV character speech file in the Pamela utility. You drag vertical bars (which represent the above phonemes) into various positions along the WAV timeline. These bars tell Pamela which points in the WAV file each visual frame should be displayed. When you've finished positioning all the bars and have set them to the correct phonemes, you finally save a .pam file which corresponds with the character's speech file you just opened. So, EGO1.wav would correspond with EGO1.pam. Here's an example of the contents of a short .pam file where the character says "Do you sell sunscreen?"

Spoiler

[Speech]
225:L
555:ZH
390:S
360:N
75:Y
45:AO0
270:S
15:D
435:AY0
180:AY0
150:S
120:W
90:AO0
315:AO0
525:T

[Preferences]
translationfile:sample.mot
soundfile:C:/pam/EGO1308.wav
framespersecond:24
textdata:Do you sell sunscreen?
framesperphoneme:3
[close]

As you can see, each phoneme is preceded by a timing number which determines when that phoneme should play (and thus, when the corresponding View/frame for the dialog portrait is shown in AGS). When watching the talking portrait in-game, each phoneme (visual mouth frame) is held until the timer reaches the next phoneme along the timeline, and then it is replaced by the newer one.

At the moment,  multithreaded audio throws off the timing, presumably because multithreading pre-buffers the audio and AGS relies on the speech playing real-time so that it can use the correct timing in the .pam files. I could be wrong about this - I'm not actually sure how it's coded, but if this is the case, I was wondering if a possible solution would be for the engine to run an independent timer alongside speech audio. Whenever Say(), or legacy DisplaySpeech(), is used, an integer timer could start counting. Then the .pam file could take its cues from this integer timer, rather than taking them directly from the speech audio file.

Giving the option to disable and enable multithreaded audio is good, but obviously, the music stutter is a real pain too. So if the issue can be resovled entirely, then even better! :D
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 06/10/2013 23:09:03
There appears to be something wrong with old-style strings as well. The following code works fine in older versions, but not in 3.3:

function CallItemLook (int num) {
  string buf;
  if (num == Money) {
    StrFormat (buf, "You have %d silver coins. They are of negligible weight.", player.inv[Money]);
    disp (buf);
  }
}

function disp (const string s1, const String s2) {
  if (game.skipping_cutscene) return;
  String inp, msg;
  int    ch, xs, ys;
  inp = s1;
  // now inp becomes an empty string...
}
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 06/10/2013 23:36:32
And a feature request. Our resident artists would like portrait animation speed to stay constant if you increase game speed. I suppose that sounds counterintuitive :) but perhaps using game.talkanim_speed there may be some possibilities there? Or perhaps I could figure out some math if you could tell me how game.talkanim_speed actually works; right now I'm setting game.talkanim_speed to GetGameSpeed() / 7, but that's not a very smooth result.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Sun 06/10/2013 23:42:34
Although it should still work, is there a reason you're using old-style strings? You could replace the StrFormat with String.Format which returns a new-style String, which is compatible with const string (but not string). Of course you only ever need const string if you're intermixing new- and old-style strings. Switching from strings to Strings is pretty simple, and you'll find that it makes your life a lot easier.

The only time I can think of when using old-style strings would still be useful is if you're appending a bunch of single characters together. The new-style String type is (rather foolishly IMO) totally immutable, so append is a particularly expensive operation. If you use an old-style string then it's significantly less expensive. It would be very worthwhile to replace the internals of String with a mutable type that prefers over-allocation to re-allocation. But that's another topic, and just points out how little I've done for AGS. :P

Old-style strings should still be functional though.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 06/10/2013 23:52:55
It's years-old code; I believe there was some functionality in the past that existed in oldstyle strings but not in newstyle, and it probably does now. I suppose I should clean up my code some time and move to newstyle strings at some point, but as long as everything works other things take up my time first.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 07/10/2013 00:16:44
And there's another discrepancy with fade sequences. I have a room set up like this:


DynamicSprite *d1;
int ht, ft;

room function called from on_event (ENTER_ROOM) {
  int i;
  if (event == 0) {
      d1       = DynamicSprite.CreateFromBackground ();
      SetObjectTransparency (1, 100);
      SetObjectTransparency (2, 100);
      SetObjectTransparency (3, 100);
      SetObjectTransparency (10,100);
      RawClearScreen (0);
    }
  }

room function called from first tick of repeatedly_execute {
  if (event == 1) {
    i = 98;
    while (i > 2) {
      RawClearScreen          (0);
      RawDrawImageTransparent (0, 0, d1.Graphic, 100 - i);
      SetObjectTransparency   (1, i);
      SetObjectTransparency   (2, (i / 2) + 50);
      SetObjectTransparency   (3, i);
      SetObjectTransparency   (10,i);
      SetObjectTransparency   (4, 100 - i);
      SetObjectTransparency   (5, 100 - i);
      SetObjectTransparency   (6, 100 - i);
      SetObjectTransparency   (7, 100 - i);
      SetObjectTransparency   (8, 100 - i);
      SetObjectTransparency   (9, 100 - i);
      Wait                    (1);
      i -= 2;
    }
    i = 4;
    while (i <= 9) {
      ObjectOff (i);
      i ++;
    }
    RawDrawImage (0, 0, d1.Graphic);
    d1.Delete    ();
  }


So what this should do is fade in a black room with a few objects visible, then fade out those objects while fading in the actualy background (stored in a dynamicsprite). What actually happens in 3.3 is that the fading of the room background is reversed, i.e. it appears at full then fades to black, then snaps to full again.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 07/10/2013 01:30:38
You know... It looks like it is previous versions of AGS that had a bug...

Let me explain.
If you read a 2.72 manual, it states:
Code (ags) Select

RawDrawImageTransparent(int x, int y, int slot, int transparency)

Draws image SLOT from the sprite manager onto the screen at location (X,Y), with a translucency of TRANSPARENCY percent.
TRANSPARENCY is from 0-100; passing a TRANSPARENCY of 50 will draw the image semi-transparent; passing 0 is equivalent to just calling the normal RawDrawImage command.

<...>
RawDrawImageTransparent(100, 100, 134, 75);

will draw sprite 134 at (100, 100) on the screen, with 75 percent transparency.


Now, you call this:
Code (ags) Select
RawDrawImageTransparent (0, 0, d1.Graphic, 100 - i);
starting with i = 98, that is with transparency = 100 - 98 = 2.
That are 2% of transparency.
Yet 3.2.1 (and probably earlier) AGS draws image 98% transparent (2% opaque)!

Basically, this function acts opposite to how it is explained in the manual.
This is because there is (was) a mistake in the code, which used transparency argument in reverse way... and I occasionally fixed that mistake some time ago. :-\
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 07/10/2013 06:09:36
That's a good point, I remember being confused by this function in the past. But it does break backwards compatibility, so I'll leave it to you guys to decide how to deal with this.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 07/10/2013 06:50:18
Quote from: Crimson Wizard on Sun 06/10/2013 20:09:18
Here I built an engine version with multithreaded audio disabled:
http://www.mediafire.com/download/f8gfo28hf1fzdka/acwin_no_threaded_audio.zip
Perhaps you could try to use it instead and see if that changes anything.
This appears to fix (or avoid) the issue, yes.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 07/10/2013 10:31:19
I've thought of something else that would cost you probably 15 minutes to implement and could save hours of future debugging. There are occasions where AGS terminates with an error message, but the message doesn't give me the information I need to find the error. It would be really helpful if you could include that in the message text.

The messages I'm talking about are,

Thank you for your time :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 07/10/2013 10:42:40
Quote from: Radiant on Mon 07/10/2013 10:31:19
  • Array out of bounds. It's great to know the allowed range, but what I'd really like to see is the name of the array.
Name of variables are never stored in game, only addresses in memory. This would require rewriting the agsscript compiler, at least.
Array size can be added to the error message, indeed. Right.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 07/10/2013 10:45:42
Ah, that explains it. Well never mind that one, then :) The array size is already there, it says "0..19" for the range.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 07/10/2013 23:21:37
Okay, here's another updated acwin.exe:
http://www.mediafire.com/download/6kb9e1x19nq9xpi/acwin.exe

- Fixed old strings assignment to new ones (and also when using in equality operators).
- Fixed RawDrawImageTransparent to work like it did.
BTW, things are really messy here. Quote from CJ found in code:
Quote
Transparency is a bit counter-intuitive
0 = not transparent, 100 = invisible, 1..99 barely visible .. mostly visible
Same goes for Object and Character.Transparency. (wtf)

No multithreaded audio in this one.

Also added extra info to error messages, as was asked.


EDIT: As a note to other devs: I did not push these changes to repository yet. I want to be sure this works first (some tricky changes there).
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 07/10/2013 23:27:43
Awesome, thanks!
Title: Re: AGS 3.3.0 Beta Release
Post by: Calin Leafshade on Tue 08/10/2013 08:07:36
Speaking of array ranges, it would be really useful to be able to get an array length at runtime.

Ideally arrays would be objects like in C# but some kind of C-like function would be fine too.

Code (ags) Select

int len = ArrayLength(myArray);
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Tue 08/10/2013 09:20:03
From the standpoint of the AGS compiler I think that adding array.Length would be easier than allowing the C-style function, because the function would have to accept arrays of any type, and the compiler doesn't allow overloaded or generic functions.
Title: Re: AGS 3.3.0 Beta Release
Post by: gargin on Tue 08/10/2013 18:23:12
There appears to be a quirk in the new script grouping system. When double clicking to expand the group, a script file often opens in response. At first, I thought this was a feature as the script that opens is often the main script file for that group. I noticed that this happens even if I expand other groups (rooms list) and the mouse lands over a script file.

This is a minor inconvenience, but it does require you to continuously close script files. Just wanted to bring it to your attention.

Another really small thing I have noticed. When using the hotkeys to switch hotspot drawing tools the cursor doesn't update until moved.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Wed 09/10/2013 08:06:48
Here's a fairly severe editor bug in the 3.3.0. It regards the feature mentioned here: http://www.adventuregamestudio.co.uk/forums/index.php?issue=340.0

If you drag-and-drop any dialog topic to change the order, and then compile and run the game, when clicked in-game, every topic option will point to completely unrelated topics' options in different trees. In addition, if you double-click on one of the dialog topics you dragged to a new position, the dialog script opens, but the font will look entirely different; it will appear smaller (plain arial) and without any of the color-coded formatting that the editor normally adds to scripts.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 09/10/2013 08:52:56
Quote from: AGD2 on Wed 09/10/2013 08:06:48
If you drag-and-drop any dialog topic to change the order, and then compile and run the game, when clicked in-game, every topic option will point to completely unrelated topics' options in different trees. In addition, if you double-click on one of the dialog topics you dragged to a new position, the dialog script opens, but the font will look entirely different; it will appear smaller (plain arial) and without any of the color-coded formatting that the editor normally adds to scripts.

Yes, that's true.
This seem to occur only with dialogs that are put into folders. Also, I think I see certain logic pattern in what's happening: dialog #1 options become binded with the answers from the very first dialog in the very first folder, dialog #2 options are binded to the second dialog in the folders, etc (the dialogs in the root are counted first, then the dialogs in folders).
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Wed 09/10/2013 09:12:22
It happened to me when I was moving dialog topics which aren't contained in folders - there are actually no dialog folders in my source code. It happened when I switched the order of dialog topics 5 and 6.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 09/10/2013 09:40:43
Interesting. It appears that the bug in dialog script view is not related with the dialog order bug. It takes place even without changing any order.

To reproduce:
1. Load game project.
2. Open any existing dialog for editing (or create new one, if there's none).
3. Right-click on pane's header, and choose "Close". Dialog script is closed now.
4. Re-open same dialog. The script will not have any syntax highlighting.

I think this is because Scintilla (script) control becomes deinitialized, or something like that.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 09/10/2013 10:09:18
Quote from: Crimson Wizard on Mon 07/10/2013 23:21:37
Okay, here's another updated acwin.exe:
http://www.mediafire.com/download/6kb9e1x19nq9xpi/acwin.exe
Okay, we're doing an internal test with this build and it seems to be working. Thank you for your hard work on these betas!

It's causing an issue for us that Speech.DisplayPostTimeMs AnimationStopTimeMargin doesn't work with voice samples but only with text; we would appreciate having the ability to end speech animation (e.g.) 250 ms before the voice clip ends.

Also, it's been shown earlier in the thread that the old function SetMusicMasterVolume() cannot reduce music to zero, because it takes a value between 0 and 100 then internally adds 60 to this value before using it. Would you mind if the function were to accept values from -60 to 100, so that calling SetMusicMasterVolume(-60) does result in an internal volume of -60 + 60 = 0?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 09/10/2013 10:35:54
Quote from: Radiant on Wed 09/10/2013 10:09:18
It's causing an issue for us that Speech.DisplayPostTimeMs doesn't work with voice samples but only with text
I hope you mean Speech.AnimationStopTimeMargin? DisplayPostTimeMs should work with voice.

Quote from: Radiant on Wed 09/10/2013 10:09:18
Also, it's been shown earlier in the thread that the old function SetMusicMasterVolume() cannot reduce music to zero, because it takes a value between 0 and 100 then internally adds 60 to this value before using it. Would you mind if the function were to accept values from -60 to 100, so that calling SetMusicMasterVolume(-60) does result in an internal volume of -60 + 60 = 0?
I would like to understand why it was made that way. Perhaps there was a change in volume units? Any ideas?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 09/10/2013 10:41:03
Yes, I meant AnimationStopTimeMargin.

(edit) As I recall, AGS has these 'room music levels' that nobody ever seems to use much; these probably apply a modifier to the music's overall volume, and the lowest of those might be -60? I mean SetMusicVolume, which has a scale of -3 to +3; it wouldn't surprise me if this maps to -60 to +60 internally. If so, these would need a boundary check to treat totals of less than zero as zero.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 09/10/2013 11:09:40
Quote from: Radiant on Wed 09/10/2013 10:41:03
(edit) As I recall, AGS has these 'room music levels' that nobody ever seems to use much; these probably apply a modifier to the music's overall volume, and the lowest of those might be -60? I mean SetMusicVolume, which has a scale of -3 to +3; it wouldn't surprise me if this maps to -60 to +60 internally. If so, these would need a boundary check to treat totals of less than zero as zero.
Ohhh. Well, in such case this is made not right. I found a code where a room modifier is applied:
Code (ags) Select
int newvol=play.music_master_volume + ((int)thisroom.options[ST_VOLUME]) * 30;
if (newvol>255) newvol=255;
if (newvol<0) newvol=0;

I think this may be fixed by changing this to something like
Code (ags) Select

int newvol = play.music_master_volume + room_modifier[thisroom.options[ST_VOLUME]] * 30;
if (newvol>100) newvol=100;
if (newvol<0) newvol=0;
newvol = newvol * 255 / 100; // convert unit range

Yes, this will require to keep master_volume in 0 - 100 range throughout the code.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 09/10/2013 11:23:02
Room volume goes -3 to +3, so that makes it -90 to +90.

Since apparently the real scale is 0 to 255, you can set master volume from 60 to 160, and room volume adds -90 to 90, so you end up with a scale of -30 to 250, with values below 0 being clipped to 0. That means that apparently, the only reason SMMV works on this particular scale is so that individual rooms can tweak their volume, but to my best knowledge nobody uses that. It also means the current code already works if you allow SetMusicMasterVolume to utilize the full 0-255 scale, only at the higher and lower ends, the room volume will no longer be able to increase/decrease it further.

Which means your suggested fix works :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 09/10/2013 13:20:39
It appears that room volume can be set in range between -3 to +5. Tested in 2.62.
+4 and +5 values are only settable with SetMusicVolume() function (which sets room volume, not general music volume).

Manual does not mention this.


EDIT: No, the first assumption was wrong.
Upon comparing with 2.62 test game I can hear that 2.62 music plays louder with the same volume setting; this means that +60 volume units are added to compensate this difference. (I do not have 2.62 code, but who knows, maybe it was made like that back then).

Also, then newer 3.3.0 engine should produce same results as 2.62. What I'd like to know, if there's a problem with dropping music volume: did that dropping worked well in previous versions of AGS, before you made an import (from 2.72)?
If it worked well prior to 3.3.0 (or 3.2.1), but no more, this means that it is rather volume drop that does not work well.
If the range of music master volume has changed from 0-100 to 60-160, then we'd need to fix volume drop accordingly.

EDIT AGAIN: err, no, something is wrong, I need to think more about this.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 09/10/2013 21:41:49
I'm reasonably sure that mastervolume always had a range of 60-160, it's just that not many games actually have separate volume sliders for music/sound/speech, and not many players drag those all the way down to zero. It's way faster to turn the physical knob on your speaker, after all.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Wed 09/10/2013 21:57:57
Quote from: Crimson Wizard on Wed 09/10/2013 09:40:43
Interesting. It appears that the bug in dialog script view is not related with the dialog order bug. It takes place even without changing any order.

To reproduce:
1. Load game project.
2. Open any existing dialog for editing (or create new one, if there's none).
3. Right-click on pane's header, and choose "Close". Dialog script is closed now.
4. Re-open same dialog. The script will not have any syntax highlighting.

I think this is because Scintilla (script) control becomes deinitialized, or something like that.
Fixed. This was indeed the issue. The same issue used to happen for scripts too, but since for some reason dialogs are implemented seperately, I had to implement the same fix there too...
Maybe some day we can unite the classes (we'll get some more features, like the "*" that is missing from the dialog when it's changed, and the fact that you don't get a choice whether to save it or not).

Quote from: gargin on Tue 08/10/2013 18:23:12
There appears to be a quirk in the new script grouping system. When double clicking to expand the group, a script file often opens in response. At first, I thought this was a feature as the script that opens is often the main script file for that group. I noticed that this happens even if I expand other groups (rooms list) and the mouse lands over a script file.

This is a minor inconvenience, but it does require you to continuously close script files. Just wanted to bring it to your attention.
That was actually a request, see here (in the end of the post) (http://www.adventuregamestudio.co.uk/forums/index.php?topic=46378.msg624850#msg624850).
Title: Re: AGS 3.3.0 Beta Release
Post by: SpeechCenter on Thu 10/10/2013 04:47:26
as reported here http://www.adventuregamestudio.co.uk/forums/index.php?topic=45622.msg636470246#msg636470246
AGS.Types.Scripts.Count returns an incorrect value

A second (totally unrelated) problem I noticed in the latest beta is if I close the application, before I get the "do you wish to save" message box, the first pane closes.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Thu 10/10/2013 05:32:05
If I'm not mistaken, I believe that AGS.Types.Scripts never includes room or dialog scripts, so multiplying the value by two should always give the script and header count. Although I agree that the collection should return the actual value of the objects it contains.
Title: Re: AGS 3.3.0 Beta Release
Post by: SpeechCenter on Thu 10/10/2013 07:13:19
The implementation also assumes the called first adds a header, it stores it in a member and then assumes the caller adds the code script in a next call. Adding a non-header scripts adds a new item that references the script and the header from the previous call. I don't think this is an elegant way to implement this structure, but I realize a lot of this is inherited from the previous implementation where add and remove are generic but additional methods assume the header always comes before the script. So perhaps you're right that given the actual usage and the way it's implemented then multiplying by 2 is not the worst thing as long as the rest remains with this behavior.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Thu 10/10/2013 07:48:43
Quote from: SpeechCenter on Thu 10/10/2013 07:13:19methods assume the header always comes before the script

That's actually something that's always kind of bothered me, that implementation detail. It's functional, but it's easily error-prone. I wonder how hard it would be to just introduce a new type to wrap a script and its header together and have the scripts collection hold objects of that type... Hmm...

Edit: It appears there already is a type for that... I'd guess it was added when script folders were added. And in fact, AGS.Types.Scripts is storing them as such, but indexing them separately. I think it would make more sense for Scripts to be updated to just be a collection of ScriptAndHeaders instead of the way it is now (which is why Scripts.Count is returning what it is).
Title: Re: AGS 3.3.0 Beta Release
Post by: SpeechCenter on Thu 10/10/2013 21:08:38
Quote from: monkey_05_06 on Thu 10/10/2013 07:48:43
Quote from: SpeechCenter on Thu 10/10/2013 07:13:19methods assume the header always comes before the script

That's actually something that's always kind of bothered me, that implementation detail. It's functional, but it's easily error-prone. I wonder how hard it would be to just introduce a new type to wrap a script and its header together and have the scripts collection hold objects of that type... Hmm...

Edit: It appears there already is a type for that... I'd guess it was added when script folders were added. And in fact, AGS.Types.Scripts is storing them as such, but indexing them separately. I think it would make more sense for Scripts to be updated to just be a collection of ScriptAndHeaders instead of the way it is now (which is why Scripts.Count is returning what it is).
It's not my intent to double post, but I've seen the post in the plugin thread first, but this is probably the right place to discuss a solution. So I just said that the change that was made today to the class breaks too much for the plugin interface. AGS.Types is exposed to the plugins and should be regarded as an interface. I would ask not to have the code as-is, it would make it very difficult for me to maintain the plugin.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Thu 10/10/2013 21:11:21
You could always abandon older versions. There's no practical reason to not upgrade once 3.3.0 is released.
Title: Re: AGS 3.3.0 Beta Release
Post by: Billbis on Thu 10/10/2013 21:18:15
Quote from: Crimson Wizard** WARNING **
Following functions and variables are now deprecated. If you have any of them in script you will likely receive compilation errors.
Either turn Backwards Compatibility mode in Global Settings, or consider using corresponding property from Speech class.
I feel stupid, but I have not found the corresponding backward compatibility setting. :-[
How it is named exactly ?
Anyway, I edit my code to use the new style Speech properties, and everything run smoothly. That new aplha channel blending things is wonderful ! 8-0
Congratulation and many thanks to all contributors !
Title: Re: AGS 3.3.0 Beta Release
Post by: SpeechCenter on Thu 10/10/2013 21:27:28
Quote from: monkey_05_06 on Thu 10/10/2013 21:11:21
You could always abandon older versions. There's no practical reason to not upgrade once 3.3.0 is released.
But as evident there are those who use the beta and the plugin. Someone reported a problem in the beta. Also, it would be nice to give people time to transition from 3.2.1 to 3.3.0 once it's released.
My suggestion is to keep the interface that returns scripts in the enumeration. I can live with the change that for add and remove accepts a different type since I don't call it, but I don't see why it can't enumerate the scripts as it was and force me to know the internal implementation.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Fri 11/10/2013 04:30:45
In retrospect you're probably right about preserving the interface, at least for now. I pushed a new commit. If you try to iterate the Scripts class for Script objects (this now requires an explicit cast of the Scripts object to System.Collections.IEnumerable, which is compatible with the previous declaration of the Scripts class) you should get a warning about it being obsolete (actually, I don't get the warning at all), but it shouldn't prevent compilation. I also marked the Add(Script) and AddAtTop(Script) methods as obsolete, with a note to use the ScriptAndHeader variants instead.

I don't think that should actually cause any breaks in backwards compatibility. Please let me know if I've overlooked anything though, as I haven't tested it. Testing stuff is for wimps.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 11/10/2013 09:33:31
Quote from: Billbis on Thu 10/10/2013 21:18:15
Quote from: Crimson Wizard** WARNING **
Following functions and variables are now deprecated. If you have any of them in script you will likely receive compilation errors.
Either turn Backwards Compatibility mode in Global Settings, or consider using corresponding property from Speech class.
I feel stupid, but I have not found the corresponding backward compatibility setting. :-[

Oh, right, I forgot to mention the exact option.
It is Global Settings -> Backwards Compatibility -> Enforce object-based scripting.
This is because those changes (deprecations) disable few non-OO functions and variables.
Title: Re: AGS 3.3.0 Beta Release
Post by: SpeechCenter on Fri 11/10/2013 13:55:51
The new enumerator still changes the signature.
public IEnumerator GetEnumerator() and IEnumerator IEnumerable.GetEnumerator() are different.

I created a pull request to fix that.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 11/10/2013 14:10:56
@SpeechCenter, I have little knowledge of this area (how Scripts class is used in plugin interface), and not much free time to investigate ATM, so I hope that you will come to consensus with monkey_05_06 before this request will be merged. I'd rather wait few hours (or couple of days if required) to see his reply (and maybe tzachs too, if he has anything to say) just to be sure everyone is ok with this.
Title: Re: AGS 3.3.0 Beta Release
Post by: gargin on Fri 11/10/2013 15:49:34
Quote from: tzachs on Wed 09/10/2013 21:57:57
Quote from: gargin on Tue 08/10/2013 18:23:12
There appears to be a quirk in the new script grouping system. When double clicking to expand the group, a script file often opens in response. At first, I thought this was a feature as the script that opens is often the main script file for that group. I noticed that this happens even if I expand other groups (rooms list) and the mouse lands over a script file.

This is a minor inconvenience, but it does require you to continuously close script files. Just wanted to bring it to your attention.

That was actually a request, see here (in the end of the post) (http://www.adventuregamestudio.co.uk/forums/index.php?topic=46378.msg624850#msg624850).

While I understand that this was a feature request, it's clearly broken. Yes, if you expand a parent group the proper script file opens. The problem I am mentioning here is that if you expand ANY group using a double-click, and the mouse lands on a script file group, a script file will open. This includes just expanding the Scripts group. I have seen this behavior when expanding the Scripts group and when collapsing the Rooms group while the Scripts group is already expanded. I can't imagine this part would be intended behavior.

If necessary, I can post a video of this, but it's easy to duplicate provided you double-click to expand/collapse groups and it may only be a significant issue when multiple script groups exist (more chance of landing on one when you expand/collapse).

If for some reason this is not fixable, I would prefer to be able to toggle this double-click feature off. I tend to expand/collapse groups fairly frequently and it's a bit annoying to have to close a script windows that pop up in error. It's a minor concern, but one that should be addressed eventually.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Fri 11/10/2013 23:34:34
I'm getting an error when loading games or when trying to create a new game:
"The property 'LegacySpeechAnimationSpeed' could not be read. This game may require a newer version of AGS."

Quote from: monkey_05_06 on Fri 11/10/2013 04:30:45
Please let me know if I've overlooked anything though, as I haven't tested it. Testing stuff is for wimps.
God, I hope that you were kidding...
Anyway, from my experience using classes in the Types namespace like Scripts, things that must be tested are compilation scenarios (including compiling a game which has two or more dialogs) and importing old projects.

Quote from: SpeechCenter on Fri 11/10/2013 13:55:51
The new enumerator still changes the signature.
public IEnumerator GetEnumerator() and IEnumerator IEnumerable.GetEnumerator() are different.

I created a pull request to fix that.
Well, if I understand correctly, you returned the previous enumeration and created a new ScriptAndHeaderEnumerator for the new enumeration of ScriptAndHeader. But didn't monkey use the new enumeration with the previous signature? You didn't change any class except Scripts, so you didn't fix those cases (unless there aren't any? If that's the case then I guess the pull request is fine if monkey has no objections).

Quote from: gargin on Fri 11/10/2013 15:49:34
If necessary, I can post a video of this, but it's easy to duplicate provided you double-click to expand/collapse groups and it may only be a significant issue when multiple script groups exist (more chance of landing on one when you expand/collapse).
Yes, a video would help, since I haven't been able to reproduce this issue, and frankly I don't understand how the cursor can land on another group than the one you were expanding...
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 11/10/2013 23:52:27
Quote from: tzachs on Fri 11/10/2013 23:34:34
Quote from: monkey_05_06 on Fri 11/10/2013 04:30:45
Please let me know if I've overlooked anything though, as I haven't tested it. Testing stuff is for wimps.
God, I hope that you were kidding...

No, he is not.

No, he is not.

No, he is not.

Okay, I am probably should not do this but fuck, I do not remember I ever was so angry in past few years.

I mean, it is no big deal when a programmer makes a mistake by overlooking. We do mistakes, we test, we bang ourselves on forehead and say "wtf I done", we fix errors.
But why pushing changes without making a SINGLE freaking test.
Why making important changes in the branch that is being prepared for release?? If that Scripts class, or whatever, was so ugly that hurt you, ou could at least change it in a parallel branch and merge later. That does not fix anything, just make better design. Wtf.

I almost believe he did this in purpose. I mean, this is probably not true, but it looks like he did.

Heck, I am spending hours and sometimes days testing changes. Maybe I should stop and say fuck it?? I'll free so many time for myself.



Damn, I am too angry, I should stop for today.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Sat 12/10/2013 00:20:18
I think we should give him some slack.
The understanding of the importance of testing and the sanctity of production code often comes with experience (if I remember correctly monkey is currently a hobbyist programmer, so no professional experience yet).
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Sat 12/10/2013 00:33:22
I have the following to say for myself:

lol
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Sat 12/10/2013 00:34:29
can2get copy of source that actually builds? plxkthnz
Title: Re: AGS 3.3.0 Beta Release
Post by: SpeechCenter on Sat 12/10/2013 01:01:39
Quote from: tzachs on Fri 11/10/2013 23:34:34
Quote from: SpeechCenter on Fri 11/10/2013 13:55:51
The new enumerator still changes the signature.
public IEnumerator GetEnumerator() and IEnumerator IEnumerable.GetEnumerator() are different.

I created a pull request to fix that.
Well, if I understand correctly, you returned the previous enumeration and created a new ScriptAndHeaderEnumerator for the new enumeration of ScriptAndHeader. But didn't monkey use the new enumeration with the previous signature? You didn't change any class except Scripts, so you didn't fix those cases (unless there aren't any? If that's the case then I guess the pull request is fine if monkey has no objections).
You understand correctly. I did test it, TDD proved itself useful on more than a single occasion, so I ignored that comment on testing, but it could have been more serious testing. By the way AGS.Native didn't compile before my change because the Script enumerator doesn't work, which is part of the compatibility problem.
Also didn't find any usages in the editor code with the enumerator, other than the AGS.Native part which wasn't changed. In all instances I found foreach goes for the AllItemsFlat which I don't think is related, but if I missed anything there then that should be fixed.

monkey_05_06 and I discussed the change over at github, he doesn't seem to like it, but with the current structure change I don't see much of a choice.
Another proposal I made was to have 2 structures, one for Scripts and the other for ScriptAndHeaders and two getters. The Scripts is built upon call and ScriptsAndHeaders returns the actual member. Scripts would then become immutable, so some compatibility is lost, but it may be ok.

I still think the change on the structure itself is least intrusive at this point, or as CW suggested, the whole change made by monkey_05_06 may be too risky if it may affect many places which weren't sufficiently tested.
Title: Re: AGS 3.3.0 Beta Release
Post by: BigMc on Sat 12/10/2013 01:16:28
Quote from: monkey_05_06 on Sat 12/10/2013 00:33:22
I have the following to say for myself:

lol

monkey, making mistakes is ok but if you refuse to learn from them and get sassy instead don't be surprised if someone decides you should better work in your own repo.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 12/10/2013 01:22:06
I apologize for everything I said here. I am genuinely ashamed and sorry.
This outburst was in a way unexpected by me. I guess I am just worrying about these things. Maybe to much. I don't have a right to behave like this.
I think I need to take a break.
Sorry again.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Sat 12/10/2013 05:03:53
I've been trying to get the native library and the engine to build, but there are some problems that needed to be addressed, not the least of which is the inclusion additional dependencies which aren't documented.

To be fair, I shouldn't have submitted major changes until I had the opportunity to fully test them.

Regarding the LegacySpeechAnimationSpeed property which I removed, I was not aware that the XML reader aborts and explodes if it encounters anything it doesn't expect. This seems very, very wrong. CW sent me a PM with a way to address that issue, but I still should have caught it myself (in testing).

As to the changes I made to the Scripts class (and inherently, the editor plugin API), I stand firm behind my work. I have made some mistakes, and I intend to learn from them to prevent causing problems for everyone else in the future. However...

* The Scripts class directly correlates to the ScriptsComponent.1
* In the Scripts component, scripts are always added, removed, rearranged, and otherwise treated as a script and header file pair.
* The ScriptAndHeader class was implemented to refer to such a script and header file pairing.

As such:

* The Scripts class more accurately reflects a collection of ScriptAndHeader objects than a collection of Script objects.
* The primary enumerator for the Scripts class should operate on ScriptAndHeader objects, rather than Script objects.
* The Scripts class should prefer references to ScriptAndHeader objects, though reverse engineering this reference from one of the contained Script objects may be useful in production code.

And finally:

* Allowing the primary enumerator to remain as returning a Script object instead of a ScriptAndHeader object fundamentally breaks the Scripts class as a ScriptAndHeader collection.
* Obfuscation of the ScriptAndHeader enumerator to allow a non-obfuscated, broken enumerator is, if nothing else, bad form.
* The existing code which I submitted in relation to the Scripts class allows for the primary ScriptAndHeader enumerator.
* The obfuscated Script enumerator requires only a single cast of the Scripts object to System.Collections.IEnumerable, which is far less obfuscation than the proposed alternative.

The Scripts class was in a very poor state, halfway between a Script collection and a ScriptAndHeader collection. The appropriate determinable behavior is for it to operate as a ScriptAndHeader collection. As such, I stand behind my revisions, which are backwards compatible. The collection can still be enumerated by the underlying Script objects by using:

Code (csharp) Select
foreach (Script script in (System.Collections.IEnumerable)_scripts)
{
}


By way of comparison, the proposed alternative is for the correct and primary enumerator to be obfuscated such as:

Code (csharp) Select
foreach (ScriptAndHeader script in _scripts.ScriptAndHeaderEnumerable)
{
}


On the surface this may not look terribly bad, but it obfuscates the Scripts class as being a collection of Script objects (which it is not) and implies that additional exception must be made in order to pair the script and the header together. This is far worse style than moving forward and fixing the problem (which is that the interface was broken).

1 There is exactly one other usage of the Scripts class in the existing code which does not relate to the ScriptsComponent. In reality, this usage would be better represented by an IList<Script> rather than using the Scripts class directly. This other usage warrants rewriting.
Title: Re: AGS 3.3.0 Beta Release
Post by: SpeechCenter on Sat 12/10/2013 06:40:44
I don't think having a public property for enumeration is obfuscation. There's no requirement that the class implementing the content also implement the iterator interface.
There are various ways to implement iteration. What if you wanted a collection with forwards and reverse iterator? And what if you had a tree structure implementing both DFS and BFS iteration? Would having two properties that return the enumeration be obfuscation? I seriously doubt that. It's ok to separate implementation into multiple classes if there are multiple usages, and here there are two ways to iterate the scripts. So I would even add a second property that returns a script enumeration, showing that there are indeed two legitimate iteration scenarios and keep the interface as-is using the obsolete attribute.

Also, using your cast method would hide the obsolete warning. Who would remember that there's a possible change in the future? Plus you are still forcing code change to run, because no one would cast in the foreach statement in existing code.

Game.Scripts doesn't represent only the scripts component, it is the main way to access the scripts in the game from the plugin - that means other components use it as well, since plugins are components. The thing about backwards compatibility is allowing existing code to work. You only rely on the fact that I changed the code now to use enumeration, before that I used Count and Item, both of which are absent now, so there are additional compromises there.

But if you keep insisting that in iteration one must always pass the container and not its properties (I'm still not sure what software design principal this derives from), there's actually a third option similar to my second proposal. You could still have the Scripts class remain with exactly the same interface as before, but instead of adding/removing to its own list it adds to another instance which is the ScriptAndHeader collection. As described before, you'll have two properties in Game: Scripts and ScriptAndHeader. Scripts will continue to hold just the last header to support add/remove and have the same obsolete attribute for these methods (iteration could still be regarded as non-obsolete given that it works correctly, for example if I don't care whether the script is header or code and want the similar iteration here and when iterating room scripts)

I believe this option answers your requirement to always implement enumerable on the main class with the internal item it contains and my requirement for backwards compatibility.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sat 12/10/2013 16:41:07
I was informed that on systems running a background virus scanner, each attempt to open an EXE file will trigger the virus scanner, potentially slowing down the system. This strikes me as problematic as AGS by default puts sound clips in the executable (they can be placed audio.vox, but I would expect that should be the default), as well as the sprite file and all room files (you can split off room files with a config option, but not the sprite file, and doing this generates a whole set of small resource files instead of one neat big resource file). Or perhaps more resources could simply be kept in memory (I'm thinking of the currently-playing background music, which is apparently streamed from disk); it's not like contemporary systems have a shortage of memory :)

Have other people encountered issues with this, and is this something that should be changed for the next build?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 13/10/2013 19:37:52
There is talk in this thread (http://www.adventuregamestudio.co.uk/forums/index.php?topic=49149) about whether AGS should continue to use winsetup (which contains quite a number of options that are either outdated or incomprehensible to the average player). Please join the debate :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Mon 14/10/2013 13:46:44
Wow, Crimson Wizard. I never saw read you this much angry before 8-0 ! I can totally understand why you got angry. But amidst your anger, these lines you said are CLASSIC:

Quote from: Crimson Wizard on Fri 11/10/2013 23:52:27
I mean, it is no big deal when a programmer makes a mistake by overlooking. We do mistakes, we test, we bang ourselves on forehead and say "wtf I done", we fix errors.

These lines really made my day!  ;-D
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 14/10/2013 18:13:24
Well, at least Adeel had fun in this situation.

My apologizes again, I needed few days to calm down and think. As a result of thinking I started a new topic (http://www.adventuregamestudio.co.uk/forums/index.php?topic=49152.0).

I want to mention few things about "Global speech animation delay support" feature. While I had no objections against a property (I guess it is pretty logical), but removing legacy setting completely is incorrect, in my opinion.
Leaving aside the problem with XML reader:
1) This setting was used when old projects (2.72) are imported. With this setting removed users will have to fix their game by setting the new property in script instead.
2) The old (< 3.1? )games with sierra-style speech always used a fixed animation delay (5). Now they will use game.talkanim_speed instead, which is probably set to 0 for all such games (the animation will run faster than intended).
3) I can't help thinking that it would be nicer to just rename this global setting, removing "legacy" word, and add a way to set talkanim_speed in Global Settings as well. This would allow average user to quickly set up his game's speech settings in properties, instead of script.
(the global animation delay option may hide when "Use *" is off, and appear when it is on, like some of the properties already do)

Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Tue 15/10/2013 02:05:42
Quote from: Crimson Wizard on Mon 14/10/2013 18:13:24removing legacy setting completely is incorrect, in my opinion.

In retrospect, I agree with this, and you raise some good points. Except:

Quote from: Crimson Wizard on Mon 14/10/2013 18:13:242) The old (< 3.1? )games with sierra-style speech always used a fixed animation delay (5). Now they will use game.talkanim_speed instead, which is probably set to 0 for all such games (the animation will run faster than intended).

This is not true. JJS implemented a "fix" because A Tale of Two Kingdoms was stupidly using this variable in the AGS game scripts but expecting it to do nothing. The engine has always allowed game.talkanim_speed to work for Sierra-style speech (check the 3.2.1 source!). Fracturing the engine code because of a bug in the user's game scripts is simply unacceptable. The default for game.talkanim_speed is 5, which is what JJS set as the return value for Sierra-style speech. The fact of the matter is that if the user was not explicitly setting this variable, then it would always return that value.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 15/10/2013 08:48:11
Quote from: monkey_05_06 on Tue 15/10/2013 02:05:42
This is not true. JJS implemented a "fix" because A Tale of Two Kingdoms was stupidly using this variable in the AGS game scripts but expecting it to do nothing.
I think I have a clue now (I hope it is true). If it used (set?) talkanim_speed, but the results remained the same, this means that talkanim_speed was ignored when the animation delay is calculated internally for sierra-style speech? But it is not ignored anymore in 3.2.1. If this is so, then there should be a fix not in the GetCharacterSpeechAnimationDelay(), but at places where it is used internally in the engine. Perhaps some other function should be introduced, that makes a backward-compatible runtime fix. Well, I replied the same on the github.
I'd rather suggest we make some tests with pre 3.1 games.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 15/10/2013 10:18:05
Quote from: monkey_05_06 on Tue 15/10/2013 02:05:42
This is not true. JJS implemented a "fix" because A Tale of Two Kingdoms was stupidly using this variable in the AGS game scripts but expecting it to do nothing.
I'm surprised I've never heard of that, but ATOTK runs in AGS2.7, not 3.X.

Looking back on my code, ATOTK does the exact same thing as you recommended for Heroine's Quest: set talkanim_speed to GetGameSpeed() divided by some constant, to ensure that portrait animation speed remains the same when overall game speed changes.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Tue 15/10/2013 22:25:11
I don't play AGS games, so it's possible I don't know what I'm talking about. But at least in the latest branches, game.talkanim_speed is defaulted to 5, which wouldn't change unless the game was expressly changing it.

Now, as I'm getting more information about this, what it sounds like is happening is that some player reported that the speech animation speed was broken because it wasn't speeding up when the game speed was increased. If the speed returns a constant value of 5 then the speed would be variable based on the game speed. If, as Radiant says, the variable value of game.talkanim_speed was respected (and set accordingly as he's described), then the speech animation speed would remain constant, regardless of game speed.

I was accusing the wrong person because it made more sense in that case (I'll admit, and I'm sorry for being so brash). And I don't really have all the full details on why JJS implemented this "fix" (which per Radiant's inspection of the code, would actually break the desired behavior), so there's still the possibility that I'm missing something else. But it really seems that this was wrongly reported, by whoever it was that reported it.

That said, yes, it warrants further inspection.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 16/10/2013 12:41:25
Monkey, I made a test, and it seems pretty clear now.

More info in github comments:
https://github.com/adventuregamestudio/ags/commit/0d6e8f67973a4508cf05e04d1e110f18c49b1e8c#commitcomment-4344864



EDIT:
Quote from: Radiant on Tue 15/10/2013 10:18:05
Looking back on my code, ATOTK does the exact same thing as you recommended for Heroine's Quest: set talkanim_speed to GetGameSpeed() divided by some constant, to ensure that portrait animation speed remains the same when overall game speed changes.

Did that actually work in ATOTK? My test shows that in 2.72 Sierra speech does not use talkanim_speed at all.
I think that's the one confusing moment about this issue. I hope monkey_05_06 is correct in what he said above regarding possible bug report.
I will be able to test ATOTK in few hrs myself...

BTW, this seem to work in HQ3 private beta build that you gave me, it is built with 3.2.1, where talkanim_speed should already be in use by Sierra speech.
It probably will not work with 3.3.0 beta 8, because there's a mistake we are discussing now (it brings behavior back to 2.72 standards).
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 16/10/2013 15:40:53
Quote from: Crimson Wizard on Wed 16/10/2013 12:41:25
Did that actually work in ATOTK?
No, but I never took it out.

By the way, the music jitter issues reported earlier do go away on an AGS build without multithreading (i.e. the most recent 3.3 beta).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 16/10/2013 15:42:42
Quote from: Radiant on Wed 16/10/2013 15:40:53
Quote from: Crimson Wizard on Wed 16/10/2013 12:41:25
Did that actually work in ATOTK?
No, but I never took it out.
Alright, that explains it all then.

Quote from: Radiant on Wed 16/10/2013 15:40:53
By the way, the music jitter issues reported earlier do go away on an AGS build without multithreading (i.e. the most recent 3.3 beta).
Ok, I guess, we should disable that by default, maybe leaving an option in cfg file to turn it on for individual game/system if wanted. AFAIK mobile ports already have such option.
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Thu 17/10/2013 20:31:02
Quote from: Crimson Wizard on Mon 14/10/2013 18:13:24
Well, at least Adeel had fun in this situation.

To be honest, these words defined my situation in those days and that's why I've tried to immortalize them in my signature... :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 20/10/2013 09:52:56
Quote from: Radiant on Mon 07/10/2013 10:31:19

  • Starting cutscene while already in a cutscene. I get the line number of the new cutscene, but it would be great to have the line number of the first one (because that's generally where the error is - a missing EndCutscene call). The same applies to NewRoom while a new room is already triggered in the same script cycle
I'm afraid this one doesn't work; it reports "previously started at line 0".
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 20/10/2013 11:03:23
Quote from: Radiant on Sun 20/10/2013 09:52:56
Quote from: Radiant on Mon 07/10/2013 10:31:19

  • Starting cutscene while already in a cutscene. I get the line number of the new cutscene, but it would be great to have the line number of the first one (because that's generally where the error is - a missing EndCutscene call). The same applies to NewRoom while a new room is already triggered in the same script cycle
I'm afraid this one doesn't work; it reports "previously started at line 0".

Can you give more details, like where the StartCutscene calls are located?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 20/10/2013 11:30:54
It turns out to be the room script for room 83, line number 175. The second one is room 20, line 481.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 20/10/2013 11:45:54
Well, I tried this:
room1.asc:
Code (ags) Select

function room_AfterFadeIn()
{
  StartCutscene(eSkipESCOnly);
  player.ChangeRoom(2);
}

room2.asc:
Code (ags) Select

function room_AfterFadeIn()
{
  StartCutscene(eSkipESCOnly);
}

And that displays correct line number.
Maybe there's something else...

BTW, I seem to have forgotten other scripts may be called during cutscene. I'll see if I can add script name to the message.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 20/10/2013 16:00:49
There's something I do not know; can anyone tell, if the LipSync working along with Voice? If yes, what happens if text runs out, but voice still playing?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 21/10/2013 13:25:13
Radiant, I am afraid I will not be able to implement AnimationStopTimeMargin working for voice right now.
When AGS plays voice it does not load whole clip at a time, but reads it part by part (streaming), therefore the full clip's length is not known at the moment of play start.
There might be a solution to this, but this will require redesigning audio system (for example, storing some information on sound clip separately in the game data), which I would not want to do right now.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 21/10/2013 13:47:22
Ok, I understand. Thank you for your time.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 21/10/2013 20:18:01
Ok, I made a branch (https://github.com/adventuregamestudio/ags/tree/release-3.3.0) specially for 3.3.0 release.
I think we should activate, how people call it, "feature freeze policy" for this branch.
The only exception may be implementing automatic scaling option in winsetup... although that's not a new feature, but a continuation of existing one. BTW the one we have currently works normally only for window mode, that should be fixed.


If someone wants to continue developing new features: fork a separate branch either from "master" or "release-3.3.0" (e.g. "feature_mynewfeatures"), preferably in the private repository. On other hand, you may consider continuing from the "develop" branch... the only problem would be that it is currently way behind in the sense of bugfixes compared to 3.3.0, and need to be updated as soon as 3.3.0 is ok.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Mon 21/10/2013 21:47:41
The Android engine is pretty badly bugged right now, with it silently crashing all the time. If that can be sorted out, then should that be included in the 3.3.0 release?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 21/10/2013 21:56:51
Quote from: monkey_05_06 on Mon 21/10/2013 21:47:41
The Android engine is pretty badly bugged right now, with it silently crashing all the time. If that can be sorted out, then should that be included in the 3.3.0 release?
Yes, this branch is for bug fixes.

BTW, it is important to know if all ports compile and run properly.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 22/10/2013 00:56:03
Quote from: Crimson Wizard on Mon 21/10/2013 20:18:01
I think we should activate, how people call it, "feature freeze policy" for this branch.
I think that's a great idea :)  Ok, if I'll have any other feature requests I'll defer them to 3.4. It would be great to have a stable 3.3 build with all the new functionality therein.

Quote
The only exception may be implementing automatic scaling option in winsetup... although that's not a new feature,
I would argue it's a bug that automatic scaling is not listed in the winsetup drop down :P  (considering automatic scaling by itself works fine).
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Tue 22/10/2013 01:21:12
Quote from: Crimson Wizard on Mon 21/10/2013 20:18:01
I think we should activate, how people call it, "feature freeze policy" for this branch.
Will transparency on text window make the cut?

Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Tue 22/10/2013 02:54:58
"Feature freeze policy" is a brilliant idea. Fix the bugs, then for 3.3.1 refactor code some more, 3.3.5 improve portability, 3.4.0 remove limits and add custom resolutions and 3.4.5 new features. Well... that's at least how I would do it. But freezing new features until all bugs are fixed is the best way to go forward.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 22/10/2013 08:07:01
Quote from: Knox on Tue 22/10/2013 01:21:12
Will transparency on text window make the cut?
It is already there.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Tue 22/10/2013 08:17:59
Quote from: Crimson Wizard on Mon 21/10/2013 21:56:51
Quote from: monkey_05_06 on Mon 21/10/2013 21:47:41
The Android engine is pretty badly bugged right now, with it silently crashing all the time. If that can be sorted out, then should that be included in the 3.3.0 release?
Yes, this branch is for bug fixes.

BTW, it is important to know if all ports compile and run properly.

I realized this may have conveyed the wrong tone on my part. To clarify, I've had several people report this silent crashing to me, from both the existing launcher APK builds and my stand-alone APK builds. Recent signs point toward the multithreaded audio, but I haven't been able to really pinpoint it (granted, I know nothing about multithreaded programming).
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 22/10/2013 08:24:40
For what it's worth, the multithreaded audio also causes problems with Windows builds. Perhaps it would be good to disable it for 3.3.0 and reinvestigate it for 3.3.1 or 3.4.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 22/10/2013 11:36:38
Quote from: monkey_05_06 on Tue 22/10/2013 08:17:59
Quote from: Crimson Wizard on Mon 21/10/2013 21:56:51
Quote from: monkey_05_06 on Mon 21/10/2013 21:47:41
The Android engine is pretty badly bugged right now, with it silently crashing all the time. If that can be sorted out, then should that be included in the 3.3.0 release?
Yes, this branch is for bug fixes.

BTW, it is important to know if all ports compile and run properly.

I realized this may have conveyed the wrong tone on my part. To clarify, I've had several people report this silent crashing to me, from both the existing launcher APK builds and my stand-alone APK builds. Recent signs point toward the multithreaded audio, but I haven't been able to really pinpoint it (granted, I know nothing about multithreaded programming).
Not sure I understand what's wrong was about tone conveyance :P. IMO the ports should at least run games created with latest editor version, so it is equally important to test & fix them all.

Regarding the multithreading, there are different sort of errors: 1) errors due improper use of shared resources (this may lead to crashes); 2) errors due desynchronization or incorrect implementation of the working process (this may lead to sound stutter and similar weirdities); also 3) deadlocks.

Threaded audio is enabled on all mobile ports (Android, iOS, PSP) by default, but can be disabled in config.
On other hand, as far as I undestand this, it may speed things up on these platforms (especially PSP).

By the way, are these bug reports kept someone?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 22/10/2013 19:01:58
Engine with proper support for automatic scaling selection (now should not cause troubles by choosing unsupported fullscreen mode):
http://www.mediafire.com/download/dpb4uve382detl0/acwin.exe
(no, this is not custom resolutions)

Please, test, and tell if that works for you.

How does it work: define filter id as "max" (case insensitive) in config manually
Code (ags) Select

[misc]
gfxfilter=max

or select "Maximal supported" in the filter list in winsetup.

When game is run, engine should choose maximal scaling filter that is supported by your graphic card / renderer mode. In windowed mode the scaling will not make window larger than your current desktop (in fullscreen it actually may).
On other hand, it may happen that windowed mode supports higher scaling than fullscreen.
For example, my display is 1680x1050, it can run 320x200 game on 1600x1000 (x5 filter) in window, but only 1280x800 (x4 filter) fullscreen.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 22/10/2013 19:26:08
Thank you, this appears to work fine. We'll test on a few other systems/monitors later this week.

I'm curious if this option gives a nearest neighbor filter or some other kind of filter? And I think it would be better placed near the top (directly below "none") because it's a sensible default and not "the next step beyond 8x scaling". For that matter it may be clearer to split this into two pulldowns: one for the filter (none/NN/AA/H2x) and one for the scaling (max/1/2/3/4...). By the way, you mentioned in another thread that certain options in winsetup don't actually do anything in the engine code, because they're either obsolete or not implemented. I believe it would be a good idea to hide or disable those.

Finally, I'm curious what the status is of the SetMusicVolume fix you mentioned earlier? It's not crucial or anything but I'd just like to know.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 22/10/2013 19:40:02
Quote from: Radiant on Tue 22/10/2013 19:26:08
I'm curious if this option gives a nearest neighbor filter or some other kind of filter? And I think it would be better placed near the top (directly below "none") because it's a sensible default and not "the next step beyond 8x scaling". For that matter it may be clearer to split this into two pulldowns: one for the filter (none/NN/AA/H2x) and one for the scaling (max/1/2/3/4...).
No, I can't split it into two popups right now, because the filters list is created by the engine literally as it is shown there... there's no "filter type" thing, only NNx2, NNx3, etc. Maybe we could get to this later, with the custom resolutions.

Quote from: Radiant on Tue 22/10/2013 19:26:08
By the way, you mentioned in another thread that certain options in winsetup don't actually do anything in the engine code, because they're either obsolete or not implemented. I believe it would be a good idea to hide or disable those.
Not really, I mean that few things that are automatically written to "acsetup.cfg" are not used, at least not by Windows version. Everything what is on winsetup dialog is used.

Quote from: Radiant on Tue 22/10/2013 19:26:08
Finally, I'm curious what the status is of the SetMusicVolume fix you mentioned earlier? It's not crucial or anything but I'd just like to know.
Whoops. I forgot about that. I recall I wasn't very sure what to fix there exactly, I need to look into that again.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 22/10/2013 19:44:54
(1) Ok, but I still think this new filter could have a clearer name (e.g. "maximum size nearest-neighbor")
(2) Thanks, that clears things up.
(3) As I recall, you posted a fix in this thread which sounded like a good solution (see next post)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 22/10/2013 19:46:02
Here you go:

Quote from: Crimson Wizard on Wed 09/10/2013 11:09:40
Quote from: Radiant on Wed 09/10/2013 10:41:03
(edit) As I recall, AGS has these 'room music levels' that nobody ever seems to use much; these probably apply a modifier to the music's overall volume, and the lowest of those might be -60? I mean SetMusicVolume, which has a scale of -3 to +3; it wouldn't surprise me if this maps to -60 to +60 internally. If so, these would need a boundary check to treat totals of less than zero as zero.
Ohhh. Well, in such case this is made not right. I found a code where a room modifier is applied:
Code (ags) Select
int newvol=play.music_master_volume + ((int)thisroom.options[ST_VOLUME]) * 30;
if (newvol>255) newvol=255;
if (newvol<0) newvol=0;

I think this may be fixed by changing this to something like
Code (ags) Select

int newvol = play.music_master_volume + room_modifier[thisroom.options[ST_VOLUME]] * 30;
if (newvol>100) newvol=100;
if (newvol<0) newvol=0;
newvol = newvol * 255 / 100; // convert unit range

Yes, this will require to keep master_volume in 0 - 100 range throughout the code.
Title: Re: AGS 3.3.0 Beta Release
Post by: Alan v.Drake on Tue 22/10/2013 21:07:06
Quote from: Crimson Wizard on Tue 22/10/2013 19:01:58
On other hand, it may happen that windowed mode supports higher scaling than fullscreen.
For example, my display is 1680x1050, it can run 320x200 game on 1600x1000 (x5 filter) in window, but only 1280x800 (x4 filter) fullscreen.

Because you have to manually add that resolution to your drivers, I too have a 1680x1050 panel and my monitor sends an EDID to the drivers that lacks other obvious resolutions like 1440x900 and so on.
As soon as the resolution is available AGS should be able to use it.

- Alan
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 22/10/2013 21:08:54
Quote from: Alan v.Drake on Tue 22/10/2013 21:07:06
Quote from: Crimson Wizard on Tue 22/10/2013 19:01:58
On other hand, it may happen that windowed mode supports higher scaling than fullscreen.
For example, my display is 1680x1050, it can run 320x200 game on 1600x1000 (x5 filter) in window, but only 1280x800 (x4 filter) fullscreen.

Because you have to manually add that resolution to your drivers, I too have a 1680x1050 panel and my monitor sends an EDID to the drivers that lacks other obvious resolutions like 1440x900 and so on.
As soon as the resolution is available AGS should be able to use it.

- Alan
My driver does not support 1600x1000. (which is 320x200 multiplied by 5).
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Tue 22/10/2013 22:09:03
Quote from: Crimson Wizard on Tue 22/10/2013 08:07:01
Quote from: Knox on Tue 22/10/2013 01:21:12
Will transparency on text window make the cut?
It is already there.
Do I have to set something up for it to work? Right now if I try using my semi-transparent text window sprites, Im still getting a screwed-up looking shadow:
Spoiler
(http://i39.tinypic.com/ax02mc.png)
[close]
Background color is black (I'm assuming that's what we need to set? I tried magic pink and that didn't change anything):
Spoiler
(http://i39.tinypic.com/3092gjs.png)
[close]
Spoiler
(http://i42.tinypic.com/4ki7ba.png)
[close]
My sprites for the text window have been imported with alpha except for sprite #231, it is completly opaque and imported without transparency?:
Spoiler
(http://i41.tinypic.com/15rmyo3.png%5D)
[close]
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 22/10/2013 22:22:24
@Knox: it is in the code, but not in beta 8.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 22/10/2013 22:33:45
Out of curiosity, would it be hard for this "max" scaling in windowed mode to maximize the window (so it covers the entire screen) and have a black border around the game area?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 22/10/2013 22:38:28
Quote from: Radiant on Tue 22/10/2013 22:33:45
Out of curiosity, would it be hard for this "max" scaling in windowed mode to maximize the window (so it covers the entire screen) and have a black border around the game area?
It is possible with custom display branch: http://www.adventuregamestudio.co.uk/forums/index.php?topic=47344.msg636462609#msg636462609
It is not finished properly yet.
There are too many things I started and I could not find time to get them all together.
That's really annoying... :~(
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 22/10/2013 22:55:18
Ok, never mind then. Stable build comes first.

Last question: if a room's walkable areas are complicated and strung out enough, then moving from one end to the other will cause the pathfinding algorithm to eventually give up and move the character in the general direction but not towards the specified destination (e.g. make a W-shaped or WW-shaped zig zagging walkable, position player in top left corner and have him Walk() to top right corner). This strikes me as by design, because pathfinding would otherwise take up too much processor time, so it presumably stops after N interations for some constant N. So my question is, assuming it works this way, is the value of N something that makes sense for computers ten years ago, and should that value perhaps be increased for current computers to make pathfinding more accurate?
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Wed 23/10/2013 04:15:14
Quote from: Crimson Wizard on Tue 22/10/2013 22:22:24
@Knox: it is in the code, but not in beta 8.

Ah gotcha! :-[
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 23/10/2013 08:01:32
Quote from: Knox on Wed 23/10/2013 04:15:14
Quote from: Crimson Wizard on Tue 22/10/2013 22:22:24
@Knox: it is in the code, but not in beta 8.

Ah gotcha! :-[

No problem, I should have been more clear actually.


Uhh, I need to gather all known problems. This is what I remember:
1) Re-ordered dialogs mess up the option-answer links.
2) SetMusicMasterVolume does not allow to set real volume of 0.
3) Blinking of the script window in the editor which happens when asteriks is being put or removed from the pane title to notify of existing/none unsaved modifications. For some reason Tzachs could not reproduce this, although I see it clearly at all times. Can anyone else confirm this is happening?
4) Couple of bugs posted in the tracker recently (broken compatibility with existing games).

Anything else?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 23/10/2013 10:35:45
Possibly include script name in NewRoom/Cutscene error messages, and it would be nice if "SetGameOption(OPT_OLDTALKANIMSPD, 0)" worked in the code, but I believe using "SetGameOption(39, 0)" does the trick too. I believe the issue with SpeechAnimationDelay and Sierra-style speech was fixed? That's it for me, thank you for your time :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 23/10/2013 16:10:24
Small update: http://www.mediafire.com/download/5lo3pj0ntbqr6da/acwin.exe
Changed the look of "max" filter, and this should be there too:
Quote from: Radiant on Wed 23/10/2013 10:35:45
Possibly include script name in NewRoom/Cutscene error messages,

I might as well say this: I fear some people will certainly ask why there's no "max anti-aliased filter" or "max hqx filter". The answer is that in order to implement nicely customizable selection properly I'd had to rewrite quite a few things there. ATM I added this option with quick hack, and I cannot make myself do more similar hacks, this literally hurts me :(.
So, other time maybe. (Then again, with free resolution selection many things will change anyway)


Quote from: Radiant on Wed 23/10/2013 10:35:45
and it would be nice if "SetGameOption(OPT_OLDTALKANIMSPD, 0)" worked in the code,
After monkey_05_06's changes this will be Speech.UseGlobalSpeechAnimationDelay (true/false) and Speech.GlobalSpeechAnimationDelay (value).
E: Although I wonder why would you need to change that at runtime? Some kind of user option?
Title: Re: AGS 3.3.0 Beta Release
Post by: selmiak on Wed 23/10/2013 17:37:31
@knox:
As far as I can see from here the shadow on your sprite 547 has much less opacity than the shadow on image 549 ;)
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Wed 23/10/2013 17:45:53
Quote from: selmiak on Wed 23/10/2013 17:37:31
@knox:
As far as I can see from here the shadow on your sprite 547 has much less opacity than the shadow on image 549 ;)
Ha, nice catch! I forgot to re-import sprite 547 :P
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 23/10/2013 17:47:06
Quote from: Crimson Wizard on Wed 23/10/2013 16:10:24
E: Although I wonder why would you need to change that at runtime? Some kind of user option?
To put in #ifver blocks for e.g. templates.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Thu 24/10/2013 02:06:36
Quote from: Radiant on Wed 23/10/2013 10:35:45
Possibly include script name in NewRoom/Cutscene error messages, and it would be nice if "SetGameOption(OPT_OLDTALKANIMSPD, 0)" worked in the code, but I believe using "SetGameOption(39, 0)" does the trick too.

Quote from: Radiant on Wed 23/10/2013 17:47:06
Quote from: Crimson Wizard on Wed 23/10/2013 16:10:24
E: Although I wonder why would you need to change that at runtime? Some kind of user option?
To put in #ifver blocks for e.g. templates.

Even adding that now wouldn't change the built-in headers of old AGS versions, so you still wouldn't be able to use SetGameOption(OPT_OLDTALKANIMSPD, 0) prior to 3.3.0. And as CW mentioned, for 3.3.0 and later versions this is equivalent to setting Speech.UseGlobalSpeechAnimationDelay = false;. The game.talkanim_speed variable is being deprecated in favor of Speech.GlobalSpeechAnimationDelay, but of course the older variable will still be available to game scripts for backwards-compatibility reasons. In the next release I'd actually like to wrap a lot of the game.* variables and SetGameOption settings in new, proper settings and deprecate their usage entirely (e.g., must have "Enforce object-based scripting" set to false to use them).

Quote from: Radiant on Wed 23/10/2013 10:35:45I believe the issue with SpeechAnimationDelay and Sierra-style speech was fixed? That's it for me, thank you for your time :)

As per CW's findings, anything compiled with 3.1.2 or earlier versions, game.talkanim_speed was ignored for Sierra-style speech which always had a fixed delay of 5. Anything compiled with 3.2 or 3.2.1 would respect game.talkanim_speed for Sierra- and LucasArts-style speech. 3.3.0 maintains this behavior, depending on what version the game was compiled with. Moving forward (games compiled with 3.3.0 and later) will preserve the 3.2+ behavior, and can be modified using the appropriate settings of the Speech class.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 24/10/2013 20:44:52
Quote from: monkey_05_06 on Thu 24/10/2013 02:06:36As per CW's findings, anything compiled with 3.1.2 or earlier versions, game.talkanim_speed was ignored for Sierra-style speech which always had a fixed delay of 5. Anything compiled with 3.2 or 3.2.1 would respect game.talkanim_speed for Sierra- and LucasArts-style speech. 3.3.0 maintains this behavior, depending on what version the game was compiled with. Moving forward (games compiled with 3.3.0 and later) will preserve the 3.2+ behavior, and can be modified using the appropriate settings of the Speech class.
I don't quite follow this. Do you mean that it's possible to take a game compiled with 3.2 and run it with 3.3? Or that the behavior of the 3.3 editor is different if you import your game from an earlier version? Or something else?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 24/10/2013 21:28:41
To put this simply: everything should be fine. :)

The only difference in behavior would be when you import 2.72 project into 3.+: the Sierra speech will start using global speech delay setting (therefore your code from ATOTK and HQ3 will work properly in 3.+).
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 24/10/2013 21:31:57
Yay!
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 26/10/2013 21:06:10
Minor editor bug: the Output log is not cleared when you load another project.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 27/10/2013 13:29:18
@Radiant, regarding SetMusicMasterVolume.

I made a stupid mistake not fully testing how previous versions of AGS really worked prior to making assumptions. Problem also is that I never made any real game with pre-3.0 AGS.
I made a test game in 2.72 and found that SetMusicMasterVolume acts exactly as in 3.3.0.
As hinted in the manual:
Quote
SetMusicMasterVolume (int volume)
Sets the overall music volume, from 0-100. This is slightly modified by the individual room volume settings.

The only way to mute the music completely is to do two calls:
Code (ags) Select

SetMusicVolume(-3); // set room volume factor to "quietest".
SetMusicMasterVolume(0); // set master volume to 0



E: Another thing is that the room volume setting does not save when player leaves room, so you'll have to keep track of it with some global variable and apply at every room load event... Unless I miss some easier solution; but, as I said, I never made a game with 2.72.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 27/10/2013 13:42:51
Yes. The problem with that approach is that you'd have to repeat SetMusicVolume(-3) whenever the player enters a new room, and that the music may 'spike' to the louder volume while the room is loading. That lasts only a few milliseconds but it's audible.

The point, however, is that if a player sets master volume to zero, the reasonable expectation is for the volume to be zero. If you want to preserve the current way things work, then I would like to request that SetMusicMasterVolume accepts parameters between -60 and 0 (which would currently abort the game with an error message), since the function's internals set the actual volume to the parameter plus sixty anyway. Then the old behavior is preserved, and people can do SMMV(-60) to make the music actually quiet.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 27/10/2013 14:21:33
Yes, I see your point now, that could be reasonable; I guess CJ did not want to mess with the old audio system anymore (and frankly I feel reluctant to do so myself).

However, I think I found a better alternative for you ;). Try this:
Code (ags) Select

Game.SetAudioTypeVolume(eAudioTypeMusic, NEW_VOLUME_VALUE, eVolExistingAndFuture);

Damn, no, this not working properly with PlayMusic function :~(...
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 27/10/2013 17:45:20
Quote from: Radiant on Sun 27/10/2013 13:42:51
Yes. The problem with that approach is that you'd have to repeat SetMusicVolume(-3) whenever the player enters a new room, and that the music may 'spike' to the louder volume while the room is loading. That lasts only a few milliseconds but it's audible.

I tried setting this in "OnLoad" (aka Before Fade-in) room event, and it caused no volume spikes. Can you try that out?
If that still not working (although I'd consider this is a wrong behavior then...), I can make the change you ask for. Actually, that would need  minimal volume = -210 to compensate both +60 adjustment and the max room volume setting.

E: No, I am wrong. I emulated longer loading times and I now clearly see hear music volume "spike". I will go for SetMasterMusicVolume fix.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 27/10/2013 19:43:25
AGS 3.3.0 BETA 9 released (engine version 3.3.0.1146)
-------------------------------------------------------
Hmmmm, this takes tad longer that I hoped for, but there's definitely the finish somewhere out there.

-------------------------------------------------------
Changes from BETA 8:

Features:
- Custom text windows now support alpha blending;
- Custom dialog options GUI now supports alpha blending;
- New property in DialogOptionsRenderingInfo class:
Code (ags) Select

/// Should the drawing surface have alpha channel
bool HasAlphaChannel;

You must set it in "dialog_options_get_dimensions" function, the one where you normally define size and position of the drawing surface. Default is False.
- The "Old-style game-wide speech animation speed" game setting (in "Backwards compatibility" group) is replaced with two settings in "Dialog" group: "Use game-wide speech animation delay" (true/false) and "Game-wide speech animation delay" (value).
Also added related properties in Speech class:
Code (ags) Select

/// Gets/sets global speech animation delay (if using global setting).
int  GlobalSpeechAnimationDelay;
/// Gets/sets whether speech animation delay should use global setting (or Character setting).
bool UseGlobalSpeechAnimationDelay;

- SetMusicMasterVolume() legacy script function now accepts volume values between -210 and 100 respectively (was between 0 and 100); this may be used as a workaround for guaranteed music mute if you imported old project and do not want to convert to new audio system;
- Defaulted threaded audio option to False for desktop builds (Linux & Windows). You may enable it by manually adding an option in "sound" section of acsetup.cfg:
Code (text) Select

[sound]
threaded = 1

- Added "Max nearest-neighbour filter" option to filter list in winsetup. This corresponds to manually setting "gfxfilter" option to "max" in acsetup.cfg. If this option is selected, AGS will choose the maximal possible scaling filter your graphics driver supports.
- Added more useful information to error messages related to incorrect NewRoom, RunDialog, StopDialog, StartCutscene and GetGameParameter calls.

Bug fixes:
- Fixed dialog script pane missing a syntax highlight on certain occasions (regression);
- Fixed game compilation error which occured after project items are re-ordered with drag&drop (regression);
- Fixed incorrect gui name convertion, which occured when importing a 2.72 project (regression);
- Fixed "savegameindex[]" array was declared with incorrect size (20, while it must be 50).
- Fixed crash in RawClearScreen() script function (regression);
- Fixed incorrect behavior of the RawDrawImageTransparent() script function (regression);
- Fixed return value of the AudioChannel.PositionMs for MOD/XM clips;
- Fixed error which occured when old-style strings were assigned to new String variable, or compared with each other using '==' and '!=' operators (regression);


Download links (also updated at first page):
EXE:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta9.exe
ZIP:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta9.zip
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 27/10/2013 19:57:40
Awesome! Does this count as an RC? :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Sun 27/10/2013 20:59:12
CW! The new CJ! Lol. Nice job for all parties involved! Thanks for all your hard work guys.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 29/10/2013 01:18:55
I think I found a bug...
In this block of code, on the line "if ((here >= 30...", the compiler breaks with the error "Line too long (max line length = 500)". This code hasn't been changed in awhile and worked fine in the previous build, and the line is clearly shorter than 500 characters. I'm not sure what's going on here.

Code (ags) Select

      if (action == 1 || action == 4) clickx = -1;
      CallRoomScript (action * 100 + spot);
      if (action == 2 && spot == 0) {
        // the next line
        if ((here >= 30 && here <= 33) || here == 60 || here == 70 || here == 75 || here == 76 || here == 80 || here == 81 || (here == 82 && scene[LIFFY] < 8) || (here >= 83 && here <= 93)) {
          if (player.View != EGOWALK && player.View != EGOSNEAK && player.View != EGORUN) {
            message ("This is not a good time to make snowballs.");
          } else {
            // snipped
          }
        }
      }
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 29/10/2013 01:23:45
Wait... 'here' is a macro that's #defined as " character[GetPlayerCharacter ()].room ", so I suppose that does make the line too long (edit) And changing it to "player.room" solves the error. Nevertheless this error did not occur in earlier builds.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 29/10/2013 02:22:30
Bug: changing the bundling type of the audio (sounds) folder from "in exe" to "in vox" doesn't change the bundling type of all individual sounds within that folder. There should be a way to do this centrally, without selecting each sound effect individually and changing them one by one.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 29/10/2013 07:14:03
Quote from: Radiant on Tue 29/10/2013 02:22:30
Bug: changing the bundling type of the audio (sounds) folder from "in exe" to "in vox" doesn't change the bundling type of all individual sounds within that folder. There should be a way to do this centrally, without selecting each sound effect individually and changing them one by one.
That's not a bug, that's lack of feature.
The type's property sais "DefaultType", and as all other default properties it is applied to all clips added afterwards, but not to the existing ones.
There probably could be an item in the context menu which changes the type, or maybe editor should allow to select multiple items and change their properties at once.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 29/10/2013 10:46:53
I'm curious why anyone would want some sound effects in the executable and other sound effects in the audio.vox file?

Maybe the type of individual audio files should default to "inherit from folder" so that if you change DefaultType on the folder they will still use that.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 29/10/2013 10:53:19
Quote from: Radiant on Tue 29/10/2013 10:46:53
Maybe the type of individual audio files should default to "inherit from folder" so that if you change DefaultType on the folder they will still use that.
That's a good idea.

Same for "Bundling type".

By the way, have you noticed that you can move your sounds to VOX with "Bundling type" property?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 29/10/2013 11:55:18
Yes, but I'd have to do 200 sound effects one by one :)

We found an issue with the "max" filter. On windowed mode, it works fine; on full screen, however, it seems to pick the wrong resolution somehow. The desktop is 1920x1080, and in fullscreen it's trying to run 1280x800 (a different aspect ratio) and it places horizontal bars at the top and bottom, making the game appear squashed. That's one of the testers, anyway; on my screen it does work. I'm curious what method it uses to pick the "best" resolution at fullscreen?

(edit) Assuming the game runs in 320x200 or 640x400, it would make sense to prioritize screen resolutions that match this aspect ratio; I'm not sure if that's what happens.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 29/10/2013 12:29:49
Hmm, well, that option does not applies resolution on its own, it chooses the max multiplier that fits in screen.
Therefore the resolution it will try to apply will be exactly (320x200) * N.
What happens next is other issue... sometimes engine may try to change resolution if it failed to apply chosen one. We have also received report that on some occasions the graphics driver automatically switches resolution: http://www.adventuregamestudio.co.uk/forums/index.php?issue=440.0

Some info could be seen in the log.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 29/10/2013 12:58:15
Ok, here's the logfile from running fullscreen:

Spoiler

Adventure Game Studio v3.3 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2013 others
ACI version 3.3.0.1146

***** ENGINE STARTUP
Installing exception handler
Reading config file
Initializing allegro
Setting up window
Initializing game data
Game data file: e:/Data/Games/HQ/Demos/November2013/HQ3.exe

Initializing TTF renderer
Initializing mouse
Checking memory
Initializing speech vox
Initializing audio vox
Initializing keyboard
Install timer
Initialize sound drivers
Install exit handler
Initialize path finder library
Load game data
You'd Beta Shape Up
Checking for disk space
Initializing screen settings
Init gfx filters
Detecting maximal supported scaling
Applying scaling filter: StdScale4
Init gfx driver
Switching to graphics mode
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1920 x 1080
Widescreen side borders: disabled (not necessary, game and desktop aspect ratios match)
Attempt to switch gfx mode to 320 x 200 (32-bit)
Succeeded. Using gfx mode 320 x 200 (32-bit)
Preparing graphics mode screen
Initializing colour conversion
Check for preload image
Initialize sprites
Set up screen
Initialize game settings
Prepare to start game
Audio is processed on the main thread
Checking replay status
Engine initialization complete
Starting game
Loading room 1
***** ENGINE HAS SHUTDOWN
[close]
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 29/10/2013 13:09:24
Heh, I forgot this version does not write real resolutions, but emulated ones. Anyway, this is irrelevant.

I think this problem should usually be solved by setting "enable side-borders" option in setup, which must be set by default for 320x200 games.
I now recall Ali mentioned the bug, which caused game to fail detect when side-borders actually needed.

This log entry should not be there, it means the engine failed to detect a difference in ratios:
Quote
Widescreen side borders: disabled (not necessary, game and desktop aspect ratios match)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 29/10/2013 14:11:10
You mean 'side borders on widescreen monitors', yes? I think it is enabled actually; it's not printed in acsetup.cfg but its default value is 'on' in winsetup.exe. We'll try forcing it by adding 'sideborders=1' to acsetup.cfg.

And that doesn't work. Omitting it, or setting it to 1 in the cfg file, gives "Widescreen side borders: disabled (not necessary, game and desktop aspect ratios match)", whereas setting it to 0 in the cfg gives "Widescreen side borders: disabled in Setup".
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Tue 29/10/2013 16:13:40
Not too sure if I should have put this here instead:

Everything works ok with alpha on the text windows, however I'm using the SSH's GuiPortrait v1.00 to display speech and it doesn't seem to work with that module (GSay function)http://www.adventuregamestudio.co.uk/forums/index.php?topic=34996.0 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=34996.0)...I also tested with the standard .Say funtion and the alpha doesn't seem to work either.

Gsay with GuiPortrait module (also standard .Say):
(http://i39.tinypic.com/4l0dg4.png)

Normal text display works perfectly fine though since your last changes with Beta9:
(http://i40.tinypic.com/1zpodpx.png)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 29/10/2013 19:06:39
@Knox, sorry, I've read your post in other thread, but could not find time to look into this until now.

@Radiant, I changed how it detects the diff in the ratios, yet there's still not 100% guarantee the borders will be added, because this build requires resolution height to stay the same, so it all depends on what resolutions are supported.

Please, replace the engine: http://www.mediafire.com/download/3q6b28afpkyzced/acwin.exe
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 29/10/2013 20:23:06
I believe monitors have a function that enumerates display resolutions; wouldn't it help to simply use that? Then out of those, pick the highest supported multiple of the game resolution (if none, pick the highest supported multiple of the game's vertical resolution and the lowest corresponding horizontal resolution that still fits). Anyway, I've sent this off to the testers.

Incidentally, I'm getting this in my script now: "import int IntVar_Global_1;" as an automatically converted interaction variable. It doesn't seem to do anything, but what is it for?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 29/10/2013 20:32:37
Quote from: Radiant on Tue 29/10/2013 20:23:06
I believe monitors have a function that enumerates display resolutions; wouldn't it help to simply use that? Then out of those, pick the highest supported multiple of the game resolution (if none, pick the highest supported multiple of the game's vertical resolution and the lowest corresponding horizontal resolution that still fits).
But that is what it currently does.

Quote from: Radiant on Tue 29/10/2013 20:23:06
Incidentally, I'm getting this in my script now: "import int IntVar_Global_1;" as an automatically converted interaction variable. It doesn't seem to do anything, but what is it for?
Hmm, maybe a forgotten global variable?
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Tue 29/10/2013 20:33:13
The IntVar_Global_1 is an artifact from projects imported from 2.72 to the 3.x branch of the editor. Unless you were using the 2.72 graphical interaction variables via the Interaction Editor then it can be safely deleted. You can check by just searching for "IntVar_Global_1". Likely the only usages are where it's defined, where it's exported, and where it's imported. I think this is created even if the project didn't have any graphical variables.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 29/10/2013 20:35:00
But I never even used the interaction editor :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 29/10/2013 21:03:11
Anyway, the new version doesn't help this particular person; it goes to 1280x800 which the monitor does support but displays awkwardly. It seems to actually use a 1280x1000 mode and display the screen vertically centered, but I think it's the monitor hardware doing that, not the DX9 software. I'm not sure how else to solve this, other than by coding fullscreen mode as "windowed, but with the window maximized and some black padding between the game's size and the screen size"; I think that's how many 2D games do fullscreen these days.
Title: Re: AGS 3.3.0 Beta Release
Post by: monkey0506 on Tue 29/10/2013 21:21:10
Quote from: Radiant on Tue 29/10/2013 20:35:00But I never even used the interaction editor :)

But this was a 2.72 project originally?

Quote from: monkey_05_06 on Tue 29/10/2013 20:33:13I think this is created even if the project didn't have any graphical variables.

And there were definitely cases where using the Interaction Editor was unavoidable (e.g., any type of character, object, hotspot, inventory, etc. interactions), even if you just added a "Run script" interaction for those events. :P
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Wed 30/10/2013 00:04:40
Quote from: Crimson Wizard on Tue 29/10/2013 19:06:39
@Knox, sorry, I've read your post in other thread, but could not find time to look into this until now.

NO problem Crimson! Thanks so much for your work. I tested the new acwin and it works perfectly! Yes! ;-D
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 30/10/2013 03:50:33
With the new build, we're occasionally getting this error which I'd never seen before: "error: Out of memory: failed to allocate 903224498 bytes (at PP=77)"
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 30/10/2013 22:43:09
Quote from: Radiant on Wed 30/10/2013 03:50:33
With the new build, we're occasionally getting this error which I'd never seen before: "error: Out of memory: failed to allocate 903224498 bytes (at PP=77)"
Did it start to happen with beta 9, or after last engine update?
Do you have any crash dumps?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 30/10/2013 22:56:29
It started happening with the most recent update. Something that might be relevant is that I changed sprite cache from 20 Mb to 100 Mb in the setup? (edit: no, it's not that)  I'll see if I can obtain a dump file.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 31/10/2013 00:20:02
Can you tell us what a crash dump file is called and where it would be located? Or it might be the case that this kind of crash doesn't generate any? I'm asking because we can't find it.

We're also getting these "Warning: ChangeCharacterView was used while the view was fixed". Yes, that's a bug in my code; but if it's not too much trouble, it would really help if this message would specify a line number (or, I suppose, which character it applies to).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 31/10/2013 00:32:33
Hmm, I just found that crash dump is not written on "out of memory" error. :(
Is there any pattern for when and/or where this happens?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 31/10/2013 00:35:35
After playing for awhile. No, we can't consistently reproduce it. It appears memory slowly fills up until it crashes, and starting the game again and restoring solves the issue for awhile.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Fri 01/11/2013 15:17:26
If the game is set up for DirectX9, then running it on an (admittedly old) system without a 3D card present causes it to abort with the message "The requested adapter mode is not supported". I would expect the engine to try for DX5 if DX9 doesn't work.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Mon 04/11/2013 08:43:40
Awesome job on getting beta 9 out and thanks for the new fixes and improvements!

CW, do you think it may be possible to look into the issue I mentioned earlier where multi-threaded audio throws off the timing of Pamela lip-syncing audio? I'm planning a major release with this newest 3.3.0 build (which should be a good public stress test for it), but at the moment I'm forced to trade-off between non-skipping music with inaccurate lip-syncing and skipping music with perfect lip-syncing. It would be ideal to have non-skipping music and perfect lip-syncing.

Might it be possible to implement a simple variable timer that runs alongside playing speech audio (i.e. have the .pam file take its timing cues from this timer, rather than directly from the audio file) as I talked about in more detail here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636469876#msg636469876

Otherwise, as an alternate solution, how about enabling multi-threaded audio, but excluding all speech audio so that it's not affected by mult-threading?
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Mon 04/11/2013 10:19:38
Hmmm and another fatal editor crash to report. This happened when I tried to copy and paste some text from the forum here into an AGS room script.

The Editor panes jittered around for a bit while it was attempting the to paste the text, and then the following crash error message appeared. At the time, my Windows clipboard was locked and I couldn't PrintScreen any screenshots or text so I had to take a couple of photos of the error message with my phone and stitch them together.

(http://www.himalayastudios.com/scratch/AGS_clipboard_Crash.jpg)

After I clicked the error message away, the editor remained open (gave me the warning that I should close it or risk corrupted files), and at that point the text I'd pasted appeared in the room script.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 05/11/2013 22:33:30
Sorry, I was busy lately...

@Radiant: I made another build which writes dumps when "out of memory" error occurs, please use it.
The dump will be written in the folder with game exe (or maybe your project folder, if you run from editor):
http://www.mediafire.com/download/930wuikbjj8zzh5/acwin.exe
I should also note that I am not sure this is because of "slowly filling memory". The large number you posted (903224498 bytes) is not total bytes the program allocated, it is the one-time growth it tried to get. Meaning, there was something that occasionally requested about 1 GB of mem. I suspect this is simply some arithmetic error or memory corruption, like buffer overflow, that caused this number to be used.


Regarding threaded audio and proper scaled display issues. Both will require more work. Custom resolutions are WIP, and not tested with ports yet, and will probably require updating OpenGL driver for consistency (which seem to be WIP on its own), and rewriting winsetup.
Don't know much about threaded audio, that might be not difficult, but still require rewriting parts of logic, and threading is a pretty delicate area.
We need to have some decision on whether to delay 3.3.0 until these are done, or wait until future update, like 3.3.1 (which may be commenced being developed before final 3.3.0 release in a parallel branch). In any case I strongly reject idea to put any more "quick fixes" in the code, not only because it's generally bad, but also because this becomes annoying: for all these will be substituted in the not so far future anyway, and it feels like plugging holes in the ship while there's definitely a new ship planned to be built soon (lol, I guess you can get what I mean).
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 05/11/2013 23:08:46
Thank you, we'll get you a log file.

As discussed earlier in this forum, I feel it is time for a new stable AGS build, so new feature requests (including mine, of course) should be moved to a future build like 3.4.0 instead. After all, AGS3.3 has been in beta since April, and the current stable version (3.2.1) dates from 2011. Time to go fully live with all the new features of the last two-and-a-half years!
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 05/11/2013 23:12:05
Maybe, I am just getting bit worried when people have problems like that when finishing their games.

BTW, dump file will be called "CrashInfo.3.3.0.1146.dmp" (even though there's no crash, AGS just uses that name by default).
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Wed 06/11/2013 06:57:46
Yeah, if it's a significant amount of work, then I'd agree with Radiant and say it's probably best to release 3.3.0 first. While it would be handy, it's not the end of the world, and I suppose I can release another updated version once multi-threading is addressed.

One question, though. If I compile and released the game with 3.3.0, and then later put out an updated version compiled with 3.3.1 (or whatever the number will be), if multi-threading is addressed between these versions, is that likely to invalidate players' savegames from 3.3.0?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 06/11/2013 07:14:47
Quote from: AGD2 on Wed 06/11/2013 06:57:46
One question, though. If I compile and released the game with 3.3.0, and then later put out an updated version compiled with 3.3.1 (or whatever the number will be), if multi-threading is addressed between these versions, is that likely to invalidate players' savegames from 3.3.0?
As of current state there's no difference in how game is saved. There could be other reasons why savedgame format may change, but there's always a way to convert saves either at runtime or with a stand-alone utility.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 06/11/2013 08:18:42
http://crystalshard.net/test/CrashInfo.3.3.0.1146.dmp - here you go.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 06/11/2013 14:05:07
Here's a weird little bug: if you create a 320x200 room, then create an object with a sprite set for 640x400 resolution and is 210 pixels high, and place it at Y=200; then the vertical middle of the sprite will align to Y=200, whereas normally, the object's bottom aligns to Y=200. So the object is shown too low on screen, both in the editor and in the runtime. Apparently object Y placement doesn't account for the fact that it's made for 640x400 rather than 320x200. Of course, people shouldn't be doing that in the first place (I only did it because I clicked the wrong resolution setting by accident).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 06/11/2013 20:59:37
Quote from: AGD2 on Mon 04/11/2013 08:43:40at the moment I'm forced to trade-off between non-skipping music with inaccurate lip-syncing and skipping music with perfect lip-syncing. It would be ideal to have non-skipping music and perfect lip-syncing.
I might be forgetting something, what is this "skipping music" problem, when does it happen? I was thinking that maybe there's just not enough music polls during some lengthy processes. In which case all we need to do is to update music more frequently.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 06/11/2013 21:37:15
Omg, omg, omg, I made such a stupid and terrible mistake. This is almost a miracle that it did not screw anything earlier.
That memory allocation problem was caused by the string buffers growing endlessly on some occasions.

Fixed engine: http://www.mediafire.com/download/9moabyjfp8mjdp0/acwin.exe


E: The error can be reproduced very easily with Heroine Quest: start dialog with Hervor, choose any option, then concede talking, then repeat. After about 3-4 minutes of repeating this your computer memory will become eaten.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Thu 07/11/2013 04:02:03
QuoteI might be forgetting something, what is this "skipping music" problem, when does it happen? I was thinking that maybe there's just not enough music polls during some lengthy processes. In which case all we need to do is to update music more frequently.

By "skipping music" I just meant the way that the music stutters for a few moments sometimes when you change rooms or play an intensive animation etc. I should have said "stuttering music", which is a more accurate description.

--EDIT--
After putting the new acwin.exe into my AGS folder and using CTRL+F5 to test the game, I get a pop-up box saying, "The publisher could not be verified Are you sure you want to run this software?" before the game will run, which applies to the game exe file in the games "_Debug" sub-folder. It doesn't seem to happen if I compile normally with F7 and run the exe from the "Compiled" folder, though.
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Thu 07/11/2013 12:21:00
Quote from: AGD2 on Thu 07/11/2013 04:02:03
I get a pop-up box saying, "The publisher could not be verified Are you sure you want to run this software?"

I'm pretty sure all you have to do is right-click properties for acwin.exe and in the compatibility tab select "run as administrator"
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 07/11/2013 13:13:18
IIRC AGS should not require administrative rights to run?


UPD: I think this is just Windows protecting us from exes downloaded from the web.
Try downloading in archive: http://www.mediafire.com/download/wijq93b19e431vv/acwin.7z


UPD2: I found out that Win detects exes in zip archive too, but not in 7z. Either it can scan zips but not 7zs, or has list of "dangeorous" extensions.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Thu 07/11/2013 20:03:08
Yeah, I just found it odd that it only started popping up this error message after I put this newest acwin.exe in my AGS directory. I don't recall Windows ever complaining like this about previous versions that I downloaded separately from the web.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 07/11/2013 20:12:25
Quote from: AGD2 on Thu 07/11/2013 20:03:08
Yeah, I just found it odd that it only started popping up this error message after I put this newest acwin.exe in my AGS directory. I don't recall Windows ever complaining like this about previous versions that I downloaded separately from the web.
I don't know how this works in detail. I just made a test with original 3.2.1 acwin.exe, uploaded it to the file hosting and downloaded back. And it gave same warning on start. I think Windows marks files somehow when they are downloaded like that. Perhaps it does not find them suspicious when they are in larger packages... just a random thought.
Title: Re: AGS 3.3.0 Beta Release
Post by: SpeechCenter on Fri 08/11/2013 08:18:53
It depends on the software that adds the file, any file can be marked with a different zone which will pop up the security warning if attempting to open it.
See this very thorough answer here http://superuser.com/questions/323933/how-does-windows-security-warning-do-you-want-to-run-this-file-work
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Fri 08/11/2013 17:14:36
Quote from: AGD2 on Mon 04/11/2013 10:19:38
Hmmm and another fatal editor crash to report. This happened when I tried to copy and paste some text from the forum here into an AGS room script.
Yeah, it happened to me too once.
The next version will catch this error so it wouldn't crash the editor.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 08/11/2013 17:46:46
And script window flicker - it is gone! Wooo! (laugh)
Title: Re: AGS 3.3.0 Beta Release
Post by: selmiak on Fri 08/11/2013 18:39:52
;-D
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Fri 08/11/2013 20:27:56
Just got this one when I used CTRL+F5 to test the game, and clicked away from AGS to another window while it was compiling (I use a dual monitor setup). I've never seen this happen before, but it seemed to interrupt the compile process somehow, and then returned to the editor with this crash:

QuoteError: The operation was canceled by the user
Version: AGS 3.3.0.1146

System.Exception: The operation was canceled by the user ---> System.ComponentModel.Win32Exception: The operation was canceled by the user
   at AGS.Editor.Tasks.RunEXEFile(String exeName, String parameter, Boolean raiseEventOnExit)
   at AGS.Editor.Tasks.TestGame(Boolean withDebugger)
   at AGS.Editor.InteractiveTasks.TestGame(Boolean withDebugger)
   --- End of inner exception stack trace ---
   at AGS.Editor.InteractiveTasks.TestGame(Boolean withDebugger)
   at AGS.Editor.Components.BuildCommandsComponent.TestGame(Boolean withDebugger)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   at AGS.Editor.MainMenuManager.MenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
   at System.Windows.Forms.ToolStripManager.ProcessCmdKey(Message& m, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sat 09/11/2013 21:49:57
There's a graphical glitch with the Nearest Neighbor filter: it is not applied to characters. If using (e.g.) the 4x NN filter, then each pixel in the game is displayed as a 4x4 block of pixels on the screen. However, characters if zoomed use the full resolution, not 4x4 blocks. It appears the graphical operations are performed in the wrong order: the character is enlarged to 400% first, then reduced from there to account for scaling; whereas it should be the other way around; this discrepancy simply looks odd, as if the characters use a higher resolution than the backgrounds. I haven't checked, but this likely also applies to objects.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sat 09/11/2013 22:11:38
Another graphical glitch: if a GUI button is set to "no clipping" then images can indeed appear bigger than the button itself. However, text will not. When using truetype fonts that are slightly bigger than the button, this looks fine in the editor but is clipped in the game.

Furthermore, vertical alignment of truetype fonts on a button is off: if the the text alignment of a GUI button is set to 'bottom middle', then it is possible for 'tall' letters like the J to extend a few pixels below the bottom of the button (meaning they are clipped, as per above). It appears that vertical alignment looks at the bottom of standard letters like 'a' and 'o'.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 10/11/2013 00:06:33
Quote from: Radiant on Sat 09/11/2013 22:11:38
Another graphical glitch: if a GUI button is set to "no clipping" then images can indeed appear bigger than the button itself. However, text will not.
That's not a glitch, that's a proper behavior; like stated in manual the ClipImage property only control whether image is clipped or not:
Quote
bool Button.ClipImage;

Gets/sets whether the button clips its image to the button boundaries.
For example, if the button is sized 30x30, but its Graphic is a 50x50 image, then this property controls whether the image is allowed to spill over the edge of the button.
Title: Re: AGS 3.3.0 Beta Release
Post by: selmiak on Sun 10/11/2013 03:11:15
i know feature requests are over, but imho this is a really quick fix.
When I have a 320x200 game in ags 3.2.1 and make a new gui the new gui is always only 300 pixels wide on default. This is really annoying. I haven't checked on higher resolutions and afaik there is no way to set the default new gui size in general settings. Just let the new gui width default to 320px and not 300px width. I came to the conclusion I use fullscreen Guis and non fullscreen guis in almost equal amounts. So 50% of the guis I create are fullscreen (fullscreen menu screens, colored guis for fading effects) while I have to change the width for all various widths of non fullscreen guis anyways, and none of them ended up being 300 px wide. Why 300 and not 320 anyways?
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Sun 10/11/2013 08:40:21
Quote from: Radiant on Sat 09/11/2013 21:49:57
There's a graphical glitch with the Nearest Neighbor filter: it is not applied to characters. If using (e.g.) the 4x NN filter, then each pixel in the game is displayed as a 4x4 block of pixels on the screen. However, characters if zoomed use the full resolution, not 4x4 blocks. It appears the graphical operations are performed in the wrong order: the character is enlarged to 400% first, then reduced from there to account for scaling; whereas it should be the other way around; this discrepancy simply looks odd, as if the characters use a higher resolution than the backgrounds. I haven't checked, but this likely also applies to objects.

Some games use this 'feature' in conjunction with a NN filter as a way to display higher resolution characters while keeping the game backgrounds at 640x400 (we used this trick in both Al Emmo and Mage's Initiation). Disabling it would destroy the pixel artwork in the latter game. So, if this is going to be 'fixed', it would be necessary to make it an optional setting for any games that rely on the current behaviour.

Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 10/11/2013 09:17:18
Very well. In that case, please ignore that suggestion for 3.3.0 and consider it as an optional setting for 3.4.0 instead.

Come to think of it, the vertical font alignment I mentioned would also break backwards compatibility if changed, so please also consider some optional setting for 3.4.0.
Title: Re: AGS 3.3.0 Beta Release
Post by: Scavenger on Sun 10/11/2013 12:34:01
Quote from: Radiant on Sun 10/11/2013 09:17:18
Very well. In that case, please ignore that suggestion for 3.3.0 and consider it as an optional setting for 3.4.0 instead.

But it is a bug - I can't count how many times it's irked me playing a game and having the character explode into a million subpixels every time they scale. I don't think it looks good at all. I guess there could be an option in the config file if people really want it (hirescharacters=true?), but the regular operation of the nearest neighbour filter shouldn't do things like that.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 10/11/2013 13:42:31
Quote from: Scavenger on Sun 10/11/2013 12:34:01
Quote from: Radiant on Sun 10/11/2013 09:17:18
Very well. In that case, please ignore that suggestion for 3.3.0 and consider it as an optional setting for 3.4.0 instead.

But it is a bug - I can't count how many times it's irked me playing a game and having the character explode into a million subpixels every time they scale. I don't think it looks good at all. I guess there could be an option in the config file if people really want it (hirescharacters=true?), but the regular operation of the nearest neighbour filter shouldn't do things like that.

No, no, I believe Radiant is speaking about different thing:

Quote
Another graphical glitch: if a GUI button is set to "no clipping" then images can indeed appear bigger than the button itself. However, text will not. When using truetype fonts that are slightly bigger than the button, this looks fine in the editor but is clipped in the game.

The character problem is different, this is something I noticed too in some games, and it looks very weird indeed.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 10/11/2013 16:05:37
Radiant, I am sorry, I found I made the widescreen borders fix wrong, my previous change made it calculate incorrect wanted resolution.

This is an updated version:
http://www.mediafire.com/download/qyejemmk5i50ov7/acwin.7z

Now I was able to test it on my own computer too (because it suggested correct size, that was supported by my driver).
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Sun 10/11/2013 16:47:23
Quote from: AGD2 on Sun 10/11/2013 08:40:21
Quote from: Radiant on Sat 09/11/2013 21:49:57
There's a graphical glitch with the Nearest Neighbor filter: it is not applied to characters. If using (e.g.) the 4x NN filter, then each pixel in the game is displayed as a 4x4 block of pixels on the screen. However, characters if zoomed use the full resolution, not 4x4 blocks. It appears the graphical operations are performed in the wrong order: the character is enlarged to 400% first, then reduced from there to account for scaling; whereas it should be the other way around; this discrepancy simply looks odd, as if the characters use a higher resolution than the backgrounds. I haven't checked, but this likely also applies to objects.

Some games use this 'feature' in conjunction with a NN filter as a way to display higher resolution characters while keeping the game backgrounds at 640x400 (we used this trick in both Al Emmo and Mage's Initiation). Disabling it would destroy the pixel artwork in the latter game. So, if this is going to be 'fixed', it would be necessary to make it an optional setting for any games that rely on the current behaviour.

Like Scavenger says, this is a hideous bug that should be fixed ASAP, and I find the decision to deliberately inflict it on your game deeply disturbing. Plus, relying on players not changing the filter settings?! Madness!

Just make the game in the resolution you want the sprites to be. If you absolutely must have this awful effect, you can scale up the backgrounds from a lower resolution before importing them.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Sun 10/11/2013 19:28:56
The issue only becomes visible when the character sprites are scaled down. As soon as pixel art gets scaled smaller at the native resolution, the pixels begin to lose symmetry and the artwork becomes horribly jagged and blocky. So it comes down to a decision between blocky sprites or hi-res ones. In my view, the hi-res ones look much better in regards to keeping the pixel artwork intact.

The only other ways around this are to avoid scaling down the characters completely or to make batches of character animations that are optimized for various pre-set sizes. But I'm afraid that these two approaches aren't feasible (not for a game this size anyway). Of course, players can change the filter setting to "none", and the game will still play. They just won't see the optimal, intended result.

QuoteJust make the game in the resolution you want the sprites to be. If you absolutely must have this awful effect, you can scale up the backgrounds from a lower resolution before importing them.

The game has over 70 rooms at 640x400 resolution. scaling up the backgrounds to 1280x800 would increase the filesize dramatically. Why do that when a simple setting to achieve the same effect will suffice?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 11/11/2013 20:42:23
AGS 3.3.0 BETA 10 released (engine version 3.3.0.1148)
-------------------------------------------------------
A very small update, mostly fixing various bugs, both old and new ones.

-------------------------------------------------------
Changes from BETA 9:

Features:
- Speech overlays now support alpha blending; (God, I hope that's the last of them, and I did not miss anything else :))
- Windows version will now write crash dump on "out of memory error" to help diagnose the situation if this occured due bug in the engine.

Bug fixes:
- Fixed script window flicker that occured when the script was first time modified and when it was saved (regression);
- Fixed occasional crash that could occur when creating new room (regression);
- Fixed occasional crash that could occur when copy/pasting text in the script;
- Fixed moving room objects with keyboard in Room Editor did not work properly for hi-res games which used low-resolution coordinates setting (regression).
- Fixed DynamicSprite.CreateFromFile() function (regression).
- Fixed superfluous string buffer growth in the engine, that could eat all your memory in some cases (regression);
- Fixed side-borders that were not applied properly at newer (larger) widescreen resolutions;
- Fixed custom dialog options clickable area by correcting its horizontal coordinate range.

Compatibility:
- Fixed <=2.72 games crash that occured if character view missed "Up" loop (unlike 3.+ games, older ones had a fallback to use "Down" loop in such cases).


Download links (also updated at first page):
EXE:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta10.exe
ZIP:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta10.zip
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Mon 11/11/2013 21:48:13
Quote from: AGD2 on Sun 10/11/2013 19:28:56
The issue only becomes visible when the character sprites are scaled down. As soon as pixel art gets scaled smaller at the native resolution, the pixels begin to lose symmetry and the artwork becomes horribly jagged and blocky. So it comes down to a decision between blocky sprites or hi-res ones. In my view, the hi-res ones look much better in regards to keeping the pixel artwork intact.

The only other ways around this are to avoid scaling down the characters completely or to make batches of character animations that are optimized for various pre-set sizes. But I'm afraid that these two approaches aren't feasible (not for a game this size anyway). Of course, players can change the filter setting to "none", and the game will still play. They just won't see the optimal, intended result.

Just to be clear, we're talking about this kind of difference, right?

[IMGzoom]http://i.imgur.com/w3ge9ld.png[/imgzoom]
Aaaagh it burns!

[IMGzoom]http://i.imgur.com/OtW4Qyi.png[/imgzoom]
Phew that's better!
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Mon 11/11/2013 22:28:14
Yes, though the effect looks more pronounced on a low-res 320x200/320x240 background than it does on a 640x400/640x480 background.

[imgzoom]http://www.himalayastudios.com/scratch/hi-res_scaling.jpg[/imgzoom]
Title: Re: AGS 3.3.0 Beta Release
Post by: Daniel Eakins on Mon 11/11/2013 23:04:12
Yeah it's only a problem with 320x200/320x240 games.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 11/11/2013 23:22:29
Made a quick fix and re-uploaded beta 10. If you have already installed it, please consider to re-download.
The bug was related to paths containing unicode characters, engine appeared to fail working with them properly again (as it did back in the days of early 3.0), now fixed.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 12/11/2013 15:50:09
I just found a new bug in beta 10 with the editor.

If you click on a room object, and then edit its x or y values, the object's position will not move. It still moves if you click and drag it or select it and nudge it with the arrow keys, though.

The above also applies to the characters section in rooms.

--EDIT--

I just tried to change an inventory item's sprite by typing a new number into its "Image" text field, and it also didn't update. It only showed a new image if I manually selected one from the Sprite Manager. It seems that anything you type into these fields (regardless of what the field is) isn't being properly updated.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 12/11/2013 21:01:44
Oh dear... I somehow did not notice.

It appears that the change that fixed the panes flickering prevents the pane to update its visuals in time. You have to save the game / switch panes to make it update the view. :(
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Tue 12/11/2013 21:26:48
Quote from: Crimson Wizard on Tue 12/11/2013 21:01:44
It appears that the change that fixed the panes flickering prevents the pane to update its visuals in time. You have to save the game / switch panes to make it update the view. :(
Oops... 8-0
Fixed...
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 12/11/2013 21:36:55
A-and reuploaded beta 10 again.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Wed 13/11/2013 07:32:44
All right, confirmed that that's fixed now. Just came across another little quirk which seems to affect room objects only.

Select any room object by clicking on it (so the yellow border appears around its edges). Normally, you can use the arrow keys to nudge the object 1 pixel at a time in any direction. However, only the left and up arrows seem to work now. Attempting to nudge down or right doesn't do anything.
Title: Re: AGS 3.3.0 Beta Release
Post by: David Ostman on Wed 13/11/2013 14:05:02
Quote from: AGD2 on Wed 13/11/2013 07:32:44Select any room object by clicking on it (so the yellow border appears around its edges). Normally, you can use the arrow keys to nudge the object 1 pixel at a time in any direction. However, only the left and up arrows seem to work now. Attempting to nudge down or right doesn't do anything.
Hmm, I can't reproduce this on my Beta 10 install that I downloaded just before posting this. Selecting the object and the nudging it in all directions with the arrow keys works as far a I can tell.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Wed 13/11/2013 15:28:19
Very peculiar! I just tried making a new game in beta 10 and didn't have this problem. I also loaded the Mage's Initiation source into the editor and that worked as well. But when I load the Al Emmo source, none of the objects in any of the rooms will nudge right or down with the arrow keys. It happens consistently, every time a load that game into the editor.

And here's another crash and what I did to cause it after creating a new game with the 'default' template:

Created room 1, set object 0 and chose a sprite for it, made walkable area 1, made region 1. Did the same for rooms 2 and 3.

Created room 4 and 5. Didn't import a background or set any objects, masks for the screens.

Created room 6, and double-clicked on "Edit Room" to open it, the editor crashed with:


QuoteError: Object reference not set to an instance of an object.
Version: AGS 3.3.0.1148

System.NullReferenceException: Object reference not set to an instance of an object.
   at AGS.Editor.Components.RoomsComponent.GetPreviousDockData()
   at AGS.Editor.Components.RoomsComponent.LoadRoom(String controlID)
   at AGS.Editor.Components.RoomsComponent.ItemCommandClick(String controlID)
   at AGS.Editor.Components.BaseComponentWithFolders`2.CommandClick(String controlID)
   at AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   at AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Wed 13/11/2013 18:52:13
Quote from: AGD2 on Wed 13/11/2013 15:28:19
Very peculiar! I just tried making a new game in beta 10 and didn't have this problem. I also loaded the Mage's Initiation source into the editor and that worked as well. But when I load the Al Emmo source, none of the objects in any of the rooms will nudge right or down with the arrow keys. It happens consistently, every time a load that game into the editor.
Fixed.
The issue was only for high resolution games working with low resolution backwards compatibility in the script. For this impressive scenario  8-0, it has to round the position to an even number to reflect how it will work in the engine, so when moving by 1 pixel downwards/right it didn't actually move you. So the fix is to move by 2 pixels in this particular scenario...

Quote from: AGD2 on Wed 13/11/2013 15:28:19
And here's another crash and what I did to cause it after creating a new game with the 'default' template:
Fixed.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 14/11/2013 19:16:59
Reuploaded beta 10 again, it has three more bugs fixed.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Fri 15/11/2013 10:04:59
Thanks! The arrow key object nudging issue is resolved now.  And here's some feedback running 640x400 games with the Max Nearest Neighbor filter:

On my 4:3 monitor:

-The "Max Nearest Neighbor" filter doesn't detect for 640x400 games (Direct3d or DirectDraw5) in Full-screen mode if "Force alternate letterbox resolution" is unchecked. In this case, the game runs full-screen at 640x400, but stretches out vertically to fill the entire screen height, as if it were 640x480.

-If I run in a window with the exact same settings above, then the Max filter (which is the 2x NN filter in my case) will be used.

-If I run at full-screen with the same settings above, but check "Force alternate letterbox resolution" instead, then the Max filter (2x NN filter) will be used.
Title: Re: AGS 3.3.0 Beta Release
Post by: Dirt McStain on Fri 22/11/2013 00:37:04
Hey Crimson Wizard!  Great work on the engine so far!  Radiant told me that this may be the best place to reach you regarding this issue:

Music and SFX skip when transitioning screens (http://www.adventuregamestudio.co.uk/forums/index.php?issue=453.0)
QuoteWhen transitioning from one background to another, music and sfx will skip. It appears that the longer it takes to transition (longer due to memory, not longer by design) the longer the music and sfx skip.

I hope that this is something that you can take a look at!  Thank you in advance!
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 24/11/2013 14:51:49
I've done some tests, and it looks like there's still quite a lot of computers around that don't work with DirectX9; conversely, anything on Windows 8 doesn't run with DirectX5, and a casual game player could not be expected to know the difference. We would really appreciate it if you'd tweak the game startup code so that if the game is set up for DX9 and that fails, the game attempts to start up with DX5 instead, and only aborts if that also fails. This feels like a simple enough change; I really don't think it should be any game designer's job to educate the players about the difference between Dx5 and Dx9.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 25/11/2013 12:42:09
New engine for testing:
http://www.mediafire.com/download/6pe80o5bzkctcxg/acwin_1148plus_25nov2013.7z

1. Fallback to graphics software driver if hardware one could not be created.
2. Couple of overriding config options, to be added manually to config file:
Code (text) Select

[override]
multitasking=0/1
os=dos/win/linux/mac

* Multitasking - overrides game's multitasking mode. Useful if game has lengthy unskippable sequences. Keep in mind that this will lock game in the given mode and make it ignore script commands that change it.
* Os - overrides System.OperatingSystem return value. Useful for ports when game disables some feature for the system because it thinks it's not supported.
To be frank, this property is not very useful for AGS at the moment anyway, and it enumerates platforms that are not really supported, such as DOS and MacOS. Android, iOS and PSP ports emulate Windows by internal means. So, this is mainly for running games on Linux.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 25/11/2013 15:03:50
Quote from: Crimson Wizard on Mon 25/11/2013 12:42:09
1. Fallback to software driver if hardware one could not be created.
Thank you. Is that related to Dx5/Dx9?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 25/11/2013 15:10:37
Quote from: Radiant on Mon 25/11/2013 15:03:50
Quote from: Crimson Wizard on Mon 25/11/2013 12:42:09
1. Fallback to software driver if hardware one could not be created.
Thank you. Is that related to Dx5/Dx9?

I realized I dropped the word "graphics" in "software driver". Yes, it is about graphics drivers.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Mon 25/11/2013 18:51:27
YAY!
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 25/11/2013 21:09:03
Sorry, that doesn't quite work.

Taking a laptop that doesn't support hardware acceleration, I get exception 0xc000005 at EIP=0, prog pointer -179, ACI 3.3.0.1148, gtags 0,0. Occurs both in windowed and fullscreen mode, but (predictably) not when selecting Dx5 from winsetup.
Also, during the process, the engine tries a few really weird resolutions, i.e. 341x200 and 409x240. I wouldn't expect any monitor to support those.

Log attached,
Spoiler
Adventure Game Studio v3.3 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2013 others
ACI version 3.3.0.1148

***** ENGINE STARTUP
Installing exception handler
Reading config file
Initializing allegro
Setting up window
Initializing game data
Game data file: d:/Prog/HQuest/Jukebox/Compiled/Jukebox.exe

Initializing TTF renderer
Initializing mouse
Checking memory
Initializing keyboard
Install timer
Initialize sound drivers
Install exit handler
Initialize path finder library
Load game data
Heroine's Jukebox
Checking for disk space
Initializing MOD/XM player
Init gfx driver
Created graphics driver: Direct3D 9
Initializing screen settings
Init gfx filters
Detecting maximal supported scaling
Applying scaling filter: StdScale2
Switching to graphics mode
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1024 x 600
Widescreen side borders: enabled, attempting resolution 320 x 200
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 240; desktop resolution: 1024 x 600
Widescreen side borders: enabled, attempting resolution 320 x 240
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1024 x 600
Couldn't find acceptable supported resolution
Widescreen side borders: gfx card does not support suitable resolution. Will attempt 341 x 200 anyway
Attempt to switch gfx mode to 341 x 200 (24-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (24-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 240; desktop resolution: 1024 x 600
Couldn't find acceptable supported resolution
Widescreen side borders: gfx card does not support suitable resolution. Will attempt 409 x 240 anyway
Attempt to switch gfx mode to 409 x 240 (24-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 240 (24-bit)
Failed, resolution not supported
320x200 not supported, trying with 2x filter
Applying scaling filter: StdScale2
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1024 x 600
Widescreen side borders: enabled, attempting resolution 320 x 200
Attempt to switch gfx mode to 320 x 200 (32-bit)
[close]
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 25/11/2013 22:06:21
Hmm, this is something different, I was expecting that it cannot create D3D9 interface at all, but it looks it could.

Do you have a crash dump?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 25/11/2013 22:21:20
Here you go, https://anonfiles.com/file/601303d72de35bc2c9bfa0704350efa1
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 25/11/2013 22:58:45
I download a 0-bytes zip file :-\.
Also, I'd need a matching game executable to use this, can you send me too, please?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 25/11/2013 23:12:19
PM'ed.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 26/11/2013 16:59:04
UPD: Fixed version:
http://www.mediafire.com/download/7ttqhtaau86rgal/acwin1150_26nov2013.7z
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 26/11/2013 19:04:14
Well, there's no crash this time, but it doesn't fall back to the software mode either. Starting up in windowed mode it says "640x400 32bit requested adapter mode is not supported".

Spoiler
Adventure Game Studio v3.3 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2013 others
ACI version 3.3.0.1150

***** ENGINE STARTUP
Installing exception handler
Reading config file
Initializing allegro
Setting up window
Initializing game data
Game data file: d:/Prog/HQuest/Jukebox/Compiled/Jukebox.exe

Initializing TTF renderer
Initializing mouse
Checking memory
Initializing keyboard
Install timer
Initialize sound drivers
Install exit handler
Initialize path finder library
Load game data
Heroine's Jukebox
Checking for disk space
Initializing MOD/XM player
Init gfx driver
Created graphics driver: Direct3D 9
Initializing screen settings
Init gfx filters
Applying scaling filter: None
Switching to graphics mode
Widescreen side borders: disabled (windowed mode)
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 240; desktop resolution: 1024 x 600
Widescreen side borders: enabled, attempting resolution 320 x 240
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1024 x 600
Couldn't find acceptable supported resolution
Widescreen side borders: gfx card does not support suitable resolution. Will attempt 341 x 200 anyway
Attempt to switch gfx mode to 341 x 200 (24-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (24-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 240; desktop resolution: 1024 x 600
Couldn't find acceptable supported resolution
Widescreen side borders: gfx card does not support suitable resolution. Will attempt 409 x 240 anyway
Attempt to switch gfx mode to 409 x 240 (24-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 240 (24-bit)
Failed, resolution not supported
320x200 not supported, trying with 2x filter
Applying scaling filter: StdScale2
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1024 x 600
Widescreen side borders: enabled, attempting resolution 320 x 200
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 240; desktop resolution: 1024 x 600
Widescreen side borders: enabled, attempting resolution 320 x 240
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1024 x 600
Couldn't find acceptable supported resolution
Widescreen side borders: gfx card does not support suitable resolution. Will attempt 341 x 200 anyway
Attempt to switch gfx mode to 341 x 200 (24-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (24-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 240; desktop resolution: 1024 x 600
Couldn't find acceptable supported resolution
Widescreen side borders: gfx card does not support suitable resolution. Will attempt 409 x 240 anyway
Attempt to switch gfx mode to 409 x 240 (24-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 240 (24-bit)
Failed, resolution not supported
[close]

Fullscreen, same effect.
Spoiler

Adventure Game Studio v3.3 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2013 others
ACI version 3.3.0.1150

***** ENGINE STARTUP
Installing exception handler
Reading config file
Initializing allegro
Setting up window
Initializing game data
Game data file: d:/Prog/HQuest/Jukebox/Compiled/Jukebox.exe

Initializing TTF renderer
Initializing mouse
Checking memory
Initializing keyboard
Install timer
Initialize sound drivers
Install exit handler
Initialize path finder library
Load game data
Heroine's Jukebox
Checking for disk space
Initializing MOD/XM player
Init gfx driver
Created graphics driver: Direct3D 9
Initializing screen settings
Init gfx filters
Applying scaling filter: None
Switching to graphics mode
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1024 x 600
Widescreen side borders: enabled, attempting resolution 320 x 200
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 240; desktop resolution: 1024 x 600
Widescreen side borders: enabled, attempting resolution 320 x 240
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1024 x 600
Couldn't find acceptable supported resolution
Widescreen side borders: gfx card does not support suitable resolution. Will attempt 341 x 200 anyway
Attempt to switch gfx mode to 341 x 200 (24-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (24-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 240; desktop resolution: 1024 x 600
Couldn't find acceptable supported resolution
Widescreen side borders: gfx card does not support suitable resolution. Will attempt 409 x 240 anyway
Attempt to switch gfx mode to 409 x 240 (24-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 240 (24-bit)
Failed, resolution not supported
320x200 not supported, trying with 2x filter
Applying scaling filter: StdScale2
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1024 x 600
Widescreen side borders: enabled, attempting resolution 320 x 200
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 240; desktop resolution: 1024 x 600
Widescreen side borders: enabled, attempting resolution 320 x 240
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 200; desktop resolution: 1024 x 600
Couldn't find acceptable supported resolution
Widescreen side borders: gfx card does not support suitable resolution. Will attempt 341 x 200 anyway
Attempt to switch gfx mode to 341 x 200 (24-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (24-bit)
Failed, resolution not supported
Widescreen side borders: game resolution: 320 x 240; desktop resolution: 1024 x 600
Couldn't find acceptable supported resolution
Widescreen side borders: gfx card does not support suitable resolution. Will attempt 409 x 240 anyway
Attempt to switch gfx mode to 409 x 240 (24-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 240 (24-bit)
Failed, resolution not supported
[close]
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 26/11/2013 19:14:27
I don't get why it's going for all those resolutions. It should be pretty straightforward to create a 640x400 window on a desktop that's larger than that, no?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 26/11/2013 19:19:50
This is how it was done originally in AGS, it just tried all variants in certain range from the actual game size, because custom display resolution was not implemented.

I see now that it fails only after trying everything. I'll check if it is possible to detect that d3d9 does not support anything at all prior to all those attemtps.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 26/11/2013 19:23:12
I think this routine is just overcomplicated. For fullscreen mode, it makes perfect sense. For windowed mode, however, it could simply do (1) find desktop resolution, (2) calculate highest multiple of game resolution that fits in that desktop, abort if none, (3) create Dx9 window with that size, (4) if fail, create Dx5 window with that size, (5) if fail, abort. It makes little sense to try a series of window sizes.
Title: Re: AGS 3.3.0 Beta Release
Post by: Dirt McStain on Thu 28/11/2013 21:46:29
Quote from: Dirt McStain on Fri 22/11/2013 00:37:04
Hey Crimson Wizard!  Great work on the engine so far!  Radiant told me that this may be the best place to reach you regarding this issue:

Music and SFX skip when transitioning screens (http://www.adventuregamestudio.co.uk/forums/index.php?issue=453.0)
QuoteWhen transitioning from one background to another, music and sfx will skip. It appears that the longer it takes to transition (longer due to memory, not longer by design) the longer the music and sfx skip.

I hope that this is something that you can take a look at!  Thank you in advance!

To add, here's what I noticed with different ACI interpreter versions:

ACI version 3.3.0.1148: skips; stops skipping with threaded=1 in the acsetup.cfg file
ACI version 3.3.0.1146: skips (not sure why because I didn't have an acsetup.cfg file - will check with Radiant); when I copy the acsetup.cfg file that the below version uses, there is no more skipping (and there's no threaded entry)
ACI version 3.3.0.1144: doesn't skip and doesn't have the threaded=1 entry in the acsetup.cfg file

So, it appears that the skipping started with 1146 but, threaded=1 wasn't the fixing factor until 1148.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 28/11/2013 21:57:57
@Dirt McStain, threaded audio was disabled by default since 3.3.0.1146 (see list of changes (http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636471796#msg636471796)); that's why skipping starts from 1146. Not sure why "threaded=1" doesn't help in 1146 though.

Currently JJS is looking into music stuttering issue, that occurs with threaded audio. He already found what causes that, hopefully this will be resolved.
I will look into skipping on room load problem as soon as I get more free time; the game should still play well without threaded audio too, because it is not compatible with Pamela lipsync yet (as AGD2 mentioned). I think this might be easy to fix: just adding few more intermediate music updates; but I will need to make some tests to see which internal operations take most time during room transition.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 30/11/2013 20:08:47
@Radiant, here's an updated engine, that tries software driver if it could not make D3D9 work.
http://www.mediafire.com/download/9a7xhyyi00avqgt/acwin1148plus_30nov2013.7z

I can't normally test this on my machine, because I cannot find a resolution that will work with DX5 but not with D3D9 (if it did not work with first, it did not with second too). I tested only by hacking D3D9 always return error.
I am still wondering how it might be possible that there's a machine where DX5 run a resolution that D3D9 cannot, but maybe I just do not know how these things work.

I need to be sure this one works, because I feel doubts about the idea in general.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sat 30/11/2013 21:01:58
Interesting, I think we're getting there.

Starting in windowed mode doesn't work,
Spoiler
Adventure Game Studio v3.3 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2013 others
ACI version 3.3.0.1148

*** ENGINE STARTUP ***
Installing exception handler
Reading config file
Initializing allegro
Setting up window
Initializing game data
Game data file: d:/Prog/HQuest/Jukebox/Compiled/Jukebox.exe

Initializing TTF renderer
Initializing mouse
Checking memory
Initializing keyboard
Install timer
Initialize sound drivers
Install exit handler
Initialize path finder library
Load game data
Heroine's Jukebox
Checking for disk space
Initializing MOD/XM player
Init gfx driver
Created graphics driver: Direct3D 9
Initializing screen settings
Init gfx filters
Applying scaling filter: None
Switching to graphics mode
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (24-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 240 (24-bit)
Failed, resolution not supported
320x200 not supported, trying with 2x filter
Applying scaling filter: StdScale2
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (24-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 240 (24-bit)
Failed, resolution not supported
Init gfx driver
Created graphics driver: Allegro/DX5
Initializing screen settings
Init gfx filters
Applying scaling filter: None
Switching to graphics mode
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (32-bit)
Succeeded. Using gfx mode 320 x 200 (32-bit)
Preparing graphics mode screen
Initializing colour conversion
Check for preload image
Initialize sprites
Set up screen
Initialize game settings
Prepare to start game
Audio is processed on the main thread
Checking replay status
Engine initialization complete
Starting game
Loading room 1
[close]

Running in full-screen mode first gives the error "requested adapter mode not supported"... and then opens and runs the game anyway!

Spoiler

Adventure Game Studio v3.3 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2013 others
ACI version 3.3.0.1148

*** ENGINE STARTUP ***
Installing exception handler
Reading config file
Initializing allegro
Setting up window
Initializing game data
Game data file: d:/Prog/HQuest/Jukebox/Compiled/Jukebox.exe

Initializing TTF renderer
Initializing mouse
Checking memory
Initializing audio vox
Initializing keyboard
Install timer
Initialize sound drivers
Install exit handler
Initialize path finder library
Load game data
Heroine's Jukebox
Checking for disk space
Initializing MOD/XM player
Init gfx driver
Created graphics driver: Direct3D 9
Initializing screen settings
Init gfx filters
Applying scaling filter: StdScale2
Switching to graphics mode
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (24-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 240 (24-bit)
Failed, resolution not supported
Init gfx driver
Created graphics driver: Allegro/DX5
Initializing screen settings
Init gfx filters
Applying scaling filter: StdScale2
Switching to graphics mode
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (32-bit)
Succeeded. Using gfx mode 320 x 200 (32-bit)
Preparing graphics mode screen
Initializing colour conversion
Check for preload image
Initialize sprites
Set up screen
Initialize game settings
Prepare to start game
Audio is processed on the main thread
Checking replay status
Engine initialization complete
Starting game
Loading room 1
***** ENGINE HAS SHUTDOWN
[close]
(note that the engine shuts down because I'm pressing the 'quit' button)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sat 30/11/2013 21:11:14
Quote from: Crimson Wizard on Sat 30/11/2013 20:08:47
I am still wondering how it might be possible that there's a machine where DX5 run a resolution that D3D9 cannot, but maybe I just do not know how these things work.
I believe that computers with no 3D capability (e.g. my traveling laptop) will simply fail a D3D9 call. Which makes me wonder why you wouldn't use D2D9, if such a thing exists :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 30/11/2013 21:19:58
Quote from: Radiant on Sat 30/11/2013 21:01:58
Starting in windowed mode doesn't work,
But according to the log, it started the game? What is going on there exactly?

Quote from: Radiant on Sat 30/11/2013 21:01:58
Running in full-screen mode first gives the error "requested adapter mode not supported"... and then opens and runs the game anyway!
Yes, it displays a message before switching to DX5... I think I'll add a name of driver that failed to the message text.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sat 30/11/2013 21:45:40
Quote from: Crimson Wizard on Sat 30/11/2013 21:19:58
But according to the log, it started the game? What is going on there exactly?
If I may hazard a guess, it started the game, but still had a return code set to false somewhere, causing the game to abort almost instantly. But feel free to add more (temporary) logging lines to your logfile :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 30/11/2013 21:47:49
Quote from: Radiant on Sat 30/11/2013 21:45:40
Quote from: Crimson Wizard on Sat 30/11/2013 21:19:58
But according to the log, it started the game? What is going on there exactly?
If I may hazard a guess, it started the game, but still had a return code set to false somewhere, causing the game to abort almost instantly.
Good idea. I'll look more into this.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sat 30/11/2013 21:56:37
Quote from: Crimson Wizard on Sat 30/11/2013 21:19:58
Yes, it displays a message before switching to DX5... I think I'll add a name of driver that failed to the message text.
If the game successfully fallbacks to DX5, then it shouldn't give the player an error message. The logfile already shows what happens, but as far as the player is concerned, the game works fine.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 30/11/2013 22:22:42
I fixed couple of things, not sure atm, but that may fix windowed mode problem...
http://www.mediafire.com/download/zrd3gdup9j3d6nz/acwin1148plus_1dec2013.7z

If not, I'll check again tomorrow.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sat 30/11/2013 22:32:51
Fullscreen now works.

Windowed mode gives no error message, and this log. It appears to create the window but not display it; the game does run and is responsive to input (specifically, it aborts when I press escape, not any sooner). For what it's worth, the game shows up in the taskbar but not the alt-tab list on windows 7.
Spoiler
Adventure Game Studio v3.3 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2013 others
ACI version 3.3.0.1148

*** ENGINE STARTUP ***
Installing exception handler
Reading config file
Initializing allegro
Setting up window
Initializing game data
Game data file: d:/Prog/HQuest/Jukebox/Compiled/Jukebox.exe

Initializing TTF renderer
Initializing mouse
Checking memory
Initializing keyboard
Install timer
Initialize sound drivers
Install exit handler
Initialize path finder library
Load game data
Heroine's Jukebox
Checking for disk space
Initializing MOD/XM player
Init gfx driver
Created graphics driver: Direct3D 9
Initializing screen settings
Init gfx filters
Applying scaling filter: StdScale2
Switching to graphics mode
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Attempt to switch gfx mode to 320 x 200 (32-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 240 (32-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (24-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 240 (24-bit)
Failed, resolution not supported
Init gfx driver
Created graphics driver: Allegro/DX5
Initializing screen settings
Init gfx filters
Applying scaling filter: StdScale2
Switching to graphics mode
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 320 x 200 (32-bit)
Succeeded. Using gfx mode 320 x 200 (32-bit)
Preparing graphics mode screen
Initializing colour conversion
Check for preload image
Initialize sprites
Set up screen
Initialize game settings
Prepare to start game
Audio is processed on the main thread
Checking replay status
Engine initialization complete
Starting game
Loading room 1
***** ENGINE HAS SHUTDOWN
[close]
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 02/12/2013 21:19:56
Ok, here's another try. I found that in some cases D3D9 can change window style, so this version has a fix to set it back when D3D9 is cancelled.
http://www.mediafire.com/download/o2193bkfljdbgkk/acwin1148plus_3dec2013.7z

Although, to be honest, the more I explore the graphics part of the engine, the more skeptical I get. The code is pretty non-flexible, and was written having straightforward one-time initialization in mind. I would not want to tweak it any further at the moment.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 02/12/2013 22:14:30
And that works flawlessly. Well done, CW!
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 03/12/2013 11:01:50
Good to hear.

One final thing in my list is music skipping (without threaded audio).
Can someone provide me more information on this: which game, what room transitions are affected? Does this happen everywhere or on some computers only?
Does this happen in your "Heroine Quest"? I still have some beta version, I may use it for test if I'll know where to look at.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 03/12/2013 15:44:12
Quote from: Crimson Wizard on Mon 02/12/2013 21:19:56
Ok, here's another try. I found that in some cases D3D9 can change window style, so this version has a fix to set it back when D3D9 is cancelled.
http://www.mediafire.com/download/o2193bkfljdbgkk/acwin1148plus_3dec2013.7z

I can also confirm that this works on my netbook which doesn't support D3D9. However, this problem still persists which I reported a few pages back:

Spoiler

Here's some feedback running 640x400 games with the Max Nearest Neighbor filter:

On my 4:3 monitor:

-The "Max Nearest Neighbor" filter doesn't work for 640x400 games (Direct3d or DirectDraw5) in Full-screen mode if "Force alternate letterbox resolution" is unchecked. In this case, the game runs full-screen at 640x400, but stretches out vertically to fill the entire screen height.

-If I run the game in a window with the exact same settings above, then the Max filter (2x NN filter in my case) will be used.

-If I run at full-screen with the same settings above, but check "Force alternate letterbox resolution", then the Max filter (2x NN filter) will be used.
[close]

I was also wondering if it would be a good idea to do something similar for filter error messages? That is, rather than having game display an error message that X display resolution/filter is not supported, it could simply drop back to trying the Max NN filter instead, and if that fails, it would attempt to run the game with no filter.

Quote from: Crimson Wizard
One final thing in my list is music skipping (without threaded audio).
Can someone provide me more information on this: which game, what room transitions are affected? Does this happen everywhere or on some computers only?
Does this happen in your "Heroine Quest"? I still have some beta version, I may use it for test if I'll know where to look at.

Are you talking about music tracks skipping or stuttering? The latest version of Al Emmo music will often stutter if multi-threading is disabled in the acsetup.cfg file. Particularly when restoring a game from the title screen or when exiting/entering any room where there are a lot of animations playing. The game uses instant screen transitions and I think it happens on many peoples' computers. I can send you a copy of the latest version by PM.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 03/12/2013 16:39:19
Yes, the music skipping happens in HQ too. I cannot reliably reproduce this on my computer, but some of the others have the issue more consistently. It appears not to happen under Win8.

Testing suggests that the following:
ACI version 3.3.0.1148 has the skipping issue, but it stops with threaded=1 in the acsetup.cfg file
ACI version 3.3.0.1146 has the skipping issue, but apparently this depends on the contents of acsetup (other than threaded); we'll see if we can find details, but running without an acsetup.cfg file does have skipping.
ACI version 3.3.0.1144 does not have the skipping issue.
Title: Re: AGS 3.3.0 Beta Release
Post by: Monsieur OUXX on Tue 03/12/2013 16:52:32
Quote from: Crimson Wizard on Tue 03/12/2013 11:01:50
One final thing in my list is music skipping (without threaded audio).

Try out the "glittery cursor" module I just posted in "modules and plugins". don't recompile it, run it "as is" -- it was compiled with 3.2.1. On my Windows 7, the sound is terrible. It's not even stuttering, it sounds more like two wires are touching each other and doing cracks in the speaker. It's a game issue, though, because the game's Ogg file sounds OK when played in VLC.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 03/12/2013 17:20:25
Quote from: AGD2 on Tue 03/12/2013 15:44:12
-The "Max Nearest Neighbor" filter doesn't work for 640x400 games (Direct3d or DirectDraw5) in Full-screen mode if "Force alternate letterbox resolution" is unchecked. In this case, the game runs full-screen at 640x400, but stretches out vertically to fill the entire screen height.
But is not that what is supposed to happen if you uncheck "letterbox mode"?
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 03/12/2013 17:31:55
For 640x400 games, if you manually select the 2X NN filter and uncheck "letterbox" mode, it uses the 2X NN filter and displays black bars at the top and bottom of the screen. It's only when the "Max NN" filter is used that it runs the game with no filter at all.

To be clear, if I run a 640x400 game (letterbox mode unchecked) with no filter selected, it will also run at 640x400 stretched vertically to fill the screen. The real issue here is that the Max NN filter doesn't run the full-screen game with the 2X NN filter when my system is capable of doing so.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 03/12/2013 19:10:41
AGD2, can you post the contents of agsgame.log produced when you run with max filter and letterbox unchecked?
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 03/12/2013 19:24:54
For comparison's sake, here's the log with the Max NN filter selected and "letterbox" unchecked:

Spoiler

Adventure Game Studio v3.3 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2013 others
ACI version 3.3.0.1148

*** ENGINE STARTUP ***
Installing exception handler
Reading config file
Initializing allegro
Setting up window
Initializing game data
Game data file: c:/AGS8/MAGESI~2/Compiled/MAGESI~1.EXE

Initializing TTF renderer
Initializing mouse
Checking memory
Initializing audio vox
Initializing keyboard
Install timer
Initialize sound drivers
Install exit handler
Initialize path finder library
Load game data
Mage's Initiation 640x400
Checking for disk space
Initializing MOD/XM player
Init gfx driver
Created graphics driver: Direct3D 9
Initializing screen settings
Init gfx filters
Detecting maximal supported scaling
Couldn't find acceptable supported resolution
Applying scaling filter: None
Switching to graphics mode
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 640 x 400 (32-bit)
Succeeded. Using gfx mode 640 x 400 (32-bit)
Preparing graphics mode screen
Initializing colour conversion
Check for preload image
Initialize sprites
Set up screen
Initialize game settings
Prepare to start game
Audio is processed on the main thread
Checking replay status
Engine initialization complete
Starting game
Loading room 45
***** ENGINE HAS SHUTDOWN
[close]


Here's the log with the 2X NN Filter and "letterbox" unchecked:

Spoiler

Adventure Game Studio v3.3 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2013 others
ACI version 3.3.0.1148

*** ENGINE STARTUP ***
Installing exception handler
Reading config file
Initializing allegro
Setting up window
Initializing game data
Game data file: c:/AGS8/MAGESI~2/Compiled/MAGESI~1.EXE

Initializing TTF renderer
Initializing mouse
Checking memory
Initializing audio vox
Initializing keyboard
Install timer
Initialize sound drivers
Install exit handler
Initialize path finder library
Load game data
Mage's Initiation 640x400
Checking for disk space
Initializing MOD/XM player
Init gfx driver
Created graphics driver: Direct3D 9
Initializing screen settings
Init gfx filters
Applying scaling filter: StdScale2
Switching to graphics mode
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 640 x 400 (32-bit)
Failed, resolution not supported
Widescreen side borders: disabled in Setup
Attempt to switch gfx mode to 640 x 480 (32-bit)
Succeeded. Using gfx mode 640 x 480 (32-bit)
Preparing graphics mode screen
Screen resolution: 640 x 480; game resolution 640 x 400
Initializing colour conversion
Check for preload image
Initialize sprites
Set up screen
Initialize game settings
Prepare to start game
Audio is processed on the main thread
Checking replay status
Engine initialization complete
Starting game
Loading room 45
***** ENGINE HAS SHUTDOWN
[close]

Both of these should ideally give the same result by adding black bars to the top and bottom of the screen under the 2X NN filter before attempting to run the game with no filter.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 03/12/2013 19:49:59
Oh, I see now. This is something I missed.
What happens is that when AGS applies gfx mode and fails, it will try letterboxed mode even if told not to force one. Your monitor does not support (640x400)x2 => 1280x800, but supports (640x480)x2 = > 1280x960, that's why x2 scaling works.

At the same time the max filter detection did not check alternate heights unless it is forced.

Please try this new build:
http://www.mediafire.com/download/3cgabyvj23w0pab/acwin1148plus_3dec2013-2.7z
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 03/12/2013 20:38:28
That works perfectly now, thanks!
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 04/12/2013 11:51:18
I'm curious what happened to this issue, regarding characters scaling at a higher resolution than the game runs at? Or was that too complex to still fit in 3.3?
[IMGzoom]http://i.imgur.com/w3ge9ld.png[/imgzoom][IMGzoom]http://i.imgur.com/OtW4Qyi.png[/imgzoom]
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 04/12/2013 12:02:09
Frankly, I have no idea.

How to reproduce this? Are there particular conditions?
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Wed 04/12/2013 12:33:48
See here (http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636472926#msg636472926) for earlier discussion.

This example is the behavior of Aeronuts (http://www.adventuregamestudio.co.uk/site/games/game/1238/) running, I believe, with a 2x nearest-neighbor filter in Direct3D and DirectDraw. The captures are really old, but apparently this is still the current Direct3D behavior? What it seems to do is to FIRST scale the sprites to 2x, and THEN scale them down based on the in-game scale factor (or multiplying the two scalings together before applying it), rather than the other way around. This leads to them effectively running in twice the resolution of the game, as well as to a number of nasty artifacts.

Since the topic is back up, let me respond to this:

Quote from: AGD2 on Mon 11/11/2013 22:28:14
Yes, though the effect looks more pronounced on a low-res 320x200/320x240 background than it does on a 640x400/640x480 background.

[imgzoom]http://www.himalayastudios.com/scratch/hi-res_scaling.jpg[/imgzoom]

A couple of things about this:

The screen on the left is blurrier in general (noticeable e.g. on the rock in the foreground). I don't know if that's because you've saved the file as a jpeg, or if it's another Direct3D artifact. (In addition to the scaling issues, Direct3D has at least in the past also tended to mess up the colors â€" you can see the increased banding in the sky in the Aeronuts example above. Just one more reason why I never use it.)

The difference in the look of the sprite is not just due to the higher resolution, but also that one of them is scaled with interpolation and the other with nearest neighbor. Simulating an interpolated low-resolution version (using a mosaic filter), gives this:

(http://i.imgur.com/dn6XxDO.png) (http://i.imgur.com/HIPPHSn.png) (http://i.imgur.com/hgHd0JF.png)
(high-res interpolated, sim. low-res interpolated, low-res NN)

I agree that in this example the resolution mixing is not as bad as in the one I gave, but I still prefer to stick to one consistent resolution. Respect the grid!
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Wed 04/12/2013 13:50:52
The reason it's smooth in that screenshot is because the "Smooth scaled sprites" option is selected in winsetup.exe.

I'm still gonna request an option for this behaviour. There are other cases where it has come in handy. When putting together hi-res 2D cutscene shots which were scripted in AGS and then converted to Vorbis video files, for example. This style of downscaling made the images much sharper. Being optional, those who don't like it don't need to use it. But I'd prefer to have that option available.
Title: Re: AGS 3.3.0 Beta Release
Post by: Calin Leafshade on Thu 05/12/2013 08:23:39
I'd argue that it's a bug for the following reason:

It's inconsistent. You will get different character resolution depending on the scaling mode the player chooses. It might look ok at 2X because the character is only out by a factor of 2. But, like in the aeronauts screenshot, where the factor is larger like 4, 5 or 6 times it's always going to look ridiculous and theres nothing the developer can do about it.

Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Thu 05/12/2013 15:18:52
The Aeronuts example is, on closer inspection, running in 3X. If it was running with "smooth scaled sprites" you probably wouldn't be seeing those weird thin pixels, but of course the sprite would still be conspicuously higher resolution than the background.

I agree with Calin that in principle, the scaling filters, particularly the nearest neighbor ones, shouldn't change how different parts of the game appear relative to each other. If a game maker wants this effect, it should be some kind of internal setting that happens before the final, user-configured filters.
Title: Re: AGS 3.3.0 Beta Release
Post by: JJS on Fri 06/12/2013 07:35:56
The Draconian edition has this "pixel-perfect" scaling, it boils down to the changes in the d3d driver: https://github.com/AlanDrake/Adventure-Game-Studio/commit/5e0ae8b6c88663d5f2b4f2732dedac47cd8caa0c#diff-5d98445a638921481f8b22c5397f77b0R1392
Title: Re: AGS 3.3.0 Beta Release
Post by: selmiak on Fri 06/12/2013 12:16:56
hmm, maybe AGS should then provide a 200%, 75%, 50%, 25% scaling view option for more control over enginenative scaling that might work different from what the autor/artist wants to happen.
Title: Re: AGS 3.3.0 Beta Release
Post by: Scavenger on Fri 06/12/2013 13:15:21
Quote from: selmiak on Fri 06/12/2013 12:16:56
hmm, maybe AGS should then provide a 200%, 75%, 50%, 25% scaling view option for more control over enginenative scaling that might work different from what the autor/artist wants to happen.

Couldn't you script that really easily in AGS anyway? Set a few properties, and have in your rep_exec_always:

Code (AGS) Select

function game_start ()
{
    player.ManualScaling = true;
}

function repeatedly_execute_always ()
{
    if (GetScalingAt (player.x,player.y) > 100)
    {
        player.ChangeView (player.GetProperty ("BIG CHARACTER!!!"));
        player.SpeechView = player.GetProperty ("BIG CHARACTER TALKIN!!!");
        player.SetIdleView (player.GetProperty ("BIG CHARACTER IDLING!!!"),whatevervariableyousettheidletimerto);
        player.Scaling = GetScalingAt (player.x,player.y) / 2;
    }
    else if (GetScalingAt (player.x,player.y) =< 50)
    {
        player.ChangeView (player.GetProperty ("tiny character"));
        player.SpeechView = player.GetProperty ("tiny character talkin");
        player.SetIdleView (player.GetProperty ("tiny character idlin"),whatevervariableyousettheidletimerto);
        player.Scaling = GetScalingAt (player.x,player.y) * 2;
    }
else
{
        player.ChangeView (player.GetProperty ("Normal Character"));
        player.SpeechView = player.GetProperty ("Normal Character Talking");
        player.SetIdleView (player.GetProperty ("Normal Character Idling"),whatevervariableyousettheidletimerto);
        player.Scaling = GetScalingAt (player.x,player.y);
}

}


And you could just use the Properties to set the initial values and just have an array you change at runtime, to have like, different outfits and junk. No need to implement it as an engine function.
Title: Re: AGS 3.3.0 Beta Release
Post by: selmiak on Sun 08/12/2013 03:32:54
hmmm, you got a point there. Haven't tried it and it might look strange when stopping one walkcycle in the middle of it and switching to the first frame of the other walkcycle but could work.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 10/12/2013 18:30:12
Here's a build with a threaded audio fix by JJS:
http://www.mediafire.com/download/u5qu46pqhu466an/acwin1148plus_10dec2013.7z

Please tell if that improves music playback (overall, and on Windows 8 in particular).

Reminder: to enable threaded audio manually add this line beyond "[sound]" category in the acsetup.cfg:
Code (text) Select
[sound]
threaded=1
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 10/12/2013 23:35:07
Just a couple of quick observations:

1) I have only tested a little bit so far. The lip-syncing in Al Emmo seems much more accurate now, though still not 100% like it is when multi-threading is disabled. Aside from that, I haven't noticed any issues with music stuttering yet.

2) Whenever I press ALT+X or QuitGame(); is called, I am presented with the Windows error message "Al Emmo has encoutnered a problem and needs to close" with the "Send Error Report" button at the bottom. This is on Win XP.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 12/12/2013 12:00:43
We have an issue with voice clips being cut off. The vast majority of voice clips work fine, but we've encountered an issue where a voice clip is cut off near the end; the text and portrait animation is played properly for the correct amount of time, but the voice halts and cuts off the last few words. Here's a sample project that shows it; run the executable and press space bar to have EGO say something.

http://crystalshard.net/test/Voicetest.zip
Title: Re: AGS 3.3.0 Beta Release
Post by: JJS on Thu 12/12/2013 12:59:32
I could also reproduce this error with 3.21 and that particular ogg file. Interestingly the engine seems to fail at keeping the buffer filled. Eventually playback ends here: https://github.com/adventuregamestudio/ags/blob/master/Engine/libsrc/alogg/alogg.c#L1022

For me the speech never ends though. Audio cuts out and the speech line stays on screen forever.

Edit: Hmm, removing this "buffer underrun" branch causes the full clip to play. May be a bug in the underrun detection.
Title: Re: AGS 3.3.0 Beta Release
Post by: deee on Thu 12/12/2013 15:08:42
First of all, I love the changes, especially the proper alpha blending now possible.
But I probably found another bug.
Not sure if this has been mentioned before:
Setting an object's visibility to false does not seem to have any effect.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 12/12/2013 17:04:51
Quote from: deee on Thu 12/12/2013 15:08:42
Setting an object's visibility to false does not seem to have any effect.

This works for me.
How do you do this? Maybe you have a mistake in script?
Title: Re: AGS 3.3.0 Beta Release
Post by: deee on Thu 12/12/2013 18:02:30
Oh, sorry, I forgot to mention, this only affects the editor.
Setting the visibility through scripts perfectly works, and that is just my workaround (setting the object's visibility to false in room_load, for initially invisible objects).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 12/12/2013 18:07:24
Quote from: deee on Thu 12/12/2013 18:02:30
Oh, sorry, I forgot to mention, this only affects the editor.
Setting the visibility through scripts perfectly works, and that is just my workaround (setting the object's visibility to false in room_load, for initially invisible objects).
You mean you set "Visible" property for the object to false in the editor, and on game start it is still visible? :-\ That's very weird.
Had anyone else seen such error?
Could be there's some line in your script that turns visibility back at game start? That's the only thing I can think of at this moment.
What will happen if you start a new game project, make 1 room with 1 object and set turn its Visibility down?
Title: Re: AGS 3.3.0 Beta Release
Post by: JJS on Thu 12/12/2013 18:20:23
Quote from: Radiant on Thu 12/12/2013 12:00:43
We have an issue with voice clips being cut off. The vast majority of voice clips work fine, but we've encountered an issue where a voice clip is cut off near the end; the text and portrait animation is played properly for the correct amount of time, but the voice halts and cuts off the last few words. Here's a sample project that shows it; run the executable and press space bar to have EGO say something.

http://crystalshard.net/test/Voicetest.zip
I pushed a fix: https://github.com/adventuregamestudio/ags/commit/7fda041a715ff2792de7cc6d789929b4682716d7
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Thu 12/12/2013 20:35:09
This is a bug: when Game.ChangeTranslation() encounters a problem, such as an invalid .tra file, then according to the manual it should return false. This is expected behavior, as it allows the game designer to deal with issues gracefully.

Instead, the function terminates the game when a Windows error popup ("the translation is not compatible with this game"). This is correct behavior if winsetup is used to select an incorrect translation, but not when changing it at runtime with ChangeTranslation().
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Fri 13/12/2013 00:09:49
The SetVoiceMode() function is meant to allow an in-game switch between playing voice samples, displaying subtitles, and both. However, doing SetVoiceMode(eSpeechTextOnly) will prevent Sierra-style portrait animation from playing; this strikes me as incorrect behavior (the text is shown normally, and the portrait is shown in its mouth-closed frame).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 13/12/2013 08:00:22
OK, I'll look into those two.
Title: Re: AGS 3.3.0 Beta Release
Post by: deee on Fri 13/12/2013 14:15:16
Okay, the object visibility issue seems to be caused by the smooth scrolling & parallax module (setting PxPos>0 leads to always visible objects, unless you script it), and does not have to do anything with 3.3.0 beta.
I apologize.
Title: Re: AGS 3.3.0 Beta Release
Post by: Billbis on Sat 14/12/2013 10:28:56
You're really doing great job, thank you all! :-*

Just signaling a minor editor bug:
1. Open a project
2. Double click on Sprite
3. Expend GUIs and double click on a GUI
4. Close the open GUI panel
5. Close the Sprite panel
6. Double click on Sprite: the Sprite panel won't open anymore.
Title: Re: AGS 3.3.0 Beta Release
Post by: Grim on Sun 15/12/2013 00:26:42
Quote from: deee on Fri 13/12/2013 14:15:16
Okay, the object visibility issue seems to be caused by the smooth scrolling & parallax module (setting PxPos>0 leads to always visible objects, unless you script it), and does not have to do anything with 3.3.0 beta.
I apologize.

And if you really need to make them invisible just go for object.Transparency=100; That's the only way to "switch off" objects with parallax.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 15/12/2013 21:03:52
I have an interesting question. Right now I am rewriting how the logging works in AGS: the log will only be written if it is enabled by cmd line argument or in config file, and choosing the sane path for every platform (like home/.ags on Linux). And I am not sure what path to use on Windows.
Writing to the exe folder is not a very good idea, because it won't work if the game is installed on system drive (like in Program Files).

Of course, the logging is not useful for everyone, and many users simply won't bother, but those who do, where they will expect to look for one? Is it "Documents", or some "AppData", or else?
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Sun 15/12/2013 21:42:05
I searched for the same thing when I needed a place to save the layout file.
From what I read then, best place is in the non-roaming user's local app data folder.
Code (csharp) Select

Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 15/12/2013 21:54:14
Quote from: Crimson Wizard on Sun 15/12/2013 21:03:52
Of course, the logging is not useful for everyone, and many users simply won't bother, but those who do, where they will expect to look for one? Is it "Documents", or some "AppData", or else?
The same location as your saved games; it's more convenient to use one folder instead of two.

"Documents" is intended for files that the user created and saved, which logfiles are not; AppData is intended for data files that aren't read by the user (and accordingly, this folder is made hard to find on Windows machines), which logfiles aren't either. So just put it in the known central location :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 15/12/2013 21:58:56
By the way, if you're rewriting logging, please make sure that every log gets a line number. I've found warnings in the past like "ChangeCharacterView was used while the view was fixed", or "FollowCharacter called but the sheep is currently animating looped" or "StopDialog called, but was not in a dialog" and found that these are very hard to locate in 10,000+ lines of game script.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 15/12/2013 22:01:32
Quote from: Radiant on Sun 15/12/2013 21:58:56
By the way, if you're rewriting logging, please make sure that every log gets a line number.
No, I am not rewriting logging globally, I am just changing the way logger starts.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Sun 15/12/2013 22:16:07
Ok. Then please consider that a feature request for 3.4 :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 16/12/2013 10:40:14
Quote from: Radiant on Thu 12/12/2013 20:35:09
This is a bug: when Game.ChangeTranslation() encounters a problem, such as an invalid .tra file, then according to the manual it should return false. This is expected behavior, as it allows the game designer to deal with issues gracefully.

Instead, the function terminates the game when a Windows error popup ("the translation is not compatible with this game"). This is correct behavior if winsetup is used to select an incorrect translation, but not when changing it at runtime with ChangeTranslation().

What should happen if the game was changing from one custom translation to another and failed:
1. Fallback to default translation?
2. Fallback to the last selected translation?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 16/12/2013 10:46:23
Well, you're trying to change something, so if that fails for any reason, the result should be no change. So if the current language is French and you're trying to switch to German and German doesn't work, it sticks with French (not switch to English or something). I think #2 would make the most sense, and the programmer can always change it to something else when the function returns false, if he wants that.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 16/12/2013 11:34:45
We've had an odd issue where string formatting ceases working after playing for awhile, leading to such oddities as this one (http://img.photobucket.com/albums/v140/Fizzii/weirdname_zpsf1584c3a.jpg). This does not reproduce so far, unfortunately.

Code (ags) Select

txt  (0, String.Format ("%s's whereabouts", player.name));
txt  (1, "are rarely known,");

// the function is this, but it seems to malfunction at the string.format above
function txt (int l, const string s) {
  if (l == 0) s2 = "";
  s1 = s;
  s1 = s1.Append     ("[");
  SetLabelText       (CRED1, 0, s1);
  s2 = s2.Append     (s1);
  SetLabelText       (CRED2, 0, s2);
}

Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 17/12/2013 07:51:39
Quote from: Radiant on Mon 16/12/2013 10:46:23
Instead, the function terminates the game when a Windows error popup ("the translation is not compatible with this game"). This is correct behavior if winsetup is used to select an incorrect translation, but not when changing it at runtime with ChangeTranslation().

I did this, but I feel regrets now :-.
The AGS engine does not have a proper error dealing system, there's program abortion called nearly everywhere something unexpected happened (like passing incorrect parameters to the script function). Dealing with every case individually makes situation much worse. There need to be a general solution for this, like something I mentioned long way ago (http://www.adventuregamestudio.co.uk/forums/index.php?topic=46329.msg622693#msg622693, it is the last paragraph of the post).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 17/12/2013 08:43:55
Quote from: Radiant on Fri 13/12/2013 00:09:49
The SetVoiceMode() function is meant to allow an in-game switch between playing voice samples, displaying subtitles, and both. However, doing SetVoiceMode(eSpeechTextOnly) will prevent Sierra-style portrait animation from playing; this strikes me as incorrect behavior (the text is shown normally, and the portrait is shown in its mouth-closed frame).
I cannot reproduce this... is there some kind of demo I can see?
(I still have older HQ beta, which I can't access right now; does that game have this error?)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 17/12/2013 12:10:02
I think so; try sliding the speech volume to zero in the control panel (doing so calls SetVoiceMode). If that didn't work, I'll get you a newer version.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 17/12/2013 17:20:03
Quote from: Radiant on Tue 17/12/2013 12:10:02
I think so; try sliding the speech volume to zero in the control panel (doing so calls SetVoiceMode). If that didn't work, I'll get you a newer version.
Hmm, the speech volume is always zero, because I don't have speech.vox. Yet I do not observe this bug.

PS. I have the "You'd Beta Shape Up" version.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 17/12/2013 18:36:32
Hm, this is odd; I have trouble reproducing this. Apparently it only occurs after some time of gameplay, or something. I'll see if I can narrow it down for you.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 17/12/2013 20:54:05
Quote from: Radiant on Tue 17/12/2013 18:36:32
Hm, this is odd; I have trouble reproducing this. Apparently it only occurs after some time of gameplay, or something. I'll see if I can narrow it down for you.
Heh, actually I just tried again and had this occured.
I jumped to Chapter 2, entered the inn and spoke to woman inkeeper there EDIT: Sorry, I was mistaken, this is Hervor, the "caretaker" of the Adventure Guild. The introductory part was ok, but as soon as I chose dialog option the speech stopped animating completely.

E: Blinking animation still works though...
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 17/12/2013 22:11:42
Hmm, Radiant, you have "game.close_mouth_end_speech_time" (aka Speech.AnimationStopTimeMargin) set to 250 (>6 seconds) as soon as player selects any dialog option while conversing to Hervor (the Adventure Guild caretaker).

Is this intentional? This is either script mistake, or engine bug that sets wrong variable. Please check dialog scripts...
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 18/12/2013 01:55:54
Aha. I thought that parameter was in milliseconds, because its counterpart DisplayPostTimeMs is also in milliseconds. I guess it's in frames, then?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 18/12/2013 07:34:55
Quote from: Radiant on Wed 18/12/2013 01:55:54
Aha. I thought that parameter was in milliseconds, because its counterpart DisplayPostTimeMs is also in milliseconds. I guess it's in frames, then?
Yes, it is an old parameter, it's in game loops:
Quote
game.close_mouth_end_speech_time
At the end of speech text, the speech animation will stop for this number of game loops. Default 10. No affect in voice mode. 

I added "Ms" part to "DisplayPostTimeMs" name to help differentiate the units.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 18/12/2013 13:28:06
Is it correct that if I call AddInventory() and NewRoom() immediately after each other, then on_event(eEventAddInventory) doesn't get called because it's overwritten by the new room call?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 18/12/2013 20:27:22
Our testing reports that with the latest build from this thread, setting "[threaded]" in the config file, works fine with no stutter.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 18/12/2013 20:34:52
Quote from: Radiant on Wed 18/12/2013 20:27:22
Our testing reports that with the latest build from this thread, setting "[threaded]" in the config file, works fine with no stutter.
Just to clarify, it is "threaded=1" under "[sound]" category, not "[threaded]".
Engine prints one of the following to the log:
Quote
Audio thread started    -- this means threaded audio ENABLED
- OR -
Failed to start audio thread, audio will be processed on the main thread   -- threaded audio DISABLED
- OR -
Audio is processed on the main thread     -- this means threaded audio DISABLED
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 18/12/2013 20:42:08
Yes, that's what I meant.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 18/12/2013 20:55:30
Quote from: Radiant on Wed 18/12/2013 20:42:08
Yes, that's what I meant.
Ok, great, just wanted to know for sure :).
This means JJS's fix did the trick.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sat 21/12/2013 17:24:33
A small update:
http://www.mediafire.com/download/v6mdnueyd1cqinx/acwin1148plus_21dec2013.7z

Couple of fixes:
- A fix to OGG and MP3 files playback ending prematurely if their size is a multiple of 32 KB.
- Game.ChangeTranslation does not make game quit if the trs file is incorrect (e.g. from different game).

Log file is only written if told to. To enable:
a) add under [misc] in acsetup.cfg
Code (text) Select

log=1

b) add "--log" to command line; also "--no-log" overrides acsetup.cfg and disables log file.

Log is saved in "Users\<Name>\Saved Games\.ags" on Vista, Win7 and Win8, and in "My Documents\My Saved Games\.ags" on WinXP.

Other platforms will have their respected paths, e.g. Linux will write to "$HOME/.ags".

Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Sat 21/12/2013 18:17:01
Nice work as always!
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Sun 22/12/2013 11:06:55
Testing with this new build, the "Send Error Report" crash I mentioned in my last post does still occur. Here is some additional information about the conditions of the crash:

-It occurs with both AGS games I'm testing (Al Emmo and Mage's Initiation)
-Only crashes when running in full-screen mode. In windowed mode, I can call QuitGame() or Alt+X and it exits without any rigmarole.
-Only crashes under the Direct3D driver.
-Only happens when I run the compiled game's exe. It doesn't occur when I use CTRL+F5 to test the game from the editor.

The crash message box contains some error details, but unfortunately they can't be copied and pasted to the clipboard (it doesn't seem to be functional while the crash error is on screen).

Also, here's a related quirk regarding ogg/mp3 music and timing. This is a rather annoying glitch that has been present ever since the new audio system was added. In our games, there's a few music pieces which have an introductory jingle that plays once only. The end of this jingle segues seamlessly into a 'main' piece. The main piece loops many times over and its end transitions perfectly back into its beginning (i.e. the loop point). Here are two example music pieces:

Combat Intro (Jingle) (http://www.himalayastudios.com/scratch/battle_intro.ogg)
Combat Main Loop (http://www.himalayastudios.com/scratch/battle_loop.ogg)

These have been split exactly at the right microsecond to make the segue/transition flawless. If you open Winamp's playlist and add battle_intro and then battle_loop, in that order, you will hear how smooth the transition is meant to sound during playback. Now, the problem in AGS is that this segue from one piece into the next isn't seamless. Here's how it has been set up in the script:


Spoiler

SetGameOption(OPT_CROSSFADEMUSIC, 0);
battle_intro.Play(eAudioPriorityHigh, eOnce);
battle_loop.PlayQueued(eAudioPriorityHigh, eRepeat);
[close]


Prior to the audio bug being addressed in the above build, the transition between the two pieces would always make the second piece start playing a bit too early. And using the above build, there is a short but noticeable gap when the second piece begins. Sidenote: When the battle_loop.ogg piece is set to eRepeat, the loop is seamless. The issue doesn't affect regular looping pieces - just pieces that lead into other pieces.

This one's been bugging me for a while now and CW's post above reminded me about it. Hopefully it's an easy fix! ;)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 23/12/2013 10:38:56
One of our testers reports,

When I quit the game in full screen mode, the game stops with an error report, and wants to notify Microsoft. The error shows:
AppName: hq3.exe  AppVer: 3.3.0.1148  ModName: unknown
ModVer: 0.0.0.0  Offset: 4fd35f8a
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 23/12/2013 20:00:38
Quote from: AGD2 on Sun 22/12/2013 11:06:55
Testing with this new build, the "Send Error Report" crash I mentioned in my last post does still occur. Here is some additional information about the conditions of the crash:

-It occurs with both AGS games I'm testing (Al Emmo and Mage's Initiation)
-Only crashes when running in full-screen mode. In windowed mode, I can call QuitGame() or Alt+X and it exits without any rigmarole.
-Only crashes under the Direct3D driver.
-Only happens when I run the compiled game's exe. It doesn't occur when I use CTRL+F5 to test the game from the editor.

Quote from: Radiant on Mon 23/12/2013 10:38:56
When I quit the game in full screen mode, the game stops with an error report, and wants to notify Microsoft. The error shows:
AppName: hq3.exe  AppVer: 3.3.0.1148  ModName: unknown
ModVer: 0.0.0.0  Offset: 4fd35f8a


I know what causes this, but don't know why (yet).
I also know how to fix it, but don't know why the fix works :).
I'll take some time to investigate more.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 23/12/2013 22:49:35
Ok, d3d9 crash on exit should be fixed:
http://www.mediafire.com/download/04dbbg9tjjb4av8/acwin_fixed_d3d9_24dec2013.7z
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Tue 24/12/2013 01:01:23
Thanks, this fixes it for me.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 24/12/2013 19:03:15
AGS 3.3.0 BETA 11 released (engine version 3.3.0.1150)
-------------------------------------------------------
This summarizes all the minor engine updates since November 14th.

Known regression: SpeechCenter plugin is not working with 3.3.0 Editor, but this is going to be resolved very soon.
Known problems with new features: Threaded audio (optional feature) has still serious issue that result in audio becoming desync with the rest of the game under some conditions.

-------------------------------------------------------
Changes from BETA 10:

Features:
- The game automatically fallbacks to Software graphics driver if the Hardware one could not run or initialize gfx mode for any reason.
- Improved automatic "max" scaling filter selection to let it take letterbox/sideborders mode into account.
- Further improved threaded audio (fixing definitive stuttering problems observed on Windows 8 system).
- Game.ChangeTranslation() script function no longer causes game to quit if the translation file belongs to different game or has unknown format.
- Log file is now only written if told to. It is enabled either by setup file:
Code (text) Select

[misc]
log=1

or "--log" to command line; also "--no-log" overrides acsetup.cfg and disables log file.
Log is saved in "Users\<Name>\Saved Games\.ags" on Vista, Win7 and Win8, and in "My Documents\My Saved Games\.ags" on WinXP.
Other platforms will have their respected paths, e.g. Linux will write to "$HOME/.ags".
- Added two "overriding" options for game config:
Code (text) Select

[override]
multitasking=0/1
os=dos/win/linux/mac

* Multitasking - overrides game's multitasking mode. Useful if game has lengthy unskippable sequences. Keep in mind that this will lock game in the given mode and make it ignore script commands that change it.
* Os - overrides System.OperatingSystem return value. Useful for ports when game disables some feature for the system because it thinks it's not supported.
- For every "long" command line argument the traditional GNU form (--arg) is supported, for example "--windowed", "--letterbox", etc (by Scott Baker).
- Built-in stubs for Wadjet Eye's "agswadjetutil" plugin, which lets to run certain games (such as "The Shivah: Kosher Edition") without the plugin present (at least on desktop systems) (by Eric Torbjorn).


Bug fixes:
- Fixed division by zero which occured if there was a 1px tall walkable area (a precisely straight horizontal line) with vector scaling applied.
- Fixed OGG speech ending prematurely if the audio file size is a multiple of 32 KB.
- Fixed crash related to forced x2 scaling (applied in case 320x200/240 resolution is not supported) (regression).
- Fixed potential crash that could sometimes occur on program abortion due logic error in the engine (regression).


Compatibility:
- Properly fixed drawing of the GUIs with transparent backgrounds in pre-3.2 games (previous fix made many months ago was incorrect and caused extra problem).


Download links (also updated at first page):
EXE:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta11.exe
ZIP:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta11.zip
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Wed 25/12/2013 13:50:49
Just wanted to mention that the person who noticed the threaded audio lagging 20 seconds behind in the Al Emmo cutscene videos (and 2-3 seconds behind during gameplay) was actually using Windows 7 or 8, not XP.

Is the queued music glitch that I posted above related to this? Or is that a separate issue entirely?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Fri 27/12/2013 16:41:01
I'm curious if it's possible to either detect what type of keyboard the player is using, or to get scancodes for physical keys instead of the character. I'm asking because Heroine's Quest uses Q/W/E, A/D, Z/X/C as a control pad (at least on laptops that don't have a Home/Up/Pgup number pad); and this doesn't work on a German or French keyboard since they use QWERTZ and AZERTY respectively.
Title: Re: AGS 3.3.0 Beta Release
Post by: DoorKnobHandle on Fri 27/12/2013 17:48:57
As a workaround, what I did in The Art of Dying (which is open source) is allow people to simply define their own keys in an ingame options menu. Seems like the best solution for everybody!
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 30/12/2013 22:06:01
AGS 3.3.0 BETA 12 released (engine version 3.3.0.1152)
-------------------------------------------------------
The last release in this year (unless there's some terrible bug that will need instant fixing).
Couple of fixes and addition to Editor Plugin API.

-------------------------------------------------------
Changes from BETA 11:

Editor Plugin API (by Gilad Shaham aka SpeechCenter):
- Added property for getting playable character.
- Added property for getting ScriptsAndHeaders collection.
- Added methods for refreshing project's tree.
- Added method for refreshing property grid.
- Added methods for controlling output panel.

Bug fixes:
- Fixed broken compatibility with existing Editor plugins that prevented from using game scripts (namely Speech Center plugin) (regression).
- Fixed bug that caused loss of precision when using DynamicSprite.Rotate() function (regression).

Compatibility:
- Fixed < 2.72 games not fully displaying label text sometimes.


Also updated CHANGELOG document to match current build state and added few missing names to credits.

Download links (also updated at first page):
EXE:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta12.exe
ZIP:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-beta12.zip
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Mon 30/12/2013 22:15:31
Nice work, CW!

Can I make a suggestion? Release it! Unless there is a hideous bug (that isn't also present in the last official AGS release... 2.2.1 is it?), take this and put it out as AGS 3.3. Any further improvements can go into 3.3.1. But it's time we had a new official release, and this seems to be ready now.

Do it! (nod)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 30/12/2013 22:23:17
Quote from: Snarky on Mon 30/12/2013 22:15:31
Nice work, CW!

Can I make a suggestion? Release it! Unless there is a hideous bug (that isn't also present in the last official AGS release... 2.2.1 is it?), take this and put it out as AGS 3.3. Any further improvements can go into 3.3.1. But it's time we had a new official release, and this seems to be ready now.

Do it! (nod)

Heh :)
I'd do that, but there are two things to do, one of which is mandatory, and another would be rather nice to have if it's finished in time:
1. Update manual (my priority 1 now).
2. Fix threaded audio (still unstable in some case); this includes the fix made by monkey_05_06, which is still kept in his personal code storage.

Of course additional fixes can be moved to 3.3.1.
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Tue 31/12/2013 17:04:00
Can 3.3.1 have the custom resolution build integrated so there is no longer 2 versions? :=
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 31/12/2013 17:13:53
Quote from: Knox on Tue 31/12/2013 17:04:00
Can 3.3.1 have the custom resolution build integrated so there is no longer 2 versions? :=
I do not think it should be called 3.3.1, it is a major change, and 3.3.1 is only for improving and fixing 3.3.0.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Tue 31/12/2013 18:51:16
I was going to post something like that. I really think this is a 3.4.0 release. If you did implement the custom resolutions and the limit removal, I would go as far 4.0.0.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Wed 01/01/2014 19:03:02
Quote from: Snarky on Mon 30/12/2013 22:15:31
Can I make a suggestion? Release it! Unless there is a hideous bug (that isn't also present in the last official AGS release... 2.2.1 is it?), take this and put it out as AGS 3.3. Any further improvements can go into 3.3.1. But it's time we had a new official release, and this seems to be ready now.
I second that. I should note that there are a lot of people playing HQ now, which is a 3.3 beta build, so that should tell us something about its overall stability.
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Thu 02/01/2014 20:23:58
Just don't forget to update the text in the license agreement:

QuoteCopyright (c) 1999-2011 Chris Jones and 2011-2013 various contributors.
Title: Re: AGS 3.3.0 Beta Release
Post by: selmiak on Thu 02/01/2014 21:18:22
Quote from: cat on Thu 02/01/2014 20:23:58
Just don't forget to update the text in the license agreement:

QuoteCopyright (c) 1999-2011 Chris Jones and 2011-2013 various contributors.
posted in January 2014... ;)
Title: Re: AGS 3.3.0 Beta Release
Post by: cat on Thu 02/01/2014 21:58:30
Exactly, that's why he should change the year. I just installed the new beta and noticed the old date.
Title: Re: AGS 3.3.0 Beta Release
Post by: Grim on Fri 03/01/2014 03:40:13
I'm in, officially using this version now...

Scary, but exciting! :)

So far, no bugs.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 03/01/2014 13:10:36
Quote from: Grim on Fri 03/01/2014 03:40:13
Scary, but exciting! :)

...A-a-aand we have a new tag line for splash screen now. :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Grim on Fri 03/01/2014 17:39:52
haha I have to say I'm really loving it so far! It's great to have a room window and script open at the same time, really useful.

It would be great to see the full list of new features and an updated manual, though. (I had a dream last night that there's a object.Rotate function there... ;) )

Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Fri 03/01/2014 18:02:19
Quote from: Grim on Fri 03/01/2014 17:39:52
It would be great to see the full list of new features and an updated manual, though. (I had a dream last night that there's a object.Rotate function there... ;) )
The full list of new features is in the first post of this thread. Updating the manual is what I am going to do in the nearest couple of days.
And, hmm, you can use DynamicSprite.Rotate to rotate images, hope that helps ;)
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Mon 06/01/2014 22:19:25
Regarding our earlier discussions about the winsetup program, one of the reasons for releasing Heroine's Quest without one was to find out which options people commonly use in winsetup. Based on feedback thereon, there are three options that players are primarily interested in, and those are (a) fullscreen, (b) magnification factor, i.e. the filter pulldown, and (c) language selection. I'm afraid that common players (as opposed to AGS regulars) simply don't understand most of the other options, like the difference between DX5 and DX9, or "alternate" letterbox resolution.

But then it struck me that the winsetup program already has an "advanced" submenu! This currently contains the options for replay and memory limit. I think a very good approach would be to move all those rarely-used extra options into advanced, that's precisely what it's for! That way, normal users can have their easy winsetup, and AGS regulars can click advanced to see all the other options. Plus it'd take all of five minutes to rearrange controls on a standard Windows GUI like that. (alternatively, add a boolean to the game settings that lets the designer swap between "original" winsetup and "simplified" winsetup).

I stongly believe that clarity is the best approach in installation and setup tools, and this way everybody can have what they need.
Title: Re: AGS 3.3.0 Beta Release
Post by: Calin Leafshade on Tue 07/01/2014 13:44:11
Winsetup should be deprecated and the relevant functions moved into the script domain, imo.
Title: Re: AGS 3.3.0 Beta Release
Post by: Joseph DiPerla on Tue 07/01/2014 13:57:43
Quote from: Calin Leafshade on Tue 07/01/2014 13:44:11
Winsetup should be deprecated and the relevant functions moved into the script domain, imo.

Agreed.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 07/01/2014 18:31:59
Quote from: Calin Leafshade on Tue 07/01/2014 13:44:11
Winsetup should be deprecated and the relevant functions moved into the script domain, imo.
That would be even better, yes, but in the meantime an easy fix to is move all those rarely-used and hard-to-understand functions into the "advanced options". Because they are.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 12/01/2014 15:10:37
I am looking for anyone who could help proofread and possibly improve the manual update I am writing for 3.3.0.
I am trying to maintain the existing manual style.

Here's the excrept I did for "Upgrading to AGS 3.3" topic:

Quote
Upgrading to AGS 3.3

AGS 3.3 editor contains a major change to user interface that now lets you to "unpin" visual panels,
drag them to any place you want and dock there or optionally leave in "floating" mode. You may
also have more than one editing panel on screen at once, for example room editor and script editor.
This allows everyone to customize the panes layout in AGS to their own taste.

You may now create folders for characters, dialogs, inventory items, guis, rooms, scripts and views,
move them up/down by context menu, and drag & drop items to change their order.
The "Sort room by number" command now sorts within folders.

Script and header files are now combined into one group item, similar to room settings and script.

Proper alpha blending

AGS now features proper alpha blending when drawing GUI Controls and using Drawing Surfaces.
This feature is enabled by two separate options in the "Visual" section of the General Settings:
"GUI alpha rendering style" and "Sprite alpha rendering style". This is done for compatibility with
projects created in previous versions of AGS.
When importing a project in AGS 3.3 these options will retain their original values. You may
consider setting them to "Proper alpha blending", but that may alter the looks of your game.
New projects will have "proper blending" mode set by default.

To support alpha blending a new HasAlphaChannel
property is added to DialogOptionsRenderingInfo class. This property must be set it in
dialog_options_get_dimensions function, the one where you
normally define size and position of the drawing surface.

System limits update

The maximal number of Fonts has been increased from 15 to 30.

New Speech class

There's now a new Speech script class that contains several speech-related properties. This renders
number of global functions obsolete, as well as some of the game variables.
If you are using any of them in your script you will likely get compilation errors. Simply replace
them by corresponding Speech properties, as shown in the table below:

table skipped, for it contains only function names

Game-wide speech animation delay

The "Old-style game-wide speech animation speed" general setting previously found in
"Backwards compatibility" section was replaced with two settings in "Dialog" section:
"Use game-wide speech animation delay" and "Game-wide speech animation delay". First enables the
use of the game-wide delay and the second specify exact delay value.
These settings are accompanied by two respective properties in the Speech class.

Translated ListBox

In the previous versions of AGS the ListBox items were never translated. A new "Translated" property
is added to ListBox class, which forces engine to translate ListBox items. Default value is True
but it is recommended to set it to False if you are using ListBox for listing savedgames.
NOTE: when older projects are imported, it is set to False automatically.
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Sun 12/01/2014 18:52:34
Hi CW. I could proofread, but probably not do any major editing in the next couple of weeks.

In this excerpt, the only bits I would change are:
Quotedrag them to any place you want and dock them there, or optionally leave them in "floating" mode.
Quoteconsider setting them to "Proper alpha blending", but that may alter the appearance of your game.
QuoteThis renders a number of global functions obsolete, as well as some of the game variables.
QuoteSimply replace them by the corresponding Speech properties, as shown in the table below:
QuoteThe first enables the use of the game-wide delay and the second specifies exact delay value.

You also use both "is added" and "was added" (/"replaced") to describe changes. I would recommend "has been added" in each instance.

None of the changes are particularly critical; the draft text is mostly fine as it stands.
Title: Re: AGS 3.3.0 Beta Release
Post by: selmiak on Sun 12/01/2014 19:57:37
I'd like to help but as a non native speaker myself I make enough errors myself.
Why not paste it all to a wiki and grab the most current version with some code magic every time a new built is released. But as this open up ways to destroy stuff there should be some editing restrictions on the wiki (not neccesarily the main AGS wiki).
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 12/01/2014 20:04:52
Quote from: selmiak on Sun 12/01/2014 19:57:37
Why not paste it all to a wiki and grab the most current version with some code magic every time a new built is released.
Please suggest this here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=46223.0 . I am just using what is avalaible at the moment.


Regarding text, there will be some more, I am writing formal specifications for new script features now.
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Sun 12/01/2014 20:28:17
QuoteSystem limits update

The maximal number of Fonts has been increased from 15 to 30.

Isn't it better to use maximum instead of maximal?

Never mind. Maximal is indeed better to use here.
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Mon 13/01/2014 22:58:14
If ever you need some help translating from english to french, let me know my wife and I are fluent in both languages. :=
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 13/01/2014 23:56:48
Quote from: Knox on Mon 13/01/2014 22:58:14
If ever you need some help translating from english to french, let me know my wife and I are fluent in both languages. :=
People, I don't get this. It's french people who might need this translation, not me. If you want to help them, you just translate the manual; you don't need my request to do so.
Stop think of me as some kind of ultimate planner for AGS, this is beyond reasonable (and not true).
How happened that I am making 3.3.0 distributives now? I came on forums back in 2012, asking if there's an assembled team whom I could help. It appeared there was none. Then I just started refactoring the code myself. I guess JJS did not ask permission to make ports too. So you can go same way.
I am not going to care about just everything, I am sticking only to certain tasks, and keep hoping others would do something too...
Title: Re: AGS 3.3.0 Beta Release
Post by: Knox on Tue 14/01/2014 03:03:57
Just offering some help. My apologies.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 14/01/2014 07:17:59
Quote from: Knox on Tue 14/01/2014 03:03:57
Just offering some help. My apologies.
Apologies for what??????????? :~(


No, it's me who should make an apology. I realize I was rude.

I don't know how to express this, but I feel confused when being offered help like this. There can be a lot of things done in parallel, and I am obviously unable to watch over everything. I am just hoping others would join this work, or make some contributions. When you offer help this way I can't help but wonder, why there's a need to ask me when it's obviously might be useful; is it like I am "blocking" people from doing anything?
Maybe I am? In such case this should be resolved somehow.
Title: Re: AGS 3.3.0 Beta Release
Post by: Billbis on Tue 14/01/2014 09:24:08
Out of topic, but the French version of the manual is available (and editable) here (http://admin.no.uchi.free.fr/dokuwiki-2008-05-05/doku.php) thanks to Kitai (http://www.adventuregamestudio.co.uk/forums/index.php?action=profile;u=12595). Also, French version of AGS (based on an old 3.2.2) here (http://adventuregamestudio.fr-bb.com/t2054-ags-322-beta-en-francais#32618). And we plane to do a French version of 3.3.0 as soon as it is released in final version. Help is very much needed, and will be welcome with great pleasure.
One cool thing with the online manual is that it is linked to the French forum code analyzer (http://adventuregamestudio.fr-bb.com/t2132-analyse-du-code-ags) (just put your mouse on the "Display" function). 8-)

Back to topic, has someone reproduced and/or corrected this minor bug (http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.msg636475690#msg636475690)?
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 14/01/2014 18:24:28
Dear CW, could you please comment on the winsetup matter? I understand that moving everything to script functions, as one poster suggests, is best left for 3.4, but it might be possible to move some of the advanced setup options onto the 'advanced' tab for 3.3? Personally I would consider it a bug to have advanced option (as in, "the average player won't need this and doesn't understand what it means") visible on the main setup screen. In my opinion it's important to have a setup tool that is easily understandable even to players who are not familiar with AGS yet.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Tue 14/01/2014 18:34:49
Quote from: Radiant on Tue 14/01/2014 18:24:28
Dear CW, could you please comment on the winsetup matter? I understand that moving everything to script functions, as one poster suggests, is best left for 3.4, but it might be possible to move some of the advanced setup options onto the 'advanced' tab for 3.3? Personally I would consider it a bug to have advanced option (as in, "the average player won't need this and doesn't understand what it means") visible on the main setup screen. In my opinion it's important to have a setup tool that is easily understandable even to players who are not familiar with AGS yet.
Moving setup to script is something beyond my understanding... unless someone elaborates on that.
Regarding moving controls... I guess it's possible, if no one objects. Winsetup is an ugly WinAPI code, that I hope will be rewritten from scratch (or completely moved out of AGS and use some modern GUI library), but moving these controls around window should be easy.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 14/01/2014 22:06:15
Quote from: Crimson Wizard on Tue 14/01/2014 18:34:49
Moving setup to script is something beyond my understanding... unless someone elaborates on that.
Give me a few days to think about it and I'll write a ticket about it (for 3.4) in the ticket database; that seems the best place to work it out further.

Quote
Regarding moving controls... I guess it's possible, if no one objects. Winsetup is an ugly WinAPI code, that I hope will be rewritten from scratch (or completely moved out of AGS and use some modern GUI library), but moving these controls around window should be easy.
Thanks. Well there's a few people up in the thread that appear to agree, at least. The experiment with including no winsetup with HQ shows that the primary options people are looking for are fullscreen, filter, and language; leading to a straightforward setup like this (http://crystalshard.net/test/sample_setup.PNG), with everything else appearing under 'advanced' for the AGS regulars. I think this is a fair tradeoff that gives new users a clear list of common options, and still allows the advanced users to find what they need after just one more click.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 15/01/2014 10:23:27
Quote from: Billbis on Sat 14/12/2013 10:28:56
Just signaling a minor editor bug:
1. Open a project
2. Double click on Sprite
3. Expend GUIs and double click on a GUI
4. Close the open GUI panel
5. Close the Sprite panel
6. Double click on Sprite: the Sprite panel won't open anymore.

There's a reason little details are important. Took me a while to reproduce this ;). This only occurs if you close panels by pressing X button in the top-right corner. This does not occur if you right-click on pane name and select "close pane" in context menu.

Upon testing bit more I came with this more general description:

1. When panels are closed by pressing X button in their top-right corner it may become so that the pane that was closed last stops showing up again. This happens with ANY combination of panels.
2. If, after this happened, you open any other pane and immediately close it (again, using X), the "missing" pane will re-appear. Furthermore, if you close that, previously missing pane, and open any other pane again and close it, the "missing" pane will appear again, even though you never tried to open it again.

It looks to me that something is bugged in the way how X button works. Perhaps it does not remove the pane from opened panes list, but merely makes them invisible?


I would like to also point out to the strange ordering of the pane tabs. When the new pane is opened, sometime it appears last, sometimes first, sometimes in the middle of the existing tabs. Probably there's some rule there, but I could not recognize the pattern yet.
Title: Re: AGS 3.3.0 Beta Release
Post by: Snarky on Wed 15/01/2014 12:57:28
Sorry to provide another vague bug report, but I recently experienced getting the editor into a state where the active tab was for one room, but the properties pane was for another. That got rather confusing. I'm not sure about the sequence of actions that led to this.
Title: Re: AGS 3.3.0 Beta Release
Post by: tzachs on Wed 15/01/2014 22:33:53
Quote from: Crimson Wizard on Wed 15/01/2014 10:23:27
Quote from: Billbis on Sat 14/12/2013 10:28:56
Just signaling a minor editor bug:
1. Open a project
2. Double click on Sprite
3. Expend GUIs and double click on a GUI
4. Close the open GUI panel
5. Close the Sprite panel
6. Double click on Sprite: the Sprite panel won't open anymore.

There's a reason little details are important. Took me a while to reproduce this ;). This only occurs if you close panels by pressing X button in the top-right corner. This does not occur if you right-click on pane name and select "close pane" in context menu.

Upon testing bit more I came with this more general description:

1. When panels are closed by pressing X button in their top-right corner it may become so that the pane that was closed last stops showing up again. This happens with ANY combination of panels.
2. If, after this happened, you open any other pane and immediately close it (again, using X), the "missing" pane will re-appear. Furthermore, if you close that, previously missing pane, and open any other pane again and close it, the "missing" pane will appear again, even though you never tried to open it again.

Thanks for the detailed description, fixed (in 3.3 branch).
Title: Re: AGS 3.3.0 Beta Release
Post by: The Suitor on Mon 20/01/2014 16:07:53
I'm not sure if this has been asked about before (I tried searching the forums), and it may only be my system, but I get this error when trying to open the editor:

QuoteAn unexpected error occurred trying to start up the AGS Editor. Please consult the details below and post the error to the AGS Technical Forum.

System.IO.FileLoadException: Could not load file or assembly 'AGS.Native, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

File name: 'AGS.Native, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.Runtime.InteropServices.COMException (0x800736B1): This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

   at AGS.Editor.NativeProxy..ctor()

   at AGS.Editor.NativeProxy.get_Instance()

   at AGS.Editor.ApplicationController..ctor()

   at AGS.Editor.Program.startupTimer_Tick(Object sender, EventArgs e)

   at System.Windows.Forms.Timer.OnTick(EventArgs e)

   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


I'm using Windows XP SP3, and have .Net 4 installed. My Windows 7 and 8 PCs have no problem at all.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 20/01/2014 16:56:29
Quote from: The Suitor on Mon 20/01/2014 16:07:53
I'm using Windows XP SP3, and have .Net 4 installed.
You need .Net 2.0, or 3.5 installed (which also includes 2.0). AFAIK .Net 4 does not include 2.0.
Other than that... not sure what may be the problem.
Title: Re: AGS 3.3.0 Beta Release
Post by: The Suitor on Mon 20/01/2014 19:08:23
Hmm, I had both 2.0 and 3.5 installed. So, I uninstalled all .Net versions (2.0, 3.5, 4.0), and then reinstalled only 2.0, and it's still giving me the same error.

By the way, 3.2.1 works flawlessly.


I suppose it's not such a big deal, since it's very likely that most people will stop using XP pretty soon anyway. :smiley: (If that's the problem)
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Mon 20/01/2014 19:32:32
Quote from: The Suitor on Mon 20/01/2014 19:08:23
I suppose it's not such a big deal, since it's very likely that most people will stop using XP pretty soon anyway. :smiley: (If that's the problem)
No... it is a pretty big deal actually :-\. It must work on XP.
Just to clarify, did you download the Editor by the link on the first post of this thread?
Does anyone else have this problem on XP?

UPD: I am testing WinXP Professional SP3 on the virtual machine.
I have installed:
- Adventure Game Studio 3.3.0.1152 (beta 12);
- .Net Framework 1.1;
- .Net Framework 2.0 SP2;
- VC Redistributable 2005;
- VC Redistributable 2008;
- VC Redistributable 2010;
- VC Redistributable 2012;
- MSXML 4.0 SP3 Parser.
Title: Re: AGS 3.3.0 Beta Release
Post by: The Suitor on Mon 20/01/2014 22:24:17
Quote from: Crimson Wizard on Mon 20/01/2014 19:32:32
Just to clarify, did you download the Editor by the link on the first post of this thread?
Yes I did, I tried both the zip and the installer. (nod)

EDIT TO ADD:

Quote from: Crimson Wizard on Mon 20/01/2014 19:32:32
Does anyone else have this problem on XP?
I also should note, that the same thing happens on my other XP SP3 pc. Totally different system.

Quote from: Crimson Wizard on Mon 20/01/2014 19:32:32
No... it is a pretty big deal actually :-\. It must work on XP.
I'm glad you think this way. I'm far from giving up XP as a workstation. 8-)
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Tue 21/01/2014 16:25:40
Seeing The Suitor's problem, I decided to try beta on my system too. I'm using WinXP SP 3, Microsoft .Net Framework Version 2.0 SP1 and I'm getting the same error as The Suitor:

Spoiler

---------------------------
Error
---------------------------
An unexpected error occurred trying to start up the AGS Editor. Please consult the details below and post the error to the AGS Technical Forum.

System.IO.FileLoadException: Could not load file or assembly 'AGS.Native, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

File name: 'AGS.Native, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.Runtime.InteropServices.COMException (0x800736B1): This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

   at AGS.Editor.NativeProxy..ctor()

   at AGS.Editor.ApplicationController..ctor()

   at AGS.Editor.Program.startupTimer_Tick(Object sender, EventArgs e)

   at System.Windows.Forms.Timer.OnTick(EventArgs e)

   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)




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

[close]

Also, I've noticed that AGS Editor's process doesn't really end at all. If you open the task manager, you can see AGSEditor.exe still present there. Also, the splash doesn't disappear too and doesn't respond to clicks of any sort.
Title: Re: AGS 3.3.0 Beta Release
Post by: Radiant on Tue 21/01/2014 20:26:49
We've received the following bug report for Heroine's Quest,

"I have performance issues with this game (I have a fairly powerful computer that runs modern AAA titles easily).

Basically my CPU sounds like it's chugging away the entire time the game is playing. When I'm going around on the normal screens it's MOSTLY fine. Where performance really takes a hit is during dialog. When I have to select my next line of dialog, the mouse gets very unresponsive and it's difficult to aim at a given option.

I have Vista x64 and a GeForce GTX 260 (if I remember correctly)."
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 22/01/2014 07:43:58
@The Suitor, Adeel S. Ahmed,
do you have any Visual C++ Redistributable packages installed on your system?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 22/01/2014 08:18:08
Quote from: Radiant on Tue 21/01/2014 20:26:49
"I have performance issues with this game (I have a fairly powerful computer that runs modern AAA titles easily).

Basically my CPU sounds like it's chugging away the entire time the game is playing."

Is he using DirectX 5 or Direct3D renderer?
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Wed 22/01/2014 08:53:47
No sir, I don't have any Visual C++ Redistributable packages installed. I'll install it as soon as I find time to use my pc (writing this from cell phone at the moment).

Which version of C++ Redistributable package should I install, though?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 22/01/2014 09:30:06
Quote from: Adeel S. Ahmed on Wed 22/01/2014 08:53:47
Which version of C++ Redistributable package should I install, though?
I think it should be VC90 (2008).
Strange thing is, though, that the library is distributed with AGS and lies in its folder... I wonder if it now requires different version of library...

Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Wed 22/01/2014 12:54:30
Another question for you: Which Visual Studio's version and/or year are you using to develop AGS?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 22/01/2014 13:03:20
Quote from: Adeel S. Ahmed on Wed 22/01/2014 12:54:30
Another question for you: Which Visual Studio's version and/or year are you using to develop AGS?
Visual Studio 9 (2008) is used to build AGS.Native.dll.
In theory one can use any higher version to work with the rest of Editor.
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Wed 22/01/2014 13:12:04
IIRC, someone mentioned developing AGS with VS 2012. Perhaps the development of same program in two different VS versions produced some conflict. Just my careful guess....

E: Yesterday, I were reading the .NET Framework 3.5 page. There, in the instructions, it was told to immediately install the either of the two updates, after downloading the framework. One of the two updates fixes the application compatibility problem on XP (iirc). Perhaps, this is the solution to my problem. I'm downloading .net framework 3.5 at the moment.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Wed 22/01/2014 13:19:54
Quote from: Adeel S. Ahmed on Wed 22/01/2014 13:12:04
IIRC, someone mentioned developing AGS with VS 2012. Perhaps the development of same program in two different VS versions produced some conflict. Just my careful guess....

Only C# libraries can be developed with 2012 (and 2010), and they do not require VC runtime libraries. Only AGS.Native.dll does.

I run a special utility for AGS.Native.dll from beta package that displays dependencies. It requires MSVCR90.dll and MSVCM90.dll.
Title: Re: AGS 3.3.0 Beta Release
Post by: The Suitor on Wed 22/01/2014 15:58:25
Quote from: Crimson Wizard on Wed 22/01/2014 07:43:58
@The Suitor, Adeel S. Ahmed,
do you have any Visual C++ Redistributable packages installed on your system?

I have every one of them installed that you had listed. Still the same.

Quote from: Crimson Wizard on Mon 20/01/2014 19:32:32
- Adventure Game Studio 3.3.0.1152 (beta 12);
- .Net Framework 1.1;
- .Net Framework 2.0 SP2;
- VC Redistributable 2005;
- VC Redistributable 2008;
- VC Redistributable 2010;
- VC Redistributable 2012;
- MSXML 4.0 SP3 Parser.

Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 23/01/2014 07:20:40
At which point did this problem arise? :( Anyone else used 3.3.0 beta on WinXP before?
Strange thing is that it works on the XP virtual machine I am running, which has literally only the .Net Framework and few VC redist. installed (no other programs, libraries, etc).

Here are the older versions of beta uploaded to ags server:
http://www.adventuregamestudio.co.uk/betas/

Does any one work for you?
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Thu 23/01/2014 09:55:05
Nope, still can't make it to work. Even the 3.3.0 beta-3 doesn't work. But I have found something that may be useful to you:

http://www.adventuregamestudio.co.uk/forums/index.php?topic=34401.msg454661#msg454661

E: More people had this problem too. See this:

http://www.adventuregamestudio.co.uk/forums/index.php?topic=34401.msg455570#msg455570

http://www.adventuregamestudio.co.uk/forums/index.php?topic=34401.msg455617#msg455617

Chris Jones proposed the following solution which worked for the people at that time:

http://www.adventuregamestudio.co.uk/forums/index.php?topic=34401.msg455681#msg455681

But the strange thing is that: I can't find any registry entry as CJ had mentioned to look for.
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Thu 23/01/2014 09:58:19
For the record, I'm using WIn XP Pro SP3 and don't have this problem with AGS 3.3.0 beta.
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Thu 23/01/2014 10:10:33
Quote from: AGD2 on Thu 23/01/2014 09:58:19
For the record, I'm using WIn XP Pro SP3 and don't have this problem with AGS 3.3.0 beta.

Can please tell us what libraries you have installed on your system? :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Thu 23/01/2014 10:19:39
FOUND A DEPRESSING FIX!

I'm happy to report that I've finally found a fix. I first installed the 3.2.1 to obtain a copy of AGS.Native.dll (year of mod: 2011). Uninstalled the 3.2.1 and installed the 3.3.0 beta. After installing it, I replaced the 3.2.1's AGS.Native.dll with 3.3.0's AGS.Native.dll (year of mod: 2013) and it started working. But I'm not too sure whether this is the right thing to do... - don't do this for the love of CJ!

Haha - on the downside, I can't compile the game now. But at least, the editor runs fine!


UDPATE: The actual solution and/or fix (or whatever you like to call it) can be found below. Don't follow this post's steps unless you like to live dangerously. :=
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 23/01/2014 10:25:04
Quote from: Adeel S. Ahmed on Thu 23/01/2014 09:55:05
Nope, still can't make it to work. Even the 3.3.0 beta-3 doesn't work. But I have found something that may be useful to you:
Thanks. :) First link looks similar.
Other two do not seem to have any relation though, they are something different and seemingly occurred when program was already working.

Quote from: Adeel S. Ahmed on Thu 23/01/2014 10:19:39I first installed the 3.2.1 to obtain a copy of AGS.Native.dll (year of mod: 2011). Uninstalled the 3.2.1 and installed the 3.3.0 beta. After installing it, I replaced the 3.2.1's AGS.Native.dll with 3.3.0's AGS.Native.dll (year of mod: 2013) and it started working ;-D .
Wait... I am confused. You are using AGS 3.3.0 with 3.2.1's dll or  AGS 3.2.1 with 3.3.0's dll?

Quote from: Adeel S. Ahmed on Thu 23/01/2014 10:19:39
Haha - on the downside, I can't compile the game now. :P
Well, newer version of library has somewhat different logic inside...
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Thu 23/01/2014 10:27:41
Why the 3.3.0 installer doesn't create new registry entries btw? I only see the Start Menu entry.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 23/01/2014 10:41:34
Quote from: Adeel S. Ahmed on Thu 23/01/2014 10:27:41
Why the 3.3.0 installer doesn't create new registry entries btw? I only see the Start Menu entry.
It is Editor that writes to registry, not installer.
Probably not a very good thing... but at least it lets you to keep "recent projects" list in the startup menu.
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Thu 23/01/2014 10:49:14
Ah, I understand. Thanks for explaining. :)
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Thu 23/01/2014 11:34:30
Quote from: Adeel S. Ahmed on Thu 23/01/2014 10:10:33
Can please tell us what libraries you have installed on your system? :)

Apparently, I have these ones installed:

.NET Framework v1.1 [1.1.4322]
.NET Framework v2.0 SP2 [2.2.30729]
.NET Framework v3.0 SP2 [3.2.30729]
.NET Framework v3.5 SP1 [3.5.30729]
.NET Framework 4 Client Profile [4.0.30320]
.NET Framework 4 Extended [4.0.30320]

VC 2005 ATL Update
VC 2005 Redistributable [8.0.56336]
VC 2005 Redistributable [8.0.61001]
VC 2008 Redistributable [9.0.30729.5570]
VC 2008 Redistributable [9.0.21022]
VC 2008 Redistributable [9.0.30729]
VC 2008 Redistributable [9.0.30729.4148]
VC 2008 Redistributable [9.0.30729.6161]
VC 2010 x86 Redistributable [10.0.40219]
Microsoft XNA Framework Redistributable 3.1 [3.1.10527.0]

MSVCRT [14.0.1468.721]
MSXML 4.4 SP2 [4.20.9839.0]
MSXML 4.4 SP2 [4.20.9841.0]
MSXML 4.4 SP2 [4.20.9848.0]
MSXML 4.4 SP2 [4.20.9870.0]
MSXML 4.4 SP2 [4.20.9876.0]
MSXML 6.0 Parser [6.10.1200.0]
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Thu 23/01/2014 11:47:40
Thank you very much, AGD2. I'll install missing libraries and check whether Editor works or not. :)
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Thu 23/01/2014 12:11:01
FINALLY! FOUND THE SOLUTION! ;-D ;-D ;-D

A very big thanks to AGD2. Thank you very much, respected sir, you've my deepest gratitude. I've finally found the solution to this problem. The problem can be solved by downloading VC Redistributable 2008 (http://www.microsoft.com/en-us/download/details.aspx?id=26368) [9.0.30729.6161]. Please download the exact version as pointed out by AGD2.

And thanks once again, AGD2, for providing the detailed version numbers too. :)

E: PS: CW Tzachs, the new editor interface is excellent!
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Thu 23/01/2014 12:40:51
Quote from: Adeel S. Ahmed on Thu 23/01/2014 12:11:01The problem can be solved by downloading VC Redistributable 2008 (http://www.microsoft.com/en-us/download/details.aspx?id=26368) [9.0.30729.6161]. Please download the exact version as pointed out by AGD2.
Darn, I feared something like this. It needs exactly the one I am using when making a distribution.
We must update this file in the AGS package (currently it has version .4148).

Quote from: Adeel S. Ahmed on Thu 23/01/2014 12:11:01
E: PS: CW, the new editor interface is excellent!
Tzachs made it :).
Title: Re: AGS 3.3.0 Beta Release
Post by: Adeel on Thu 23/01/2014 14:52:16
Quote from: Crimson Wizard on Thu 23/01/2014 12:40:51
Darn, I feared something like this. It needs exactly the one I am using when making a distribution.
We must update this file in the AGS package (currently it has version .4148).

It's really frustrating that just because of the slight version mismatch, the .dll refuses to run. Really hard to trace it out (since many people don't look beyond the second decimal of version number - I do that many times too) And Microsoft's download page doesn't explicitly mention anything about this newer version and instead, just calls it a security update which is very easy to miss.

Quote from: Crimson Wizard on Thu 23/01/2014 12:40:51
Tzachs made it :).

Sorry, my mistake! Fixed it. :)
Title: Re: AGS 3.3.0 Beta Release
Post by: AGD2 on Thu 23/01/2014 15:51:20
No worries, glad you got it sorted. :)
Title: Re: AGS 3.3.0 Beta Release
Post by: The Suitor on Thu 23/01/2014 17:16:05
That was definitely the solution. Working great here as well! :-D My deepest thanks to all involved in figuring it out.
Title: Re: AGS 3.3.0 Beta Release
Post by: Crosco on Sun 26/01/2014 18:26:40
Quote from: Crimson Wizard on Thu 23/01/2014 12:40:51
Darn, I feared something like this. It needs exactly the one I am using when making a distribution.
We must update this file in the AGS package (currently it has version .4148).

Wow, what a tricky issue. :-\

Are the "VC Redistributable" part of the installer?
Title: Re: AGS 3.3.0 Beta Release
Post by: Crimson Wizard on Sun 26/01/2014 23:28:03
I made a test build with changed winsetup, please check if that's what you want:
http://www.mediafire.com/download/mq7xl78khqb05jn/acwin_newwinsetup.7z


Quote from: Crosco on Sun 26/01/2014 18:26:40
Are the "VC Redistributable" part of the installer?
Not fully, there are only couple of required libraries coming with AGS files.
Title: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Mon 27/01/2014 18:33:38
AGS 3.3.0 RC released (engine version 3.3.0.1154)
-------------------------------------------------------

Changes from BETA 12:

Features:
- Renamed long GUI rendering options to shorter ones (Classic / Additive Opacity / Proper alpha blending);
- Updated "Empty game" and "Default game" templates to have "proper alpha blending" selected by default.
- Updated winsetup: moved many options under "Advanced" section; also removed "Replay" option which was unused for years (the feature appear broken anyway).

Bug fixes:
- Fix for Editor pane doesn't open after closing it by clicking the 'x' on top right.

Updated manual.
Updated copyright to 2014.

Download links (also updated at first page):
EXE:
http://www.adventuregamestudio.co.uk/betas/AGS-3.3.0-rc1.exe
ZIP:
http://www.adventuregamestudio.co.uk/betas/AGS_3_3_0-rc1.zip



//---------------------------------------------------------------
For this package I updated the MSVC libraries to precisely match the ones used for building the AGS.Native. Still, if you have any problem starting the Editor, make sure you have the latest VC 2008 Redistributable package installed from Microsoft's site.

Also please tell if you are OK with new winsetup. It is visually smaller than before (until you press "Advanced" button).
Title: Re: AGS 3.3.0 Release Candidate
Post by: Adeel on Mon 27/01/2014 19:52:11
Downloading...

I'm glad to see 3.3.0 RC being released. Ever since finding the solution for beta 12, I'm already using 3.3.0 as my official version. Excited to see updated manual and new winsetup. :)
Title: Re: AGS 3.3.0 Release Candidate
Post by: Ghost on Mon 27/01/2014 21:24:44
Link to zip file gets me a 404... :cry:

__
Thanks jug!
Title: Re: AGS 3.3.0 Release Candidate
Post by: fire on Mon 27/01/2014 21:42:06
Should be http://www.adventuregamestudio.co.uk/betas/AGS_3_3_0-rc1.zip
Title: Re: AGS 3.3.0 Release Candidate
Post by: Adeel on Tue 28/01/2014 15:15:46
Hmm, AGS 3.3.0 RC 1 is running smoothly on my pc. It's quite nice to not to see the beta warning and I now feel very comfortable. :)

The UI is simply excellent. The ability to create folders has now enabled me to properly organize my scripts and views which was not the case previously. I like the more powerful debugger. The ability to update sprites, if the source sprite is updated, saved me quite some time and one of the most useful feature. Another feature I really appreciated was the Editor refusing to delete a sprite if it's already in use. Perhaps its just me but I've noticed the '_Debug game' is now running more faster than before. The updated manual looks very professional and precisely mentions the new updates in the release along with the explanation of new additions Speech Class.

I can go on and on, praising this piece of beauty, but I'll stop for now. :) This is the best AGS release by far and I feel very confident to expect even more powerful and better version in near future!

Good Job Dev Team, keep it up! ;-D
Title: Re: AGS 3.3.0 Release Candidate
Post by: AGD2 on Tue 28/01/2014 23:59:29
A couple of funky errors I received with the RC today:

1) At one point I was deleting, replacing, and adding a bunch of music files. I hit F7 to save and the game compiled. But when it finished, it gave me this error:

Unexpected error: The process cannot access the file 'C:\AGS8\Mages Initiation\game28.dta' because it is being used by another process.

Exiting the editor and re-opening was enough to resolve the issue.

2) A more serious one. I double-clicked a view which contained only blue cup sprites in loop 0. Instead of the view opening, I received this error message:

A serious error occurred and the AGS Editor may now be in an unstable state. You are STRONGLY ADVISED to shut down the editor and restart it. Before saving your work, make a backup copy of your game folder in case any data has been corrupted.

I closed the editor without saving the game. Re-opened it and kept getting the same message every time the editor loaded up (but before it allowed me to choose a game to load). It looked like all the panels etc. had been compacted into a small square in the upper-left corner of the editor and the rest of the screen was just grey. The AGS editor files had somehow been corrupted. The only way to open any games in the editor was to re-extract fresh files from the zip, overwriting the corrupted ones. Unfortunately, the error message didn't go into any further details than what's stated above...
Title: Re: AGS 3.3.0 Release Candidate
Post by: Billbis on Wed 29/01/2014 18:16:03
Quote from: Crimson WizardAlso please tell if you are OK with new winsetup.
I'm OK with the new winsetup. :)
It's far clearer like this.
No problem with compiling and completing my projects with this RC so far. Great job!
Title: Re: AGS 3.3.0 Release Candidate
Post by: tzachs on Wed 29/01/2014 19:06:49
Quote from: AGD2 on Tue 28/01/2014 23:59:29
A serious error occurred and the AGS Editor may now be in an unstable state. You are STRONGLY ADVISED to shut down the editor and restart it. Before saving your work, make a backup copy of your game folder in case any data has been corrupted.
Weird. You should have seen a dialog before that error, that shows the actual error...
Anyways, I've added the actual error to this message as well, so once a new version is released if you'll reproduce the issue you'll have more information to show us.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Adeel on Wed 29/01/2014 20:08:37
I've noticed a glitch and/or bug:

If you make a scripting error (such as null pointer referenced), the Editor will run the game to the point it reaches the null pointer reference, shows an error message and the message will disappear once "I've finished examining this error, close the game' button is clicked.  Then, if you manually open the Call Stack window and double click on the line shown on it. The Editor will point you to the 'faulty' line and will display an error just as expected. But after that, the status of the editor changes to '[Debugging] Game Name' (even though there's no game being run). Clicking on Pause and/or Stop button doesn't help as well.

See this:
Spoiler
(http://websolutions.freevar.com/August_and_Onward_Images/Screenshot%202014-01-30%2000.53.33.png)

Here, joke is an audio channel pointer and is kept null intentionally.
[close]

Another bug/glitch I noticed, while tracing the above mentioned glitch/bug, the Editor will run the game to the point it reaches the null pointer reference, shows an error message and the message will disappear once "I've finished examining this error, close the game' button is clicked. But once the editor quits the game: the output, call stack and find results windows get closed automatically as well.
Title: Re: AGS 3.3.0 Release Candidate
Post by: cat on Wed 29/01/2014 21:20:40
Finally! Congrats and thanks to everyone working on this new AGS version. Setup was ok for me.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Thu 30/01/2014 07:36:36
Quote from: Adeel S. Ahmed on Wed 29/01/2014 20:08:37
the Editor will run the game to the point it reaches the null pointer reference, shows an error message and the message will disappear once "I've finished examining this error, close the game' button is clicked.  Then, if you manually open the Call Stack window and double click on the line shown on it. The Editor will point you to the 'faulty' line and will display an error just as expected.

The problem is (perhaps) that the call stack is not cleared as soon as debugging is finished. You should not see callstack when the program is not running, this makes no sense.
At least not in current debugger implementation. It only worked for you because editor keeps some data saved for a while, but that's sort of bug exploit.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Adeel on Thu 30/01/2014 11:17:36
I normally can't see anything in call stack window, once I stop debugging. But this case is exceptional. Also, I forgot to mention that this bug can be 'overcome' by restarting the Editor after closing it.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crosco on Fri 31/01/2014 20:26:57
Download................................PASSED
Installation..............................PASSED
Game conversion from 3.2.1...PASSED
Compiling game......................PASSED
Running game.........................PASSED
Detecting bugs.......................FAILED

Thank you. :)
Title: Re: AGS 3.3.0 Release Candidate
Post by: AGD2 on Fri 31/01/2014 21:38:50
Quote from: tzachs on Wed 29/01/2014 19:06:49
Weird. You should have seen a dialog before that error, that shows the actual error...
Anyways, I've added the actual error to this message as well, so once a new version is released if you'll reproduce the issue you'll have more information to show us.

Shortly after posting that, I realized a few other programs I opened new files or documents in also failed the action ("the program cannot create a new blank document" and similar error messages). It crashed about 5 times in AGS within the space of 20 minutes when I got that previous message I posted. But I've been testing several more days now, and I have yet to see the crash occur again. So I guess it was just some strange quirk or memory hiccup my computer was experiencing at the time. Haven't seen it once after rebooting a few days back.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crosco on Fri 31/01/2014 23:06:24
I detected an issue with the cursor position when deleting a whole line and saving the file afterwards.

How to reproduce:

1) Implement a function at the end of an .asc file containing already some functions. e.g.:
function myFunction()
{
}

2) Add two new lines into the body by pressing "ENTER" two times.
As a result the cursor is now positioned at the second empty line.

3) Save the file via "CTRL" + "S".

4) Press "Shift" + "Cursor Up" to mark the whole line until same position in line above.

5) Press "Del" to remove the line.

6) Save the file via "CTRL" + "S".
As a side effect the cursor position was moved several lines upwards.

Beside this it would also be great if the already opened "Find and replace" window would overtake a new text markup when pressing "CTRL" + "F" once again.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Radiant on Sat 01/02/2014 17:27:50
This has been working fine for us. Nice work!
Title: Re: AGS 3.3.0 Release Candidate
Post by: Radiant on Mon 03/02/2014 18:56:17
Minor interface bug: I would expect control+tab (and shift+control+tab) to move to the next (resp. previous) tab, exactly like how that works in Visual Studio or in my web browser. But that doesn't work for script tabs; for some reason, for any script tab I have to press those keys twice to get to the next tab. This makes editing with the keyboard rather inconvenient at times, and in certain situations makes control-W close the previous tab rather than the currently visible one.

Related feature request: control+1 should switch to the first open tab, control+2 to the second, and so forth.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Radiant on Tue 04/02/2014 00:09:32
Another minor interface bug: when editing a script and you press control-G (for go-to-line), then the dialog box that pops up should have its current text selected. This is so that you can start typing a line number (1234) immediately and it will overwrite what's already there; this is consistent with how it works in e.g. Visual Studio. Also, the display in this dialog box has comma separators for thousands set, and it probably shouldn't. $.02.
Title: Re: AGS 3.3.0 Release Candidate
Post by: abstauber on Tue 04/02/2014 14:09:24
Two editor related  things I've noticed:

1) When I save a script (ash or asc), the undo-history for that file is gone afterwards
2) I alter the font size inside the editor via CTRL-mousewheel. After saving a file, the font size will be reset to the old size.

Sorry if this has already been reported, I admit I haven't read through the whole thread yet :-[
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Thu 06/02/2014 20:13:24
Thanks to Sunny Penguin who reminded me about this.
Uploaded a NO-MP3 version of the engine:
http://www.adventuregamestudio.co.uk/betas/acwin_3.3.0_rc1_nomp3.zip


@Tzachs, do you plan on fixing other reported bugs in the most nearest future?
If they are not serious, we may leave them for 3.3.1 update.
Title: Re: AGS 3.3.0 Release Candidate
Post by: tzachs on Fri 07/02/2014 09:27:57
No, they are not critical (and I'm short on time), so I suggest to leave them for a future update.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Radiant on Fri 07/02/2014 10:33:22
Very well, I'll put them in the issue tracker for now. I agree that getting a stable release is more important than these little issues.

(edit) Ok, I've done a search of this forum and made a number of posts in the issue tracker. Sorry for flooding it :) None of that is a high priority, I think, but it's convenient to have everything in the same tracker for easy reference.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Sat 08/02/2014 15:08:43
So... do we release this? If yes, then how is this organized?
I will now make another build with couple of last-time additions (nothing special, just very minor fixups by Tzachs and me). Where do I upload it, where do I post? :)
Title: Re: AGS 3.3.0 Release Candidate
Post by: selmiak on Sat 08/02/2014 15:41:13
Importing a 3.2.1 game into 3.3.0 is as easy as opening the project in the new editor and confirming that it was made with an older version? How does oldstyle audioscripting import?
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Sat 08/02/2014 15:55:46
Quote from: selmiak on Sat 08/02/2014 15:41:13
Importing a 3.2.1 game into 3.3.0 is as easy as opening the project in the new editor and confirming that it was made with an older version?
Almost, except few deprecated commands. Check "Upgrading to AGS 3.3" in the manual.

Quote from: selmiak on Sat 08/02/2014 15:41:13
How does oldstyle audioscripting import?
It should work as in 3.2.1 (with proper Backward-compatibility option in General Settings).
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Sat 08/02/2014 16:34:38
Uploaded the meant-to-be final release:
http://www.adventuregamestudio.co.uk/finals/AGS-3.3.0.exe
http://www.adventuregamestudio.co.uk/finals/AGS-3.3.0.zip

No MP3 engine:
http://www.adventuregamestudio.co.uk/finals/AGS_3.3.0-noMP3.zip

Please tell that you can download, install and run these.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Billbis on Sat 08/02/2014 16:45:28
I can download, install, run and compile a project with AGS-3.3.0.exe.
Well done, team ! :)
Title: Re: AGS 3.3.0 Release Candidate
Post by: Radiant on Sat 08/02/2014 17:34:34
I also confirm that it works. Thank you very much for your hard work!
Title: Re: AGS 3.3.0 Release Candidate
Post by: cat on Sat 08/02/2014 18:13:43
This is the first offical community-made build, right? Congratulations for getting it done!
Title: Re: AGS 3.3.0 Release Candidate
Post by: selmiak on Sat 08/02/2014 18:19:01
Quote from: Crimson Wizard on Sat 08/02/2014 15:55:46
Quote from: selmiak on Sat 08/02/2014 15:41:13
Importing a 3.2.1 game into 3.3.0 is as easy as opening the project in the new editor and confirming that it was made with an older version?
Almost, except few deprecated commands. Check "Upgrading to AGS 3.3" in the manual.

Are these all commands that are deprecated?
Code (ags) Select

void SetVoiceMode(eVoiceMode);        // use Speech.VoiceMode
void SetSkipSpeech(int skipFlag);     // use Speech.SkipStyle
void SetSpeechStyle(eSpeechStyle);    // use Speech.Style

int game.close_mouth_end_speech_time; // use Speech.AnimationStopTimeMargin
int game.speech_text_align;           // use Speech.TextAlignment
int game.skip_speech_specific_key;    // use Speech.SkipKey
int game.talkanim_speed;              // use Speech.GlobalSpeechAnimationDelay
Title: Re: AGS 3.3.0 Release Candidate
Post by: miguel on Sat 08/02/2014 23:50:22
Congratulations to everybody that worked on this. You're keeping AGS alive.
Thank you.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Ghost on Sun 09/02/2014 07:57:45
Tested the exe and found it flawless- importing 3.2.1. projects is smooth as hell. Congrats to everyone involved! And Zoidberg!

ZIP is once again leading straight to a 404 though.
Title: Re: AGS 3.3.0 Release Candidate
Post by: GMD1984 on Sun 09/02/2014 15:11:56
Thank you for your hard work! Everyone. I'm going to update my game to 3.3.0 soon!
Title: Re: AGS 3.3.0 Release Candidate
Post by: selmiak on Sun 09/02/2014 15:26:04
Quote from: Crimson Wizard on Sat 08/02/2014 15:08:43
I will now make another build with couple of last-time additions (nothing special, just very minor fixups by Tzachs and me).

please test these last minute additions at least twice or thrice or a lot. last minute additions tend to be a pain in the ass sometimes ;)
Title: Re: AGS 3.3.0 Release Candidate
Post by: abstauber on Mon 10/02/2014 10:00:18
Yes, we all want 3.3.0 to be finally released. But pretty pretty please consider fixing the Undo-History :~(

Unfortunately this behavior is quite unpredictable. It seems that after a couple of minutes, the history for a file is simply gone.
This works pretty well for me:
Edit a few scripts and save. Now read the forums. After a few minutes come back to AGS. Now the Undo-History from the last edited file exists, for the other files it's gone or just reaches 1-2 steps back.

To be honest this is driving me nuts, because at some points I can't remember what I did to break the game. Only that now I can't undo my way out of this mess ;)
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Mon 10/02/2014 11:17:05
We have a bug in 2.72 import. :( Needs to be fixed.
At the moment I know only that it appeared somewhen in last 4 months.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Radiant on Mon 10/02/2014 11:51:49
Quote from: Crimson Wizard on Mon 10/02/2014 11:17:05
We have a bug in 2.72 import. :( Needs to be fixed.
Please elaborate? I haven't noticed issues importing anything, so if there's something going on that's hard to spot I'd like to know about it.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Mon 10/02/2014 11:57:20
Quote from: Radiant on Mon 10/02/2014 11:51:49
Quote from: Crimson Wizard on Mon 10/02/2014 11:17:05
We have a bug in 2.72 import. :( Needs to be fixed.
Please elaborate? I haven't noticed issues importing anything, so if there's something going on that's hard to spot I'd like to know about it.
It's very easy to spot, the 2.72 project just fails to import with error message about corrupted data format. This happens if the game has any global messages. The bug was introduced only about 3 months ago.
Fixed now, will have to re-build the version.
Gurok's pull request sort-of made me to find this :).
Title: Re: AGS 3.3.0 Release Candidate
Post by: Ghost on Mon 10/02/2014 15:13:23
Quote from: Crimson Wizard on Mon 10/02/2014 11:57:20
This happens if the game has any global messages.

For some reason it makes me incredibly happy to see these are still used. Oh man. Memories!
Title: Re: AGS 3.3.0 Release Candidate
Post by: Blackthorne on Mon 10/02/2014 17:00:37
Just imported my game into it with no problems - running smooth and beautifully!  Thanks to all who worked on this; it's amazing.


Bt
Title: Re: AGS 3.3.0 Release Candidate
Post by: Radiant on Mon 10/02/2014 22:24:41
Quote from: Crimson Wizard on Mon 10/02/2014 11:57:20
It's very easy to spot, the 2.72 project just fails to import with error message about corrupted data format. This happens if the game has any global messages. The bug was introduced only about 3 months ago.
Is it "read_gui: file is corrupt"? That's the error I'm getting now on importing a small test project.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Mon 10/02/2014 23:17:27
Quote from: Radiant on Mon 10/02/2014 22:24:41
Quote from: Crimson Wizard on Mon 10/02/2014 11:57:20
It's very easy to spot, the 2.72 project just fails to import with error message about corrupted data format. This happens if the game has any global messages. The bug was introduced only about 3 months ago.
Is it "read_gui: file is corrupt"? That's the error I'm getting now on importing a small test project.
Yes, that one.

I am discussing with tzachs now will he be able to fix an Undo bug in the Editor. I will remake release later on this week.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Sat 15/02/2014 09:56:55
Reuploaded "final" build:

http://www.adventuregamestudio.co.uk/finals/AGS-3.3.0.exe
http://www.adventuregamestudio.co.uk/finals/AGS-3.3.0.zip

No MP3 engine:
http://www.adventuregamestudio.co.uk/finals/AGS-3.3.0-noMP3.zip

Looks like I finally made a correct name for zip archive. :tongue:


Regarding "Undo" bug, it seem there's a fix, but it sounds like a serious change to program logic. In other circumstances that won't be a big deal, but at the moment I am somewhat paranoid, so I suggested to put it into 3.3.1 branch instead.
I suppose it will be possible to release a first test version of 3.3.1 in following weeks.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Radiant on Mon 17/02/2014 22:01:52
Sorry to say this, but there appears to be another bug in importing games from AGS2.7. When importing a GUI named (e.g.) SAVE, its internal name should be set to gSave (which is a pointer to the GUI, whereas SAVE is a constant containing the number of the GUI). Instead, the internal name is set to SAVE, causing compiler errors on any lines such as "if (IsGUIOn (SAVE)) ..."  This did work in earlier release candidates.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Crimson Wizard on Tue 18/02/2014 07:16:32
:(

I will make a hotfix release.
Title: Re: AGS 3.3.0 Release Candidate
Post by: Radiant on Wed 19/02/2014 10:29:20
Thanks :)