Answer Questions
Tdar Can't stop a playing sound
Hi, I play a sound using code taken from the well-known tutorial: public static void Play( string name) { Cue s = soundbank.GetCue(name); s.Play(); } I've got my own little routine for stopping the sound: public static void Stop ( string name) { Cue s = soundbank.GetCue(name); s.Stop( AudioStopOptions .Immediate ); } But the sound fails to stop. It doesn't throw any exceptions. Any clues Sorted. It seems you can't stop a sound from looking up the cue using GetCue - you have to use the original Cue you invoked the Play() command on. It seems the two are different! :D Anyway, I've just posted a demo game up on my site. *Blatent self publicity - turn away now!* I'm ...Show All
gsell Where is a Tutorial??
hello, where can i find a tutorial, or a guide step-by-step, some examples There are some great documentaion that comes with XNA, including some simple tutorials. If you click on help in VC# Express and hit Index , then search for Getting Started with XNA it has a few tutorials that should get you started. You can also search How To: and it'll come up with a bunch of tutorials. Also info at http://xbox360homebrew.com yes for people that have never seen or have no experience in this, not me Also, as I've been playing around this morning. I've discovered some great step by step instructions already provided by Microsoft fo ...Show All
sigol post processing shader
hi, i want to learn how to write post processing shader. so i have a few questions. when i tried to figure out, how post processing shader are working i saw a script in an effect technique. are this scripts used to redirect the rendering process into a texture instead of rendering the pixels to the back buffer when i want to post process a final scene, do i need to draw the scene onto a rectangle i mean do i have to render to primitives and map the final scene onto these primitives in order to post process thx a lot! Can you send me a complete source codes to mailto: hack.root@mail.ru No. Note that if you are doing 3D you'll also want to create a depth buffe ...Show All
Lucky P Creators Club???
How do I join the Creators Club I don't see it anywhere in XBox Live Marketplace. Don't you have to have this subscription to *test* XNA games on the XBox 360 And if so, how then are people already exchanging their work I could not find the Club from the All Game Downloads as described in Step 2 here: http://msdn2.microsoft.com/en-us/library/bb197292.aspx Jon No, I don't have Family Filter on. However, I went back to look again and saw it there. It was right under my nose; I am such a guy. I've looked for it many times as well, and it's not there. I joined the XNA Creators Club a couple hours ago, and I'm hoping the launcher will show up so ...Show All
A. Argueta using the XmlImporter w/Content Pipeline
I have all my game objects defined in XML files and I would like to use the Content Pipeline to load them. Looking at the available importers, it seems like the XmlImporter is the right choice, but it appears to want the XML in a certain format (a reasonable requirement). So far I haven't found any documentation on the correct way to format the file. It seems like this would use the XML serialization in C# to serialize/deserialize the object. When you pick XmlImporter in the properties, however, it appears to want a particular root element. Also, I would assume that you would use the No Processing Required for the Content Processor. If that is the case, then I think it is just a matter of formatting the XML file correctly, selecting the XM ...Show All
chris441962 Riemers.net -- 4th Series finished: Final screenshots
Hi all -- I've been working on a 4th Series of XNA Tutorials, which deals with advanced terrain rendering. This series is completely new; it is not a translation of one of my MDX series. The graphical part of the series has been finished, so you can already have a look at some screenshots: XNA Tutorials Series 4: Advanced terrain You can expect the first chapters somewhere next week. I first have to clean up some code and get the skydome exported to a .x file! If you have some experience with this, head over to this thread please. ps: you can find links to 2 larger screenshots in the 3rd paragraph. I think Reimer's tutorials are probably the best around, but I know what you mean - I did find it ...Show All
Eric Harmon Xbox 360 Guides in XNA
Hi there, I've been playing around with the framework and I have a little question for any MSFTies who can answer. On the Windows side of things, if we want to call up any useful built in functions of Windows like say the common dialog box colour picker (for say, a player's car paint job) or a MessageBox (you've reached the end of the demo!), we can still do so by calling in to the Windows.Forms namespace. On the Xbox 360 side though, any such UI we would have to recoded manually. However, as we all know, there are certain built in elements of UI on the 360 too in the form of the various Xbox Guide slide out panels. Currently, access to one of these does exist in XNA (The save Location guide for letting the user choose a Memor ...Show All
jmsigler2 Get Screen Coordinates of Vertices?
Hey, I'm looking to obtain the screen (X and Y) co-ordinates of vertices. Whenever I move my mouse over a vertex I want to change it's color, but don't know how to compare the mouse position with my vertices. Any suggestions Thanks There are three ways of doing this: 1) Cast the ray in world space, collision test against the bounding sphere of each mesh, and for the meshes that overlap, transform the vertices into screen space and compare. This requires software transform of the vertices, which might be a waste of CPU. (screen position = meshvertex * WORLD * VIEW * PROJECTION / W * VIEWPORT) 2) Render each vertex as a small quad with a unique color for each (there are 16 million unique colors, ...Show All
pradeep990 Port asm to HLSL help please
Could someone who is more intelligent than me please convert the below asm code to HLSL. You will have a place in heaven if you do this ..... :O) Thanks, Dave PixelShader = asm { ps_1_1 tex t0 tex t1 // Specular dp3_sat r1, t1_bx2, v1_bx2 // r1 = (2.0 * (NormalMap - 0.5)) * (2.0 * (vSpecular - 0.5)) dp3_sat r0, t1_bx2, v0_bx2 mul_sat r1, r1, r0 mul_sat r1, r1, r1 mul_sat r1, r1, c2 // Diffuse + Ambient dp3_sat r0, t1, v0_bx2 mad_sat r0, r0, c1, c0 mad_sat r0, r0, t0, r1 }; PixelShaderConstant1[0] = (cAmbient); PixelShaderConstant1[1] = (cDiffuse); PixelShaderConstant1[2] = (cSpecular); Yes, but it is ...Show All
Giber Scaling my Skybox
Hi guys i hope you can help me with my simple problem. I use the following code to draw my skybox: public void Draw() { Matrix[] transforms = new Matrix[myMesh.Bones.Count]; myMesh.CopyAbsoluteBoneTransformsTo(transforms); foreach (ModelMesh mesh in myMesh.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.View = View; effect.Projection = Projection; effect.World = mesh.ParentBone.Transform * Matrix.CreateTranslation(Position); } mesh.Draw(); } } Whats my problem My problem is that my skybox is too small. So how can I scale my skybox or in common how c ...Show All
jiao Need a little bit of LinkedList help
While this doesn't exactly pertain to XNA, I can't find an answer for how to do this correctly and I'm running into this problem making an XNA program. Basically, I'm re-creating the Windows Starfield screensaver using XNA. As such I've created a simple class called Star, and I've got a LinkedList of Stars for my program, as linked lists are incerdibly fast for removing items from the middle of the list. As such, I've got some code like this: foreach (Star currentStar in stars) { currentStar.Update(); } that works beautifully to update all my stars quickly. The way I've got my stars set up, though, the Update function returns -1 if the star has passed the screen't border, signifying that the star c ...Show All
raymuirhead Saving screenshots
Since SurfaceLoader has disappeared I tried to make this code work: Texture2D tex = new Texture2D(device, device.Viewport.Width, device.Viewport.Height, 1, ResourceUsage.Dynamic, SurfaceFormat.Color, ResourcePool.SystemMemory); device.CopyFrontBuffer(0, tex.GetSurfaceLevel(0)); tex.Save("C:\\screenshot.png", ImageFileFormat.Png); It throws an exception; and so does this: Surface s = device.CreateOffscreenPlainSurface(device.Viewport.Width, device.Viewport.Height, SurfaceFormat.Color, ResourcePool.SystemMemory); device.CopyFrontBuffer(0, s); Did I miss something or is this a bug --Michael Beware that code will fail for multisample render targets and that the graphics compone ...Show All
Mr Papaya xbox 360 controller thumbsticks
hello, I'm trying to move a Sprite with my 360 controller thumbstick, the X directions are working but the Y directions go the wrong way. can someone help me here's my code: void UpdateBall() { GamePadState gamepadstatus = GamePad .GetState( PlayerIndex .One); if (gamepadstatus.IsConnected == true && gamepadstatus.PacketNumber != gamepadvorigestatus.PacketNumber) { if (gamepadstatus.Buttons.Back == ButtonState .Pressed) { this .Exit(); } if (gamepadstatus.ThumbSticks.Left.X > 0) { int thumbstickX1 = Convert .ToInt32(gamepadstatus.ThumbSticks.Left.X); ball.ballposition.X += thumbstickX1 * 4; } if (gamepadstatus.ThumbSticks.Left.X < 0) { int thumb ...Show All
Tryin2Bgood Waiting is booooooring....
Do you think somebody at Microsoft is reading these posts Are they making us wait on purpose Oh i have code for my work... nothing to see with a game :(. We are as children waiting for a present... Ok i've just seen webcasts but it was just containing explanation and no demonstration :(... I think that the XNA team is working hard to provide us a good and fun package... but I'm impatient too... :'( ... I'm impressed to see that people of all countries are waiting for it !!! That's fun. I think (and i'm sure) hope we will enjoy XNA game studio express. Well, we've seen video of it. do you realize that we are fan of a software we have never seen... :d it's probably a littl ...Show All
caligula Dream Build Play - partner in crime
I'm still hard at work on a new game I'm working on, but it's more for fun than anything I would submit for a contest. But I really want to enter the dream, build, play contest too, I just don't think I'll have the time to do it all on my own. Does anyone out there want to partner up I'm no programming guru, but I've got a few skillz. I've been messing with XNA since beta 1, I got one (and a half) xna game(s) under my belt, and I'd say my biggest assets are creativity, thinking outside the box, analytical problem solving, writing, story, plot, characters, and high fives (not necessarily in that order) ...only reply if you plan on winning! No smili ...Show All
