Answer Questions
jamil Vector Math Help
I'm having a problem...I have a ship heading in a direction VectorA and a gravitational force pulling it towards an object, when it collides with that object, I need to bounce it off that object into the correct direction, (180 - angle of collision), but I cant figure out how to get it to head in the proper direction at the correct speed. if (shipBounds.Intersects(sphereBounds) == true ) { double yoffset; double xoffset; double returnangle; yoffset = ( double )(playerShip.Position.Y - sphere1.Position.Y); xoffset = ( double )(playerShip.Position.X - sphere1.Position.X); returnangle = Math .Atan(yoffset / xoffset); returnangle = (double)MathHelper.ToRadians(180) - returnangle; playerShip.Velocit ...Show All
chiraj Base Movements on Time
As currently, only 2D games can be produced in XNA Express, I've decided to make the obligatory Tetris clone to get myself into XNA and C#. I'm not far into development but I've hit a small problem I'm hoping someone can help me with. I'm wanting my blocks to fall at a rate of milliseconds so that they fall at the same speed on every machine, regardless of power. Currently, I have an Update() function which looks like this: int gameSpeed = 70; int updateIncrement = 0; protected override void Update() { // The time since Update was called last float elapsed = (float)ElapsedTime.TotalSeconds; if (updateIncrement >= gameSpeed) { updateIncrement = 0; gameGrid.Update(true); } ...Show All
daimaku Vector maths methods...
Following a long day of writing and debugging some nasty rigid body physics code, and feeling the pain of the maths library I have to use for this C++ work, I thought I'd take another look at the XNA maths code to see if the results would be more readable (as you might hope ;). ... But my quick look at the framework docs seems to show more deficiencies than in the code I have been using all day... 1/ There is no Point3 class. This is a real pain as libraries that don't distinguish points and vectors are a right pain - transforming a point by a 4x4 matrix will result in a different result to transforming a vector. (And I don't want to resort to coding every point/vector as a homogeneous coordinate either!). There appears to be a ...Show All
petrHloz I have to write an article about XNA Game Studio : user point of view needed
Hello everyone, I have to write a dossier for a french videogame monthly magazine, where I should present the "product" to the readers, most of whom are teen gamers. It's no tech article, but a "perspective" one, about what is and may become XNA. If it can spark something inside a few of our readers, and have them try game development, that will be nice. Therefore, I'd like to have an idea about XNA reception on the users' side . I have a serie of generic questions. I'd be really happy that some of you cared to answer. Basic questions : - Why choose XNA over DX C++ dev - Why or how is XNA more suited to indie/homemade developements - Is there a reason why one would choose not too dev How would you describe XNA framework, refering to - th ...Show All
MrMMills Getting a model from a 3D Studio into a game?
Hi there Im looking for some tutorials that in detail describe how to get from a model inside say 3ds Max or Rhino to get it into my game. What Im looking for is some simple yet descriptive tutorial or something that step by step takes me from a Cube or what ever in 3ds Max to a spinning cube with some texture applyed to it in my game. Ive followed the Getting started tutorials in XNA and understand how to get the model and the texture loaded into the Content Pipeline. I just dont know how to ready them for the game in terms of getting the model out in the right format and how to get it to know which texture to use or even how to create the texture file other than its a image file. Anybody got some helpfull links on these matte ...Show All
Hallio 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 In order for the Properties Window to be able to edit this property, the type needs to have a TypeConverter that can convert it to/from System.String. The reason being that you will edit the property in the Properties Window by typing a string. The Type Co ...Show All
sunny123 Is the XNA Game Studio Express supposed to look exactly like Visual C# 2005 Express Edition?
I just downloaded XNA Express 1.0 and I looks just like Visual C# Express Edition that I downloaded a week ago. It even says Visual C#.......... and I dont understand why. Also I could never start a new project because there were no templates to select. Does anyone know what my problems are and how I can fix them. Oh, and the "Windows Game" and "XBox 360 Game" won't appear at the top of the dialog. Look towards the end of the list of icons... matlock85 wrote: I just downloaded XNA Express 1.0 and I looks just like Visual C# Express Edition that I downloaded a week ago. It even says Visual C#.......... and I dont understand why. Also I could never start a new project becaus ...Show All
Saurabh G Collision Detection
Ok, i know this has already been posted on but after going through that i still couldn't get it to work. So here's my code and plz tell me what's wrong. Texture2D _paddle1; Texture2D _paddle2; Texture2D _ball; Vector2 _paddle1pos; Vector2 _paddle2pos; Vector2 _ballpos; Vector3 _p1box; Vector3 _p1box2; Vector3 _p2box; Vector3 _p2box2; Vector3 _bbox; Vector3 _bbox2; BoundingBox bb1 = new BoundingBox (); BoundingBox bb2 = new BoundingBox (); BoundingBox bb3 = new BoundingBox (); SpriteBatch spriteBatch; _paddle1pos = new Vector2 (50, 300); _paddle2pos = new Vector2 (1000, 300); _ballpos = new Vector2 (400, 300); _p1box = new Vector3 (_paddle1pos.X, _paddle1pos.Y,0); _p1box2 = new V ...Show All
ciaranh XNA with C# Professional version
I can find any of this in the FAQ so I'll ask: Is there a way to get/install and use the XNA framework with the professional version of C# My Visual Studio Professional already as C# installed. I'd like to be able to play with XNA without playing to many installation games Thanks, Gary Only the installer itself depends on C# Express being present. So, install it to make the installer happy, uninstall C# Express, and reference the XNA framework from any version of Visual Studio that you like. Working with it with Vb.Net in VS2005 Standard Edition atm. (I do understand that it won't work on the 360 doing that as the vb libraries aren't on there yet, but I don't have a 360 making it a null point for m ...Show All
NehaRahul Using DirectX9.0c and Visual C++ express: errors in building a full screen
Windows XP Home Edition, SP2. Visual C++ express, DirectX SDK (oct. 2006), Visual Studio and platform SDK (SPK1). Updated the different files. Successfully made a window in Win32 application. And now have compiling errors building a full-screen window with DirectX. What I did: - in: Project - MyThirdWindow - Property pages _ Linker - Input: I added d3dx9.lib and d3d9.lib - in : Tools - Options - Project and Solutions - VC++ Directories , I made sure to add : in Executable files: $(DXSK_DIR)Utilities\Bin\x86 in Include Files: $(DXSDK_DIR)include in Library Files: $(DXSDK_DIR)lib\86 I've been working on this since las night (started with 26 errors narrowed down to 9 (+ 1 warning)! Looking for hints ! (new to ...Show All
Jourdan TorqueXNA
I had a look at the XNA version of the Torque 2d engine and noticed that it converted 4mb worth of png files into over 60mb of xna files; Is this a Torque issue or xna as its a massive increase and would make releasing any games online a virtual impossibility. Thanks Shawn, but I'm not sure if that answered the question. For example, I have a splash screen that goes from 5.21kb in PNG format to 1.10MB (1126.4kb) in XNB format - over 216 times bigger. Is there something I have to change in the properties for that file to keep it from getting inflated There is nothing inherent in converting PNG to .xnb format that will make the files larger: it all depends what output format you are converting them ...Show All
xlordt How to control level of multisampling ?
Hi all, I have a question: How can I control the level of multisampling I understood that with graphics.AllowMultiSampling = true the device will be set to use multisampling, if possible. But how can I control the level of multisampling, e.g. if I want to let the user to decide between 2x multisampling and 4x multisampling Another related question: Let's say I have a windowed (not fullscreen) device at a size of, say, 640x480. The device runs fine with multisampling. Now the user resizes that window to a larger size, say 1024x768. Will the device automatically be reset to no multisampling, if using multisampling would exceed the video memory Cheers, Christopher You should be able to hook t ...Show All
ThomasAG Threaded code shows no speedup on XBox 360: More to it than Threading namespace?
I wrote some Mandelbrot code that I can divvy up into multiple threads. On my multiprocessor dev box, I get the expected speedups. Identical code on the XBox 360 shows no difference in calculation speed. Does the XNA Framework actually distribute the processing, or is it serially multitasking on a single core Update: Using SetProcessorAffinity() at the beginning of my ThreadStart delegate worked perfectly. I'm interested in this as well, just last night I started working on updating my inflater / deflater to work across several background threads so that decompressing files will be as fast as possible (System.IO.Compression is not in 360CF if you did not notice. ;-). ...Show All
revmrfr 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 Thanks X-Tactic for te converter...i'll try it... Matute wrote: It fails! it gives the following error: Mesh format clone failed :-( I updated the cloning a little, hopefully it will fix your problem. Heres an updated version with modifed cloning: http://astaroth.beatbuggy.net:8080/Downloads/x2swm_1_0_0_2.zip 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 to be very careful ab ...Show All
ejamashu Direct3D Retained Mode Documentation
Where can I find documentation on Retained Mode objects and functions. Seems as if it is now omitted from the current Visual Studio documentation. Somewhere there has to be documentation on Direct3D Retained Mode. The last version of the DirectX SDK to include the retained mode documention was the DirectX 7 SDK. It was already obsolete in that SDK but it included the documention as an appendix. See this recent thread for a discussion on where you might be able to find this old SDK. if i'm not mistaken retained mode was supported in dx below 8. so beggining from 8th version there is no retained mode. but this is imo of course ...Show All
