XNA is a game framework by Microsoft that allows deployment for Xbox Live Indie Games as well as Windows Phone 7.

learn more… | top users | synonyms

0
votes
0answers
5 views

Draw my array at a position defined with Vector2

I'm developing a space invaders game in C# using XNA Game Studio. So I got some of the invader logic complete: An array holds the invaders and draws them on the screen, animated and moving.But I can't ...
0
votes
1answer
45 views

How do I avoid going through objects at high speed? [duplicate]

I am quite the beginner in XNA. I have only recently started using GameComponents. I have a multiplayer game called Better Pong. I move the ball (which is an object) by incrementing the Vector2 (the ...
-1
votes
1answer
68 views

Sprites get terribly scaled

I've been making a Space Invaders game in XNA for a while. I got the invaders animated and contained within an array. But when I call spriteBatch.Draw and debug the invaders sprites get a huge ...
0
votes
1answer
33 views

Is there a way to use the ContentManager with full directory paths

So i want to figure out a way to use the ContentManager.Load method with full directory paths, so lets say Content.Load<T>(@"Images\SomeImage"); becomes ...
0
votes
2answers
32 views

Loading content into an Winforms/XNA Editor's content project

So i am bulding a game editor/engine basically for teh lulz but i have encountered a problem i cannot seem to fix, i cannot load any new content through the Winforms UI during runtime. I tried using ...
0
votes
2answers
11 views

Setup VertexPositionTexture array for a texture2D at a location

I am trying to adjust the following code to render a quad on a 2D texture at a specific location and specific size. Currently this code will render a fullscreen quad, which makes sense since the ...
0
votes
0answers
23 views

How set window position?

How set window position? Monogame version: https://www.nuget.org/packages/MonoGame.Binaries/3.2.2-alpha This dont work because OpenTKGameWindow is internal: ...
0
votes
1answer
44 views

Transparency using HLSL in XNA

I currently working on Depth Data on Kinect SDK v1.8 on XNA and I wanna show an Image Inside the Depth view of Human body. the image below is just an example of what I wanna do : ...
0
votes
0answers
27 views

In XNA, how does KeyboardState work internally?

I already understand how to work with Keyboard and KeyboardState, but when debugging I happened to take a look at the KeyboardState's non-public members via the VS debugger. I expected to see a large ...
6
votes
1answer
230 views
+100

How can I convert this xBR shader file into something I can use in XNA? (partially working)

I'd like to render my game scaled up with one of the hqx filters (hq2x, hq3x or hq4x) or an xbr filter in a shader. I was able to find implementations of these shaders: hqx xbr (hqx derivative - ...
0
votes
0answers
49 views

Rendering a fullscreen quad is leaving a one pixel line on the left and top

I am rendering a fullscreen quad using XNA. I am having an issue where the top pixel line and left pixel line are not rendered. It should be black in the picture. Can anyone tell me why this might be ...
-1
votes
1answer
109 views

C# XNA - How to animate using Texture Atlas/ Sprite Sheet

I have a problem which I need to resolve. I am making a Space Invaders game in C# XNA. I've been following this tutorial for the Invaders: ...
0
votes
2answers
91 views

How to Create a New Instance of a Game Object

Alright, please don't scald me here haha. I'm very new to XNA, C#, and game development as a whole. I have done web-design, but that is my main experience with programming. It is a Space Invaders ...
0
votes
1answer
46 views

Loading Song in MonoGame Windows

I cannot load the song into my game. I got error in both templates WindowsDX and WindowsGL. Monogame Develop Build 1252 Both files .wma and .xnb are exist in Content folder and Build Actions are sets ...
-1
votes
0answers
38 views

Problem with shooting projectiles at mouse cursor [duplicate]

I'm shooting projectiles from one point to another, first point is near entity, another is mouse position. Problem is I can't make projectile to be shot directly at position where mouse is pointing, ...
2
votes
2answers
55 views

In XNA 4, how can I access SpriteBatch's transformMatrix in my shader?

I would like to use a custom effect with a regular XNA SpriteBatch. I have a 2D camera which computes a transform matrix, so I need my shader to take this into account. I have put a world matrix ...
0
votes
0answers
11 views

3D Model in the midst of tracking state inferred and tracked

I am developing Kinect motion capture application by using XNA framework.My 3d model's bones are sometimes at the state inferren and tracked ,so for example the hand is being at the very unrelated ...
0
votes
0answers
76 views

Layers with parallax in a game with zoom out by a transformation matrix

I'm trying to implement a parallax rendering to my multi layered backgrounds. It's a classic 2d fighting game like The King of Fighters and Street Fighter. It may have a stage composed by 5 layers. ...
0
votes
0answers
32 views

C# XNA Weird black line behaviour of sprite animation spriteBatch.Draw()

So I've been making a Space Invaders game in XNA. I have my ship spritesheet (sprites are left-to-right - horizontal). The spritesheet has 6 sprites. Here's my class: playerShip.cs using System; ...
0
votes
0answers
45 views

XNA C# - Get original rotation from parent bone transform

I have a 3DS Max made model, exported into FBX and imported into XNA project. The parts I am working with have NOT been rotated in Max (specifically, collision mesh is made of Axiz-Aligned boxes). ...
1
vote
1answer
36 views

TypeLoadException when running a Monogame Windows Phone 8 game

Using Monogame, I'm trying to port a game to Windows Phone 8, but I'm having issues getting a basic example to run. When I create a basic Mono project and run it on my phone (to check everything's ...
0
votes
0answers
10 views

how to add .tif importer to skinned model pipeline

I have model which is occuring .tif components but XNA can not import .tif.Because of that I should add a .tif importer to my skinned model processor. How can ı add this? My SkinnedModelProcessor into ...
1
vote
2answers
153 views

How can I create an aperture-closing effect?

I'm looking to create an effect like this in a game I'm making: I would describe it as a camera aperture closing. I have the following requirements: I need to be able to reverse the fade (open ...
2
votes
1answer
39 views

XNA: How do I match Spritebatch View/Projection Matrices with BasicEffect Matrices?

I'm rendering a bunch of 2D content using SpriteBatches to a default XNA viewport. A simple 2D camera is used to move around the scene, which generates a transformation matrix passed to each ...
0
votes
0answers
47 views

How to move vertices of matrix in order to cast a 2d shadow?

I am trying to add shadows to my 2D xna game. Currently I have created a "shadow" using the texture of the caster with a transparent gray color, rotated, and stretched using a matrix. This, though, ...
1
vote
0answers
39 views

XNA and Json.Net - Recognizing types when deserializing with inherited classes [closed]

The title may seem a bit confusing, so let me explain. I am using Json.Net and XNA. I have an entity class, that has a virtual update method. I also have a class named Monster, which inherits the ...
0
votes
1answer
80 views

Why does GameComponent have an Initialize() method?

I'm not sure if this exact question has been asked before, but all I could find were questions about how to work with GameComponent, or why something wasn't working. I understand that you overload ...
1
vote
0answers
94 views

How to setup a particular blend state where the alpha channel is additive?

I would like to set a blend state to be "additive" and do the following: Result.R = Source.R + Destination.R; Result.G = Source.G + Destination.G; Result.B = Source.B + Destination.B; Result.A = ...
0
votes
1answer
62 views

Xna 2d tile culling

I'm trying to make a simple 2d tile engine here, and I've got a problem with getting a proper cells from a tile grid map when I'm trying to cull off tiles which aren't needed to be drawn. I've got a ...
-1
votes
1answer
64 views

C# - How to properly play background songs in XNA

So I'm using the game states (enum) to change my game screens. I have 2 songs for main menu and game playing states, respectively. To play songs, I'm using an old code example I saw at MSDN, like ...
1
vote
1answer
60 views

Monogame Windows Phone 8

I want to port a WP7 XNA game to WP8 using MonoGame. The thing is that I have Windows 7. So here's the questions (if some sound dumb, please bare with me). Do I need to have Windows 8? Do I need to ...
0
votes
0answers
40 views

Concepts to store XNA textures

I'm working on a graphic library supporting XNA with some cool features. To do so I need direct per pixel access to textures (RGBA). I've been wondering what are the advantages of using those two ...
0
votes
2answers
76 views

How to make a wait timer?

I am making a mining styled game and am looking to make variables that effect how fast you are able to mine the block. This is the idea I have currently got but it does not wait for the timer to ...
0
votes
0answers
35 views

Having trouble getting shader to work with sprite batch in XNA #4

I found a neat "CRT screen" effect shader on the web, but I've never used shaders before and I can't seem to get it working properly. If I do the second sprite batch in my code here normally without ...
0
votes
0answers
49 views

Data structure to store map layers in each Tile while keeping the order of terrain, items and monsters intact

My game represents its map as a 2D array of tiles, each of which stores a stack of layers. I'm looking for a data structure to efficiently represent this . I want to be able to add layers ...
0
votes
2answers
65 views

Incrase framerate in XNA [duplicate]

I'm trying to increase the frame rate of my game from 60FPS to 100 FPS because of reasons. But i can't seem to get it higher than 60 frames. This is the count I'm using. I can slow down the frame rate ...
2
votes
1answer
112 views

Should I bother merging faces in my 3D block-based game?

Okay, so I have a bunch of cubes in a 3d-world. I already implemented face culling, so that when a cube is next to another cube, their touching faces won't be drawn, or even sent to the buffer. ...
1
vote
1answer
65 views

How to find the 3D object the camera is pointed at

I'm currently developing a 3-dimensional game (the first I've ever done and it's not as hard as I thought it would be!), but I've run into a little bit of a snag. I want to find the current block the ...
0
votes
1answer
123 views

How do I get the mouse coordinates relative to my whole scene with Monogame? [duplicate]

I am making a topdown isometric real time game using Monogame. I know how to get the mouse position for my camera view. How do I get the mouse coordinates relative to the entire scene? My game's ...
0
votes
1answer
52 views

Varying spritefont quality depending on string

I'm using Kleymissky font size 26 made via Nuclex font renderer (Hinting Method: AutoHinter) - download Why the thickness of the font drawn on screen depends on the string itself? What can I do to ...
4
votes
1answer
94 views

Odd Behaviour XNA Game Component

Inside of my main class file I am initializing a number of game components which are used to represent game scenes i.e. main menu and game. I am initilizing each component inside of XNAs LoadContent ...
0
votes
1answer
87 views

XNA C# 3D game Wall collision response glitch

I have been working on a reliable physics system in my code and so far it's ALMOST working. :D I am aiming for wall "sliding" style of collision response, like you'd expect it to work in commercial ...
0
votes
0answers
54 views

Emit light from items

In order to create a day/night cycle in my game, I decreased the r,g and b values of the Color variable after a certain amount of time has passed. This worked as expected. I am wondering in order to ...
2
votes
1answer
46 views

Getting more particles in engine

I followed rbwhitakers tutorial on making a particle engine and I'm wondering how to get more particles on the screen. I was thinking that the "total" variable would do it but it doesnt. Is this ...
3
votes
2answers
298 views

Why should I use a list of enemies instead of an array of enemies?

I have been making 2d shooter similar to galaga using xna in C#, where the enemies (2 types) are all in rows above the player's ships, and are supposed to randomly launch attacks. I had previously ...
0
votes
0answers
40 views

Drawing quadtree nodes

I'm using a quadtree example that I found on a tutorial. I have initialized the tree and using a breakpoint I am able to determine that there are 4 child nodes, each containing a number of items. So I ...
1
vote
1answer
42 views

How can I fill a Color[] from a Texture2D given a Rectangle in SharpDX?

I used to fill a Color[] using XNA's Texture2D.GetData<T>(int, Rectangle?, T[], int, int) method, but there doesn't seem to be an equivalent overload on SharpDX's Texture2D. Anyone know how I ...
1
vote
1answer
39 views

XNA Texture.GetData “Size of the data passed in is too large or too small for this resource.”

I am attempting to retrieve the color data for a given sprite located on a texture atlas by creating a new color and passing a source rectangle width and height for the given sprite. I am then passing ...
1
vote
1answer
48 views

How to handle input in Monogame

I've just switched over to MonoGame from XNA. Since MonoGame is supposed to have the same API (implying that any copied code should work as usual), I've run into a strange issue- input doesn't seem to ...
0
votes
0answers
34 views

How can I have an RPG character redirect / glance off stationary objects and keep going? [duplicate]

I am attempting to create an effect in a game that is identical to the effect I've shown in the attached gifs. Essentially, the character, when they are running or walking and hit an object that is ...