Answer Questions
Henrik Dahl Declaring alternative input devices
Hi to all I have been told that I can register alternative input devices to the DirectX such that a game that runs will see my input instead of the standard devices that are connected on the machine. To be more specific, I want to use a client that receives a user input (game pad, mouse etc.) from a remote machine and gives it to the Direct Input, such that the game that runs on the local machine thinks that an action was taken locally. I have browsed through the DirectX SDK Documentation and also searched for an answer in the web, but I haven't figured out anything yet. Could anyone from this site clear this issue for me please Is what I am trying to do feasible I really thank you for your time Theofilos ...Show All
c_shah On Quaternions and Vectors in 1.0
First: Congrats to the team for getting 1.0 out. It's always a mad push. Second: Is there a "release notes" document somewhere, that documents all the changes between beta 2 and 1.0 The Readme document contains almost nothing like that, and neither does the supplied help file documentation (at least that I can find). Third: I'd like to understand how the connect feedback system works. I suggested you add a vector-by-quaternion transform function to make it easy to rotate a vector by a quaternion. Doing it that way is a lot more efficient than going to matrix and multiplying. This suggestion was closed as "resolved" in connect a while back. However, in 1.0, there is no Vector3.Transform() function to transform by a quate ...Show All
Will C.404367 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
Fwank79 Basic projection, view and world matricies?
Is there a tutorial out there about projection, view and world matrices I would like to check them out. Hi Alfons, I posted a response to your request for a basic explanation of why matrices are used in three dimensions on my blog, the post is called The Five Steps to Three Dimensions . This gives you an overview of how you get from a 3D universe full of things, to viewing a scene in the screen coordinates of your monitor, and how matrices play a hand in that. I hope it helps! Daniel I just wandered into this thread, and I'd like to thank Kyle_W for the explanations. All too often tutorials will tell you what to do for the matrices, but don't bother explaining what they're actually for. ...Show All
paso How to use View and Projection matrix?
Hi. I'm trying to draw a vertex buffer (using PositionColored vertex) but I can't see anything. So, reading about it on the web, I've found that I need to set two matrix: Projection and View. I've donet it! Take a look: // Create the vertex buffer private void OnVertexBufferCreate(object sender, EventArgs e) { VertexBuffer buffer = (VertexBuffer)sender; CustomVertex.PositionColored[] verts = new CustomVertex.PositionColored[3]; verts[0] = new CustomVertex.PositionColored(0.0f, 1.0f, 1.0f, Color.Aqua.ToArgb()); verts[1] = new CustomVertex.PositionColored(-1.0f, -1.0f, 1.0f, Color.Black.ToArgb()); verts[2] = new CustomVertex.PositionColored(1.0f, -1.0f, 1.0f, Color.Purple.ToArgb()); buffer.SetD ...Show All
Rich G Building a Class repository but I have Namespace issues.
You'll have to forgive the no doubt "simplicity" of this question but please bear with me. I am currently writing lots of small projects to learn different aspects of how C# and XNA both work. This is pretty much the first major involvement in a class based language that I have really dug into and it is certainly one where I have encountered namespaces and had to take notice of them. My plan is to build a set of classes that any new project can have access to (gameObjects, cameras etc...), ideally in a central location to all projects. Every class I create has a Namespace associated with it which means every time I try and use it from a different project, I have to add the class to the project and then change the Namespace. ...Show All
tt2lhp Question about Transfering the game.
I am totally new at XNA and pretty new at programming in C, and i was wondering; How do you transfer the game over to the 360 Do you upload to the internet, or do you just transfer over an ethernet cable Thanks. Oh, ok. I just never got that. Thank you. " How do you transfer the game over to the 360 " At this point you don't. Running on the 360 is not enabled in the beta. ...Show All
yanyee Pixel Manipulation of Textures
Hi All I have created some 2d textures from bmp files and want to combine them in a new texture. I have been trying the surface getData()/setData() commands unsuccessfully. In fact if I get the data from a surface, modify only one pixel of it, and set the data back to the same surface I get a graduated pattern instead of just a pixel being modified Which is not really what I was expecting. Any help would be great, thanks. RF Hi Sorry, here's some code. Basically I have a png and create a texture (from file) with it (texDest). Get the surface pixels into an array, replace the first pixel, and set the pixels back to the surface with setData. The png goes from being a red block, t ...Show All
Buster95127390 DrawableGameComponent.GraphicsDevice
I added a class I called Quad, that I hope to use as a rectangle. I butchered the code used to draw the cube and I inherited from DrawableGameComponent in order to make use of the GraphicsDevice property to do the drawing. Any reference to the property throws an "Object reference not set" exception. Any help just a guess, but I think Initialize is not the right place to add your object to the Components list. I'm not at work so I can't be sure, but my guess is that your Initialize is never being called. You can put a breakpoint in there to check. A better place to add an object to the Components list is in the game's constructor. Try this instead: GraphicsDeviceManager gdm = ...Show All
oaix Engine Renderer
I have been using an engine renderer that using DirectX 9.0c. It comes in a version that was developed in C Sharp, and I was wondering if that can be used with XNA Game Studio Express for the making of Windows and Xbox 360 games (assuming that XNA Creator's Club Subscription is purchased) I suspect that TorqueX will be a developer only licensing. So you buy one copy and then you can redistribute a run time or something. None of the other Torque products have any runtime licensing. So Developer (PC Only) - free XNA + TorqueX Friends to play (PC Only) - free XNA + free TorqueX redist Developer (360) - Creators Club + TorqueX Friends to play (360) - Creators club + free TorqueX redist Yes ...Show All
MyLady Problem scaling a model
Hi, I am not sure if someone already posted something on this, but here's my question. I bought a .fbx model from turbosquid.com and I would like to scale it so that everything looks proportionate. The problem is, parts of the model become out of place (for example, the wheels are no longer connected to a truck) after scaling it. I scaled the model by using this code: Matrix[] transforms = new Matrix[model.Bones.Count] model.CopyAbsoluteBoneTransformsTo(transforms); . . . Effect.world = Matrix.CreateScale(new Vector3(0.5f, 0.5f, 0.5f)) *transforms[mesh.ParentBone.Index]* Matrix.CreateTranslation(position); Thanks in advance. Hi Kyle, You were absolutely right. The code below works for me. Matrix ...Show All
Mark Hogan .x file
I posted another question about converting 3d pixles to a .x file, but no one seemed to know the anwser, so I have the go the down and dirty route: Can some one please explain to me, or point me to a page that explains how a .x file works I want know how a .x file works so I can make the conversion software my self, but just incase some knows how already: I want to turn a bunch of pixles of this or simular format: r, g, b, x, y, z into a .x file, I know direct x use triangles, not pixles, but i guess you can see what I'm trying to do X File Format Reference ...Show All
Bruce Barker render a copy of the backbuffer
Hello I have read several posts about that, but nothing seems to work for me, I try to save my backbuffer (to store it in a surface) then I would like to draw this saved surface... so, I need two things. 1: save my backbuffer MyBackBufferSurface=graphics.GraphicsDevice.GetBackBuffer(0,0); 2:render my backBuffer spriteRenderer.Draw(MyBackBufferTexture, new Rectangle (0, 0, 512, 512), Color .White); I used : MyBackBufferSurface= MyBackBuffertexture.GetSurfaceLevel(0); to assosiate my surface with my texture I end up with a black surface when I render my texutre please help me I on this since a week and it makes me crazy. thanx it seems to work better, b ...Show All
davidw Could C# be the future of gaming?
Since XNA is using C#, and is is a more intuitive language than C++, is it possible that in the future that C# will dominate, espessially in AAA titles. Could XNA be ushering a new way of programming in the main stream I agree with a lot of what is said here. A collegue and I dabbled in producing "cottage industry" type games using C# and DirectX 9. The Z-Buffer web site (www.thezbuffer.com) shows the groundswell of movement towards managed languages and game writing. Excuse this ... (Under the "games" link, the game "d-Rez" was our first attempt at a C# DirectX game) . Personally, I think managed environments are the way forward in creating some much needed layers to game industry. I love C#. I don't write games as a day job. Ho ...Show All
JoeBlow123 Colors, RGB values and vector confusion
I've started playing with various XNA tutorials available on the net. I see several examples where colors are made from Vector4 structures. So my question is: is there any resources for looking up Vector4 values to know which one to use for a given color In paint I get arb values (which is between 0 and 255) and it looks like I need to convert that to vectors which use values between 0 and 1. Hi, usually the color's components are stored between 0 and 1 like you said, to convert from the 0 - 255 to 0 - 1 just divide the value of each component by 255. The use of vector4 instead of vector3 is because of the alpha channel. The alpha channel has the opacity or transparency of the color which is usually ...Show All
