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

3
votes
4answers
135 views

RPG like hit points growth algorithms help

I am currently making an XNA game in C#. I want to increase health as the player level up. I am currently using this equation. MaxHealth = Convert.ToInt32(100 * Math.Pow(1.17, level - 1)); Its ...
4
votes
1answer
102 views

Problem building a color grading map

I am trying to build a default color grading map into a 1024x32 RenderTarget. Here is my shader code: VertexShaderOutput VertexShaderFunction(VertexShaderInput input) { VertexShaderOutput output; ...
0
votes
1answer
41 views

How does Texture2D.GetData return coloured pixels?

I'm trying to work out how the pixels are stored in the returned array but I'm not having a lot of luck (and thus my calculations don't seem to be working). I realize that the pixels are stored in ...
1
vote
1answer
856 views

Drawing Shape in DebugView (Farseer)

As the title says, I need to draw a shape/polygon in Farseer using debugview. I have this piece of code which converts a Texture to polygon: //load texture that will represent the tray ...
0
votes
1answer
36 views

XNA: Camera's Rotation and Translation matrices seem to interfere with each other

I've been following the guide here for how to create a custom 2D camera in XNA. It works great, I've implemented it before, but for some reason, the matrix math is throwing me off. public sealed ...
0
votes
0answers
17 views

create a bounding object for flat model [on hold]

I have a flat textured ground representing my terrain and a bounding ssphere which surrounds my player. When i jump, i set my y distance to stop decreasing when i reach a certain point. But this ...
2
votes
1answer
414 views

How can I simulate objects floating on water without a physics engine?

In my game the water movement is done in a shader using Gerstner equations. The water movement looks realistic enough for a school project but I encounter serious problem when I wanted to do sailing ...
0
votes
1answer
61 views

XNA Masking Mayhem

I'd like to start by mentioning that I'm just an amateur programmer of the past 2 years with no formal training and know very little about maximizing the potential of graphics hardware. I can write ...
0
votes
0answers
16 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
1answer
31 views

How do you create a .XNB Font file for use with CocosSharp?

I know the .XNB file format is an XNA thing and that CocosSharp inherits this from its MonoGame roots. However there doesn't seem to be any information on how to create your own .XNB fonts to use with ...
0
votes
0answers
25 views

3D Mesh Collision Help

I am new to XNA (I have only been working in it for a countable number of weeks) as well as to these forums (I have only made 1-2 other posts), so this may seem like a strange request, but I am ...
0
votes
2answers
41 views

Collision detection problem in XNA

I'm having two problems with my collision detection in XNA. There are two boxes, the red box represents a player and the blue box represents a wall. The first problem is when the player moves to the ...
1
vote
1answer
58 views

XNA How to change the sprite texture to white color

as the title, how can i do to take the sprite to white color here is some example, turn to follows image and my game planform is XNA now, and developed winphone game thanks for reading!
1
vote
1answer
51 views

how to define a field of view for the entire map for shadow?

I recently added "Shadow Mapping" in my XNA games to include shadows. I followed the nice and famous tutorial from "Riemers" : http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Shadow_map.php . ...
1
vote
1answer
94 views

XNA Diffuse Shader Issue. Edge lighting problem. Image Attached

As you can see in this image the diffuse shading is working correctly in some places but in other places such as the the bottom of the sphere you can see the squares/triangles of the mesh. Any ...
1
vote
1answer
61 views

Collisions and Lists [closed]

I've run into an issue that breaks my collisions. Here's my method: Gather Input Project Rectangle Check for intersection and ispassable Update The update method is built on object_position * ...
3
votes
1answer
70 views

Character creation using spritesheets

I am currently creating a 2D fighting game and have implemented a system where upon starting a new game, the player is presented with the option to create a custom character. I have a set of string ...
-1
votes
1answer
55 views

How add fog with pixel shader (HLSL) XNA?

I started to make a small game in XNA . And recently i tried to add a "fog" on "pixel shader HLSL" with the class Effect from XNA . I search online about some tutorial and found many sample. But ...
2
votes
1answer
3k views

2D Grid based game - how should I draw grid lines?

I'm playing around with a 2D grid based game idea, and I am using sprites for the grid cells. Let's say there is a 10 x 10 grid and each cell is 48x48, which will have sprites drawn there. That is ...
-1
votes
0answers
35 views

3D mobile game development [closed]

I am not a developer or programmer and, I am planning an educative project that will involve having students to develop a cross-platform, 3D mobile game, similar to the SimCity concept. I need to ...
-1
votes
0answers
18 views

Download XNA Game Studio Connect without a Xbox [closed]

I would like to know where I can download the XNA Game Studio Connect to Xbox 360 without having an Xbox.
0
votes
2answers
77 views

Draw a never-ending line in XNA

I am drawing a line in XNA which I want to never end. I also have a tool that moves forward in X-direction and a camera which is centered at this tool. However, when I reach the end of the viewport ...
0
votes
1answer
46 views

Problem with sprite direction and rotation

I have a sprite called Tool that moves with a speed represented as a float and in a direction represented as a Vector2. When I click the mouse on the screen the sprite change its direction and starts ...
5
votes
3answers
2k views

XNA: Rotating Bones

XNA 4.0 I am trying to learn how to rotate bones on a very simple tank model I made in Cinema 4D. It is rigged by 3 bones, Root -> Main -> Turret -> Barrel I have binded all of the objects to the ...
1
vote
1answer
111 views

Draw lines from the center of the screen at specific angles

I want to draw multiple primitive lines which start at the center of the screen and end at the edges of the screen, traveling at specific angles: How can I set the angle for each line? Here is my ...
1
vote
0answers
25 views

XNA HLSL UV Mapping

I was testing my hlsl lighting shader, I've copied it from a tutorial and it works perfectly, but all the meshes in the model needs to have texture coordinate, I guess this is because this part: ...
-4
votes
1answer
45 views

How can I modify this projectile class to support movement in an arbitrary direction?

Hi I have the following class which Updates and Draws a projectile: public class TierOneProjectile : IProjectile { private AnimatedTexture animation; private Vector2 screenPosition, ...
1
vote
1answer
31 views

(XNA) Stretching Images (Sprites) without Blur (Rasterizing?)

thanks for clicking on this question although it has likely one of the most un-specific and confusing titles on this site. I am somewhat new to XNA and I have only posted 1 question on this site ...
1
vote
2answers
124 views

Detecting Hitbox Collisions (Rectangle)

So I have some Hitboxes set up on 2 classes, HealthPickup and Player. public static Rectangle Hitbox; public override void Initialize() { Hitbox = new Rectangle(Pos.X, Pos.Y, 32, 32); } That's ...
1
vote
1answer
309 views

Sprite collision with color?

Is this possible? To elaborate, I am making a PacMan offshoot. Essentially it is a "zoomed in" version of the game, but the board is randomly generated. I have 11 .png files each to be used as a ...
0
votes
1answer
270 views

Disappearring instances of VertexPositionColor using MonoGame

I am a complete beginner in graphics developing with XNA/Monogame. Started my own project using Monogame 3.0 for WinRT. I have this unexplainable issue that some of the vertices disappear while doing ...
0
votes
1answer
121 views

Rectangle touch sides of another rectangle

I am making a platformer game and im trying to make the player collide with all the blocks, here's a picture: The blocks is stored in List and im trying to get the side's of the block usin static ...
3
votes
1answer
310 views

Spritebatch Vertex shader world matrix change after each draw

I have a spritebatch where I draw some textures transformed in 3d space. The easy way was just Begin with the transformation matrix, draw, and end it right after. But that is silly, so I'm trying ...
8
votes
5answers
1k views

How can I simulate shattering glass?

I need to make a simulation with stone thrown through a glass window. How can I accomplish that? I mean, I was thinking about making a 3D model of a stone and glass in 3D Studio Max 2012, shatter the ...
5
votes
2answers
437 views

XNA 3.1 to 4.0 Vertex Shader Not Drawing

I have recently been converting our XNA 3.1 game to XNA 4.0 and am stuck on the shaders. I have the game running, but nothing is drawing to the screen, except things not using a shader. This is only ...
2
votes
0answers
65 views

How to implement simple shadows on XNA?

UPDATE: See photos below the description I try desperately to implement shadows on my XNA games. My game is a style of games like Voxel (minecraft). The problem is that I do not find support / ...
2
votes
1answer
228 views

How do I avoid pathfinding characters getting stuck in corners?

I used A* pathfinding to return a list of Tiles to get from an enemy to the player. After that, I wasn't sure how to actually move the enemy. What I ended up doing was get the first Tile in the path. ...
1
vote
1answer
45 views

XNA Library DrawPrimitives throwing primitiveCount error

I downloaded the project from here http://silverlight.bayprince.com/tutorials.php?tutorial=13 and tried adding a new OBJ file with a few thousand vertices listed. The classic teapot works but when I ...
0
votes
1answer
673 views

3DS Max MassFX — Animation to XNA without bones/skins?

I made a model in which a number of cobble stones fall into a hole using the rigid bodies in 3DS Max 2012 MassFX. They are just editable polys, no skin, no bone. I want this to play (Take 001, 0-100 ...
10
votes
2answers
7k views

How do I generate projectiles toward the mouse pointer? [duplicate]

I'm making a top-down space shooter where the player controls a ship and can aim and shoot using the mouse cursor. How can I fire bullets from the ship at the angle from the ship to the mouse cursor? ...
0
votes
1answer
78 views

Do I need to create an HLSL in XNA to display textures without content pipeline

I currently have a jpeg texture stored as a Color array in XNA as RGBA. I also have the vertices of a cube in OBJ format mapped to VertexPositionColor vertex buffer using the VertexBuffer and Indices ...
0
votes
0answers
28 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 ...
-1
votes
0answers
66 views

best app store owner, which deals with payoneer, to host and sell an XNA game [duplicate]

I have developped a XNA game, and I'd like to sell it. I'd like to know what is the best free way to put the game as online appstore ? I need an app store owner, which deals with payoneer Thank you ...
5
votes
2answers
294 views

How can I optimize a parallax effect consisting of multiple transparent layers?

I have a parallax effect in MonoGame consisting of multiple semi-transparent layers of textures. The effect is simple, but rendering multiple transparent layers on top of each other is rather slow. ...
0
votes
1answer
64 views

Incomplete mesh using DrawIndexedPrimitives after rotating mesh

Through help on this site I was able to draw the triangles of an unrotated, nonscaled nontransformed mesh created in Blender and exported to OBJ, accurately imported through Assimp and rendered in XNA ...
2
votes
1answer
66 views

Cancel a SpriteBatch I've started drawing

Background: I'm working on a control library for XNA to use in a couple game clients I've written. The way I've implemented Dialogs is to have them derive from the base XNAControl class. XNAControl ...
1
vote
1answer
519 views

How can I skew my XNA sprites?

I would like to make a 2D tile based game, but, to make it look a bit prettier, I would need to skew textures so that it would look more like a 2.5D game. So I thought maybe I should skew textures to ...
5
votes
2answers
401 views

Set a 2d camera's position so that a building is under the players feet

My issue is this: i am making a scrolling game in XNA, and the camera updates based on the players velocity, but the player never actually moves, he is always in the center of the screen. When he hits ...
1
vote
1answer
341 views

Are SharpDX's ContextDirect2D methods different from XNA's SpriteBatch?

I'm migrating from XNA to SharpDX in Win8. I noticed this DrawBitmap call in one of the samples. Is this different in some shape, way or form from XNA's SpriteBatch?
2
votes
2answers
79 views

(XNA) Possible to hide, compress, or rename .XNB files?

I'm fairly new to XNA (only a week into C# and XNA at this point) but I have been developing games for a while now, and the program I used did not require any/many external files in creating an ...