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
7 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
46 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
17 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
18 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
23 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
8 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
129 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
32 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
42 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
33 views

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

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
74 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 ...
0
votes
0answers
40 views

How can I store Key/Button bindings separately in a datastructure?

I want to let the player set their own keybinds, and it's working well. However, I can't tell keyboard Key from controller Button when displaying them in the menu. I store the inputs in a INI file and ...
1
vote
0answers
66 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
0answers
19 views

XNA: Does the position of mouseState matter? [migrated]

In order to get a single click response from MouseState, I use this line. currentMouseState.LeftButton == ButtonState.Pressed && oldMouseState.LeftButton == ButtonState.Released) And at the ...
0
votes
1answer
46 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 ...
0
votes
1answer
40 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
38 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
36 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 ...
-1
votes
2answers
86 views

I want to do an ECS Game, what would be a good replacement for XNA [closed]

In the past, I've made some little games for fun, and I want to start a new project. I want to use Entity / Component Paradigm, and I would have liked to use Artemis for .NET That said, I had a pretty ...
0
votes
0answers
64 views

How to create a sun (shining) and a moon in a 3D world? (Using specular light.) [closed]

I'd like to know: where should I start from to create a moon and a shining sun. Do I need 3D models or is there an effect I can use? Or is it better to use a sprite? Actually, for now I just have a ...
0
votes
2answers
68 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
18 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
34 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
59 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
103 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
58 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
95 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
50 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
83 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
46 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
51 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
44 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
264 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
22 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
29 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
21 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
40 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 ...
0
votes
1answer
53 views

Remove item after crafting

I'm having one last problem with my crafting system. Say an item takes 2 rocks, 1 twig, and 1 vine. When I craft the item, only 1 of each item is removed instead of the correct amount of items related ...
1
vote
1answer
45 views

Use of SpriteFonts without installing on host machine

I am working on a Windows game for my university project. In this project I am using a custom TrueType font which is not installed on any university computers. For submission my game is required to ...
1
vote
1answer
76 views

Ambient occlusion of cubes, a specific case

After much fiddling around and thinking I've got my AO working on my game engine as intended; except one specific case. When a block is nestled between others on two sides, but the corner block is ...
1
vote
1answer
44 views

Where does my .sav file default to in XNA 4.0 when using the StorageDevice class?

I am using the StorageDevice class built into XNA and am looking to delete my save file from the solution in my XNA game. I never specify where the save file is to save, and can't find the default ...
2
votes
1answer
77 views

Is it bad practice to add GameComponents and DrawableGameComponents outside of the main initialization method?

I'm working on a snake game that has multiple game objects (snakes, apples, obstacles), and game modes (classic, adventure), that are DrawableGameComponents. Is it OK that I'm adding them as needed ...
1
vote
1answer
23 views

XNA - DrawIndexedPrimitives or DrawUserIndexedPrimitives?

When rendering primitives in XNA, does it matter if I use DrawIndexedPrimitives() versus DrawUserIndexedPrimitives()? RB Whitaker uses the former, while Reimer's uses the latter. From what I can ...
0
votes
1answer
32 views

Mouse state not acting as I intend it to

I am creating an inventory system. I have it working well, but for some reason when I pick up an item from a slot(lets say slot 2 of 20) and drop it into that same slot(slot 2) the mouse state fails ...
0
votes
0answers
35 views

HLSL - Binary operations

I'm trying to do binary operations with integers in the hlsl code. For example: int n = 10 & 15; Binary value of 10 = 1010 and Binary value of 15 = 1111. With this, n = 10, because (1010 & ...
1
vote
1answer
95 views

In a TPS, how to aim bullets to the direction the camera is pointing, but make the shooting from the player?

(In C#/XNA.) I mean, I can't find an answer nowhere. I'm trying to learn how to make a Third Person Shooter, especially like the one I found in a game called "M.A.R.S.", from Epic Games. I don't want ...
1
vote
1answer
105 views

Downsides of using this integration formula for movement?

So I read that Gaffron integration basics tutorial and noticed how the Euler integration method gives a small error over time. I implemented the RK4 and noticed that with constant acceleration, I ...
1
vote
1answer
35 views

RenderTarget2D moves with scene

I encountered a strange RenderTarget issue, in XNA/Monogame. I am currently updating my render target at every frame, just to test to see what is happening. When I move the camera around, the ...
1
vote
1answer
105 views

Is it Possible to create one equipment piece, and handle the manipulation programatically

I have a 2D game made in XNA-4.0. I am brainstorming on how to implement a system of equipment where I can draw one Texture, and rotate/scale it to my character's current animation without haveing to ...