xna

How do I produce a collection of game entities from another collection without producing garbage?

I've been playing around with XNA a lot lately and I've also been reading quite a bit about garbage collection in games. I think I've done a reasonable job of reducing the amount of garbage by using pooling and avoiding a dependence on foreach. Right now I have my base game entities stored in a KeyedCollection that allows me to iterate ...

multiple realtime graphics forms in own threads, global 60fps limit?

I'm using XNA and creating a bunch of forms that roll their own 'game loop' to handle drawing and such. Each new form is opened on its own thread, with a subsequent Application.Run(form) to make the thread handle the messages for that form. When I started I noticed that despite me not implementing any kind of frame limiting timing, the...

XNA - About the relation between world space and the screen space

Edit: Just wanted to make the question I have more clear. I pretty much am having trouble seeing how something like Matrix.CreateTransformationZ works in the context of not only matrix multiplication but more importantly what this does to the screen space/world space so I can get a clearer picture. So maybe someone could alter the code o...

XNA: Basic DrawableGameComponent override functions (Update, Draw, etc) not being called

I'm trying to encapsulate my game objects by having them extend Mircosoft.Xna.Framework.GameCompenent, then merely constructing them and managing them in the Update() method of Game1. I have my Game1 class, a Player class, and an Animation class. Animations are supposed manage the Texture2D changes of an object, in this instance Player. ...

Implementing a simple XML based Scripting Language for an XNA Game

Hello, I'm working with a team on a RPG engine in C# and XNA. We're planning on targeting Windows and Windows Phone 7, but are running into issues with AI interactions and controlling player actions during cutscenes. FOr the most part, everything is extracted using the MVC design pattern, but abstracting all logic and movement into a con...

XNA: get Vector3 from Matrix

I thought I understood matrix math well enough, but apparently I'm clueless Here's the setup: I have an object at [0,0,0] in world space. I have a camera class controlled by mouse movements to rotate and zoom around the object such that it always looks at it. Here is how I calculate my viewMatrix from the camera: public Matrix viewM...

AccelerometerReadingEventArgs Cannot be found. I added the reference...

I am trying to finish up a tutorial, and I am trouble with AccelerometerReadingEventArgs. I have added the Microsoft.Devices.Sensor and I have stated the using Microsoft.Devices.Sensors I have access to AccelerometerReadingAsyncEventArgs but this isn't exactly what I need. I am using 2.0.5 and I think I need to update, but not sure h...

Xna - get window location?

I'm trying to rig an XNA WinForms system so I can have a game editor, and I need to use the mouse for it. Since the XNA Mouse input class reports mouse position based off of the window's location, I need to place the form I have in the same spot. How can i get the location of the window that my XNA game uses? ...

Xna racing game on multi monitor setup or alternatives via C#

Hello, I'm developing a car game where a person uses a wheel on a pc connected to two projectors. One projector should show the front view and the other the view from the back of the car. The object of the game is to park the car in a parking place. I decided to go with XNA and Racing game starter kit. I don't know how to render two cam...

Downloaded XNA 4.0 Beta, now when I run my emulator does not appear

Title mostly says it all, it was working before update, now when I run debug, my phone emulator does not run with the game :( ...

XNA: adding a force to a vector

i do have 2 points on a 2d plane. one has already an vector that does determine in which direction it will move. now i want to add a vector to this existing vector. so he accelerates in the direction of the other point. to be a bit more clear, it is about 2 asteroids flying in space (only 2d) and gravitation should move them a bit clo...

XNA ViewPort projection and SpriteBatch

I'm working on an XNA game and I am using ViewPort.Project and ViewPort.Unproject to translate to and from world coordinates. Currently I use these for each object I draw with SpriteBatch. What I would like to do is calculate a Matrix that I can send to SpriteBatch.Begin to do the screen-space transformation for me. Here are the functi...

Performance profiling Windows Phone 7 apps (SL/XNA)

Is there performance profiler for Windows Phone 7 (SL/XNA)? I just want to measure execution time of calling methods. ...

XNA and Matrices

So thanks to many of the replies from this board, I have a much better understanding of some of what's under the hood but I just need this little bit more to get a firm understanding. So I am reading through part of Riemer's tutorials here: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2D/Coll_Detection_Matrices.php I'll use th...

XNA Exclusively Lockable Input Handling

I'm writing an XNA application which requires input directed to only one input event handler, which is the object that is currently locked, i.e. game, menu, console, etc. What is the best way to do this? I've thought about creating an IInputReceiver interface (with methods such as HandleInput) that attaches into a central input manager ...

XNA to render 3D video (fixed FPS!)

Hi, i have to develop an application in wich the final step is to export a video (or a single frame) of a 3D animation generated by my software calculating the user input parameters. I want to use XNA and for this. i need that the software can export FIXED FPS video (or also all single frames of the video separately). It's not a matter...

swf2xna tutorial?

Does anybody know of a tutorial for swf2xna or can show me an extremly simple example were a flash i integrated into a xna project with swf2xna? ...

Dynamically compiling and running shaders from file in XNA

Hello, im wondering if its possible to dynamically compile a pixel-shader from file and apply it to a mesh. First I'll just start with some background information. I have a system which creates HLSL pixel-shaders based on a range of data which is not really important to the question. What is important is that these shaders do not use te...

Using MAYA 3D Model in a .Net application

If I want to render a 3D model created by Maya and do some animation with it in a .net application what should be my choice of platform - plain WPF or XNA? ...

C#: UDP Listener Thread

Hi, i found articles to that topic, but they dont solve my problem... I want to use UDP-Sockets for my XNA-Networkgame. And now i am trying to code a reliable Listenerthread, but there are some Problems. If i use socket.Receive it will wait until a packet. This is fine for my Listenerthread. My thread has a while-loop like this: while...