From GuitarBabe at earthlink.net Sun Apr 1 13:49:43 2007 From: GuitarBabe at earthlink.net (Guitar Babe) Date: Sun, 01 Apr 2007 05:49:43 -0700 Subject: [AGDev-newbies] DirectX Audio class. In-Reply-To: <460E92C5.5070908@earthlink.net> References: <5.2.1.1.0.20070330093345.0483eb68@pop.earthlink.net> <5.2.1.1.0.20070330025744.00df76e8@pop.earthlink.net> <5.2.1.1.0.20070330025744.00df76e8@pop.earthlink.net> <5.2.1.1.0.20070330093345.0483eb68@pop.earthlink.net> Message-ID: <5.2.1.1.0.20070401054128.02a677e0@pop.earthlink.net> Hey Tom, thanks muchly!... I'd revised my code a bit yesterday but still hadn't gotten it to work, so will work from this and see what I get. thanks so much for sending this along! you rule! I find it very helpful reading your code for a few other lil DX operations as well. In my opinion, even aside from the terrific commenting you've done, it's much much easier and more intuitive to follow your coding than the DX documentation. I unfortunately can't currently locate the DX example code snippets but as I said, this explains a lot so THANK YOU!!! Have a great rest of your weekend and chat wicha soon!... Smiles, Cara -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.18/734 - Release Date: 3/26/2007 2:31 PM From tward1978 at earthlink.net Sun Apr 1 21:01:17 2007 From: tward1978 at earthlink.net (Thomas Ward) Date: Sun, 01 Apr 2007 16:01:17 -0400 Subject: [AGDev-newbies] DirectX Audio class. In-Reply-To: <5.2.1.1.0.20070401054128.02a677e0@pop.earthlink.net> References: <5.2.1.1.0.20070330093345.0483eb68@pop.earthlink.net> <5.2.1.1.0.20070330025744.00df76e8@pop.earthlink.net> <5.2.1.1.0.20070330025744.00df76e8@pop.earthlink.net> <5.2.1.1.0.20070330093345.0483eb68@pop.earthlink.net> <5.2.1.1.0.20070401054128.02a677e0@pop.earthlink.net> Message-ID: <46100F8D.80900@earthlink.net> Unfortunately, the MS SDK examples tend to not be so obvious. I have to read the notes to even get the idea of what is going on and then convert it to my own personal style. From GuitarBabe at earthlink.net Wed Apr 4 06:00:45 2007 From: GuitarBabe at earthlink.net (Guitar Babe) Date: Tue, 03 Apr 2007 22:00:45 -0700 Subject: [AGDev-newbies] once more, with feeling!!! Message-ID: <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> Okay, here is my current form1.cs file. I'm wondering why the hell this won't work?! lol! It just doesn't want to compile, and I've located the wave file in the project folder, have included the proper direct x references, and just don't get it! ick! I can comment the sound code out and it compiles, so it's me, but I just can't for the life of me, figure this out. It should be so simple, and I think I understand the concepts behind it,but I'm obviously missing something basic... Any thoughts would be truly appreciated. Thanks so much for taking time to read this. You all rock!... Smiles, Cara using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.DirectX; using Microsoft.DirectX.DirectSound; namespace CQ_Sound_1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { private Device dsDevice = null; dsDevice = new Device(); dsDevice.SetCooperativeLevel(this, CooperativeLevel.Priority); private SecondaryBuffer secBuff = null; private BufferDescription desc = null; desc = new BufferDescription(); desc.ControlPan = true; desc.ControlVolume =true; desc.ControlFrequency = true; secBuff = new SecondaryBuffer(blah.wav, desc, dsDevice); secBuff.Play(0, 0); } } } -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 4:24 PM From tward1978 at earthlink.net Wed Apr 4 06:13:35 2007 From: tward1978 at earthlink.net (Thomas Ward) Date: Wed, 04 Apr 2007 01:13:35 -0400 Subject: [AGDev-newbies] once more, with feeling!!! In-Reply-To: <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> References: <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> Message-ID: <461333FF.7080406@earthlink.net> Hi Cara, While looking over your code I noticed a few things that could be causing you some errors. and here are some recommended changes which should resolve your problems. When you create the new instance of the secondary buffer that holds your file you forgot to include quotes around the string holding the name of the file. That is a major syntactical error and one the compiler wont' catch until the program is actually run. What I would do is something like secBuff = new SecondaryBuffer(@"blah.wav", desc, dsDevice); rather than your secBuff = new SecondaryBuffer(blah.wav, desc, dsDevice); The other thing I would change is rather than doing secBuff.Play(0, 0); I would do secBuff.Play(0, BufferPlayFlags.Default) for standard playback or secBuff.Play(0, BufferPlayFlags.Looping); for files that repete in a game. Let me know how it goes. PS Since I have written my own interface to DirectX I don't quite remember if the @ sign is required when directly passing to the Play function or if that is only if you are passing it through a string variable which is passed to the play function. However, I do know in either case the quotes are necessary. So try it with the @ sign and if that files try it without the @ sign. From GuitarBabe at earthlink.net Wed Apr 4 08:12:34 2007 From: GuitarBabe at earthlink.net (Guitar Babe) Date: Wed, 04 Apr 2007 00:12:34 -0700 Subject: [AGDev-newbies] once more, with feeling!!! In-Reply-To: <461333FF.7080406@earthlink.net> References: <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> Message-ID: <5.2.1.1.0.20070404000806.04a1d708@pop.earthlink.net> Tom, wow! I really must work on this code during the day! *yawn* lol! I can't believe I missed the quotes! *looks sheepish* That's such a basic syntax that I can't believe I missed it. ick! Thank you for catching it and I'll see what happens when I change it. As for everything else you mention, I don't believe that the @ sign is necessary, but hey, I'll sure find out, won't I? lol! Anyway, thanks again and I think I'll wait until tomorrow to revise / run this! lol! Have a wonderful evening and I really do appreciate your help... nighters! Cara At 01:13 AM 4/4/2007 -0400, you wrote: >Hi Cara, >While looking over your code I noticed a few things that could be causing >you some errors. and here are some recommended changes which should >resolve your problems. >When you create the new instance of the secondary buffer that holds your >file you forgot to include quotes around the string holding the name of >the file. That is a major syntactical error and one the compiler wont' >catch until the program is actually run. What I would do is something like >secBuff = new SecondaryBuffer(@"blah.wav", desc, dsDevice); >rather than your >secBuff = new SecondaryBuffer(blah.wav, desc, dsDevice); >The other thing I would change is rather than doing >secBuff.Play(0, 0); >I would do >secBuff.Play(0, BufferPlayFlags.Default) >for standard playback or >secBuff.Play(0, BufferPlayFlags.Looping); >for files that repete in a game. >Let me know how it goes. > >PS > > >Since I have written my own interface to DirectX I don't quite remember if >the @ sign is required when directly passing to the Play function or if >that is only if you are passing it through a string variable which is >passed to the play function. >However, I do know in either case the quotes are necessary. So try it with >the @ sign and if that files try it without the @ sign. > >_______________________________________________ >AGDev-newbies mailing list >AGDev-newbies at lists.agdev.org >http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies > > > >-- >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 >4:24 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 4:24 PM From GuitarBabe at earthlink.net Wed Apr 4 08:50:11 2007 From: GuitarBabe at earthlink.net (Guitar Babe) Date: Wed, 04 Apr 2007 00:50:11 -0700 Subject: [AGDev-newbies] once more, with feeling!!! In-Reply-To: <461333FF.7080406@earthlink.net> References: <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> Message-ID: <5.2.1.1.0.20070404004041.02539e90@pop.earthlink.net> Okay, couldn't resist trying this out now. I've included below, the revised form1.cs file (have tried, both with and without the @ sign before the first quote before the wave file name) along with the rather annoyingly extensive error list. lol! I'm sorry, but this just seems like way too many errors for this bit of code. I mean, I've looked through several tutorials and a C# programming e book, as well as the DX docs themselves on this, and I just can't see what's happening here... Anyway, will keep looking, but in the meantime, here is what I have... Have a wonderful night and talk with y'all soon!... Smiles, Cara using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.DirectX; using Microsoft.DirectX.DirectSound; namespace CQ_Sound_1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { private Device dsDevice = null; dsDevice = new Device(); dsDevice.SetCooperativeLevel(this, CooperativeLevel.Priority); private SecondaryBuffer secBuff = null; private BufferDescription desc = null; desc = new BufferDescription(); desc.ControlPan = true; desc.ControlVolume =true; desc.ControlFrequency = true; secBuff = new SecondaryBuffer("blah.wav", desc, dsDevice); secBuff.Play(0, BufferPlayFlags.Default); } } } Error list Error 1 } expected C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 22 10 CQ Sound 1 Error 2 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 25 10 CQ Sound 1 Error 3 Class, struct, or interface method must have a return type C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 25 16 CQ Sound 1 Error 4 Invalid token '(' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 26 29 CQ Sound 1 Error 5 Invalid token ')' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 26 61 CQ Sound 1 Error 6 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 30 6 CQ Sound 1 Error 7 Class, struct, or interface method must have a return type C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 30 12 CQ Sound 1 Error 8 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 31 17 CQ Sound 1 Error 9 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 32 20 CQ Sound 1 Error 10 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 33 23 CQ Sound 1 Error 11 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 34 9 CQ Sound 1 Error 12 Class, struct, or interface method must have a return type C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 34 15 CQ Sound 1 Error 13 Type expected C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 34 31 CQ Sound 1 Error 14 Invalid token ',' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 34 47 CQ Sound 1 Error 15 Invalid token ')' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 34 57 CQ Sound 1 Error 16 Invalid token '(' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 35 13 CQ Sound 1 Error 17 Invalid token ')' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 35 40 CQ Sound 1 Error 18 Type or namespace definition, or end-of-file expected C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 38 1 CQ Sound 1 At 01:13 AM 4/4/2007 -0400, you wrote: >Hi Cara, >While looking over your code I noticed a few things that could be causing >you some errors. and here are some recommended changes which should >resolve your problems. >When you create the new instance of the secondary buffer that holds your >file you forgot to include quotes around the string holding the name of >the file. That is a major syntactical error and one the compiler wont' >catch until the program is actually run. What I would do is something like >secBuff = new SecondaryBuffer(@"blah.wav", desc, dsDevice); >rather than your >secBuff = new SecondaryBuffer(blah.wav, desc, dsDevice); >The other thing I would change is rather than doing >secBuff.Play(0, 0); >I would do >secBuff.Play(0, BufferPlayFlags.Default) >for standard playback or >secBuff.Play(0, BufferPlayFlags.Looping); >for files that repete in a game. >Let me know how it goes. > >PS > > >Since I have written my own interface to DirectX I don't quite remember if >the @ sign is required when directly passing to the Play function or if >that is only if you are passing it through a string variable which is >passed to the play function. >However, I do know in either case the quotes are necessary. So try it with >the @ sign and if that files try it without the @ sign. > >_______________________________________________ >AGDev-newbies mailing list >AGDev-newbies at lists.agdev.org >http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies > > > >-- >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 >4:24 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 4:24 PM From GuitarBabe at earthlink.net Wed Apr 4 10:16:28 2007 From: GuitarBabe at earthlink.net (Guitar Babe) Date: Wed, 04 Apr 2007 02:16:28 -0700 Subject: [AGDev-newbies] once more, with feeling!!! Message-ID: <5.2.1.1.0.20070404021524.00df6610@pop.earthlink.net> Okay, couldn't resist trying this out now. I've included below, the revised form1.cs file (have tried, both with and without the @ sign before the first quote before the wave file name) along with the rather annoyingly extensive error list. lol! I'm sorry, but this just seems like way too many errors for this bit of code. I mean, I've looked through several tutorials and a C# programming e book, as well as the DX docs themselves on this, and I just can't see what's happening here... Anyway, will keep looking, but in the meantime, here is what I have... Have a wonderful night and talk with y'all soon!... Smiles, Cara using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Microsoft.DirectX; using Microsoft.DirectX.DirectSound; namespace CQ_Sound_1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { private Device dsDevice = null; dsDevice = new Device(); dsDevice.SetCooperativeLevel(this, CooperativeLevel.Priority); private SecondaryBuffer secBuff = null; private BufferDescription desc = null; desc = new BufferDescription(); desc.ControlPan = true; desc.ControlVolume =true; desc.ControlFrequency = true; secBuff = new SecondaryBuffer("blah.wav", desc, dsDevice); secBuff.Play(0, BufferPlayFlags.Default); } } } Error list Error 1 } expected C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 22 10 CQ Sound 1 Error 2 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 25 10 CQ Sound 1 Error 3 Class, struct, or interface method must have a return type C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 25 16 CQ Sound 1 Error 4 Invalid token '(' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 26 29 CQ Sound 1 Error 5 Invalid token ')' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 26 61 CQ Sound 1 Error 6 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 30 6 CQ Sound 1 Error 7 Class, struct, or interface method must have a return type C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 30 12 CQ Sound 1 Error 8 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 31 17 CQ Sound 1 Error 9 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 32 20 CQ Sound 1 Error 10 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 33 23 CQ Sound 1 Error 11 Invalid token '=' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 34 9 CQ Sound 1 Error 12 Class, struct, or interface method must have a return type C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 34 15 CQ Sound 1 Error 13 Type expected C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 34 31 CQ Sound 1 Error 14 Invalid token ',' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 34 47 CQ Sound 1 Error 15 Invalid token ')' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 34 57 CQ Sound 1 Error 16 Invalid token '(' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 35 13 CQ Sound 1 Error 17 Invalid token ')' in class, struct, or interface member declaration C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 35 40 CQ Sound 1 Error 18 Type or namespace definition, or end-of-file expected C:\Documents and Settings\cARA\My Documents\Visual Studio 2005\Projects\CQ Sound 1\CQ Sound 1\Form1.cs 38 1 CQ Sound 1 At 01:13 AM 4/4/2007 -0400, you wrote: >Hi Cara, >While looking over your code I noticed a few things that could be causing >you some errors. and here are some recommended changes which should >resolve your problems. >When you create the new instance of the secondary buffer that holds your >file you forgot to include quotes around the string holding the name of >the file. That is a major syntactical error and one the compiler wont' >catch until the program is actually run. What I would do is something like >secBuff = new SecondaryBuffer(@"blah.wav", desc, dsDevice); >rather than your >secBuff = new SecondaryBuffer(blah.wav, desc, dsDevice); >The other thing I would change is rather than doing >secBuff.Play(0, 0); >I would do >secBuff.Play(0, BufferPlayFlags.Default) >for standard playback or >secBuff.Play(0, BufferPlayFlags.Looping); >for files that repete in a game. >Let me know how it goes. > >PS > > >Since I have written my own interface to DirectX I don't quite remember if >the @ sign is required when directly passing to the Play function or if >that is only if you are passing it through a string variable which is >passed to the play function. >However, I do know in either case the quotes are necessary. So try it with >the @ sign and if that files try it without the @ sign. > >_______________________________________________ >AGDev-newbies mailing list >AGDev-newbies at lists.agdev.org >http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies > > > >-- >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 >4:24 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 4:24 PM From tward1978 at earthlink.net Wed Apr 4 18:03:48 2007 From: tward1978 at earthlink.net (Thomas Ward) Date: Wed, 04 Apr 2007 13:03:48 -0400 Subject: [AGDev-newbies] once more, with feeling!!! In-Reply-To: <5.2.1.1.0.20070404000806.04a1d708@pop.earthlink.net> References: <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> <5.2.1.1.0.20070404000806.04a1d708@pop.earthlink.net> Message-ID: <4613DA74.3020606@earthlink.net> Hi Cara, I do think though the quotes isn't all of your problem. There seams to be no real structure to your classes. For example where is your main() function and the rest of your program? I think you should probably mail me the entire project off list as it looks to me as if you are treating this app as a C++ and C# project. C# has a completely different structure than C++ and it might best to learn it before continuing. Guitar Babe wrote: > Tom, wow! I really must work on this code during the day! *yawn* > lol! I can't believe I missed the quotes! *looks sheepish* That's > such a basic syntax that I can't believe I missed it. ick! Thank you > for catching it and I'll see what happens when I change it. As for > everything else you mention, I don't believe that the @ sign is > necessary, but hey, I'll sure find out, won't I? lol! > > Anyway, thanks again and I think I'll wait until tomorrow to revise > / run this! lol! > > Have a wonderful evening and I really do appreciate your help... > > nighters! > > Cara > > At 01:13 AM 4/4/2007 -0400, you wrote: > >> Hi Cara, >> While looking over your code I noticed a few things that could be >> causing you some errors. and here are some recommended changes which >> should resolve your problems. >> When you create the new instance of the secondary buffer that holds >> your file you forgot to include quotes around the string holding the >> name of the file. That is a major syntactical error and one the >> compiler wont' catch until the program is actually run. What I would >> do is something like >> secBuff = new SecondaryBuffer(@"blah.wav", desc, dsDevice); >> rather than your >> secBuff = new SecondaryBuffer(blah.wav, desc, dsDevice); >> The other thing I would change is rather than doing >> secBuff.Play(0, 0); >> I would do >> secBuff.Play(0, BufferPlayFlags.Default) >> for standard playback or >> secBuff.Play(0, BufferPlayFlags.Looping); >> for files that repete in a game. >> Let me know how it goes. >> >> PS >> >> >> Since I have written my own interface to DirectX I don't quite >> remember if the @ sign is required when directly passing to the Play >> function or if that is only if you are passing it through a string >> variable which is passed to the play function. >> However, I do know in either case the quotes are necessary. So try it >> with the @ sign and if that files try it without the @ sign. >> >> _______________________________________________ >> AGDev-newbies mailing list >> AGDev-newbies at lists.agdev.org >> http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies >> >> >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: >> 4/2/2007 4:24 PM > > From tward1978 at earthlink.net Wed Apr 4 18:13:28 2007 From: tward1978 at earthlink.net (Thomas Ward) Date: Wed, 04 Apr 2007 13:13:28 -0400 Subject: [AGDev-newbies] C# and DirectX was Once More In-Reply-To: <5.2.1.1.0.20070404004041.02539e90@pop.earthlink.net> References: <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> <5.2.1.1.0.20070404004041.02539e90@pop.earthlink.net> Message-ID: <4613DCB8.4060703@earthlink.net> Hi Cara, I've read over the attached error list and to solve those I would need to see the entire source. In general the type of errors I am seeing sound to me like invalid structure and your functions are not properly returning. I've got allot of why questions. I don't at all wisht to sound rude, but I am interested as to why you tried creating a new instance of the object when you declared it. That is simply not how things are usually done in C#. Typically, I would have put in my button clicked event to test if the buffer was empty or full and if it was empty try and load it, and ifit was loaded play it. You could have tested the audio subsystem the same way. Also when writing test apps try and catch are your best friend. It will catch errors you might have over looked. From GuitarBabe at earthlink.net Wed Apr 4 21:40:34 2007 From: GuitarBabe at earthlink.net (Guitar Babe) Date: Wed, 04 Apr 2007 13:40:34 -0700 Subject: [AGDev-newbies] once more, with feeling!!! In-Reply-To: <4613DA74.3020606@earthlink.net> References: <5.2.1.1.0.20070404000806.04a1d708@pop.earthlink.net> <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> <5.2.1.1.0.20070404000806.04a1d708@pop.earthlink.net> Message-ID: <5.2.1.1.0.20070404131748.00e27088@pop.earthlink.net> Hey Tom, will do, but in the meantime, the reason I sent along that particular bit of code, is because I've seen in several tuts on DX, the code for setting up an audio device / playing a sound, being placed in the form class and/or form method, so as I'm just for the moment, trying to simply get the hang of getting a simple sound to play, I am merely imitating until I can get more comfortable so I'm kind of a step away from good arrangement of classes when it comes to DX use. Yes, I am coming from a C / C++ background, but I feel like I have some grasp of class structure in C#, but as I'm having trouble, I sure could be wrong on that one! lol! The example I've sent along, is the default windows application that one gets when they set up a new project in VS 2005 and my only adaptations are that I've added the appropriate references to DX and have added a button to the form along with it's on click method that you see in my note. Ive obviously added the offending code as well! lol! If I comment that out, the ap works fine, displaying a button which does nothing at the moment. I can get it to do other things, so it's not my basic coding I'm worrying about, and as this is only an experiment I'm only wanting to see if I can get a single sound to play once on a button click. So that's where I am with it at the moment... Anyway, I can send you along the project and will also see what I can find as usual, on this end. Thanks so much for the note and any other advice you're willing to share is most certainly appreciated!... Have a wonderful day!... Smiles, Cara At 01:03 PM 4/4/2007 -0400, you wrote: >Hi Cara, >I do think though the quotes isn't all of your problem. There seams to be >no real structure to your classes. >For example where is your main() function and the rest of your program? I >think you should probably mail me the entire project off list as it looks >to me as if you are treating this app as a C++ and C# project. C# has a >completely different structure than C++ and it might best to learn it >before continuing. > > >Guitar Babe wrote: >> Tom, wow! I really must work on this code during the day! *yawn* >>lol! I can't believe I missed the quotes! *looks sheepish* That's >>such a basic syntax that I can't believe I missed it. ick! Thank you >>for catching it and I'll see what happens when I change it. As for >>everything else you mention, I don't believe that the @ sign is >>necessary, but hey, I'll sure find out, won't I? lol! >> >> Anyway, thanks again and I think I'll wait until tomorrow to revise / >> run this! lol! >> >>Have a wonderful evening and I really do appreciate your help... >> >>nighters! >> >>Cara >> >>At 01:13 AM 4/4/2007 -0400, you wrote: >> >>>Hi Cara, >>>While looking over your code I noticed a few things that could be >>>causing you some errors. and here are some recommended changes which >>>should resolve your problems. >>>When you create the new instance of the secondary buffer that holds your >>>file you forgot to include quotes around the string holding the name of >>>the file. That is a major syntactical error and one the compiler wont' >>>catch until the program is actually run. What I would do is something like >>>secBuff = new SecondaryBuffer(@"blah.wav", desc, dsDevice); >>>rather than your >>>secBuff = new SecondaryBuffer(blah.wav, desc, dsDevice); >>>The other thing I would change is rather than doing >>>secBuff.Play(0, 0); >>>I would do >>>secBuff.Play(0, BufferPlayFlags.Default) >>>for standard playback or >>>secBuff.Play(0, BufferPlayFlags.Looping); >>>for files that repete in a game. >>>Let me know how it goes. >>> >>>PS >>> >>> >>>Since I have written my own interface to DirectX I don't quite remember >>>if the @ sign is required when directly passing to the Play function or >>>if that is only if you are passing it through a string variable which is >>>passed to the play function. >>>However, I do know in either case the quotes are necessary. So try it >>>with the @ sign and if that files try it without the @ sign. >>> >>>_______________________________________________ >>>AGDev-newbies mailing list >>>AGDev-newbies at lists.agdev.org >>>http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies >>> >>> >>> >>>-- >>>No virus found in this incoming message. >>>Checked by AVG Free Edition. >>>Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: >>>4/2/2007 4:24 PM >> > >_______________________________________________ >AGDev-newbies mailing list >AGDev-newbies at lists.agdev.org >http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies > > > >-- >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 >4:24 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 4:24 PM From GuitarBabe at earthlink.net Wed Apr 4 21:51:59 2007 From: GuitarBabe at earthlink.net (Guitar Babe) Date: Wed, 04 Apr 2007 13:51:59 -0700 Subject: [AGDev-newbies] C# and DirectX was Once More In-Reply-To: <4613DCB8.4060703@earthlink.net> References: <5.2.1.1.0.20070404004041.02539e90@pop.earthlink.net> <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> <5.2.1.1.0.20070403215218.00dfdaf8@mail.onemodelplace.com> <5.2.1.1.0.20070404004041.02539e90@pop.earthlink.net> Message-ID: <5.2.1.1.0.20070404134124.00e1af40@pop.earthlink.net> tom, don't worry about sounding rude at all! This is a blatant beginning experiment and nothing more than that! As I'd just mentioned in my last note, I'm merely trying to get to working with DX a bit, and so am working from some tuts I've located on the web. I actually got most of this code structure from the DX docs themselves, and the placement is coming both from the tuts and myself, so I can just get a feel for what needs to happen for this to work. The code is supposed to simply work with the default audio device and play the sound once, and the project as a whole is based completely off of the default windows app that you get when you create a new project in VS 2005 C#. If I comment out the code within the button's on click event, the project compiles fine and everything is happy. So the structural probs are all coming from the code within the on click event. Thus my confusion. Anyway, as I said, don't worry about being rude, I obviously don't know what the hell I'm doing in regard to getting a sound to play, and I'm not ashamed to admit it! lol! That's why I'm sending along these pathetic notes to try to figure this out. I've read over quite a bit and am still missing something basic so obviously still need a bit of hand holding for this project, as simple as it is... I do appreciate the help and your time in reading over this stuff and will attach the project in a few... Thanks again and have a great day!... Smiles, Cara At 01:13 PM 4/4/2007 -0400, you wrote: >Hi Cara, >I've read over the attached error list and to solve those I would need to >see the entire source. In general the type of errors I am seeing sound to >me like invalid structure and your functions are not properly returning. >I've got allot of why questions. I don't at all wisht to sound rude, but I >am interested as to why you tried creating a new instance of the object >when you declared it. That is simply not how things are usually done in C#. >Typically, I would have put in my button clicked event to test if the >buffer was empty or full and if it was empty try and load it, and ifit was >loaded play it. >You could have tested the audio subsystem the same way. >Also when writing test apps try and catch are your best friend. It will >catch errors you might have over looked. > >_______________________________________________ >AGDev-newbies mailing list >AGDev-newbies at lists.agdev.org >http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies > > > >-- >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 >4:24 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 4:24 PM From sadlerman at randylaptop.com Sun Apr 8 16:01:52 2007 From: sadlerman at randylaptop.com (damien c. sadler - head of x-sight interactive) Date: Sun, 8 Apr 2007 16:01:52 +0100 Subject: [AGDev-newbies] sorting through a score file Message-ID: <007f01c779ee$d80bd560$0500a8c0@xsight> hi. how would i get my game to sort the scores so i can let the player view the top 10 scores in the game? i know it's a basic case of putting values into arrays and seeing which score is higher but then how do i actually do the sorting bit? regards, damien -------------- next part -------------- An HTML attachment was scrubbed... URL: From GuitarBabe at earthlink.net Sun Apr 8 19:43:34 2007 From: GuitarBabe at earthlink.net (Guitar Babe) Date: Sun, 08 Apr 2007 11:43:34 -0700 Subject: [AGDev-newbies] sorting through a score file In-Reply-To: <007f01c779ee$d80bd560$0500a8c0@xsight> Message-ID: <5.2.1.1.0.20070408112010.029ed2e0@pop.earthlink.net> Damien, am just writing this in a language non-specific way, so hope this makes sense. you can create a new array in addition to your original unsorted array and then cycle through the unsorted array with a nested loop, (both set to one less than the length of your array) and then test the values as you go. I.E. If you start your check at the top of your list, with the first two elements of the list, you could pass these to your actual routine to check their values, as in: Pass score(x) and score(x + 1) to your check, and in the check routine, you could have something like this: if(score(x) < score(x +1)) { newscore(x) = score(x + 1); newscore(x + 1) = score(x); } and then to create the actual list that the user would see, you'd then use the new array of the newscore values. Does this make sense?... This is typically called a bubble sort and there are a couple of variations on it as well... HTH and have a most wonderful Easter!!! Smiles, Cara At 04:01 PM 4/8/2007 +0100, you wrote: >hi. > >how would i get my game to sort the scores so i can let the player view >the top 10 scores in the game? >i know it's a basic case of putting values into arrays and seeing which >score is higher but then how do i actually do the sorting bit? > >regards, > >damien > > >_______________________________________________ >AGDev-newbies mailing list >AGDev-newbies at lists.agdev.org >http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies > > >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 >4:24 PM -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 4:24 PM From sadlerman at randylaptop.com Sun Apr 8 20:16:01 2007 From: sadlerman at randylaptop.com (damien c. sadler - head of x-sight interactive) Date: Sun, 8 Apr 2007 20:16:01 +0100 Subject: [AGDev-newbies] sorting through a score file References: <5.2.1.1.0.20070408112010.029ed2e0@pop.earthlink.net> Message-ID: <001401c77a12$59026e40$0500a8c0@xsight> i shall try this. thanks. regards, damien ----- Original Message ----- From: Guitar Babe To: Friendly informal list for those new to AG development Sent: Sunday, April 08, 2007 7:43 PM Subject: Re: [AGDev-newbies] sorting through a score file Damien, am just writing this in a language non-specific way, so hope this makes sense. you can create a new array in addition to your original unsorted array and then cycle through the unsorted array with a nested loop, (both set to one less than the length of your array) and then test the values as you go. I.E. If you start your check at the top of your list, with the first two elements of the list, you could pass these to your actual routine to check their values, as in: Pass score(x) and score(x + 1) to your check, and in the check routine, you could have something like this: if(score(x) < score(x +1)) { newscore(x) = score(x + 1); newscore(x + 1) = score(x); } and then to create the actual list that the user would see, you'd then use the new array of the newscore values. Does this make sense?... This is typically called a bubble sort and there are a couple of variations on it as well... HTH and have a most wonderful Easter!!! Smiles, Cara At 04:01 PM 4/8/2007 +0100, you wrote: hi. how would i get my game to sort the scores so i can let the player view the top 10 scores in the game? i know it's a basic case of putting values into arrays and seeing which score is higher but then how do i actually do the sorting bit? regards, damien _______________________________________________ AGDev-newbies mailing list AGDev-newbies at lists.agdev.org http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 4:24 PM ------------------------------------------------------------------------------ No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 4:24 PM ------------------------------------------------------------------------------ _______________________________________________ AGDev-newbies mailing list AGDev-newbies at lists.agdev.org http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies -------------- next part -------------- An HTML attachment was scrubbed... URL: From GuitarBabe at earthlink.net Sun Apr 8 21:14:39 2007 From: GuitarBabe at earthlink.net (Guitar Babe) Date: Sun, 08 Apr 2007 13:14:39 -0700 Subject: [AGDev-newbies] sorting through a score file In-Reply-To: <001401c77a12$59026e40$0500a8c0@xsight> References: <5.2.1.1.0.20070408112010.029ed2e0@pop.earthlink.net> Message-ID: <5.2.1.1.0.20070408130736.00e37298@pop.earthlink.net> Damien, my sincerest apologies. I realized after I sent that that I'd confused it with another variation. For this to work properly in this context, you will not need to create a second array, and simply initialize a placeholder variable of the same type as your array data instead. So the check routine would look something like: if(score(x) < score(x +1)) { placeholder = score(x); score(x) = score(x + 1); score(x + 1) = placeholder; } So the array you'd show the user would be the one you'd actually checked. Again, my apologies... Have a most wonderful day!... Smiles, Cara At 08:16 PM 4/8/2007 +0100, you wrote: >i shall try this. thanks. > >regards, > >damien > > > > >----- Original Message ----- >From: Guitar Babe >To: Friendly informal list for those >new to AG development >Sent: Sunday, April 08, 2007 7:43 PM >Subject: Re: [AGDev-newbies] sorting through a score file > > Damien, am just writing this in a language non-specific way, so hope > this makes sense. > > you can create a new array in addition to your original unsorted array > and then cycle through the unsorted array with a nested loop, (both set > to one less than the length of your array) and then test the values as > you go. I.E. If you start your check at the top of your list, with the > first two elements of the list, you could pass these to your actual > routine to check their values, as in: > >Pass score(x) and score(x + 1) to your check, and in the check routine, >you could have something like this: > >if(score(x) < score(x +1)) >{ >newscore(x) = score(x + 1); >newscore(x + 1) = score(x); >} > >and then to create the actual list that the user would see, you'd then use >the new array of the newscore values. > >Does this make sense?... > >This is typically called a bubble sort and there are a couple of >variations on it as well... > >HTH and have a most wonderful Easter!!! > >Smiles, > >Cara > >At 04:01 PM 4/8/2007 +0100, you wrote: > >>hi. >> >>how would i get my game to sort the scores so i can let the player view >>the top 10 scores in the game? >>i know it's a basic case of putting values into arrays and seeing which >>score is higher but then how do i actually do the sorting bit? >> >>regards, >> >>damien >> >> >>_______________________________________________ >>AGDev-newbies mailing list >>AGDev-newbies at lists.agdev.org >>http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies >> >> >>No virus found in this incoming message. >>Checked by AVG Free Edition. >>Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 >>4:24 PM > > >---------- > > >No virus found in this outgoing message. >Checked by AVG Free Edition. >Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 >4:24 PM > > >---------- >_______________________________________________ >AGDev-newbies mailing list >AGDev-newbies at lists.agdev.org >http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies > >_______________________________________________ >AGDev-newbies mailing list >AGDev-newbies at lists.agdev.org >http://lists.agdev.org/cgi-bin/mailman/listinfo/agdev-newbies > > >No virus found in this incoming message. >Checked by AVG Free Edition. >Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 >4:24 PM -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 4/2/2007 4:24 PM From agdev-newbies at htpad.com Mon Apr 9 17:25:00 2007 From: agdev-newbies at htpad.com (Hardy) Date: Mon, 9 Apr 2007 12:25:00 -0400 Subject: [AGDev-newbies] Problem with visual studio sample code Message-ID: <000601c77ac3$a7f2ff40$6501a8c0@DESKTOPCOMCAST> Hello helpers, I am using 'visual studio 2005' and I am getting all kinds of errors every time I use certain sample code I get from the online help pages (click to copy code, not cut and paste). Please tell me the simple reason the sample code from the manual is not working so we all can have a good laugh. I think it's either a header I'm not including, a namespace problem, or a declaration of a class I'm not declaring. I'm new at using the 'visual studio 2005' software and I do not want to just sit here bashing my head against the wall for the next 3 or 4 days. I would rather ask for help. here is one of the samples of code I am getting the errors with (it's everything, including the errors that show up): //start of sample code from the online help manual #include "stdafx.h" using namespace System; int main() { Console::Write( L"Hola " ); Console::WriteLine( L"Mundo!" ); Console::WriteLine( L"What is your name: " ); String^ name = Console::ReadLine(); Console::Write( L"Buenos Dias, " ); Console::Write( name ); Console::WriteLine( L"!" ); } //end of sample code from the online help manual //start of errors ...\gameclientproject.cpp(6) : error C2871: 'System' : a namespace with this name does not exist ...\gameclientproject.cpp(10) : error C2653: 'Console' : is not a class or namespace name ...\gameclientproject.cpp(10) : error C3861: 'Write': identifier not found ...\gameclientproject.cpp(11) : error C2653: 'Console' : is not a class or namespace name ...\gameclientproject.cpp(11) : error C3861: 'WriteLine': identifier not found ...\gameclientproject.cpp(12) : error C2653: 'Console' : is not a class or namespace name ...\gameclientproject.cpp(12) : error C3861: 'WriteLine': identifier not found ...\gameclientproject.cpp(13) : error C2065: 'String' : undeclared identifier ...\gameclientproject.cpp(13) : error C2065: 'name' : undeclared identifier ...\gameclientproject.cpp(13) : error C2653: 'Console' : is not a class or namespace name ...\gameclientproject.cpp(13) : error C3861: 'ReadLine': identifier not found ...\gameclientproject.cpp(14) : error C2653: 'Console' : is not a class or namespace name ...\gameclientproject.cpp(14) : error C3861: 'Write': identifier not found ...\gameclientproject.cpp(15) : error C2653: 'Console' : is not a class or namespace name ...\gameclientproject.cpp(15) : error C3861: 'Write': identifier not found ...\gameclientproject.cpp(16) : error C2653: 'Console' : is not a class or namespace name ...\gameclientproject.cpp(16) : error C3861: 'WriteLine': identifier not found Results Build log was saved at "file://...\Debug\BuildLog.htm" gameClientProject - 17 error(s), 0 warning(s) //end of errors Thanks, Mr. Hardy Read one man's journey: http://www.htpad.com/journey -------------- next part -------------- An HTML attachment was scrubbed... URL: From tward1978 at earthlink.net Mon Apr 9 21:21:28 2007 From: tward1978 at earthlink.net (Thomas Ward) Date: Mon, 09 Apr 2007 16:21:28 -0400 Subject: [AGDev-newbies] Problem with visual studio sample code In-Reply-To: <000601c77ac3$a7f2ff40$6501a8c0@DESKTOPCOMCAST> References: <000601c77ac3$a7f2ff40$6501a8c0@DESKTOPCOMCAST> Message-ID: <461AA048.7000703@earthlink.net> Hi, Based on the error messages I've been reading it appears you have not included Microsoft.System.dll to your C++ projects. Microsoft.System.dll is the core dll that is used for Visual Studio 2005 C++, VB, and C# projects. So once you add that dll to your list of dependancies in your project.sln file you will be alright. Cheers. From agdev-newbies at htpad.com Tue Apr 10 17:09:57 2007 From: agdev-newbies at htpad.com (Hardy) Date: Tue, 10 Apr 2007 12:09:57 -0400 Subject: [AGDev-newbies] I'm still stuck on go Message-ID: <001b01c77b8a$bc9c9470$6501a8c0@DESKTOPCOMCAST> Hello Tom, you wrote: Based on the error messages I've been reading it appears you have not included Microsoft.System.dll to your C++ projects. Microsoft.System.dll is the core dll that is used for Visual Studio 2005 C++, VB, and C# projects. So once you add that dll to your list of dependencies in your project.sln file you will be alright. --- I have never done what you are suggesting. I am new at using my '8.0' visual studio 2005' software. I have been doing a lot of hopping around the manual and I have not come across anything that says to do that. However, the manual is enormous. is there a way or an option I can select that will cause 'visual studio' to automatically add this dynamic link library to the file you suggested? There seems to be no clear way in which for me to accomplish this task manually. I tried opening my project.sln' file and I could not see where to add the file name. I tried this as well: #using then I tried: #using which gave this error for both: C1190: managed targeted code requires a '/clr' option Now I am stumped again. I can't seem to get past all the semantics of 'visual studio' to get to my actual work. again, here is the test code from the manual: int main() { Console::Write( L"Hola " ); Console::WriteLine( L"Mundo!" ); Console::WriteLine( L"What is your name: " ); String^ name = Console::ReadLine(); Console::Write( L"Buenos Dias, " ); Console::Write( name ); Console::WriteLine( L"!" ); } Thanks, Mr. Saleem Hardy Read one man's journey: http://www.htpad.com/journey -------------- next part -------------- An HTML attachment was scrubbed... URL: From tward1978 at earthlink.net Tue Apr 10 20:31:27 2007 From: tward1978 at earthlink.net (Thomas Ward) Date: Tue, 10 Apr 2007 15:31:27 -0400 Subject: [AGDev-newbies] I'm still stuck on go In-Reply-To: <001b01c77b8a$bc9c9470$6501a8c0@DESKTOPCOMCAST> References: <001b01c77b8a$bc9c9470$6501a8c0@DESKTOPCOMCAST> Message-ID: <461BE60F.7080908@earthlink.net> Hi, Which C++ project template are you using. If you use the CLR Empty project System.dll should be added automatically. If you use Win32 you can't since Win32 and CLR arec ompletely different types of C++ apps. One is a full compile and the other requires the runtime .NET framework. Before you dive head long in to this what type of app are you using. Are you specifically7 going .NET, or do you want to go triditional Win32. From agdev-newbies at htpad.com Tue Apr 24 05:29:22 2007 From: agdev-newbies at htpad.com (Hardy) Date: Tue, 24 Apr 2007 00:29:22 -0400 Subject: [AGDev-newbies] Can't get internet to computer socket connection Message-ID: <001401c78629$282430b0$6501a8c0@DESKTOPCOMCAST> Hello Helpers, I'm still working on the multiplayer game project. I was taking a week to learn about the internet connection part of the programming. I did manage to learn quite a bit and I created a client on my computer using my visual studio 2005 software. I programmed it in C++ and connected it to a server on the internet using perl and io::socket. all went well. I was freely sending and receiving from the server on the internet. however, there is a new problem. when I reversed the situation and made my local computer the server and the perl program on the internet the client, the two would not connect. also, I tried different port numbers, such as 13000, 5818, etc., making sure to use the same port number for the server and client. nothing worked. the server on my local computer is being programmed with visual studio 2005 c++ with a forcing of the .net framework (clr) and the TCPListener class. the main c++ sub does nothing but call this listener sub. here is the code: ----- #pragma once //clr using namespace System; //IP class using namespace System::Net; //TcpListener Class using namespace System::Net::Sockets; void HTPad_connectAsServer() { try { // Set the TcpListener on port 13000. Int32 port = 50146; IPAddress^ localAddr = IPAddress::Parse( "127.0.0.1" ); // TcpListener* server = new TcpListener(port); TcpListener^ server = gcnew TcpListener( localAddr,port ); // Start listening for client requests. server->Start(); // Buffer for reading data array^bytes = gcnew array(256); String^ data = nullptr; // Enter the listening loop. while ( true ) { Console::Write( "Waiting for a connection... " ); // Perform a blocking call to accept requests. // You could also user server.AcceptSocket() here. TcpClient^ client = server->AcceptTcpClient(); Console::WriteLine( "Connected!" ); data = nullptr; // Get a stream Object* for reading and writing NetworkStream^ stream = client->GetStream(); Int32 i; // Loop to receive all the data sent by the client. while ( i = stream->Read( bytes, 0, bytes->Length ) ) { // Translate data bytes to a ASCII String*. data = Text::Encoding::ASCII->GetString( bytes, 0, i ); Console::WriteLine( "Received: {0}", data ); // Process the data sent by the client. data = data->ToUpper(); array^msg = Text::Encoding::ASCII->GetBytes( data ); // Send back a response. stream->Write( msg, 0, msg->Length ); Console::WriteLine( "Sent: {0}", data ); } // Shutdown and end connection client->Close(); } } catch ( SocketException^ e ) { Console::WriteLine( "SocketException: {0}", e ); } Console::WriteLine( "\nHit enter to continue..." ); Console::Read(); } ----- here is the perl based client code: ----- #!/usr/bin/perl -w -t #!/usr/local/bin/perl -w -t use strict; use sigtrap; use IO::Socket; use CGI; use CGI::Carp qw(fatalsToBrowser); my $q = CGI->new; print $q->header; #enter main sub HTPad_client(); #start of main socket client sub HTPad_client { #define the host and in out port #when the perl was the server on the internet, it gave me the below two as my #ip address and host name of the connected local computer. #I tried both of these as the peeraddr with no luck my $HTPad_host = "72-236-0-140"; #my $HTPad_host = "c-72-236-0-140.ada1.mi.comcast.net"; my $HTPad_port = 50146; my ($HTPad_server , $HTPad_client, $clientPort, $clientIP, $server_input); #open the TCP connection $HTPad_client= IO::Socket::INET->new( PeerAddr => $HTPad_host, PeerPort => $HTPad_port, Proto => "tcp", Type => SOCK_STREAM) or die "A connection to the client at $HTPad_host, $HTPad_port, could not be found: $!\n"; # send something over the socket print $HTPad_client "I would love to here a responce from you my lovely server! (time: " . time() . ") (pid: $$)\015\12"; # read something from the socket $server_input = <$HTPad_client>; print "This client was sent: ", $server_input, "

"; #close the client connection close($HTPad_client); } #end of main socket client ----- Thanks, Mr. Saleem Hardy Read one man's journey: http://www.htpad.com/journey -------------- next part -------------- An HTML attachment was scrubbed... URL: From tward1978 at earthlink.net Tue Apr 24 13:01:15 2007 From: tward1978 at earthlink.net (Thomas Ward) Date: Tue, 24 Apr 2007 08:01:15 -0400 Subject: [AGDev-newbies] Important News. Message-ID: <462DF18B.70909@earthlink.net> Hi Everyone, During the week prier to and following June 1 I will be moving from my mobile home to a flat closer to town. During this period of time I will not be able to moderate lists, answer questions by email, and I will certainly have no time to devote to work on Montezuma's Revenge and USA Raceway. For those interested in these two games I imagine I will get some free time to work on these two games during May, but it will not be a primary factor during free time. Mostly I will be doing spring cleaning, packing, doing paperwork, and other things that need done prier to the move. I do expect however production on Monty and Raceway will resume sometime In June once things settle down again. Thanks.