Answer Questions
Saad Ahmed Model Position Problem
I have this code that creates a model at the position of the mouse click but the model never shows up at that position. Maybe someone out there knows why the models seem to be offset. If I click in the top left corner of the screen, the model shows up in the center of the window. Here is the code: #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; using System.Collections; #endregion namespace Commander { /// <summary> /// This is the main type for your game /// </summary> ...Show All
WilliamVista Entities: Think, Update, Create, Collide, Render -- Stumped!
Hey all, Thanks to all of your suggestions from previous topics, I'm finally 'working on the game' sort of speak. My final (or near final) hurdle is in the controlling and creation of entities. Game entities need to be able to think (what's around me Should I get out of it's way ), update (move based on your velocity), collide (whoops I hit something), create other entities (I'm shootin' mah gun!) and render themselves. Every problem is easy to handle individually: Think: Can be performed inside the Update method. Update: Entity.Update() Collide: Run through all the entities, do some culling of what's obviously too far away, and check the rest. Spawn: EntityFactory.Create(typeof(Bullet)) Render: Entity.Render() Combined, however, it begin ...Show All
Jonathan van de Veen DirectX 10-Vista
I owe a computer with W. XP.I'm going to upgrade it to Vista.My question is if directX 10 needs only Vista to run.My system is fueled by ATI radeon x1600 pro.Do I have to change it or just have Vista As always ATI and nVidia will launch the high end models first. Slower less expensive models will follow. A “cheap” D3D10 solution could be the new Intel chipset that contains a D3D10 compatible IGP. Unfortunately it seems that Intel will not provide D3D10 driver for it until Vista is ready. But the users of your software will face the same problem. game-maniac ... DX10 compactible devices have nothing to do with new drivers and stuff. The chipset on the graphic card must be compactible with t ...Show All
RolfWiki Using Static Members
In my projects, instead of passing the GraphicsDeviceManager and the SpriteBatch by reference to the constructor of every class that will need them, or directly to every method that needs it, I prefer making them both Public Static Members of my main class, thus being available anywhere in the program. I would like to know, is this a bad solution And if so, why is that I understand one of the reasons is portability. If I passed them by reference, then I could re-use those classes in other applications without any change. But consider that I'm using these classes for my own application only, and if I needed to use it somewhere else, the changes to be made are still minimal. On the other hand, by using the Static approach, both classes and ...Show All
smudie Xbox 360 Development
Yes I know it's a little early but since beta 1 of the XNA Game Studio Express won't have Xbox 360 development will beta 2 include this or not Is it too early to tell -- Mike When you mean initial release do you mean after beta -- Mike You would think that they would want to beta this feature but something in the faq said that MS does not beta this type of thing on 360. That being said I think they will have a private beta 2. We will not publicly beta test the XNA Framework for the Xbox 360. It will be available when the XNA Game Studio Express goes into initial release this holiday season. Our initial release will happen after Beta 1 (August 30th). The release is currently slated for Holiday '06. aL ...Show All
LadyReader help with Pan Tilt and Zoom with simple 3D Cube
Hey guys and gals, I'm sort of new with XNA and programming with C# in general. I created a simple 3d cube and using this thread as a reference. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=687936&SiteID=1 I also created a keyboard component for my input as I want to manipulate the camera such as you would in a FPS game. My problem is that I tried to these lines of code to accomplish that and it doesn't seem to work. I have these under the Update section of my code. What am I doing wrong if (keyboardComponent.IsKeyDown( Keys .W)) { //zoom into object mCameraPosition.Z-=1.0F; } if (keyboardComponent.IsKeyDown( Keys .S)) { //zoom out mCameraPosition.Z+=1.0F; } if (keyb ...Show All
TruePsion Spare 360 power supply to help with XNA development
I have to move my xbox from the tv room to my computer room for doing XNA development - probably the same story for many of you here. So I figured I would just buy a second set of cables so it was easier to move - I can find the video cables all over but there appears to be no way to get a second power supply. There's a couple on ebay but they want $120 with shipping which seems a little much. So what is the magic search voodoo to find a spare one at a reasonable price. I have had some success using remote desktop but its a real pain to go from 2x21" monitors to a single laptop screen... i do whireless i my place all include my coffe maschine is wireless conected so i just send a command to the coffe maschine and ...Show All
Amitai Create a Model dynamically?
Hi, I'm trying to import an iges file, and display in 3D, etc.. I've loaded the iges file and tessellated the faces, that gives a me serious of triangles. I can draw these primatives, but unfortunately I don't have the normal's and thus all the triangles come through as a single sold color. I would like to create a Model with the given vertices, and it seams that the Model will also generate the normals that I need to have a nicely shaded model. The problem that I have, is how do I create a Model dynamically without using the content processor (as I need to import & convert iges at runtime - I've created a MeshContent, but with limited access to the internet, I couldn't figure how to get this into a Model). Any ideas ...Show All
GTrz Heightmap Collision testing
This question has been mocking me all day. I know it's doable, I have even used such a function somewhere long ago, and I have even found quotes of people saying "the calculation is easy and quick," however, I cannot find an example of heightmap collision testing. In other words, I want to be able to type MyLandscape.GetHeight(x,z) and it'll return the height (y) at that point. Now, this is not a simple, find the vertex at (x,z), and return the array value. There is distance between each vertex so, (x,z) wouldn't always be a vertex location. If I recall my calculus from ages ago, I think I remember there being a way to do this, but I don't remember. Answers or links would be deeply appreciated. ...Show All
peter sobhy Serializing CustomVertex
Microsoft.DirectX.Direct3D.CustomVertex is not marked as Serializable, so an array can not be Serialized. Is there any way to overcome this Thanks. Let me be more specific for the extra intelligent perfectionists: How do I serialize an array of CustomVertex.PositionNormalTextured items (or any other of the many types). For example: Public Vert() As CustomVertex.PositionNormalTextured ReDim Vert(nVerts) Dim FS As FileStream = New FileStream(fname, FileMode.Create) Dim BF As New BinaryFormatter() BF.Serialize(FS, Vert) This does not work and gives the following message: Type Microsoft.DirextX.Direct3D.CustomVertex+PositionNormalTextured is not ...Show All
Alex Resnik I have already installed all the programs but I have a problem
Hi everybody I hope you could help me. I have already installed this software: MicrosoftR Visual C#R 2005 Express Edition XNA Game Studio Express and DirectX Software Development Kit (dxsdk_oct2006.exe) When I open a new Window Game (XNA) project, it has only the g raphics component , that's all right, but when I build and run the game it should work but it doesn't, I get the next error: Microsoft.Xna.Framework.Components.NoSuitableGraphicsDeviceException was unhandled Message="The values used in the attempt to create the GraphicsDevice were invalid." Source="Microsoft.Xna.Framework.Game" StackTrace: at Microsoft.Xna.Framework.Components.GraphicsComponent.CreateDevice(GraphicsD ...Show All
Ramesh_Kumar_02a072 DrawModel Memory Problem
Hey all, i have used the code from the MSDN documentation which draws a model but i have run into a problem. private void DrawModel(Model m) { Matrix[] transforms = new Matrix[m.Bones.Count]; float aspectRatio = 640.0f / 480.0f; m.CopyAbsoluteBoneTransformsTo(transforms); Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f), aspectRatio, 1.0f, 10000.0f); Matrix view = Matrix.CreateLookAt(new Vector3(100.0f, 150.0f, -150.0f), Vector3.Zero, Vector3.Up); foreach (ModelMesh mesh in m.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.View = view; effect.Projection = projection; ...Show All
aramka XNA Framework wish list
XNA Framework wish list. - System.Net.Sockets o Socket (Tcp & UDP transport) o Do not really need support for TcpClient, TcpListener and UdpClient - System.Security.Cryptography o Rijndael o MD5 - System.IO o FileStream o StreamWriter / Reader - System.Text o StringBuilder o Full UniCode support - System.Threading - System.Diagnostic Thanks, Roger Larsen Before I answer your question, first some background. As you may know, XNA networking is coming on the 360; it just won't be out for the first release. In the meantime, wouldn't it ...Show All
Developer Dan Line of sight
I am currently working on an RPG using XNA and I was wondering if anyone has implemented a line of sight algorithm on XNA. The game uses a grid of squares, and I need to know which squares are visible based on what square the character is in. I have an array that I can use to determine which squares the character can see through, but I can't think of a way to determine which squares the character can see. I somehow need to determine which squares are on the other side of a wall, for instance. I hope I am clear enough. If all your concerned about is what parts of your 2D grid are visible, you should look at quad trees for your scene management. Easy to implement and an effecient way to cull unseen ...Show All
David T&#246;rnquist XNA and physics?
Hi, I'm curious about the XNA Framework, but at this point it seems like there is very little written about what exactly is included in the framework. Will XNA ship with a physics module How about the content pipeline Collada 1.4 Is XNA more than a c# wrapper for DirectX Regards Johan They seem to be pretty tight liped about the features that will come with with XNA, when XNA was announced at GDC they talked about it having managed code for things like physics and "other" things that take away from programming the game. I wish some video came out of Gamefest, sounds like they did some demos of XNA and the beta has to be 99% ready to give it a release date. Maybe on10.net or s ...Show All
