AGS 3.4.0.6 (Alpha) - Builder Patch

Started by Crimson Wizard, Sat 27/09/2014 17:25:18

Previous topic - Next topic

Knox

Quote from: Crimson Wizard on Tue 30/09/2014 18:11:23
Quote from: Knox on Tue 30/09/2014 17:53:23
If I am currently using AGS 3.3.1 Alpha 2 Turbo, does this mean I can start using this version now or should I wait for the next alpha release of this version so I can use higher resolutions (1280x720)?
Wait for 1-2 weeks, I am doing last fixes to custom resolutions.

Quote from: Knox on Tue 30/09/2014 17:53:23
As for the 2013th "3.4.0 Alpha" with limits removal, would the next alpha release of this version potentially at least include unlimited GUI controls?
That's possible; I am reviewing my 2013th changes now to see which may be moved here without trouble.

Ok thanks I'll wait until the next release then. Great work guys, btw! :grin:
--All that is necessary for evil to triumph is for good men to do nothing.

Trapezoid

Problem: Mouse.SetPosition behaves incorrectly when you have "filter_scaling:max" in the configuration. It seems to place the mouse's Y position 32 pixels below what you told it to.

Crimson Wizard

Quote from: Trapezoid on Wed 08/10/2014 05:54:08
Problem: Mouse.SetPosition behaves incorrectly when you have "filter_scaling:max" in the configuration. It seems to place the mouse's Y position 32 pixels below what you told it to.
Found a mistake, please check if this works for you:
http://www.mediafire.com/download/mysrp8t1r9nh4m7/acwin_3.4.0.0_fix.zip

Trapezoid


Crimson Wizard

#24
AGS 3.4.0.1 Alpha 2 - Custom Game Resolutions

ZIP-archive
http://www.mediafire.com/download/icgb9mjp9cjj6u5/AGS_3.4.0.1-Alpha2-CustomGameRes.zip



What's new since 3.4.0.0 Alpha 1:

Common features
Custom game resolutions.
You can now set (almost) any game resolution, including both usual and unusual one. In practice, there are certain limits (upper and lower), also I cannot honestly guarantee all crazy kinds of numbers will work well. "Standard" resolutions should work.

Game resolution is now set not by simple drop-down list, but with a slightly more advanced dialog.
Spoiler


Select "Resolution" option and click on "..." button

In the dialog either choose one of the presets, or type in your own width & height, then press OK.
[close]



Removed limit of Controls on GUI.
Was: 30 -> Now: unlimited.
Also removed the limit of GUI script name length. Was: 20 characters -> Now: unlimited



Script API
Struct functions returning dynamic arrays.
It is now possible to define a member function of a struct, that returns dynamic array, like this:
Spoiler

Code: ags

struct MyClass
{
	int Max;
	int Arr[];
	
	import void  InitArray(int max);
	import int[] GetArray();
	import int   GetArrayLength();
};

void MyClass::InitArray(int max)
{
	this.Max = max;
	this.Arr = new int[this.Max];
	int i;
	for (i = 0; i < this.Max; i++)
		this.Arr[i] = i;
}

int[] MyClass::GetArray()
{
	return this.Arr;
}

int MyClass::GetArrayLength()
{
	return this.Max;
}

function game_start() 
{
	MyClass my_obj;
	my_obj.InitArray(5);
	int get_arr[] = my_obj.GetArray();
	int i;
	for (i = 0; i < my_obj.GetArrayLength(); i++)
		Display("#%i = %i", i, get_arr[i]);
}

[close]


Engine
Bug Fixes
* Fixed WAVE audio not looping after restoring a game (from Draconian Edition)
* Fixed incorrectly set Y coordinate in Mouse.SetPosition() (was broken in 3.4.0.0)
* Setting your project to run fullscreen, then running in debug mode from the Editor will cause game to run in a very large black window covering most of your screen, instead of being the size of scaled game. Now this is fixed. (introduced in 3.4.0.0)

Crimson Wizard

I reuploaded the 3.4.0.1 package with a tiny but important fix (without changing version number).
The download link is the same.

It appears that since early versions of 3.3.1 branch there was a bug that incorrectly set sprite cache size to 20 KB instead of 20 MB by default (unless it was explicitly set to something else in setup).
This could cause slow downs in hires games, because sprites and animations would need to be re-loaded more often.

The earlier Custom Resolution builds based on 3.3.0 did not have this bug.

Knox

#26
Testing this out now, thanks a lot for all your hard work!

EDIT:

Ok, so I tried to open my game with AGS 3.4.0.1 Alpha 2 CustomGameRes and I'm getting this error:
(My computer at work is in french but I can try at home later tonight if you need it in english)


I have these plugins/dlls manually added to this vesion of AGS:

--All that is necessary for evil to triumph is for good men to do nothing.

Crimson Wizard

@Knox
According to the error message, this occurs when one of the scripts is being compiled. Too bad we don't have much means to test things that occur during compilation.

I made this "hackish" version that would dump details about game compilation to the "compile_log.txt" (should appear in your game project folder).
If you would be able to run your game and then PM me the resulting file, I would probably have bit more info on overall situation.
http://www.mediafire.com/download/1ti78s6mn4jn5sp/AGS.Native.dll.zip

Gurok

Interesting. Maybe the code to allow returning of dynamic arrays has a bug in it?
[img]http://7d4iqnx.gif;rWRLUuw.gi

Knox

Quote from: Crimson Wizard on Mon 27/10/2014 19:23:56
@Knox
According to the error message, this occurs when one of the scripts is being compiled. Too bad we don't have much means to test things that occur during compilation.

I made this "hackish" version that would dump details about game compilation to the "compile_log.txt" (should appear in your game project folder).
If you would be able to run your game and then PM me the resulting file, I would probably have bit more info on overall situation.
http://www.mediafire.com/download/1ti78s6mn4jn5sp/AGS.Native.dll.zip

Here's the error in english:
Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Version: AGS 3.4.0.1

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at ccCompileText(SByte* , SByte* )
   at AGS.Native.NativeMethods.CompileScript(Script script, String[] preProcessedScripts, Game game, Boolean isRoomScript)
   at AGS.Editor.NativeProxy.CompileScript(Script script, String[] preProcessedData, Game game, Boolean isRoomScript)
   at AGS.Editor.AGSEditor.CompileScript(Script script, List`1 headers, CompileMessages errors, Boolean isRoomScript)
   at AGS.Editor.AGSEditor.CompileScripts(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.CompileGame(Boolean forceRebuild)
   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.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.ToolStripDropDown.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 System.Windows.Forms.ToolStripDropDown.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)


PS: I'm PMing you the log file soon.
--All that is necessary for evil to triumph is for good men to do nothing.

Crimson Wizard

Quote from: Knox on Mon 27/10/2014 23:59:04
PS: I'm PMing you the log file soon.

I can tell that this happens on "StringPlus.asc".
Is it this module by monkey_05_06: http://www.adventuregamestudio.co.uk/forums/index.php?topic=20950.0 ?

Knox

Quote from: Crimson Wizard on Tue 28/10/2014 00:19:34
Quote from: Knox on Mon 27/10/2014 23:59:04
PS: I'm PMing you the log file soon.

I can tell that this happens on "StringPlus.asc".
Is it this module by monkey_05_06: http://www.adventuregamestudio.co.uk/forums/index.php?topic=20950.0 ?


Wow that was quick Crimson...thanks a lot! I removed that module (to test), and the game runs perfectly. Should I contact Monkey to see if we can get his module to work with this version of AGS?
--All that is necessary for evil to triumph is for good men to do nothing.

Gurok

#32
Knox, please don't contact Monkey about making it compatible. It's a bug in the compiler introduced (presumably) by allowing function prototypes for member functions that return dynamic arrays. I'll look into it this evening, but it appears I've just been too lenient with where to parse such declarations or missed a check somewhere.

Here's a minimal test case:

Header:
Code: ags
import String[ ] MyFunc();


Module:
Code: ags
String[ ] MyFunc()
{
}
[img]http://7d4iqnx.gif;rWRLUuw.gi

Crimson Wizard

Quote from: Gurok on Tue 28/10/2014 01:01:20
Knox, please don't contact Monkey about making it compatible.

You may temporarily comment out following functions from script header:
Code: ags

/*
///StringPlus module: Splits the String into units no wider than WIDTH when displayed in FONT.
import String[] SplitByWidth(this String*, int width, FontType font, String delimiters=0, bool caseSensitive=false);
///StringPlus module: Splits the String by instances of OTHERSTRING.
import String[] SplitByString(this String*, String otherString, bool caseSensitive=false);
///StringPlus module: Splits the String by instances of anything from CHARACTERSET.
import String[] SplitByCharacterSet(this String*, String characterSet, bool caseSensitive=false);
*/

abstauber

I gave it a quick shot and my game still works totally fine. Even better, everything appears a lot smoother with the nearest neighbor filter (nod)
Great version so far.

Gurok

#35
CW, this is fixed now.

https://github.com/adventuregamestudio/ags/pull/203

The forward declaration stuff for dynamic user structs was to blame.

P.S. I will look at that change to the LastBuildConfiguration tomorrow night. I've unfortunately run out of time tonight. Sorry I've been out of action recently.
[img]http://7d4iqnx.gif;rWRLUuw.gi

Crimson Wizard

Quote from: Gurok on Tue 28/10/2014 12:07:13
P.S. I will look at that change to the LastBuildConfiguration tomorrow night. I've unfortunately run out of time tonight. Sorry I've been out of action recently.
There's no hurry; and this suggestion in particular is a very low priority anyway.

Crimson Wizard

#37
Related to dynamic arrays, have anyone considered adding some kind of "length_of" keyword to get the size of dynamic array? That would greatly simplify using them as return values...

monkey0506

I actually did try looking into that, but I had no idea what I was doing mucking around in the compiler code. 8-)

My personal preference would be to add a Length member to dynamic array objects (or even static arrays too), but that might be more complicated, so I'll leave that for whoever has the ability to actually implement it.

Gurok

CW,

The weird maximised window bug is fixed. However, when running games directly from the editor, the current version seems to run games at max scaling regardless of what's listed in acsetup.cfg. It used to be that it would adhere to whatever value was listed there, e.g. 3x.
[img]http://7d4iqnx.gif;rWRLUuw.gi

SMF spam blocked by CleanTalk