Answer Questions
AndyL DRAW simple 3D CUBE - InvalidCallExeption
Hi guys, I was able to succesfully complete the 3D Cube tutorial, The build was succesfull,but It throws an Exception at this line: graphics.GraphicsDevice.DrawUserPrimitives< VertexPositionColor > ( PrimitiveType .TriangleList, 12,nonIndexedCube); Does anyone have the complete code and if you guys do could you please copy and paste it.If some one from the XNA Team could please check this Exception I would realy appreciate it. Also i would love to know where to place, the folowing lines of code : VertexPositionColor[] nonIndexedCube = new VertexPositionColor[36]; Vector3 topLeftFront = new Vector3( -1.0f, 1.0f, 1.0f ); Vector3 bottomLeftFront = new Vector3( -1.0f, -1.0f, 1.0f ); Vector3 topRightFront = new Vect ...Show All
eric_o Simple 3D Cube using BasicEffect -- No shading/color
I am trying to just create a cube using BasicEffect, not shaders like in the sample code for a simple cube in the help (see http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=687011&SiteID=1 ). However, I only see the cube as a flat grey hexagon -- no colors, no shading, not even the edges of the cube are seen -- only the flat grey against the background. When I run the above code, I do get a colored cube. I have an NVIDIA GeForce FX 5900XT, which does support Pixel and Vertex Shader 2.0+. I've messed with every effect method there is, so I'm not sure what I'm missing. Below is the code: using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Frame ...Show All
NP Rudra Question from XNA Tutorial 1
Ok, so, I see this going on in many people's 3D examples, so there must be something to it. In XNA tutorial 1, in the Draw loop, they set every property of every effect every time through the loop. Why It would seem to me that, since they always want default lighting, the best place to set that is in LoadGraphicsContent, right after the model is loaded. Same for the aspect ratio. They don't support it changing, so why bother setting it 60 times per second As far as the view and world matrix, obviously those theoretically need to change. But why is this not done in Update That way, the transformations are skipped (and frame rate goes up), if the player is not pushing on the controller to move the camera, or if the object did not n ...Show All
GaryMcC Shadows in 2D
I'm writing a 2D game and it looks nice, but its missing something. I've never handled shadows with 2D games before, but I believe this would add a nice touch. Can anyone give me any pointers (no, not the programming type) Is there an easy way with XNA to make the shadow appear on my standard background when just doing 2D There is a sprite overload that takes a color which will be multiplied by the sprite colors. If you use Color(0,0,0,128) all the opaque parts of your sprite will turn black and 50% opaque. Draw this sprite slightly offset first and it should give you what you want. You could also stretch the sprite in the direction of the light and change the opaqueness to make it look like the li ...Show All
Hallio The XNA Resource Directory- XNAList
XNAList is aXNA Resource Directory.We are try to put all xna resource link all into one place. This way user can search and add new resources to the directory. The site should be up and running at full speed in the next few days. I would like all xna programmers to come over in sign-up. XNAList is part of Nik Nak Games. Site: www.xnaList.com e-mail: 1. Harrison- harrisonb@niknakgames.com 2. Rick- ricks@niknakgames.com Good idea - there are tons of tutorials floating around, and people should be careful not to reproduce things that have already been done. I also want to suggest a rating system for tutorials. You should also have posted this as a comment rather than a question! ...Show All
akilah I cant install
I downloaded everything, SP2, VC++ 5 and XNA, but I cant install XNA. It says that I need to download and install VC 2005, but I did that, I can run VC and do everything with it, but cant install XNA. Whats going on The requirement is c# express http://msdn.microsoft.com/vstudio/express/visualcsharp/ is that what you meant by VC2005 [moving to xna forums] I too have this issue..here is the report I really wanted to compete in this contest btw I hope the contest ends in 2008 and not 2007 :'( todays the 27th i was going to staple myself to a desk. lol. Here is to another week for the contest! I'm not sure how many times we hav ...Show All
irohan_fernando How to import a 3d Model in XNA framework?
Can anyone explain me howto import a 3d model in an XNA project In which format I have to export my model from 3ds max 7 Alright, heres a new version: Updates: .swm now contains vertex format string more verbose error descriptions Get it here: http://astaroth.beatbuggy.net:8080/Downloads/x2swm_1_0_0_1.zip I created a .X to .SWM converter. x2swm - http://astaroth.beatbuggy.net:8080/Downloads/x2swm.zip It's not properly tested, so let me know if it works ok. Hi, thanks for posting this converter. Now, I don't like to look a gift horse in the mouth and all that, but would it be possible for you to post this as source I understand if you are restricted by work or such but you will appreciate we have t ...Show All
Barry-ELX How to do anti alias in XNA?
How to achieve anti alias in XNA, after a quick search in the document and forums, I got no idea, will some one tell me if it's possible in XNA If not, is there anyway to wrap around that Because without anti alias , the game sometimes looks a little weired! Many thanks! I think you may need to adjust these properties on your render target: RenderTarget2D.MultiSampleQuality RenderTarget2D.MultiSampleType I just noticed that those properties are apparently read-only, but you can specify them in the constructor when you create the RenderTarget2D. Here's an article here that talks about achieving a type of anti-aliasing with 2D images. You can also l ...Show All
&#38;&#35;169&#59; &#354;&#297;&#1084;&#972; &#350;&#261;&#316;&#963;&#1084;&#257;&#312; Online Multiplayer for Xbox360
Will there be any kind of support for creating multiplayer games over the internet for use on the 360 There's a hugely compact framework for the 360 when you create the project, and nothing about sockets, internet, etc... if we can't make online multiplayer games, huge blow to what we can do on the 360. There will be no networking in v1 of XNA as far as the public knows currently. I will confirm -- there will be no networking API in the first version of the XNA Framework. On Windows, you can use System.Net from the .NET Framework (or some other API), but there will be no equivalent in the Xbox 360's .NET Compact Framework. This is in the FAQ: Q: Does the XNA ...Show All
Derson Andrade By the numbers - why so big?
My content, using JPG's, is roughly 14.4 MB. However, the XNB version is roughly 515 MB. About 38 times bigger than the original. Is this normal What steps do I need to take to reduce the size of this I'm just begining with my development but if I can't augment this behavior of the Framework I'll have to serverly strip down my game. Maybe, I'll have to replace Content<T> altogether ( ) I have a few 60+ MB jpeg’s if anyone is interested. Just post your email info and I’ll send them to you Actually, I couldn’t send the images even if I wanted too because they're not mine. I thought we were aiming for the 10-Foot experience. Popping up a clip composed of 8x8 BMP’s seems to contradict that goal. Ma ...Show All
tfrazier Questions and suggestions
Just a couple of small observations/questions from a quick play 1: Is there a reason I'm missing why Microsoft.Xna.Framework is copied local to the output app, and Microsoft.Xna.Framework.Game isnt. I could understand if both werent or both were, just a little confused why one is and one isnt. 2: From the Content Pipeline video on the XNA Team blog I would assume that Assets (Models, sounds, etc) are saved basically as resources in the exe. The reason I assume this is that the content is build when you compile, theres no mention of the files existing on the filesystem in the new xna binary format, the code for using a Model seems to imply that the Model is already in memory. Is this true If so will there be a mechanism for loading th ...Show All
Fred Herring Reset or not reset a IDirect3DDevice9?
Hi @ all, i'd want know if calling IDirect3DDevice9::reset() is the correct way after switching from windowed mode to fullscreen. In PresentParameters there are some attributes that have sense only in fullscreen mode, as well as FullScreen_RefreshRateInHz or MultiSampleType. Have I to call reset() function Is it the correct way What do I have still to check Thx ;) THX @ all ;) ProfEclipse wrote: Be aware that certain changes to the present parameters, such as bit depth, will require that the device be released and recreated. You can test for that, or just let the Reset fail and then fallback to device recreation. How did you get into this conclusion ...Show All
cgraus Code4Fun Framework Timer compile issue
Hi, I am attempting to make use of the QueryPerformanceCounter timer, as detailed in the Coding4FunTutorial. After following the steps, add a new folder, copy the dxmutmisc.cs file to the project. I get 133 errors most saying "The type or namespace name DirectX does not exist in the namespace Microsoft( are you missing an assembly reference )" ANy direction would be appreciated. Thanks Jeff Hi Glenn, That is the namespace that I am using, using Microsoft.Samples.DirectX.UtilityToolkit; Thanks Jeff There's no need to use QueryPerfomanceCounter if you are using .Net 2.0 use System.Diagnostics.Stopwatch instead. You need to add ...Show All
happycamper1234 device.AvailableTextureMemory somehow?
Is it possible to get the free or the used VGA memory somehow in Xna like device.AvailableTextureMemory in MDX or GetAvailableTextureMem(). If it is not possible in the XNA framework, can I extract the "native DX device pointer" from XNA and pass it to the C++ DirectX dll and ask GetAvailableTextureMem() with PInvoke Thanks, George What's your ultimate goal in doing this if I may ask Used and available video memory is actually a tough question to answer on modern hardware. Even if you do have access to the API the return value can be surprisingly random at times! For instance on Xbox, the unified memory architecture means any kind of CPU data structure allocation would affect t ...Show All
rheaney Suggestion for stock Vertex structs
I notice that the framework provides a few stock vertex structures like VertexPositionColor etc. This is cool but it would be great if these could inherit from an interface which provides a mechanism to get the SizeInBytes and Element information abstractly. These structs currently provide this information as static properties but this is no good if you are are trying to write a generic function that can deal with a number of different types of vertex structures seamlessly. My suggestion is that in future something like an IVertexInfo is provided that lets you deal with these concrete vertex structures abstractly. Perhaps something like this. interface IVertexInfo { VertexElement [] Elemen ...Show All
