Answer Questions
CSQ foreach slower than for on 360?
Hi, I have been hearing on the "internets" that foreach runs slower on the XBox 360 CF because of the IEnumerators used. According to this hot book, "Effective C# (item 11)", it claims that the C# compiler 1.1+ generates different code when a foreach is used on an array. The code avoids IEnumerator and even avoids bounds check that a normal for() loop would invoke. The book, however, was written in 2004. I was hoping for a a final statement on this because I just find it hard to believe that foreach is slower on the XBox 360 and enjoy the syntax it offers. Thanks. Two clarifications: Due to an optimization in the C# compiler, foreach does not cause garbage if you use it to iterat ...Show All
IG Fats vertex color doesnot work
thanks for answering my previous question....well now when i draw the mesh all the vertex and primitives become white color....if i dont ...i.e. if i comment the mesh drawsubset then all the color reappear........ what could be the problem Make sure that the render states you expect are indeed set on the device before rendering your PosColor vertices... PIX is your friend here... In particular, look at the Lighting state, and the MaterialColorSource state... ...Show All
L123 Uploaded mine...
When you get done with you game and sumbit it, crow about it here. A little over 24 hours left until the deadline and I'm so amazed I'm done, so much better than college Thanks to ZMan for his help, good luck all. I'll post the source code for my submission once the deadline hits. Bill I'd like to post my game somewhere, for others to see, but I'm still wodering if it is ok with MS. Anyone has an official opinion Finished mine at about 1am PST last night. It's called SolarBall and it's basically like a two-man space soccer. After I've had a nap, I'll post the binaries if anybody's interested. I'm really looking forward to seeing everybody's entries. Two weeks is a very short amount ...Show All
Mike Turner - MSFT Absolute beginners questions about XNA Game Studio Express
Could someone point me to an FAQ about system hardware requirements, and maybe a simple tutorial about modern graphics cards I'm afraid I haven't done anything with hardware in years and all this XNA terminology is new to me. ------------ My actual problem is this: I've downloaded XNA Game Studio Express. I've downloaded the latest DirectX Drivers. I've created an instance the MySpaceWarWin demo. And of course it crashes. I put that recommended test code in: GraphicsDeviceCapabilities caps = adapter.GetCapabilities( DeviceType .Hardware); if (caps.MaxPixelShaderProfile < ShaderProfile .PS_2_0) ... etc. just before game.run and apparently I do have a good enough Shader (whatever that is.) However Game.Run still ...Show All
BuzzBar Pong
Where would I find or How would i go about creating a simple 2D pong game.Are there any tutorials available I downloaded the file but it comes up with an error - 'Unexpected end of archive' What should I do I have a made pong if anyone would like to see the code, but I don't have a website right now. So I can't put it up on the web. If any one knows a site that is about XNA, and if the webmaster would put me projects up let me know. Here is a pong game on the coding4fun site: http://msdn.microsoft.com/coding4fun/gaming/arcade/article.aspx articleid=1256876&title=Intro+to+XNA+Part+1%3a+Building+Tiny+Tennis Can someone post ...Show All
Will Merydith Components Advantage
Is there any real advantage to creating a class as a component Say I have a camera class - Is there any reason to base it off of Component Thanks for all of the responses To tie some of these responses together, I think that yes, the component model is not a replacement for proper structures such as scene graphs, but they can definitely help bring things together in an additive way. And the way you can accomplish this is by composition. Consider your camera example ... you can have a camera component, which registers an ICameraService, which exposes a Camera property. This Camera property can inherit from whatever class you want ... there you go, best of both worlds :-) ...Show All
Lukke DXSDK vs. DX runtimes
Hello, The DX version we're supporting is DirectX 9.0c but if we compile using a recent DXSDK (currently April 2006), it seems that some users are missing some dependencies (ex. D3DX9_30.dll) even if the installer properly detects that they already have DirectX 9.0c. MSDN entry: http://msdn.microsoft.com/library/default.asp url=/library/en-us/directx9_c/DirectXSetupGetVersion.asp It is possible to detect the version and revision but that only tells us that the user has a DX 9.0c runtime. What's the proper way of handling this during installation to detect whether latest DX runtime should be installed ugh, that link should be removed. Always use the DirectX End ...Show All
Marc Sutton xnb file shader
when i have to release my game engine it comes with prebuild shader for win and xbox is there any form i can store copyright info inside the shader or pehaps store some file info in my engine so i prevent people from steel my shaders I thought the only way to currently distribute xbox 360 XNA games was by shipping the complete source to someone else so they can build their own copy. Not much IP hiding with that distribution model. XNA is currently a hobby platform so game developer wannabes like me can have some fun and maybe, someday, have a portfolio or perhaps a product. It is not a commercial product development platform for the 360, and we are told we CANNOT use it to develop commercial products that target the 36 ...Show All
Jignesh Vyas XNA : Absolute Beginner
Ok, I've taken the plunge and decided to write my own Pong game (you have to start somewhere, right!). I thought this would be a good starting point as it will get my used to sprites and collision detection.. I've managed to get a sprite working and bouncing of the edge of the graphics viewport but I'm using simple "if ( texturePos.X > viewPoirt.Width )" code to detect the edges of the viewport. I'd like to encompass my texture in a boundingbox (boundingsphere) and set up 4 planes as the walls. I'm not much of a star in the maths department and I can't get my head around a plane having 4 co-ordinates... Would someone be kind enough to help me understand how I describe the planes with 4 co-ordinates Alteratively, ...Show All
JavaBoy EffecMaterialContent behavior in a custom model processor
Hi, I'm writting a custom model processor and I have some questions about it, if anyone can help me I should be grateful. I'm using MeshBuilder to build my mesh, geometry, texture channels, normals... and this works perfectly. I'm putting my textures with 'EffectMaterialContent myMaterial = new EffectMaterialContent(); myMaterial.Textures.Add(keyname, new ExternalReference<TextureContent>("mytexture"))' method. a) I build my asset model in my game project and the texture is named "mytexture~0" and I don't understand why appear that sufix "~0" if I don't have other texture with this name in my project. b) I would like to know if I must load my model’s texture with 'myCo ...Show All
87jerome MDX and XNA
Is MDX being phased out by XNA I googled around and quite some helper libraries and tutorials provided by others are being converted from MDX to XNA code, and there's also this notice on the DirectX SDK that says that MDX 2.0 beta is no longer supported and have to go back to MDX 1.1. So what is the status on MDX Is it out of development and that XNA is its successor Since I have answered this question a lot now. I've blogged a summary http://www.thezbuffer.com/articles/470.aspx which I will keep up to date with anything new that I learn MDX 1.1 is currently frozen and is no longer being updated. However its part of DX9 so will be supported for a pretty long time. Microsoft have not made any publ ...Show All
Amit Online Direct3D - how to render a simple bitmap ( Draw2D ) transparently ?
Hello all! I'm using Direct3D 9 (windowed) @ C# 2005. I load the bitmap file to my Texture object like that: tB = TextureLoader .FromFile(devD3D, @"b.bmp" ); I tried all kind of combinations with my Sprite object (who's associated to the DevD3D Device object) to render this Texture transparently, with the Draw2D function. Why Because this program is very simple and I don't want to mess around with 3D stuff. So, what am I missing here How can I render it transparently Can I tell what color to be rendered as "transparent" Thanks in advance ! This is pretty well covered in the "Simple2D" sample in the DirectX SDK Don't know why I didn't check this one before.. Took a few minutes ...Show All
dansha Extra strip line
Have noticed a little thing. I am drawing my background image in fullscreen mode placing it at 0,0, with backbuffer size. If at the same draw time graphics.GraphicsDevice.Clear (Color) method is using, clscolor stripline in one pixel width is seen at the top and utmost left lines. It is not sufficient in this case though, you can set Color.Black or not use this method at all. How are you drawing the background image Using SpriteBatch, or your own code With SpriteBatch. So I am forced to clear screen with black color before going to the start screen again. Strange thing is going on. Failed to represent this situation today - was curious to put on the presentation su ...Show All
cvajre Optimizing meshes
Basically, I'm building a sort of Isometric Tiling engine in XNA, the same you see in games such as Civilization. Each tile in my 3D world is a mesh (cube), so many cubes form the grid or playing area. As expected, rendering many meshes at once slows down the game a lot. It can handle a 15x15 grid (225 meshes) but going over 20x20 (400 meshes) slows the game down to a halt. I'm not sure how they do it in modern games, but I'm assuming they build the terrain seperately and then represent it as a grid.. so that could be a possibility. I also thought of using sprites to represent the tiles but that (I think) severely affects the 3D stuff I can do, such as panning/rotating a camera or selecting objects. So what sort of optimizations c ...Show All
bluexx Website to download components
In Mitch Walker's blog, he says he expects to see cool components from the community. Will Microsoft have a website to host these components Kind of like how highend3d lets people share all the scripts and plugins people make for cg packages. Ahhh, I could throw that together in a day or so. Let me know if you need a hand! You could stop posting non-XNA stuff on your blog and you'd have more time! The VS code snippets feature may already fill in a good part of the needs for this. As for hosting ready-made components, we'll be looking into a solution for that as well. It would be nice to know Microsoft's plans for this though, so we're not building a redundant alternative. Since r ...Show All
