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
1answer
57 views

Drawing on an image before drawing on screen in XNA using VB.NET

I'm programming a game in XNA, using VB.NET. I want to create an intro to the game that zooms in/out the whole screen and scaling each image to accomplish this is cumbersome at best. I like to be able ...
1
vote
1answer
25 views

XNA - SoundEffect with SpeedOfSound

SoundEffect has SpeedOfSound property. I'm trying to use it, but it doesn't work: SoundEffect.SpeedOfSound = 600.0f; SoundEffectInstance soundEffectInstance = stepsSound.CreateInstance(); ...
0
votes
1answer
16 views

XNA HLSL Shader Color Swapping based on lightness

I'm trying to achieve a similar effect to the image below in HLSL. [Ignore the inbetween state, currently I'm only trying to achieve the final phase, which is black and red] What I tried so far is ...
0
votes
2answers
52 views

MonoGame Gamepad Y axis flipped?

I'm following a book I bought on Google Play that is teaching me the ropes of MonoGame, and in Chapter 2 it introduces creating an input wrapper that takes care of all the input methods for a game pad ...
0
votes
1answer
30 views

Gaussian blur spritesheet/texture atlas without clipping edges

I'm trying to apply a Gaussian blur to a shadow to soften them a bit. I can apply the blur fine, but the problem is that I end up with this: Instead of this: Which isn't great. The image is part ...
0
votes
1answer
34 views

How can I use web browser controls for non-browser game GUI?

I'm looking for a way to get a modern browser's level of customization and rendering quality in my c# monogame to avoid using roundabout/limited/buggy GUI toolkits and to get better fonts without ...
1
vote
0answers
26 views

XNA/MonoGame screen scale and keeping aspect

My aim is to make a simple 2D platformer, the idea is that it will be a base resolution of 480x270 (16:9) which can scale x2, x4(1920x1080) or go full screen. I basically do: graphics....
0
votes
0answers
14 views

Resolution-Independent Rendering squishes view field

For the last couple of days, I've been trying to get a resolution-independent renderer going on an XNA game. I have a camera and a renderer class that I added, based on this tutorial Here's the ...
0
votes
2answers
32 views

Lerp velocity in specific time

How to lerp velocity to 0 in specific time? For example in two seconds? I need this for jumping. velocity.Y = MathHelper.Lerp(velocity.Y, 0, [time]);
0
votes
2answers
68 views

C# XNA :Snake Game, direction problem

I am trying to do a snake game in XNA but I have some little problems... I explain : The Snake has a direction (Enum Type : Haut(=up), Bas(=down), Droite(=right), Gauche(=left)) When the player ...
2
votes
2answers
125 views

HLSL texture not reading from register S1

I made a simple post processing shader, that draws scanlines. This all works perfectly. I wanted to make it a bit more interesting by applying a shadowmask instead so I wanted to pass a texture to the ...
0
votes
2answers
68 views

How can I use an HLSL pixel shader to peek at other pixels?

I think this is like a pixilation shader but I had a hard time trying to find one online, and one that I could manipulate specifically. I want to create a pixel shader for my monogame project that ...
0
votes
1answer
41 views

Is Update(GameTime) called before it's finished?

Code at the beginning of Update(GameTime) is being called over and over again, and code at the end of Update(GameTime) is only being called after a delay. Is Update(GameTime) called again before it's ...
0
votes
0answers
35 views

Getting XNA 4.0 running on VirtualBox?

I'm teaching myself gamedev using VS2015 and MonoGame, however so much of the good example code uses XNA 4.0. So I installed Win7 on VirtualBox, with C# 2010 Express, with XNA 4.0. I installed Guest ...
0
votes
0answers
45 views

XNA Access violation from KernelSoundEffectInstance

Some users (but not all) are reporting a periodic crash in my XNA game. They say it's happening every 15 to 20 minutes. I am unable to replicate this myself, so I asked users to send me error logs. ...
-1
votes
2answers
71 views

How do I create a 3rd person camera in XNA?

Because other people are using too complicated code for me to understand, I decided to ask a question from an XNA noob. So, I'm using the spaceship thing that Microsoft use in their tutorials of Going ...
0
votes
2answers
56 views

How to achieve a sheet of paper unfolding from the center in XNA 2D?

I need to create an effect like a folded sheet of paper unfolding. I was thinking about transforming an image so it "scales" from the center to the borders by cutting the image in half and scaling ...
1
vote
0answers
35 views

Monogame + Render Target + antialiasing doesn't work

Is there any proper way to use antialiasing, while rendering to a RenderTarget2D and using Monogame? I do this: renderTarget = new RenderTarget2D(GameData.GraphicsDevice, pp.BackBufferWidth, pp....
4
votes
1answer
136 views

Can I use xna tutorials to learn monogame?

Can I use xna tutorials to learn monogame? I can't find any good monogame tutorials but there are tons of xna tutorials available and from what I have seen they are pretty much the same thing.
0
votes
0answers
21 views

Clip on model XNA

I'm currently doing my water plane system (with waves etc...). Actually, I have a heightmap with a waterplane on it; refraction and reflection working perfectly, but now I want to add objects. So ...
1
vote
2answers
77 views

How to load textures at other times than startup in XNA using vb.net?

I've encountered a problem with my game project lately. When I load more than a certain number of textures (around 1000) at startup I recieve an error regarding memory, because I have to use 32-bit in ...
0
votes
1answer
204 views

Monogame - Sprite sheet animation

I have a sprite sheet that contains a character walk cycle, and I have made a player class that allows the player to move and cycle through the walk animation, however the animation only works whilst ...
0
votes
0answers
19 views

How to do an xBR or hqx filter in MonoGame?

I have been trying to implement an HD filter (xBR or HQX) in my MonoGame game project but so far got no success. I have checked out this question, but the shaders provided in the answers don't seem to ...
0
votes
2answers
124 views

Smooth movement from point A to point B in a tile-based game

I'm currently very new to XNA, and I'm trying to get a grasp on movement. Currently, I have a function that checks for keypresses, and moves my character from point A to point B instantly: private ...
3
votes
2answers
96 views

Why does transforming a Vector3 by a Quaternion result in reversed Z?

I'm trying to transform the vector (1, 0, 0) by an orientation unit quaternion, which in XNA should be: Vector3 v = Vector3.Transform(Vector3.Right, Orientation); But this results in the Z value ...
0
votes
1answer
73 views

Game crashes when sound is finished

I'm trying to code a simple audio playback test game (which will be used in my actual project), and everything works fine, except for the fact that after the audio has finished playing, the game will ...
0
votes
0answers
68 views

Water reflection xna

I'm actually trying to do the reflection map for my water component, but even following the riemer's tutorial about reflection map the formulas provided doens't work. http://www.riemers.net/eng/...
1
vote
1answer
85 views

Drawing textures in 3D/2.5D at an angle using spriteBatch in Monogame

for a university project we are creating a small "2d" game. Im writing 2D in "" because we would like to achieve a look similiar to the one in games like Don't Starve (so more like 2.5D). As you ...
0
votes
0answers
36 views

Shader questions with regards to the SpriteBatch in XNA/MonoGame

So I've finally decided to create my very own GUI system. And I'd like it to use shaders for pretty much all rendering. Think "WPF/Direct2D Brushes". Except to my knowledge, using shaders with the ...
0
votes
3answers
95 views

How do I draw non-smoothed fonts in MonoGame 3.5?

I don't want to smooth the tiny fonts I'm building but even disabling ClearType system wide doesn't let me create SpriteFont files with sharp characters. There doesn't seem to be an option for ...
0
votes
0answers
45 views

Purple screen when using vertex shaders

Alright, so I've tried everything I can think of. I've put in over 10 hours into this crap, but nothing seems to work (tried multiple online tutorials as well). Always purple screen. Here is the ...
0
votes
0answers
48 views

Rendering water with Hardware Instancing xna/MonoGame

I was wondering if rendering in XNA/MonoGame will be better using Hardware Instancing. For example, I have my editor and when I click anywhere on my map, i'll add a plane with a water texture. If I ...
0
votes
2answers
103 views

XNA/MonoGame creating a player

After some fine-tuning on my game's GUI I am finally ready to begin with the gameplay. But that's a tall order. My game will be something like a 2D platformer with RPG elements like collecting armor, ...
0
votes
1answer
39 views

XNA How do I detect if my mouse if hovering over a specific sprite?

How do I detect if my mouse if hovering over a specific sprite? For example I'm making a custom button and I want to check if my mouse is hovering over it so I can make animations.
2
votes
1answer
139 views

Having trouble creating multiple sprites from one class

So I am trying to make more than one sprite using a single class but I cannot seem to get the sprites to be drawn at all or drawn in different places (they are all just on top of one another). In my ...
0
votes
1answer
64 views

Using XNA to create an isometric tileset?

In XNA, how can I take any given texture, then render it so that it fits completely into a 64x31 (or 32x15) isometric tile such that it tessellates perfectly? My goal is to give various textures to my ...
0
votes
0answers
15 views

Farseer 3.5 RevoluteJoint Breaking

I think I'm missing something completely and the solution is unbelievably simple, but I'm at a loss at the moment. I'm trying to build a stylized car, with a rectangle as car body with two circles as ...
0
votes
0answers
60 views

How to make this 2D jumping animation smooth in XNA?

I am currently developing a game where I have a sprite that its objective is to jump over boxes coming at it. I know that you have to change the Y values. When spacebar is hit, it goes up but then I ...
0
votes
1answer
47 views

Draw a Texture to fit a rectangle

I would like to draw a texture in a rectangle that is smaller than the texture, normaly the texture will be scaled to fill the rectangle, which results in a squished image. I want to draw it to fit. ...
2
votes
1answer
86 views

Ray casting fails when it shouldn't

I have two objects that should collide. My player should stand on a ship. The position where my player stands, is exactly on the edge of two adjacent triangles (in the ship's model). To Check for ...
0
votes
1answer
74 views

Transform matrix hierarchy issue

I'm trying to implement a parent child relationship between Sprites and draw them to the screen. I'm calculating transforms by chaining transform matrices. I'm using code from here: private void ...
0
votes
2answers
61 views

Using sourceRect or cropping out a Texture 2D to draw? MonoGame/XNA

I was wondering what is the best way to draw textures (for performance). Using the sourceRectange in the spriteBatch.Draw() call and just draw the whole spriteSheet, or crop out every texture on the ...
3
votes
2answers
333 views

2D Platformer AABB collision issues

Before anyone say that this questions already has a answer, I will list all the questions I read and tried: AABB collision resolution issues Trouble with AABB collision response and physics Hard ...
6
votes
1answer
260 views

How to do Chromatic Aberration on a transparent background?

I have a problem with a chromatic aberration shader effect... If I produce the effect on a white background I get exactly what I want: But if I do the same effect on a transparent background I get ...
0
votes
0answers
24 views

Deforming the mesh with skeleton in XNA

I just want to know which algorithm does the default Model Processor of XNA uses to deform meshes when the skeleton changes, like Linear Blend Skinning, etc. I tried hard to find out but I found that ...
1
vote
1answer
33 views

transfer 3d model processing from Xna to Android?

I developed xna scenario in Desktop application and i need to make the same scenario in android app I we need to make processing in desktop and just display it in android app using socket programming. ...
-1
votes
1answer
92 views

Bullet only removing closest enemy

I'm having an issue with my collision detection code. I'm making a top down shooter and when I shoot, the bullet will only destroy an enemy if it's the closest enemy. The bullet will go right through ...
1
vote
1answer
83 views

Check collision with rectangle and pixels

I have done a function to check the pixels collision against two animated sprites, and now I need to check a "Rectangle x animated sprite" collision, but I have no idea how to do this. I tried to ...
0
votes
1answer
117 views

Mode 7 in xna/monogame

I want achieve a view like Mode 7 from snes games where the closer textures get stretched out more and more far away textures look smaller. Something like this: What I have in my project at the ...