xna

Saving level data in XNA

I am writing a game in XNA. The first main goal is to have it complete and running on Windows but after that I will be purchasing the 360 kit and changing all the bits I need to change in order to make it into a working game on 360. I am currently writing a level editor which i will be using to create the levels but also leaving in as ...

Can I create games using XNA if I have Visual Studio 2010 installed?

Pretty straight forward question. Thank you. ...

Intersection Region Color

i have drawn two semitransparent circles which intersect each other. I have found that the intersection region is deeper in color than other regions. is there any way to make the whole shape as one semitransparent color (color shouldn't be deeper in one area than others)? For more details: http://yfrog.com/0sneedtosolvep is it possible...

Animation issue caused by C# parameters passed by reference rather than value, but where?

I'm having trouble with sprite animation in XNA that appears to be caused by a struct passed as a reference value. But I'm not using the ref keyword anywhere. I am, admittedly, a C# noob, so there may be some shallow bonehead error in here, but I can't see it. I'm creating 10 ants or bees and animating them as they move across the scree...

Changing RenderTarget Results in Purple Screen?

I'm attempting to change RenderTargets at runtime, so I can draw some elements at runtime, manipulate them and then finally draw the texture to the screen. Problem is, the screen turns purple if I change the RenderTarget at runtime. Here's the code I've got in Draw: RenderTarget2D tempTarget = new RenderTarget2D(GraphicsDevice, ...

Fisheye projection matrix in Xna/OpenGL - 3D

Hi, I'm looking for a projection matrix I can use in 3D that will give me the effect of a fisheye. I'm not looking for a pixelshader or anything like that, that will manipulate pixels - but the actual projection matrix used in projecting from 3D space onto 2D. Thanks. ...

Animate Sprite Along a Curve path in XNA

I would like to implement a ballistic trajectory in an XNA game and was trying to figure out the best way to make the projectile follow a gravitational curve. Best thing I can think of is to just calculate the curve first and store in a "Curve" class. Then get the sprite to move along that curve. But I can't really figure out how to a...

Dealing with lag in XNA + lidgren

I am experimenting with lidgren in XNA and I'm having some issues with the 'lag'. I've downloaded their XNA sample and noticed that even their sample lags. The thing is, the movement is not smooth on the other side, and I'm trying this on a LAN (on the same computer actually) not over the internet. Has any had the same issues as regar...

Adjusting the colours of a whole scene

I am developing a 2D game in C#/XNA where the sprites/backgrounds/etc are Texture2Ds. I am interested in rendering a particular scene in either "daytime" or "nighttime". Obviously one option would be to have two copies of every image, one darker than the other, but this isn't very scalable. Is there a way to adjust the colours on the fly...

How to scale on-screen pixels?

I have written a 2D Jump&Run Engine resulting in a 320x224 (320x240) image. To maintain the old school "pixely"-feel to it, I would like to scale the resulting image by 2 or 3 or 4, according to the resolution of the user. I don't want to scale each and every sprite, but the resulting image! Thanks in advance :) ...

wpf 3d animation

can i use wpf for importing 3d character and manually animate it like skinned model in xna??????? ...

Draw 2D Curve in XNA

Is there any way to generate a Curve class and then draw that curve in 2D on the screen in XNA? I want to basically randomly generate some terrain using the Curve and then draw it. Hoping that I can then use that curve to detect collision with the ground. ...

Apply Post Render Effect to SpriteBatch in XNA

Is there a way, in the XNA framework, to render your 2D scene using the typical SpriteBatch method and then, after that frame is rendered, apply effect to the whole image? For example, blurring, sepia or even making the whole thing look like an old time movie film, with grain, dust, lines, etc? ...

XNA + Pixel Shader Difficulties

I've written a basic 2d pixel shader, and i can't seem to get it to work. If i draw with the effect active, then nothing draws to the screen. But if i disable it, then the texture draws to the screen as expected. My aim is to be able to draw an arbitrary texture to the screen, then have this pixel shader "carve" circular hunks of pixel...

What sort of games can developer creates using XNA & Silverlight?

I need innovative ideas on Gaming Application for Windows Phone. Can anyone guide me to how to approach new ideas on gaming application? How shall i start as i am new to this domain? No gaming experience at all? Also i have worked only on C & C++. But now i have to work on gaming application using C# with XNA framework & Silverlight for ...

how to make my object in XNA cannot be entered by human

I have created some houses in my XNA world using code like this in my loadContent method: house.Model = Content.Load<Model>("Models\\oldgreekhouse"); house.Position = new Vector3(0, 0, 0); house.Rotation = new Vector3(0f, 0f, 0f); house.Scale = 0.125f; Then I call the Dram() method to make it shown in my virtual city. However,I have ...

OnCollision event handler problems in C# XNA with Farseer Physics

I have this working ok(ish) in my game at the moment, but i'm not fantastic at maths. When two primatives collide, I want them to smash up into tiny bits if the force applied to a primative was over a set threshold. My collision event handler at present looks like this. public bool Collision(Fixture fixtureA, Fixture fixtureB, Manifold...

XNA crop 2d Texture

Hey guys, is there a way to crop a 2d texture? Thanks, Max ...

Rx extensions/parallel task library in .net compact/xna3.1 for xbox360?

Is there any way I can use the .net task parallel library that was included in the Rx extensions for .net 3.5 SP1 in xna 3.1 for xbox 360? Or, alternatively, to use the Rx extensions themselves? The assemblies installed by .net 3.5 SP1 Rx extensions installer do not appear to be compatible with the .net compact framework. Or, if not pos...

DrawableGameComponent XNA, Implementation Right way?

So i have been googling/binging trying to find an answer on this but drawing up blanks. If I want to have a level type of game with different assets for each level do I do something like public class Level:DrawableGameComponent { } //somewhere inside functions or w.e var Level = new Level(this,"Level1"); Components.Add(Level)); ...