(http://monkeygames.mixnmojo.com/ags/AGS_MediaMan_NET_03.gif)
Hey... you thought I forgot about this plugin, right? Well, you're all wrong!!! (Actually, it had been so long I almost forgot how to program it ;D).
Beta 2 features:2. Added support (sort of) to Ogg Vorbis files. You need to download an external program like Winamp or a codec that can play ogg files. What the media manager will do is just open an external program to play the file. Thanks to Neccy for guiding me into the right direction!
Anyway, I've added a couple of features:
1. The ability to play, pause, and stop files!
2. Speech file descriptions will have the dialog lines, but only dialog lines from the script editor
Issues to be resolved:
1. OGG files can't be played from the AGS Editor. There seems to be some major problem with DirectX when trying to open the file.
2. I've yet to figure out the previous and next track buttons... so that it works more like a playlist.
3. People get the white background which means the plugin didn't load correctly, and I rarely get it myself.
Please test it and tell me how it works, specially on loading those dialog lines... feel free to give out suggestions too!
It can be used with AGS 2.61 and above.
http:// monkeygames.mixnmojo.com/ ags / AGS_MediaMan_NET_03beta2.zip
(If you really want to download it and become a tester, copy and paste this link on your browser adn get rid of the spaces. Currently it's having problems loading on AGS, and I'm trying to figure out what's wrong with it.)
QuoteI can't find the documentation for the AGS Editor plugins! Where is it?
http://www.adventuregamestudio.co.uk/accomplug.htm
I think that to play OGG you'd need a codec, much as you'd need DivX.
Otherwise... great, NetMonkey! I was SO looking forward to this!
Let us know if you find a way to use those OGG files, though. AFter all, that's all I use anymore. :P
Have you got this DirectShow filter installed for OGG?
http://www.illiminable.com/ogg/
Problem... I always get the "white background" and no files are displayed... and this time I DID run the .reg thing. :P
Good job, netmonkey!
And yeah, you need an ogg codec to play the ogg files, please resolve this issue, since all my audio files are ogg...
Good work, netmonkey! :)
However,
Quote from: Rui "Erik" Pires on Sun 06/02/2005 09:46:12
Problem... I always get the "white background" and no files are displayed... and this time I DID run the .reg thing. :P
same here ... any ideas?
Hmmm... I ASSUME it's compatible with the latest beta, netmonkey... am I correct, or...? 'Cause that's the one I'm using.
That is very strange... I don't get the white background myself. Actually, I do sometimes but only when I update the plugin and I load the game, like I tried to explain in the manual. Again, it has to do with the whole .net/ActiveX issue.... And I did test it with 2.7 beta whatever we are on right now.
As for ogg, yes, I was aware that you could install a codec, but I've yet to figure out how to handle the nasty error message if it tries to play the file without it.
Edit: Updated, see first post. :)
Edit: Looks like I get another problem once you get the codec installed, and AGS crashes, too! :(
I need to know who does or doesn't get the white background and can see the files? Tell me what OS you're using and what version of AGS.
Well, I already have the codec installed... so I'll keep checking this thread, but won't be able to give any actual info, sorry. :(
Updated again... you can sort of play the ogg vorbis files now. At least it beats looking for them on the ags folder! :)
Still white background.
Win XP Home edition, ags beta 16, with Ogg codec installed. If you need more info, just ask.
Windows XP home AGS 2.62.509.0
As you see in screen shot I can see it fine but it won't show any files ?
(http://img2.imagevenue.com/loc136/9b6_manager.png)
Heh. No, Candle, you aren't seeing it fine. :) THAT's the white background error.
Oh my ,, sorry .. lol
I'm starting to suspect that everyone is having this problem... sigh. Hopefully I can find a solution real soon!
I get the white screen too... and Im using 2.62 :(
Yeah I also get that white thingamybob with the latest beta.
Stop. Colaborate. And Listen:
Looks like I'll remove the download link until I figure out how to make this work... I think Petteri got it working once, but he's off to the army and such. If I see him sometime I'll ask him, but in the meantime I'll work with Pumaman to perhaps improve support on 2.7.
On the white background... this is somewhat technical (Hey, it's the technical forum!):
The reason is that once again AGS Editor is unable to find the correct methods for the UserControl class (the class that holds the panel and the buttons and so forth). Chris, I don't know if you want to add a mandatory interface for the usercontrol (kind of like pluginmain) that includes these methods:
Public Sub AGS_InitPane(ByVal pData As Object)
Public Sub AGS_SelectPane()
Public Sub AGS_DeselectPane()
Public Sub AGS_GameChanged()
Public Sub AGS_SaveUpdates()
Which I think will solve the problem.... I had made an interface myself with those methods and then implemented my usercontrol from it to see if it was more stable, but that doesn't seem to work quite right. It looks like the editor is still looking at my class instead of the interface methods only, so it gets lost and can never find them, and that's why it doesn't initialize the control and it has a white background.
The reason why the background is white is because I set the color of the background to normal during AGS_InitPane(...), and since AGS can't find it, it can't initialize the controls. In AGS_InitPane() I also add the extra actions like what happens when the user clicks on "Play" or "Stop", etc.
What is AGS doing when it loads the usercontrol, anyway? How is it different from loading the plugin main class?
Did you do the AutoDual attribute thing to try and get it to automatically pick up the AGS_InitPane and related functions? I'm sure it must be possible to get it working as-is with .net, although an interface could be added if necessary (I didn't want to because it means you have to implement all the methods).
Okay, boys and girls, I made a change on this, and let's see if it works:
http://monkeygames.mixnmojo.com/ags/AGS_MediaMan_NET_03beta3.zip
I hope it does.
Don't forget to unload the plugin from the game if you saved the game with the plugin loaded and you get the magic white background! And please, as soon as you notice that it works/doesn't work, let everyone (and myself) know by posting a reply!
For the record, and Chris, someone should try to interpret this mumbo-jumbo on the ClassInterface attribute:
Quote from: Microsoft Visual Studio.net Help
You can apply this attribute to assemblies or classes.
This attribute controls whether a class interface is generated for the attributed class. While class interfaces can be useful for testing purposes, their use in production applications is strongly discouraged because they present versioning problems.
Class interfaces are useful for testing managed types from COM because they free you from having to explicitly define interfaces for each class. A class interface carries the same name as the class itself, but is prefixed with an underscore. The class interface contains all the public, non static (Shared in Visual Basic) members of the managed class, including members inherited from its base class. Managed classes cannot access the class interface, but do not need to as they can access the class members directly. The type library exporter generates the interface and a unique IID for the class interface.
The downside to class interfaces is that they allow clients to bind to a specific interface layout that is subject to change as the class evolves. This problem is obscured by managed applications that bind directly to class and do not exhibit the same versioning problems. Unmanaged clients are subject to failure while the managed clients are unaffected.
Consider a managed class that exposes a class interface to COM clients. Version 1 of the class contains methods A() and B(). The unmanaged clients bind to the class interface that has method A() as the first method in the class interface and method B() as the second method. Now consider version 2 of the class which has a new method C() added between methods A() and B(). Clients that try to bind to the new class through the old class interface end up calling method C() when they intend to call method B() because the method position in the interface has changed. The problem is compounded when you consider that the class interface also include methods of any base classes. Changes in the layout of one class affects the layout of the class interface for all derived classes. Due to the versioning problems described, the use of class interfaces in strongly discouraged.
Class interfaces are only generated when the ClassInterfaceAttrribute is set to ClassInterfaceType.AutoDual. Use of this setting is strongly discouraged, it should only be used when the versioning limitations are known to be acceptable.
Unfortunately I still get the white background. I tried it in 2.62 and in the current beta. I'm really looking forward to this feature, so don't dispair. If I knew any ounce of programming, we'll you know how that goes.
Thanks again for your efforts!! ;D
White screen once again here also.
Thanks for the help guys... at least I can confirm that my computer has somehow been rigged to work no matter what I do to it, which is rather odd... I've done so much to make it work in the beggining that I must have permanently (until I reinstall) fixed my computer.
Anyway, I'm messing with the debug tools, and I'm pretty sure that the once you I add the panel to the editor, then it is unable to find AGS_InitPane()... therefore, it never finds those methods. On my computer it does find it, which is rather odd. I'll dig my registry for answers... or at least try to.
Man, I wish some expert would come and help us all out.
Can you provide an example code snippet from your plugin, showing which COM attributes you've attached to things?
I created a test VB.net plugin, and the AGS_InitPane method did get called.
However, I had to run tlbexp on the dll as well as regasm to get it to work.
So, I tried running tlbexp on your plugin but that didn't fix it for me, so I'm wondering if there's some sort of attribute that you need for it to pick up the methods.
Puma, can you e-mail me the source of your test plugin? (Check your messages)
I've uploaded it here:
http://www.adventuregamestudio.co.uk/testnetplugin.zip
Note that this is in no way meant as a template plugin or anything like that, it's just a quick test I whipped up for this specific issue.
Well, the only difference I can see is that I didn't have a ProgId("AGS_MediaMan_NET.AGSPanel") in my code, so I added that... it looks like I don't have tlbexp on my compy (weird) so I uploaded these files so you, Pumaman, can play with them:
http://monkeygames.mixnmojo.com/ags/AGS_MediaMan_NET_tests.zip
There's two files: one inherits a class interface that contains all of your AGS controls:
public interface IAGSControlMethods
{
void AGS_InitPane(Object pData);
void AGS_SelectPane();
void AGS_DeselectPane();
void AGS_GameChanged();
void AGS_SaveUpdates();
}
[ProgId("AGS_MediaMan_NET.AGSPanel"), ClassInterface(ClassInterfaceType.AutoDual)]
public class AGSPanel : System.Windows.Forms.UserControl, IAGSControlMethods
{}
I can't remember why I did this... I think I was just playing around to see if it worked.
Anyway, the other does not have an interface (the one with NI at the end):
[ProgId("AGS_MediaMan_NET.AGSPanel"), ClassInterface(ClassInterfaceType.AutoDual)]
public class AGSPanel : System.Windows.Forms.UserControl
{}
If you can make it work, let me know how tlbexp affects it, and what do I need to do in the future.
You must have tlbexp, it's part of the .net SDK (you probably need to use a Visual Studio Command Prompt in order for it to find it).
Anyway, have you put some sort of message box in AGS_INitPane so that we can check whether it's being called? If not, there's no easy way to tell whether that's the problem or not.
The way it's telling whethere's it is working or not has to do with the background color, because I have a variable set on AGS_InitPane() that fixes the white background issue.. so if the background color is correct, it means that the method has been called successfully...!
Yeah, I found the tlbexp thing... I don't use the magical visual studio "command prompt".. I just go straight from cmd, so I added the location of it to the PATH variable.
Edit: So, how do I use tlbexp?
Edit 2: Good news, I broke the Media Manager on my computer.. it doesn't work here either! :)
I would suggest you don't use the seperate interface, and just put the methods directly in your UserControl class.
You use tlbexp to generate a .tlb file, and then the user has to run regtlib to register it -- a bit like the reg file, but slightly more cumbersome.
alright, looks like regtlib is part of visual studio 6, and I have something laying around, but reagsm AGS_MediaMan_NET.dll /tlb seems to actually fix what I just broke. Now, how in the world do I output that to a REG file so that people can use it?
I'm not sure if you can convert a tlb to a reg file, I think you just have to distribute the tlb and get people to run regtlib on it.
Hey Chris, in the sample code you uploaded, how'd you generate the GUID in the assemblyinfo file? That's the only thing I don't have....
The good news is that I now have another computer, so I can test the plugin there since in that one it behaves as it is (in other works, it doesn't work!)
I dunno, I guess Visual Studio generated it automatically.