Answer Questions
Larry Surat problems creating a triangle strip for a terrain section
Hi I am having a few problems creating an index buffer for a triangle strip for a terrain section. I have a section similar to the following. 0 - 1 - 2 | / | / | 3 - 4 - 5 | / | / | 6 - 7 - 8 I define my triangle strip using the following indices also with one degenerate triangle, I have bolded it so it stands out better. 0, 3, 1, 4, 2, 5, 5, 3 , 3, 6, 4, 7, 5, 8 My first question is, is this degenerate correct it seems to be correct, but my next problem is what confuses matters as it really affects wether my terrain tile renders correctly without gaps. When it comes round to making my DrawIndexedPrimitives call, I have to specify the number of vertices, and the total number of primitives. I would have thought t ...Show All
Starck Sprite scaling and blending
OK, I've searched through a couple posts here and didn't find anything that fixed the problem. I'm scaling sprites to draw GUI controls and I'm getting funky results. Here's what I get (blown up 6x to show the problem). I'm drawing the box in chunks - upper left 4x4 pixels, upper right 5x5 pixels, left border, right border, lower left 4x4 and right 5x5 pixels, and upper and lower middle sections.I don't think I have to explain what the problem is. I've tried setting texture filtering, destination blending, but nothing seems to affect it. Here's the sprite I'm using to draw. Maybe I just need to get some sleep. If you look at the first image I linked, the background should be completely back and the border should be one color. ...Show All
AZ13 Generating MipMaps
Hi, When I create a texture using the code below the mip maps always come out as a solid color, how can i generate proper mip maps from the texture TextureImage = new Texture (device, ii.Width, ii.Height, 5 , Usage .None, format, Pool .Managed); SurfaceLoader .FromSurface(TextureImage.GetSurfaceLevel(0), textureTexture.GetSurfaceLevel(0), Filter .None, 0); TextureImage.GenerateMipSubLevels(); Thanks for any help, -Dave Thanks Ralf, will check it out. You are a victim of a common misunderstanding what GenerateMipSubLevels do. It is only there to create the mip maps for textures that are used as render target. And even then they need to ...Show All
tornin2 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
porsh tiger Do any big game companies use C#, VB.Net or J#
Hi, it's me again. ;) I've posted many posts in this thread, but try to stand me. Okay. This could be a silly question, but does any big game house use C#, VB.NET or J# to program DirectX Is it possible Timo Well Vista includes WPF for development (though don't forget WPF is also availalbe to download for WIndows XP) so WPF might make more managed developers (not just c#). Remember though that WPF isn't really about games, well not high performance ones, so that probably won't increase managed code in games. XNA GSE will probably increaseit - well we all hope so. Last I talked to flight sim guys it was all C++ (maybe the occasionaly bit of assembly) Many big companies use it for tools, EA mentioned it in a game postmo ...Show All
derelict.pt XInput wrapper
How are people wrapping up XInput Many games only care when the player starts or stops pressing a button. State changes. Edges. XInput lets you check if the button is currently down or not, but leaves the rest to be handled at a higher level. Is XNA Framework planning to handle any of this I wrote a quick wrapper that just checks for state changes and fires off events using delegates. This is a good start, but requires an update from the game loop to check for those changes. Even at 60Hz, I imagine it's easy to drop edges, and god forbid the game hitches due to some nifty effect. Losing an input would be pretty annoying for a fighting game. Lacking interrupts, it seems the best solution might be to dedicate a thread to monitoring control ...Show All
Marek Istvanek GraphicsComponent.AllowMultiSampling
What does the AllowMultiSampling exactly do It says Specifies whether to enable multisampling if available So i tought this mean it enabled multisampling when available and disables it when not available. I'm using a ATI Radeon 9550 and when setting this to true, the application works, when i test the application on my other computer using ATI Radeon 9200 the application craches. When i set this to false it works. The error it show The values used in the attempt to create the GraphicsDevice were invalid In the beta some graphics cards are not detected properly so when you set this to true it tries to turn on multisampling (or multisampling of a higher quality) when your c ...Show All
cunha Model Exporting From Maya (.fbx)
I have a question and concern regarding the .fbx model exporting from Maya. Problem: Whenever I load a model into my game that has been exported using the latest .fbx exporter plugin from Maya the model is arranged such that some of the pieces of the model are lined up along its x axis. I did some research on the .fbx file format and found out that while it was designed to be an open document 3D model format, it has been grossly revised by just about all modeling programs which have edited it to suit. Which is why you can't export a model in Maya and then import it into Max and expect it to be the same. My question is this, being that the .fbx file format is flaky at best; what make and version of the .fbx exporter/importer is XNA designed ...Show All
naicul So basically "Cut & Paste" from Beta1 to Beta2?
Not including the coding changes involving the content pipeline, to transfer my code from beta1 to beta2 is a simple matter of creating a new project and copying all the data over right Now if ultimately, I want to create a 360 game, I would have to wait until the final release, then "cut & paste" one more time to a new 360 project, is this correct The ZMan wrote: Yes that is correct. When you make your 360 project you can either add all the files to the project, or do 'add link'. Then both projects point to the same source files. This information is unbelievably useful. Thanks! you can make 360 projects now, just cant run them or anything yet. Yes that is correct. When you make your 360 project ...Show All
CBuilder My first game on Xna
I made my first game(1946) with Xna. you can move your plane with mouse, canon is left mouse button new version! (0.1) http://s1.upload.sc/request/38ca5cf656f179755c9bd1d11dea24ae/owner changes; 1 new plane, 2 new sounds, fixed bullet bug. old download link; http://s1.upload.sc/request/f6db77a9f09b025ca438d0dca6855812/owner if anyone has a question please send here or genjurosei@gmail.com thanks thanks I will enter this contest but I dont know many things. I have a few questions; how do I move an object with directions how do I play a sound with looping New version is here http://s1.upload.sc/request/38ca5cf656f179755c9bd1d11dea24ae/owner changes; 1 new plane, 2 sound ...Show All
firmlyfly Drawing a primitive without a texture
I am trying to draw a masking square in front of my application's display. The display uses VertexPositionTexture format vertexes. I was hoping to draw the square using a VertexPositionColor vertex, but it looks like Vertex types cannot be mixed on a single device. While I can create a single-color texture in code and throw it on the square, it looks pretty bad when it expands. A very noticable ring appears around the edges. Without a texture, it will not draw while TextureEnabled is set to true. Is there a means to draw a primitive without a texture when using VertexPositionTexture Whenever you want to render a primitive with another type of Vertex Format/Declaration you will need to set the verte ...Show All
csi_hugh Issues with a Loading Bar
Well, earlier today I realized my mario-clone was taking a while to load mainly due to the audio files and partly due to the many sprites being loaded. It wasn't a real problem, but it seemed rather unproffesional to have the computer pause for a while without any feedback for the user to confirm that anything was happening. Initially I used System.Console.WriteLine("Loading Something...") for the various resources that I had. This works fine for debugging, but whenever I tried to organize a loading bar that the user could see on a devoted portion of my game I experienced some trouble. First off, I'm using game states to determine whether I'm loading, at the menu, or playing the game, these aren't a problem. Secondly I'm using a ...Show All
Ujjwal Das DreamBuildPlay is up!!!
Now go register!! Actual contest details to come the week of Feb 5th uphhh....they turned this piece of junk off. M$ please keep pro. The site is live and yes we realize there are a few things that haven't quite propped properly. We've got people looking to get these fixed asap. To be clear, yes you will be able to register outside the US as this is a global competition. And yes, the missing states will be re-annexed shortly. Apologies for the wrinkles in the rollout. --dave Hmm... State location and phone number seem to be USA specific. An oversight, or is the rest of the world excluded ...Show All
Manoj Verma C# Brainwrong
How do I do this in C# I have an ArrayList and the following code : levelObject objtest; objtest = ( levelObject )levelObjectList[10]; objtest.matWorld = Matrix .Identity; I want the matWorld of the 10th element of the arraylist to change to identity when I change the objtest.matWorld. I thought objects were references and not value types. I didn't even notice that ha. My biggest pet peeve is the dreaded, make me hold down shift and blow my intellisence to bits m_ and _property grrr Don't mean to be picky but you should really use pascal case for your class names, LevelObject would be more appropriate. Sorry, had to mention it ;) ...Show All
Heinz Krug Coordinate system and matrix inconsitencies
I still don't understand the intent of not using DirectX's left handed coordinate system. I thought it made sence at first, since OpenGL uses a right handed coordinate system.It would open up for easier porting of OpenGL code and interop integration with OpenGL libraries. Now I would prefer to have things the same way as DirectX so that I can easily use libraries and code from DirectX, but that's me. I can still say that all is good and a right handed system is just fine. But then I notice that matrices in XNA use row major representation, just like DirectX and not like OpenGL's column major matrices. Now it is only a matter of the order you multiply your matrices in and it really doesn't matter which one you use as long as you know whi ...Show All
