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

1
vote
0answers
241 views

Map terrain generation to texture instead of color

I have some terrain being generated using the following algorithm double rand1 = rand.NextDouble() + 1; double rand2 = rand.NextDouble() + 2; double rand3 = rand.NextDouble() + 3; float offset = ...
1
vote
0answers
201 views

Sprite sorting issues

I apologize for the vague title, I'm not sure how else to phrase this problem. I am using tIDE to assist me in my game's world development. To give a dynamic effect to map layers within tIDE, it has ...
1
vote
0answers
517 views

Sprite visual effect in XNA?

Suppose I have a character sprite and I want to apply some animating effect that overlay its color, how would I do it? What I desire is something along this line: (From final fantasy tactics) It is ...
1
vote
0answers
290 views

Need help with objects moving toward the player

I am making a 2D game with simple "gravity": everything is just pulled toward 0,0. The speed at which they accelerate towards it is GravityAcceleration up to MaxGSpeed. I also want the player to be ...
1
vote
0answers
236 views

Bone pivot mirroring problem in 3dmax

Im make model with animation in 3dsmax and port it to XNA game. All works fine except one character hand. I suspect its all about pivot and kinematics. When I create hand bone from scratch the ...
1
vote
0answers
376 views

3D Model transparency issue

I am using Goblin XNA 3.6. When I export a 3D model in FBX format from Maya, the model often looks transparent. For some 3D models it works fine though. What could be causing this?
1
vote
0answers
164 views

Farseer Physics EndContact events don't fire for all registered delegates

Here's my situation: I have several objects that contain a body and a fixture. They are set to sensor = true; atmosphere = BodyFactory.CreateCircle(world, atmosphereRadius / Level.METER_IN_PIXELS, ...
1
vote
0answers
226 views

Unusual Farseer Behaviour?

My basic implementation of a Farseer world has been behaving very strangely. It seems as though there is a very low maximum velocity, and collisions result in the small spheres involved clipping ...
1
vote
0answers
283 views

Why does drawing bounding boxes disable my other shaders?

I have some .X models loaded via self-written AssetManager that has Lists with models in it. I also apply a diffuse shader to my models. All the models are "self-drawing" in a BasicModel class. ...
0
votes
0answers
17 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, ...
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 ...
0
votes
0answers
35 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
0answers
16 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
33 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
0answers
48 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 ...
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 ...
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 & ...
0
votes
0answers
25 views

HLSL Shader Relative Positioning

I've got a shader that does the texturing, lighting, etc. for my game engine (written on top of MonoGame, in case that's relevant) for my block-terrain-based game (everything is rendered as triangles ...
0
votes
0answers
35 views

Speeding up Recursive Quad-Tree iteration

I've got a problem in regards of runtime speed in XNA. I've built up a Quad-Tree where each node stores the 3 positions of a triangle, which forms a Icosahedron and its subdivided triangles. My aim is ...
0
votes
0answers
58 views

2D Vector Graphics in XNA

I'm here today to ask about Vector graphics in XNA, my first question being whether it is possible or not. The only other question on here that I have seen in relation to this is simply asking which ...
0
votes
0answers
23 views

Wall Collision on a model

I am building a model of a house in XNA and made a collision system so that when the player goes into the wall they stop. Also I made it so if the player is pressing the key 'up' and collides into the ...
0
votes
0answers
21 views

XNA `tex2Dlod` always returns transparent black

I want to sample a texture in a vertex shader, so at first I just tried using float2 texcoords = ...; color = tex2D(texture, texcoords); But apparently I cannot use tex2D in a vertex shader, and ...
0
votes
0answers
63 views

graphics.IsFullScreen resetting to false after game constructor and graphics.ApplyChanges()

This is a MonoGame 3.2 Windows (DirectX) Project. I've tried setting graphics.IsFullScreen to true in the game's constructor and in the game's initialize function, both times running ...
0
votes
0answers
53 views

How can I create a 2D camera with zoom and parallax scrolling that works on every Windows Phone resolution?

Mario game that uses parallax scrolling: http://www.youtube.com/watch?v=de5f3mvRyIY I want to create a Windows Phone jump-and-run game with parallax scrolling. The parallax scrolling should be like ...
0
votes
0answers
60 views

Why isn't my Blender FBX not appearing in XNA?

I am trying to display a simple cube in XNA. The cube is the default Blender cube exported to a .fbx. Re-exporting the cube has had no effect. I have also varied the camera's z-distance from 5 to ...
0
votes
0answers
48 views

How to I coordinate a camera with the eyes of a model?

I am currently working on an FPS in XNA and I wanted to know how I would position the camera at the eyes of the model and whenever the model rotated or moved it's head (where the eyes are), the camera ...
0
votes
0answers
52 views

Particle friction with variable timestep in XNA

Alright, so I'm working on an engine of sorts in XNA (yes, it's deprecated, I know) and I'm implementing my own particle system. I've defined a "ParticleEffect" such that when it's supplied a GameTime ...
0
votes
0answers
38 views

Mouse RayCast quadTree in XNa

Hallo i have quadTree terain and every quadNode have BBox.I have made function to return center of hitted quadNode BBox. But it's returns my bad calculations..... I have pitchedYawRoll camera ,it's ...
0
votes
0answers
51 views

Pixel-Perfect Collision With Rotation

I know how to implement pixel perfect collision, but how would I do this with rotations applied to my sprite?
0
votes
0answers
25 views

Tiled and tmx files

i started using the software tiled and it very simple to create an image and object positions over there. I am using the library XNA and i would like to load the image and the objects into my code, ...
0
votes
0answers
40 views

Converting a WIndows Store App to Android

I cross posted this from SO I'm very new to Xamarin. I have a few published Windows Store apps and want to convert them to Android. I'm attempting to use Xamarin for this. I'm just using the free ...
0
votes
0answers
93 views

XNA - Finding boundaries in isometric tilemap

I have an issue with my 2D isometric engine. I'm using my own 2D camera class which works with matrices and need to find the tilemaps boundaries so the user always sees the map. Currently my map size ...
0
votes
0answers
42 views

XNA Guide text input - maximum length

so I am using Guide.BeginShowKeyboardInput to get the user to enter their username. I would like this to be limited to 20 characters, and it seems to break expected behaviour to let them input ...
0
votes
0answers
45 views

XNA Shader deformation event driven

I’m working on this tutorial trying to figure out how i can modify the code in order to get the deformation along only one axis (for example Z axis) when I hit a button on my keybord. In other words, ...
0
votes
0answers
46 views

XNA Windows Resolution / Mouse Position Bug

In XNA, when in windowed mode and resolution (set via PreferredBackBufferWidth/Height) is close to the resolution of the display, the view is distorted (zoomed in a bit)and the mouse coordinates are ...
0
votes
0answers
103 views

Zooming in isometric engine using XNA

I´m currently working on an isometric game engine and right now I´m looking for help concerning my zoom function. On my tilemap there are several objects, some of them are selectable. When a house ...
0
votes
0answers
54 views

Trying to get an object to move back and forth on collision between two collidable objects

Im trying to get a box object to hit a collidable wall on the right and when it hits it move left and hit the left wall and switch back and so on and so forth. Im having trouble with this because ...
0
votes
0answers
73 views

Rendering an Assimp Scene object in XNA without DirectX or OpenGL

Is there any site that explains how to render an imported Assimp Scene object in XNA/MonoGame using only the Frameworks available in those libraries? I realize that would be at the Vertex/Matrix level ...
0
votes
0answers
54 views

Animation of a 3D model's parts from code

I'm creating a game in XNA where will be an object called a tower. Its action can be described as two phases: aiming and firing. Here's a model I'm creating in Blender: I want the tower to have 3 ...
0
votes
0answers
33 views

XNA 2D Stencil Buffer Rotation

I am currently working on a 2d game related to planets and am trying to get a stencil buffer working with rotation. I currently have a stencil buffer found from another related answer but it refuses ...
0
votes
0answers
31 views

XNA - Link between Create Rotations matrices

A friend of mine have been coding some rotations on my XNA project, but the order of the matrices rotation are not good. Some are of form : Matrix.CreateRotationZ(1.21f) * ...
0
votes
0answers
43 views

How to import fbx into XNA?

I am developing basic XNA car game. I used 3D fbx car models to represent car objects. I drag and drop all tga and fbx files into content and I succesfully showed car in my game by using some basic ...
0
votes
0answers
24 views

How to use CCGrid3DActions in Cocos2d-XNA?

For example, I want to add a CCLiquid action to my player shield in my game. In my Player class: public Player() { // code snippet when creating new Player CCSprite shield = new ...
0
votes
0answers
83 views

Farseer: How can I break a body into multiple pieces?

I created a breakable body but the pieces are not flying around if the ball touches it. What is wrong? Why is the breakable body not breaking into pieces? I made a video and I enabled debugview, so ...
0
votes
0answers
30 views

How do I optimally give current UVs to the shader for animating a spritesheet?

I've implemented sprite animation by passing UVs into the shader with the good-ol' shader.SetParameters[] call. In the vertex shader, I lerp the new UVs with the Texture Coordinates of the original ...
0
votes
0answers
83 views

Precalculating timespan of bullet collision on cubic bezier curve circles?

I'm fairly new to game logics, C#/XNA (The language/library of choice) and bezier curves in general, and is stuck in my current project. I'm going to try to explain as thoroughly as I can what the ...
0
votes
0answers
62 views

Monogame/XNA Invert Screen Y Axis

I am trying to invert the direction of the Y axis in Monogame from positive downwards, or screen space, to positive upwards, so that my world transformation matrix makes more sense. It seems ...
0
votes
0answers
65 views

Drawing objects that visible on the screen

So I generated a terrain using list's of tiles, and I display it only if its visible on the user screen (if he move's to the right, the tiles that aren't visible wont be drawn, for performance ...
0
votes
0answers
112 views

Farseer Player Movement and Collision

I have added a video link for any one who whats to see what the problems are by watching the game. I am trying to create a player movement system and there are small problems that I am running into. ...
0
votes
0answers
163 views

Non-rectangular hitbox methods in XNA

I'm creating a 2D top-down RPG, and many of my buildings/scenery have non-rectangular corners to the textures. Does anyone know a good way to create circular/triangular/polygonal hitboxes, or is too ...