AGS 3.2 Final 5 - Recession-busting edition

Started by Pumaman, Sun 03/05/2009 15:34:47

Previous topic - Next topic

Pumaman

Quote from: abstauber on Tue 19/05/2009 12:17:47
When using line-numbering in a custom dialog gui, the line numbers a being rendered as well.

When processing strings with
Code: ags
DialogToRender.GetOptionText();

it doesn't return line numbers (which is good), but
Code: ags
Surface.DrawStringWrapped()

displays the line number.

I don't really understand what you mean here. Are you using custom dialog options scripting, eg. dialog_options_render? Are you saying that Surface.DrawStringWrapped is adding a number to the text it is writing? Can you post an example?

QuoteThe surface in a custom dialog doesn't support partial transparency.
So using the transparency parameter in Surface.DrawImage results in a partially pink surface.

Yes, this has already been mentioned. It'll get done at some point!

GarageGothic

A non-critical editor bug: If you try to import an old game that doesn't have a Music folder, you'll get an elaborate System.IO error message. The editor doesn't crash but the game cannot be imported until you create the folder.

abstauber

Quote from: Pumaman on Tue 19/05/2009 19:18:19

I don't really understand what you mean here. Are you using custom dialog options scripting, eg. dialog_options_render? Are you saying that Surface.DrawStringWrapped is adding a number to the text it is writing? Can you post an example?


Sorry if I expressed myself unclear. Yes I use custom dialog rendering and when there's line numbering in the option text, it's getting displayed.
Here's an example for the option text in the dialog editor

&1 How are you ?

Quote from: Pumaman on Tue 19/05/2009 19:18:19
Yes, this has already been mentioned. It'll get done at some point!

I though you've meant images with semi-transparent pixels there, sorry for double reporting then :)

Pumaman

Quote from: GarageGothic on Wed 20/05/2009 02:12:43
A non-critical editor bug: If you try to import an old game that doesn't have a Music folder, you'll get an elaborate System.IO error message. The editor doesn't crash but the game cannot be imported until you create the folder.

Interesting, I'll look into it.

QuoteSorry if I expressed myself unclear. Yes I use custom dialog rendering and when there's line numbering in the option text, it's getting displayed.
Here's an example for the option text in the dialog editor

&1 How are you ?

Oh I see, I thought you meant Auto-Number Dialog Options, not voice speech numbering :)

Hmm, I'm not sure how to tackle this. In some situations you might want GetOptionText to retain the &1-style numbers, so that should probably stay ... but would it be safe for Surface.DrawString to always strip them out? I'll have a think about it.

QuoteI though you've meant images with semi-transparent pixels there, sorry for double reporting then

Oh sorry, maybe I've misunderstood. Well, if you have a transparent surface and you semi-transparently draw onto it, then it will have nothing to draw against except the transparent background, so you'll get a pink effect. You would need an opaque image to already be on the surface in order to DrawImage semi-transparently onto it.

monkey0506

Quote from: Pumaman on Thu 21/05/2009 22:43:42Hmm, I'm not sure how to tackle this.

Perhaps the best method would be an optional bool for Dialog.GetOptionText (default true) to includeSpeechNumber?

It seems better IMO than an arbitrary decision regarding the DrawingSurface functions...

abstauber

Oh I see... well if it's not a bug, I guess, I could filter them out myself ;)

Btw. why should I want them to be displayed? For the ease of translation?

freshpaint

Finally trying to get caught up with the latest -- yes, please do put the playambientsound with  locations back!  I just spent a whole bunch of time modifying a room to use this feature (kind of like an audio maze).

Assuming the weather doesn't turn lovely again, will try to test Pig Flu with my neverending Darkdevil game this week.

Yeppoh

Quote from: Pumaman on Mon 18/05/2009 20:02:27
QuoteI created a Custom Propriety (for a Character) and the title string (called for Character.GetPropriety()) was too long. It was notified when compiling. Due to a stupid reflex I double-clicked on the error line to get automatically at the faulty line in the script. Of course there's isn't one, since it's in the editor API, thus nothing happened, visually. But... I couldn't open the Character Editor anymore to correct it in the Custom Propriety window.

Hmm I couldn't replicate this problem. I created a custom property with a long name, got the error when compiling, double-clicked it and nothing happened. But then I could still carry on and open the Character Editor as normal...

For some unknown reasons I can't replicate it either. I can't remember if there might have been something I missed.

abstauber

I finally found some time to play with AGS 3.2 some more.

Here are some things I've been stumbling upon.

No. 1
This is more odd behaviour, than a bug ;)

My computer is a little slow and when I launch AGS games, it gets some kind of hiccup. The game window freezes for a split seconds while the audio hangs.
Sound comes out of the speaker, it repeats the last fraction of what should have been played... e.g. if a word like "Jones" is played, I get Jo.o.o.o.o.o.o.o.nes.
This happens randomly after starting the game and I think it even isn't AGS' fault.

But when I play two sound files simultaneously like this

Code: ags
      
cSong       = aSongTrack.Play(eAudioPriorityVeryHigh);
cInstrument = aInstrument.Play(eAudioPriorityVeryHigh);


They are totally out of sync after my hiccup.

No. 2
Is it possible to add the audioclip pointer to the manual and the auto-complete?

Except this isn't valid code (it compiles fine though)

Code: ags

AudioClip *aSongTrack;
AudioClip *aInstrument;

aSongTrack = aBangSong;
aInstrument = aBangInstr;



No. 3
An unhandled error occurs when you try to remove an audio file which on 'pause' in the audio-tab.

Code: ags

Error: Unable to delete the file 'D:\Eigene Dateien\RythmGame\AudioCache\au00000B.ogg'.
Der Prozess kann nicht auf die Datei "D:\Eigene Dateien\RythmGame\AudioCache\au00000B.ogg" zugreifen, 
da sie von einem anderen Prozess verwendet wird.
Version: AGS 3.2.0.86

AGS.Types.CannotDeleteFileException: Unable to delete the file 'D:\Eigene Dateien\RythmGame\AudioCache\au00000B.ogg'.
Der Prozess kann nicht auf die Datei "D:\Eigene Dateien\RythmGame\AudioCache\au00000B.ogg" zugreifen, 
da sie von einem anderen Prozess verwendet wird. ---> System.IO.IOException: 
Der Prozess kann nicht auf die Datei "D:\Eigene Dateien\RythmGame\AudioCache\au00000B.ogg" 
zugreifen, da sie von einem anderen Prozess verwendet wird.
   bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   bei System.IO.File.Delete(String path)
   bei AGS.Editor.AGSEditor.AttemptToDeleteFileFromDisk(String fileName)
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei AGS.Editor.AGSEditor.AttemptToDeleteFileFromDisk(String fileName)
   bei AGS.Editor.AGSEditor.DeleteFileOnDiskAndSourceControl(String[] fileNames)
   bei AGS.Editor.Components.AudioComponent.DeleteResourcesForAudioClips(IList`1 clipsToDelete)
   bei AGS.Editor.Components.AudioComponent.DeleteResourcesForAudioClip(AudioClip clipToDelete)
   bei AGS.Editor.Components.AudioComponent.ItemCommandClick(String controlID)
   bei AGS.Editor.Components.BaseComponentWithFolders`2.CommandClick(String controlID)
   bei AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   bei AGS.Editor.ProjectTree.ContextMenuEventHandler(Object sender, EventArgs e)
   bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
   bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



If you then stop the audio-clip and try to remove it again, the following happens:

(I guess it means, that a object pointer does not point to an instance  ??? )
Code: ags

Error: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Version: AGS 3.2.0.86

System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei AGS.Editor.Components.AudioComponent.ItemCommandClick(String controlID)
   bei AGS.Editor.Components.BaseComponentWithFolders`2.CommandClick(String controlID)
   bei AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   bei AGS.Editor.ProjectTree.ContextMenuEventHandler(Object sender, EventArgs e)
   bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
   bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


After I restart AGS, the music files are gone.

Pumaman

Quote from: abstauber on Sun 07/06/2009 10:35:48
My computer is a little slow and when I launch AGS games, it gets some kind of hiccup. The game window freezes for a split seconds while the audio hangs.

Hmm, does anyone else get this problem? Does it happen only full-screen or windowed, or both?

QuoteIs it possible to add the audioclip pointer to the manual and the auto-complete?

Except this isn't valid code (it compiles fine though)

Code: ags

AudioClip *aSongTrack;
AudioClip *aInstrument;

aSongTrack = aBangSong;
aInstrument = aBangInstr;


I'm not sure what you mean by this, the autocomplete and manual do include the AudioClip commands?

QuoteAn unhandled error occurs when you try to remove an audio file which on 'pause' in the audio-tab.

Thanks for spotting this, I'll get it fixed.

abstauber

Quote
AudioClip *aSongTrack;
AudioClip *aInstrument;

aSongTrack = aBangSong;
aInstrument = aBangInstr;

I'm not sure what you mean by this, the autocomplete and manual do include the AudioClip commands?

Oh, sorry... I should have waited a little more to post this..
I somehow was expecting an example like
AudioClip *aSongTrack = aBangSong.Create(); ... which is bogus of course ;)
Also after a restart of AGS, the autocomplete now shows me those pointers, it just wasn't shown after I declared them. 


About my computer's hiccup:
I usually play games in windowed mode, direct 5 and 3x filter - but I haven't tested fullscreen yet. But it also happens with other games, so I guess this is only my machine or some evil process in the background which pushs the CPU load to 100% for short while.

But there's also another strange behaviour on those hiccups: the gameloops seem to stop, but the audioposition moves on.

Here's my test setting.
In the room load, I add:
AudioChannel *channel = aSong.Play();

And in the repeatly_execute I also start a timer.
timer += 25;

(the gamespeed is set to 40, which should mean: about 1 loop per 25 msec.)

When I now start the testgame, this timer and the result of aSong.PositionMs are in the same region. Of course the timer only "jumps" into 25 msec steps.
But after the hiccup, there's a huge gap. So I assume, the engine paused, while the sound kept on going somehow. Is that possible?
(and sorry for this extensive post ;) )

Pumaman

QuoteAlso after a restart of AGS, the autocomplete now shows me those pointers, it just wasn't shown after I declared them.

Ah ok, it could just be that the autocomplete needs to update more often, I'll take a look.

QuoteWhen I now start the testgame, this timer and the result of aSong.PositionMs are in the same region. Of course the timer only "jumps" into 25 msec steps.
But after the hiccup, there's a huge gap. So I assume, the engine paused, while the sound kept on going somehow. Is that possible?

Yeah, because the audio is sent into a buffer on your sound card, it will continue to play even when the CPU is locked up with other things. When that buffer runs out and is not filled with new data by the CPU, it just plays the contents of the buffer over again, which is why you get the stuttering effect.



Anyway, Beta 2 is now up. You cannot load in games from Beta 1 -- any test games you made with beta 1 need to be thrown away. However, from this point on, games saved with Beta 2 will be supported by future versions.

This basically completes the new audio system now. There are a couple of remaining missing bits listed in the first post -- crossfading being the main one. Your feedback is welcome.

Dualnames

Woohoo you fixed the translation thingy. Downloading..
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)

xenogia

Will you be making it so that when the final version is released it will automatically convert the obselete lines of code in the audio system to the new.  This would make life a lot easier.

Shane 'ProgZmax' Stevens

I agree that some conversions/tweaks would help, even if it means checking to see if the room has a music file set to play on load and changes that out for an audio call to the music file in the room load script.  It would streamline the importing of old games greatly.  It's looking good, in any event!

abstauber

Quote
Yeah, because the audio is sent into a buffer on your sound card, it will continue to play even when the CPU is locked up with other things. When that buffer runs out and is not filled with new data by the CPU, it just plays the contents of the buffer over again, which is why you get the stuttering effect.

Oh I see, thanks for this info. Then I'd better play a silent ogg and use it as a timer :)

And yay... curry ;D

Leon

Quote from: Dualnames on Mon 08/06/2009 23:53:34
Woohoo you fixed the translation thingy. Downloading..


Does that mean that I can stop digging for this bizarre bug?
Ultimate Game Solutions - Because there is a solution for everything

DavidCB

   
Oh, what a mistake!  :o I saved my piece of  adv. in the version 3.2 beta 1 with no copies and now I won't open in the 3.2 beta 2.  :P
Is there any way back?  :'(

Thank you

Excuse my English

Adamski

Does Beta 2 remove the 1 music channel limit from Beta 1? Lots of music channels would be extremely useful!

Shane 'ProgZmax' Stevens

When switching quickly through different ogg music tunes in the properties pane AGS crashed.  I was basically playing one and then switching to the next on the list, etc.  It might have something to do with trying to play one music track over the other.

SMF spam blocked by CleanTalk