xna

How to parse image for border vertices? Complex object geometry (farseer physics)

How could I create body vertices by scanning image and detecting it's shape (of it's non-transparent pixels)? I wanna create complex geometry, and I actually have no real idea where to start, so any advice would be highly appreciated. Accepted answer would most likely be the one that explains the topmost idea. Thanks in advance ...

C# XNA: Trouble with Dictionaries

I'm new to C#. Perhaps I'm not implementing IEquatable properly, because objects of my type that should be considered the same are not. The class: class CompPoint : IComparable { public int X; public int Y; public CompPoint(int X, int Y) { this.X = X; this.Y = Y; } public ove...

C#: What `using` statement do I need here?

I have a project in MS Visual Studio 2008 Pro. I'm new to the environment and the language, so forgive a noobish question. I have a type ControlCode: namespace ShipAILab { public abstract class ControlUnit { public enum ControlCode { NoAction = 0x00, MoveLeft = 0x01, MoveUp = 0x02, ...

XNA tearing when doing 2D camera transformations

I'm not sure why this is happening. Basically I render my tile map to the screen using a Spritebatch with a matrix transformation, and I get this weird tearing thing happening. Tearing Note that everything looks fine when I render using Matrix.Identity. This is the code that I use to create the Matrix: #region Creating Transfor...

Looking for 3D xna engines

I'm looking for a 3D xna engine that 1. provides GUI interface for editing games 2. provides Skeleton/rigged animation 3. are Well documented (in short, engines like Unreal engine) ...

XNA C# 2D Platformer Game

Hey, I'm trying to make (figure out how to..) a 2d platformer in XNA. I know how to create a tile grid and how to perform collision detection. I perform collision detection on the 9 bounding tiles of the player, but I'd like to know if there's a better way to perform collision detection. I've read Braid doesn't use tiles but pieced i...

Simultaneous GraphicsDevice's in different threads

I have an XNA application that renders onto a second monitor (adaptor 1), at regular intervals it takes a screenshot of itself and stores it as a Texture2D. As this application launches it also shows a Windows Form with a panel. This panel is supposed to be drawn on by a seperate GraphicsDevice, and displays the Texture2D. The problem ...

Zune HD networking

Is there a way to access internet from Zune HD (from XNA app or maybe another app)? I've found nothing in official documentation, but maybe there is a hack? For example, Twitter and Weather programs work fine with the internet ...

C# XNA: How to remove repetition from this simple function?

I have a game consisting of ships that fly around on a 2d grid. I am writing a function that takes a location, and figures out if the (predefined) target can be hit from there. This simply requires checking all the grid square's in the potential aggressor's line of fire. In most cases, this is a cross, formed like so: (currX +/- SHOT_R...

C# XNA Box2d: ApplyImpulse() acts surprisingly

I'm trying to move a body: if (ks.IsKeyDown(Keys.Up)) { rocket.ApplyImpulse(new Box2DX.Common.Vec2(0, 30f), rocket.GetPosition()); } Oddly, the body only moves when the key is released. Why is this? I've been looking at the manual but can't figure it out. When I remove the conditional, and just have the applyImpulse() call in Ste...

C# XNA Box2d: What kind of joints for a ragdoll?

I'm trying to make a ragdoll out of a bunch of bodies. What kind of joints do I want to connect them? Distance joints? ...

Resources for Windows Phone 7 development

Windows Phone 7 has been unveiled and MS have announced all details of the development chain at the Mix10 conference. So this could be a good starting point/collection of online resources as they appear EDIT: I've removed the speculation tag now that the covers are off ...

Help rendering sprite

What i want the program to do is draw the graphic ground at each point in which a one appears in the .txt file, but everytime i run it, it doesnt draw the sprite? here is the code..... using (StreamReader sr = new StreamReader("trainingLevel.txt")) { while (!sr.EndOfStream) { stri...

How can I get and set pixel data in XNA?

I have a texture2D where I want to get the color of a specified pixel. Do something with it and put a new color in an other texture2D. I will need to do this with all the pixels in the texture. How can I do this. No pixel shader's please. It need to be in C# ...

XNA 2D vector angles - what's the correct way to calculate ?

what is in XNA in 2D the standard way vector angles work ? 0 degrees points right, 90 points up, 180 left, 270 down ? What are the 'standard' implementations of float VectortoAngle(Vector2 vec) and Vector2 AngleToVector(float angle) so that VectortoAngle(AngleToVector(PI)) == PI ? ...

XNA line segment intersection?

Lets say we have 4 Vector2's (yes this is 2d), so we have lineOneStart, lineOneEnd, lineTwoStart and lineTwoEnd. How can I detect if the 2 lines cross? I don't care where they cross, I just want to know if they intersect. ...

What is the development platform for Windows mobile 7

If I want to develop for Windows mobile 7, what should I learn? XNA, Silverlight or other? ...

IDirect3DTexture9::SetData?

In XNA, you can do texture = new Texture2D( GraphicsDevice, width, height ) ; I'm guessing somewhere deep down in the MSFT bowels, this is equivalent to C++ code: D3DXCreateTexture( GraphicsDevice, width, height, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture ) ; In XNA there's this nifty function that lets you set the pixel valu...

Dance pad in XNA

Is there any class that supports Dance pad in XNA? Maybe it's treated just like regular pad? I don't have any access to dance pad, and it's quite hard to find any usefull info in the internet. ...

How can I clone FileStream type?

How can I clone FileStream type? The problem is that I using MagickNet.Image(inputStream) to get the image distentions before saving it, but it seems to closing the inputStream. So, I can send a clone of inputStream to the function, so the function cannot edit the real inputStream object? This is my function: public Picture GetPictur...