Answer Questions
Roozbeh Sharafi Editing Vector3s in the designer
I have a component with a public accessor for a Vector3 eg: public Vector3 Position { get { return mPosition; } set { mPosition = value; } } When I add the component to my Game derived class using the designer, this property shows up in the Properties window but the value is grey and I cannot change the values. I noticed the same thing happening with the FreeLookCamera class in the components demo video. Is this by design Is there a way around it The designer always does this. Thus far, you're not allowed to plug in object types into the editor unless the instance of the object you'd like to plug in is seen in the visual designer. It'll gray things out if you try doing that. As for getting around i ...Show All
Blair Allen Stark XML data file becoming corrupt for no apparent reason
For reasons I can't explain, my game sometimes throws an exception when trying to load my XML game save data on 360. It seems to become corrupted randomly. I have to recode the game to delete and recreate the file. Could this happen if the game debug is stopped at a certain time Should I always quit through the game itself If I wanted to overwrite a set of data every time I saved, I would use; FileMode.Create, FileAccess.Write correct Such as highscores where the values are simply being replaced. If I tried using; FileMode.Open, FileAccess.Write to accomplish this, could that be what's causing my problems The way to do "safe save" is to: 1) Create a new file as a neighbor of the file being replaced. Name it ...Show All
gudel Detecting a controller button press?
I'm using the following code to toggle my grid on/off at runtime: if ( GamePad .GetState( PlayerIndex .One).Buttons.Y == ButtonState .Pressed) grid1.ShowGrid = !grid1.ShowGrid; But it's badly flawed, in that the Y button is "Pressed" every time the button is down (eg. if I hold it down for 1 second, it would toggle 60 times). How can I reliably find if a button was pressed (eg. it's initial down state), without having to keep track of Up/Down states for every button myself I have a little InputManager, it only works on the keyboard, but it seems to do what you want. Calls a delegate as soon as the registered key is pressed or released with the new state as an argument. I'll see if I ca ...Show All
KennMurphy How do you set the framerate?
Is there an easy way to get my code and the game components to run at constant 60 FPS so that I can have the same experience between different machine Are we going to see a feature in the GraphicsComponent that will allow me to set this You can set the rate that the Update routine gets called by viewing the designer and setting IsFixedTimeStep to true and setting TargetElapsedTime to the number of milliseconds between calls, but I don't think there is any way to lock the rate that the Draw routine is called. It would probably be way too variable based on the GPU of the computer it is running on to be reliable. Even TargetElapsedTime isn't guarenteed. Thanks, I didn't see that! At least it's a ...Show All
coolcoder Cause Reboot while using D3DCREATE_HARDWARE_VERTEXPROCESSING
I wrote a D3D9 App, and it runs well if using D3DCREATE_SOFTWARE_VERTEXPROCESSING. But if I swithed to D3DCREATE_HARDWARE_VERTEXPROCESSING, it reboot my computer. Then I switched back to soft mode and see the debug messege when running, just got"D3D9 Helper: Warning: Default value for D3DRS_POINTSIZE_MAX is 2.19902e+012f, not 1.58456e+029f. This is ok." without anything else. I just do some Sin wave computing for the positions in Vertex Shader. I'm using nVidia GeForce6200, may it be the problem of driver another thing I want to ask is about the FPS. During my test of my apps, it seems that the FPS of Debug Runtime + Hardware vertex process=Retail Runtime + Software/Hardware vertex processing (same fast) Only Retail ...Show All
please help me Rendering simple textured quad
Hi! I'm using MDX 1.1 and DX SDK Framework. How can I render a simple textured quad, that I can rotate (using ModelViewerCamera and preferably vertex shader) to show that in fact it's 3D, not just plain 2D The quad size should match the texture size. If the texture is larger than the current resolution it should scale somehow to fit the screen. I'm trying to do some image post processing and I'd like to move from CPU post processing to real time GPU postprocessing using shaders. Thanks in advance ...Show All
nagual20 XNA Community Website
With the announcement of the XNA Game Studio Express (Beta) we decided to create a community site where everyone can post Games, Articles, Tutorials, Pictures, and more. We hope XNASpot will be a place where anyone at any programming level can come to learn more about XNA game development. One tutorial is already in the works. But we need feedback on what everyone would like to see on the site. Is there any specific tutorial, article, code sample everyone would like to see If you have a site or blog you would like us to link to please feel free to shoot us an email. Please let us know what you think. http://www.XNASpot.com ZMan this is what we were thinking. :) ...Show All
Leo Mathew How to defiine line width
I draw objects using "LineList" primitive type. How can I define line's width Line primitives are always one pixel wide. Use ID3DXLine for thick lines... http://msdn2.microsoft.com/en-us/library/ms887118.aspx Line Class (Microsoft.DirectX.Direct3D) Can you tell me how to do it with C# (I don't know how ID3DXLine called in .NET) But thickness of Line won't vanish with perspective. I don't want to draw 2D lines Read my answer in your thread: " Can't draw line " ...Show All
a.s.viswa Animating Billboards Using A Single Texture
I just finished a basic billboard class that is capable of reading in multiple textures and animating. However, I would like to read in a single texture file and be able to simply change texture coordinates to change the appearance of the billboard. Now, I could recreate my VertexBuffer each frame, but that would be a lot of wasted processing. Is there a way to dynamically alter the texture coordinates for VertexBuffer objects each frame Edit: As a bonus question, how do I enable the alpha channels in my textures Right now it shows up white. I am using the BasicEffect. Would I have to write my own effect just for that Seems rather silly but I will if I have to. Edit 2: As bonus question 2, how can I disable antialiasing of my textures I'm ...Show All
Michael Klucher - MSFT Will XNA work with .......?
hey everyone im new to this forums and i just had a quick question but if this question has been already asked then you may lock it. ok my question is i recently downloaded Microsoft Visual C# Express 2005 will this work with XNA / is that the only program i had to download for XNA.. or in other words are there any other software i need to download to use XNA on August 30th or will XNA come with the other programs Thank You very much.. I am not to sure if you need C# Express to run XNA, the way it sound it will come with it. However I think if you already have C# Express it will share files with XNA. Unlimited Destroye wrote: By the way what about v.b At the moment only C# is supported. ...Show All
MrZkitten Rants on XNA 1.0
This is my first reaction when I installed and tried the 1.0 of XNA. To summarize my feeling: it's still 95% for XBox and no nearer to replace the old MDX 1.0. So I decided not to migrate from MDX to XNA though I want to do that very much. I feel like MDX 2 more; amen to MDX 2. The hardest issue for me is the content pipeline, which is very necessary, but the workflow is fixed and it assumes the contents are only built before the program runs. The helper functions wrapping D3DX can only be used with types in the content pipeline. I have to utilize the full content pipeline just for generating something dynamically, of course with significant performance cost. Or I have to write those D3DX utilities my self. Currently I don't have a good id ...Show All
papiens Making a Game
Hi, My name is Robert Veldhuizen. I am 13 years old and I have always been interested in computer games. Two months ago I went on MSN Video and I saw you could make your own game for your PC or Xbox360 with a program called XNA. It immedatly got my attention and I have been storing this in my favourite until I had the courage to post. I want to work in the games industry and even though I'm in school, I want to make a portfolio now for any Graphics/ Game Universety I want to go to. I have no clue on how to make a game ( let alone code), but it would be a great help if I could get anyones help ( A guide for example). My MSN name is Robert.Veldhuizen@chello.nl so please add me on your msn or E-Mail so we can get and discuss about me wa ...Show All
RedXrider Where is the 360 download?
On your Xbox 360 Dashboard, navigate to the Xbox Live blade. Select Xbox Live Marketplace and press A. Select Games and press A. Select All Game Downloads and press A. Select XNA Game Studio Express . I don't see XNA Game Studio Express Is there a way to search Market Place Live! and not have to scroll up and down all the list - guy Ya It should have either been left out or a disclaimer or something somewhere saying it is not there. Maybe on the downloads pages. If I missed it because of anxiety and hopes that I could get my game on the 360 than I think the message needs to be in BOLD. Because everything points to it being there including those instruction I posted (maybe ...Show All
bralston Can't get model to display properly
Hi, I have a created a airplane in 3DS Max (it's not finished), but i have rendered it you can see it here: http://home.exetel.com.au/feldaspar/plane_rendered.gif When I go to diplay it while running the game from XNA stuidio express all I get is this: http://home.exetel.com.au/feldaspar/game.gif I think it is probably more the way it is being output from 3DS Max, but i'm new to both XNA and 3DS so I dont know. I exported it using the FBX extension, filmbox. This is my code: protected override void LoadGraphicsContent( bool loadAllContent) { if (loadAllContent){ mymodel = content.Load< Model >( @"Content\Models\p11" ); } } ........ protected override void Draw( Ga ...Show All
ChristopherC problem with creating ForceFeedback periodic effect
Hallo I use DirectX 9 to control a forcefeedback joystick (saitek Evo Force ) with c++. The project works well with a constant force ef fect (see direct input sdk c++ example "FFConst"). Now I want to create a second effect ( DIPERIODIC). So I initialize and create the effect on the same way like the constant effect (see code at the 2. post). But wenn I run the Programm the effect will not start. And my problem I do not see why the effect will not work... MFG. Gerald T P.S. I am still working on my English :-( HMM how can I post code better then this way is there a special codebox anywhere DWORD rgdwAxes[2] = { DIJOFS_X, DIJOFS_Y }; LON ...Show All
