xna

c# "OR" event delegates returning bool

Hi, I have created a console for my game in XNA and I have a delegate for when a command has been entered. At the moment the delegate is returning a bool value. I have declared an event inside the Console class (which returns false) and then subscribed to this event from other classes. The idea is, if none of the classes that subscribe ...

How to read in a txt file in XNA 4 for Windows Phone 7?

I had a look at this previous question however this doesn't seem to work for XNA 4 for a Windows Phone 7 project: http://stackoverflow.com/questions/1234426/xna-framework-importers I've been trying to use: string line; using (StreamReader sr = new StreamReader("credits.txt")) { while ((line = sr.ReadLine()) != null) { ...

How to access XNA 3.1 Templates in VS2010

I have installed XNA Game Studio 3.1 and VS 2010, But I can't see Game Template in VS. What could be the solution. For some reasons(may be because I am using Windows server 2008 and no driver for graphics) XNA 4.0 won't install. ...

OpenGL being ported to XNA

I'm beginning to port my game over to XNA from a C/OpenGL codebase. I'm just now getting to the rendering code, and I'm wondering what the best methods would be for transitioning from a system where you simply bind a texture with one call, then output vertex buffers objects to an XNA equivalent set of methods? I can see how you pass ve...

What's wrong with this XNA RotateVector2 function?

Hi, I know this is probably a very simple question, but I can't seem to figure it out. First of all, I want to specify that I did look over Google and SO for half an hour or so without finding the answer to my question(yes, I am serious). Basically, I want to rotate a Vector2 around a point(which, in my case, is always the (0, 0) vecto...

Dotfuscator for WinPhone 7 and XNA

Does anyone know if Dotfuscator supports WinPhone7 and XNA applications ? ...

Disabling Depth Buffer checks in XNA 4.0 on Windows Phone 7

I don't see a RenderState as a member in the GraphicsDevice class, which is where the functions for disabling the depth buffer used to be. Anyone know how this is done with this new 4.0 API? It would be great if I could somehow access a full RenderState-like class somewhere.. GraphicsDevice seems to have gotten some of it, but not nea...

XNA glColor equivalent

I come from the land of OpenGL, so I'm similar with glColor functions, and how they work with the textures that get outputed using the default GL blending methods. I can't seem to get GraphicsDevice.BlendFactor to work as glColor does, but I may not be using the right blending settings. Without using shaders is it possible to get the e...

XNA Game Studio 4.0 in VS2010 Express Installation Issues

I am try to get the 4.0 up and running in VS 2010, I downloaded, I installed, I launched VS2010 following the instructions at this link: http://msdn.microsoft.com/en-us/library/bb203893.aspx. I click file new project and look under C# and lo and behold there is nothing what-so-ever to do with XNA listed there. Can someone tell me how t...

OpenGL and XNA Matrix differences

XNA has the following Matrix objects under BasicEffect public Matrix World public Matrix View public Matrix Projection OpenGL uses the following defines for glMatrixMode() GL_MODELVIEW GL_PROJECTION I'm not really sure why one would have more than the other, to be honest. I'm porting a GL game over, and it would be nice if I could...

Programming Xbox games with Scala

I asked this on the XNA forums but I guess since most people there would specialize in C# I didn't get much help with this I have some code for a game written in Scala. I compile everything into Java Bytecode at the moment but the Scala compiler has a .Net version. With that in mind, and because modular design is good practice in gene...

Xact vs AudioContent

I am using XNA to develop a game which requires both sound effects and music. I'm trying to figure out how to implement the sound engine. Microsoft provides the ability to use the Content Pipeline to load and play audio. However, I also seen people use Xact to do the same thing. My question is, whats the difference and what would be the ...

Attempting Catapult game, after new XNA download.The type or namespace name 'GestureType' could not be found

I just recently downloaded the new version of XNA, and trying to follow a tutorial (that I thought was updated with the new version) I am getting a few errors The type or namespace name 'GestureType' could not be found (are you missing a using directive or an assembly reference?) 'Microsoft.Xna.Framework.Input.Touch.TouchPanel' does no...

Ideal choice for this game, XNA or SlimDX (DirectX 10)?

I'm looking to develop a multitouch rhythm game in C#. So far, I've decided on several requirements for the game that must absolutely be present: 1) Unicode text display, without the characters being known beforehand (i.e. the displayed strings are not known at compile time, but entered in by the user). 2) Support for display of all t...

XNA - Keyboard Input

I just started using XNA Framework 4.0 today, and I was wondering what the easiest way was to get input from the keyboard. I recognize a lot of C++ in C# but the whole Java side of it is alien to me. This coupled with XNA is a little confusing so, please be specific and give examples. Thanks. ...

InvalidOperationException exception in XNA

The following line will error sometimes in my .NET XNA program. VertexBuffer v = new VertexBuffer(GraphicsDevice, typeof(VertexPositionColorTexture), 4, BufferUsage.None); The exception that is thrown is InvalidOperationException, and it tells me that: "The current vertex declaration does not include all the elements required by the...

XNA Game in ASP.Net web site.

Hi all, I was wondering, though I have got quite a few articles in this regard and all of them are for previous versions of XNA or not what I need, is it possible to embed an xna game in a asp.net website??? Means like there are several websites (game portals) having several games of may b flash or java. But is it possible to embed your...

Converting .dds to .png: is XNA really this convoluted?

I have a .dds file and I want a .png file. Although I already found out about the DevIL.NET library, the API design there of one static class does not parallelize, so I am hoping to find another method. This led me to XNA. But, here's how far I got with that idea... OK, it looks like I want this Texture2D class; then I can call myText...

Is there an alpha value that makes white go invisible?

If I use the following for(int i = 255; i > 0; i--) { Color transparentBlack = new Color(0, 0, 0, i); } I have the effect of the object using this color to draw with going from black to a light grey and then invisible when the alpha value goes to zero. However if I start with a white value: new Color(255, 255, 255, i); The obje...

XNA - Signing in with Local Profile

I am trying to learn XNA (4.0) multiplayer networking for the PC only environment. For development, I read that using local profiles (with SystemLink) for PC-only environment does not require me to worry about Xbox Live Licenses. Using Guide.ShowSignIn (1,false); causes the Xbox Live sign-in to come up. But I am stuck here. The sign-...