AGS 3.4.0.6 (Alpha) - Builder Patch

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

Previous topic - Next topic

Crimson Wizard

Quote from: Gurok on Sat 01/11/2014 07:39:45
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.
I fixed this in the repository recently: https://github.com/adventuregamestudio/ags/commit/e6edfdb84becac28fa684bcd762be7bbc5ef5575
Does it work for you?
The change will be included into next public release; since this is not a critical issue I just wanted to "accumulate" more changes before making a release.

Gurok

Quote from: Crimson Wizard on Sat 01/11/2014 12:35:44
Does it work for you?
The change will be included into next public release; since this is not a critical issue I just wanted to "accumulate" more changes before making a release.

Oh. Thank you! Yes, this works for me. Now that this is fixed, I've started officially using 3.4.0 for my project too :D (Previously an old 3.3.1 build)
[img]http://7d4iqnx.gif;rWRLUuw.gi

Radiant

In AGS Editor .NET (Build 3.3.1.1165) ** BETA VERSION ** v3.3.1, August 2014, I've got this crash,

Spoiler

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

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.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)
[close]

Followed by this
Spoiler

---------------------------
Adventure Game Studio
---------------------------
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.



Error: 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.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)
---------------------------
OK   
---------------------------
[close]

Radiant

Downloading most recent version... same thing.

Spoiler
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)
[close]

Crimson Wizard

@Radiant, this is caused by a function returning dynamic array (e.g. String[]).
We have this fixed, the new version will be released in a short while.

Radiant

I'm pretty sure that's not what's causing it, though... let me see if I can narrow it down.

Crimson Wizard

Quote from: Radiant on Sat 01/11/2014 20:19:30
I'm pretty sure that's not what's causing it, though... let me see if I can narrow it down.
Maybe something else?
Here's a version of dll I made for Knox when he got this crash (applied over 3.4.0.1). It writes a compilation log to your project folder:
http://www.mediafire.com/download/1ti78s6mn4jn5sp/AGS.Native.dll.zip

The last script it mentions should be causing a problem.

Radiant

Hm, with that new DLL I haven't had crashes so far. So it may be fixed now; however the crash didn't always reproduce, even from the same code, so I'll keep an eye out.

Crimson Wizard

Quote from: Radiant on Sun 02/11/2014 08:25:07
Hm, with that new DLL I haven't had crashes so far. So it may be fixed now; however the crash didn't always reproduce, even from the same code, so I'll keep an eye out.
This dll is built right on 3.4.0.1, it should not have any changes except for the aforementioned log.
So this crash might not be happening all times (which is not good).

Crimson Wizard

#49
AGS 3.4.0.2 (Alpha) - Multi Platform Build

ZIP-archive:
http://www.mediafire.com/download/jajm3z7v2z8480m/AGS_3.4.0.2-Alpha3-MultiPlatformBuild.zip



What's new since 3.4.0.1:

Editor

Building for multiple platforms
The Editor can now build for several different platforms. This is configured with this new option in General Settings (Compiler -> Build target platforms):



Select the platforms you like to build the game for by pressing on "drop down" button to the right and checking or unchecking items in the list:



"DataFile" builds a game data file, and cannot be unchecked. Other targets may be selected in any combination.
More platforms will be added in time.
Note, this only affects doing full build (Build -> Build EXE / Rebuild all files). When running in test mode only Windows version is built always.

The "Compiled" folder has changed. Now each platform has its own subdirectory: "Windows", "Linux", etc. To distribute your game - pack/copy contents of corresponding folder(s).


Important internal change to game compilation
The game compilation was rewritten to comply the needs of future development. The way Editor works should NOT change because of this.
However, if you encounter any errors during compilation or your game is introducing bizzare behavior after updating to this version, use following option in Editor Preferences to enable old compiler:



NOTE: this option will be removed after we become sure that everything works correct.

Bug Fixes
* Fixed a crash when trying to run game setup from editor while "Compiled" folder does not exist.
* Fixed a crash when compiling functions returning dynamic array of strings (String[]) (introduced in 3.3.1/3.4.0).


Script API
AudioChannel.Speed.
The new property used to get or set audio clip's playback speed. The value is defined in clip's milliseconds per second; 1000 is default, meaning 1000 of clip's ms in 1 real second (scale 1:1). Set < 1000 for slower play and > 1000 for faster play.
NOTE: the engine will also map "AudioChannel.SetSpeed" function to this property, therefore you can run Gord10's "Self" game using new interpreter (e.g. on Linux).


Engine
Improvements
* In 32-bit games DrawingSurface.DrawImage() now properly applies overall transparency when drawing opaque sprites over surfaces with alpha channel.

Bug Fixes
* Fixed a bug that caused MP3 clip continuously increase its base volume if the directional volume modifier was applied.
* Fixed a bug that prevented to apply requested graphics filter scaling amount (broken in 3.4.0.1).
* Fixed GUI sliders acted as if the mouse button is held down since game start (introduced in 3.4.0.1).

monkey0506

#50
Just a note, but this also includes a bug fix for the crash when running the setup if the "Compiled" folder didn't exist (not sure when this showed up, but it's fixed now).

Also, yay! :-D

Crimson Wizard

Quote from: monkey_05_06 on Wed 12/11/2014 19:46:51
Just a note, but this also includes a bug fix for the crash when running the setup if the "Compiled" folder didn't exist (not sure when this showed up, but it's fixed now).
True, 3.2.1 has this bug. Added to change notes.

monkey0506

Another problem: 3.4.0.2 doesn't run on Android either (3.3.2 does). I'm looking into what's causing it, but there's no error message given.

Crimson Wizard

Quote from: monkey_05_06 on Wed 12/11/2014 20:21:06
Another problem: 3.4.0.2 doesn't run on Android either (3.3.2 does). I'm looking into what's causing it, but there's no error message given.
Tadam... https://github.com/adventuregamestudio/ags/issues/198 :P

monkey0506

Didn't realize there was an existing issue for it. My bad. ;) But I'm glad to try and help sort it out.

Crimson Wizard

Quote from: monkey_05_06 on Wed 12/11/2014 22:31:04
Didn't realize there was an existing issue for it. My bad. ;) But I'm glad to try and help sort it out.
I was supposed to set up Android tools myself, but somehow forgot about this. I'll see if I can do that in the end of this week.

My guess is that OpenGL driver needs some extra stub, or just get properly implemented.

Gurok

Okay, just playing around with the test game, I noticed that setting "Split resource files into X MB-sized chunks" to a value > 0 (I set it to 9999) creates a Windows .exe that fails to find its sprite file. Was this something that was going to be fixed with hard links? I don't remember.
[img]http://7d4iqnx.gif;rWRLUuw.gi

monkey0506

Hmm... It seems like it's not copying (hard linking) the *.001 file. ??? For now, you can just copy this from the Compiled folder to Compiled/Windows. I'm on it. :-\

Dualnames

Hey guys I know it's not a big thing, but since almost all classes have that, could we do it for Characters too? For the sake of consistency? Which means adding a function SetPosition(int x, int y);

It's silly that I'm copying a function so many games now, just because it's so annoying to do
Code: ags
cEgo.X=667;
cEgo.Y=665;


Regardless, I'm intrigued, excellent work.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

abstauber

#59
Regarding the multi-platform abilities: I'm using the joystick plugin by Wyz, which isn't opensourced (yet?).
Are there any macros I can use to hide it from the linux build?

Apart from that my project still compiles and works fine.


edit: another minor thing: Since you are working on the compiler.. could you do something against the warnings.log please (Dynamic sprites were never deleted because I had no chance ) ?
That would be a wonderful improvement :)

SMF spam blocked by CleanTalk