Questions tagged [xna]

XNA is a game framework by Microsoft that allows deployment for Windows, Windows Phone & Xbox 360.

Filter by
Sorted by
Tagged with
0
votes
2answers
178 views

Bounding box messed up for .fbx models

I am trying to make bounding boxes for my models. My code works fine if the model is imported as a COLLADA (.dae) file. When I try to import a model that has .fbx extension, my bounding box messes up. ...
1
vote
0answers
76 views

Generate and then rasterize vector shape in Monogame/XNA

I apologize if this is too broad, but I can't seem to find information on this anywhere (perhaps I am searching for the wrong thing?) Anyways, I'm making a simple game where the player visits ...
4
votes
1answer
261 views

Make models not see through

All my models are see through and I can't figure out why. For example: Here's what it looks like when you are not looking through them: And when I look through one of them: Why can I see the black ...
2
votes
1answer
506 views

Camera follow behind a Model

I am trying to learn about the Camera in a 3D space and wanted to 3rd person type of camera. Right now, I directly control my camera and it doesn't follow anything. It works like a first-person camera....
1
vote
2answers
126 views

Create BoundingBoxes on a Model

I am trying to create multiple BoundingBoxes on a Model by following this tutorial: https://electronicmeteor.wordpress.com/2011/...
1
vote
0answers
133 views

XNA 4.0 Camera and object handling on screen

For developing a side-scrolling platform 2D game I want to implement a moving camera class, the reason of using the class instead of moving the whole map is that I'll have to use too many objects at ...
1
vote
1answer
150 views

Very weird C#/XNA bug, not drawing a magenta dot

My C# code is drawing all the colored dots except the magenta one. Here's the code: ...
3
votes
2answers
4k views

Getting Sprites from a SpriteSheet with Rows and Columns

I am having trouble reading a spritesheet with rows and columns. If it is just one row, then my code works fine. The sheet looks like this: Source: Character animations, clothes, armor, weapons, ...
1
vote
1answer
2k views

Understanding SpriteBatch.Draw overload XNA

I'm talking about the public void Draw (Texture2D texture, Vector2 position, Nullable sourceRectangle, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)...
0
votes
2answers
263 views

Why is my collision code blocking the player's movement in XNA?

I have the following code to check for collisions in my game, but this code doesn't work it as should. For example: I go from up to down and if collision is detect I can't turn right; if I go from ...
1
vote
1answer
472 views

Any good pattern for managing user input in XNA

I'm doing some experimentation on XNA, and unlike past experiences with XNA, I wanna do stuff right. Are there any good patterns for managing user input? Like... how do I manage what components get ...
1
vote
1answer
78 views

Frame rate slowing down after publishing XNA game in VB.NET

I will get to the main question later but I just want to give the backstory here first. I program a game in XNA using VB.NET. As I'm testing the game in debug it works at a certain speed (...
7
votes
2answers
1k views

Need simple 3D terrain render with big texture map

I have a 1000 x 700 height map I have a 1000 x 700 texture map I did something very similar about 8 years ago: Using XNA. Unfortunately, when I bring up this old project and convert it to Visual ...
-3
votes
2answers
567 views

Trajectory Arcs

Ok so I have read this question Calculating trajectory. And it is sort of working in my program. I am trying to produce nice parabolic arcs with this. Like so .. The results I am getting look more ...
1
vote
0answers
505 views

Why would ContentManager load new copies of content instead of returning references to existing content?

I am currently programming a space shooter with MonoGame. I encountered an issue where the memory usage constantly increases when I load a specific class. This class is called ...
2
votes
1answer
283 views

Frame Skips in MonoGame

I'm developing a 2D game using MonoGame. I've got a square on the screen I can move around. The problem is that about once a second, the square jumps a bit. Using a frame counter I found here I've ...
1
vote
1answer
66 views

Deriving from base class but not calling base method

I am very new to C#, XNA, and OOP. This is my question: I have an abstract class called Sprite. Sprite handles position and drawing from the sprite sheets, from its update and draw methods, for my ...
2
votes
1answer
395 views

Publishing an XNA project on Windows Store

I have made an application in XNA that I want to sell on Windows Store. When it comes to uploading in the Windows Store dashboard it says files need to be in the format xap, .appx, .appxbundle or ....
1
vote
0answers
136 views

XNA Deserialization Error: XML element “Type” not found

I want to deserialize an xml file that contains a path for an image I have 3 projects: One with the Program.cs class and the main template stuff from xna, another with classes such as the default '...
1
vote
0answers
148 views

Jump height being affected by the duration of how long jump button is pressed

So I've been trying to implement a controlled jump the way the title proclaims to make the game easier to play and having the ability to make harder challenges in each level. I have noticed how there ...
3
votes
1answer
251 views

How to create shockwave of objects in other shapes than circle?

Basically, I'm making a bullethell / I wanna be the guy inspired game for where I'm currently creating different methods of spawning bullets into the game. One of the few methods I've created is ...
2
votes
1answer
2k views

Correctly creating/handling events for keypress in MonoGame C#

I'm having trouble finding the best approach to registering an instantaneous user key-press with MonoGame (where the key has been held down and then released), using events in C#. Unlike the click of ...
1
vote
1answer
139 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
265 views

XNA - SoundEffect with SpeedOfSound

SoundEffect has SpeedOfSound property. I'm trying to use it, but it doesn't work: ...
0
votes
1answer
90 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
234 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
89 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 of ...
0
votes
1answer
205 views

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

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 ...
2
votes
1answer
1k 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
2answers
173 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
138 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 ...
1
vote
2answers
675 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 ...
3
votes
2answers
1k 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
62 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 ...
0
votes
0answers
107 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
248 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
66 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
179 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: ...
4
votes
1answer
645 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.
1
vote
2answers
144 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 ...
1
vote
3answers
7k 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
2answers
927 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: ...
2
votes
2answers
308 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); ...
0
votes
1answer
147 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
216 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
864 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
3answers
483 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
60 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
2answers
464 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
794 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.