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
6 views

Drawing directly to XNA depth buffer

Is it possible to set the depth buffer (i.e. draw depth values directly) in XNA? All the examples I could find are showing how to render a 3D scene to a RenderTarget2D and get the depth information ...
0
votes
1answer
24 views

Circle Depth Penetration

I'm resolving some collision between circles and I keep getting this problem. Note: The rectangles are perfect squares fitting the circles so when I type rect.Width I mean the radius of the circle. ...
0
votes
1answer
34 views

Enemy Follow Player Orthogonal Movement

I have a Enemy class that Seeks a player if he is in his field of view. Problem is i want the enemy only to move up/down/right/left, not like for example up and left at the same time (diagonal ...
0
votes
0answers
15 views

.NET Socket TCP Listener force quit problem [on hold]

So i'm trying to setup a TCP server/client in visual studio with .net sockets for my xna game. And so far it works fine until the client closes the application. The error appears to be here. But I ...
0
votes
0answers
24 views

Problem with Rotation - C#/XNA

I have a projecile(Hook) and the tail of the projectile(yellow balls) TailProjectile class draw a ball at the exact position of the projectile(hook) and let it there until the projectile ends I'd ...
-1
votes
0answers
12 views

Adding Texture and Sound content to Monogame [on hold]

I was working with XNA C# Programming for Windows games until XNA got discontinued. I then discovered Monogame which is close to XNA. The only problem I have is importing content to the game. Back ...
0
votes
0answers
92 views

How to make chunk creation faster? Or how can I deal with slow chunk creation? [on hold]

I'm using C# and XNA and I am creating a voxel engine with "infinite" world. I read this: How can I optimise a Minecraft-esque voxel world? And I tried the following: Using "shifted values" for ...
1
vote
0answers
23 views

Custom Keyboard run by Arduino not working in XNA

I'm trying to make a stenotype-teaching game using the stenoboard as input. The Stenoboard emulates an NKRO keyboard, using this code: https://github.com/caru/StenoFW/blob/master/StenoFW.ino, with an ...
0
votes
0answers
11 views

System.ComponentModel.Win32Exception Run-time Error [on hold]

I have been working on a game where the Player has to go around the game screen collecting objects before the enemy collects them. After a while of playing, I seem to come across a warning that forces ...
-3
votes
2answers
44 views

How can I follow the player sprite with the camera?

I've spent the last 4 days trying to figure out how to get a camera to follow the player sprite. I've followed every tutorial I could find and none of them worked. My Camera script looks like this. ...
0
votes
0answers
13 views

MonoGame disable spritefont anti-alising?

Ive got a pixel art font and when I draw it theres a lot of antialiasing going on which totally ruins the point of making the font pixel art? How can I disable this? My SamplerState is set to ...
-6
votes
0answers
72 views

how might we stop all the people from piracy games and then go to the jail [closed]

how might we stop all those people that piracy games? i want 10 people to anser this question. IS piracy bad or good and give me the reson of that and second, i want to know how can we stop it and ...
0
votes
0answers
46 views

Using an object as a model to avoid too many parameters - XNA/C#

I have 3 classes(Skill,Projectile and Status),Skill has Projectile and Projectile has Status, all of them need to read information from a txt and to avoid open it everytime I want to create an object ...
1
vote
1answer
82 views

Keyboard.GetState() only work first time, and Memory increase (not Disposing)

EDIT UPDATE 3 I been searching the web for a solution and found several people struggling with Memoryleak using MonoGame while trying to dispose objects. It could be the case that MonoGame should be ...
3
votes
2answers
43 views

XNA/C# Convert polygons into tilemap

I'm currently working on my 2D survival game, where the world is infinite and generated by perlin noise. I wanted to also include biomes and this article interested me - ...
2
votes
0answers
52 views

In MonoGame, how can I disable font anti-aliasing?

I am building a game with a "low resolution" aesthetic, so I would like to disable the default font anti-aliasing. The text is drawn using the built-in SpriteFont and SpriteBatch classes. Here is ...
1
vote
1answer
46 views

Simplex noise heightmap

I'm currently working on a game with an "infinite" programmatically generated terrain. The terrain is being generated by creating a heightmap using simplex noise. I've followed a tutorial and ended ...
-1
votes
1answer
80 views

How to optimize my movement & collision code?

I am trying to implement movement & collision the simplest way possible. public void MovePlayer() { KeyboardState keyState = Keyboard.GetState(); Vector2 checkVec = ...
0
votes
0answers
38 views

Problem with SSAO

I'm trying to implement SSAO based on this tutorial (and other). My setup: XNA 4.0 Deferred depth = z/w This is result: Lines across buildings are moving when I move camera. So I'm wondering ...
1
vote
1answer
187 views

Word in different color in middle of string XNA

Is it possible to use different font colors for the same string, for example, when buying a weapon in CoD AW Exo Zombies: How do I do this? Thanks.
3
votes
2answers
45 views

Managing cross-platform targets/compatibility with Monogame

I recently started using Monogame for the first time because of it's cross platform compatibilities and heavily active development. The first thing I did is installing the whole framework using their ...
0
votes
2answers
64 views

entity component - get object from entity system without knowing it's ID

Ive been building a game using a Entity Component system, but im having a bit of an issue finding a specific object in my entity system without knowing the Entity's Id. My game is organized in ...
2
votes
2answers
93 views

2D Simplex Smooth Cave Generation

So I'm creating a system of caves below my random terrain generation, and I'm using 2D Simplex Noise to do so and I have a pretty good grasp on generating the random caves. However, the cutoff from ...
1
vote
1answer
60 views

1D Simplex Noise Returns Same Generation

I've been using 1D Simplex Noise to create a random world surface, and it keeps generating with the same looking surface terrain, with some minor variations. Here is my sample code- Tile[][] tiles = ...
0
votes
1answer
39 views

My sprites are spwaning on top of each other with a new class?

I am making a game for college in XNA C#, however I have got to the point where I need some enemy sprites to be spawned in for the player to shoot. I did this with one enemy by itself without using ...
0
votes
2answers
76 views

XNA Rotating a Rectangle?

I am in the process of making a giant shooter game and I have got to the point where I needed to use rectangles to detect bullets and giants hitting the player. I did that however, if you look at this ...
1
vote
0answers
30 views

Black Rectangle instead of texture

I am trying to draw a textured ractangle like in this example. But instead of a texture the rectangle is just black. Draw method: protected override void Draw(GameTime gameTime) { ...
0
votes
0answers
43 views

Creating terrain in sections in XNA

I am learning XNA, and have followed riemers tutorial on multitexturing terrains: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series4/Multitexturing.php Which worked perfectly, however when I use ...
0
votes
1answer
51 views

Shadow map depth error makes all light be covered and hidden

I've been following the tutorials listed below: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Shadow_map.php http://xbox.create.msdn.com/en-US/education/catalog/sample/shadow_mapping_1 ...
-2
votes
2answers
45 views

In XNA, how do I make a sprite move towards another?

I am making a shoot-em-up with a player-controlled sprite with a gun: I have most of the game working, but I have gotten to the point where I need to load in the enemy characters and make them move ...
1
vote
1answer
41 views

XNA arcball camera steering issue

I have an arcball set up to follow my model in XNA. It rotates around the target correctly when holding in the left mouse button and moving the mouse. It zooms in and our correctly with the mouse ...
4
votes
1answer
92 views

Torus World Collision Dection

I am looking for a collision detection solution for use when 2d screen wrapping. Specifically, when the image is split between the right and left side I can only detect a collision for a limited ...
0
votes
0answers
42 views

Choppy movement

So, I'm trying to write some code in C# XNA to make an enemy move in a random direction for 0.5 seconds, then switch direction and once again move for 0.5 seconds. However the problem I've discovered ...
1
vote
1answer
70 views

Problem, why the mouse cursor position is totally wrong, after resizing the window?

I come here, because i'm trying to add some "menu" interface in my small XNA Game . I found on internet a nice library adviced by many devellopers. Till now everythink is ok, the problem is my C# code ...
1
vote
0answers
48 views

Supported Orientation, Monogame, Windows Phone 8

I am developing a game in which I need to rotate the screen on Landscape mode or Portrait, and lock it that way. In Monogame, targeting Windows Phone 8.1 adding this code: ...
1
vote
0answers
39 views

Specific bone not present in the skeleton XNA

I have created a human mesh, bone structure, and animation rig in 3ds max for an XNA game I am developing for school. I am currently having a problem with one specific bone upon build in Visual ...
0
votes
0answers
23 views

XNA Texture mapping on model

I have a cube as my model and want to map a texture on every side of the cube. I have been searching for a while and most answers suggest using 3D max or using VertexPositionTextures. I am not ...
1
vote
1answer
46 views

What is the difference between a Viewport and a Scissor Rectangle?

In XNA, what is the difference between a Viewport and a Scissor Rectangle, and when should I use each one? It looks like viewport clipping is applied to the geometry before the rasterization state, ...
1
vote
0answers
12 views

XNA maximum VertexBuffer size exception

I am trying to build content(a text file contains list of triangles vertices) for an XNA application through a custom pipeline importer. It works ok. But when number of triangles gets near 1m(in this ...
1
vote
1answer
48 views

Find distance from Vector2 to nearest point in Rectangle

I'm setting up collision detection and I have Walls which store their positions as rectangles. I need to figure out the distance from a Vector2 to the nearest side of a rectangle. If this was two ...
2
votes
0answers
59 views

Read custom content in MONO-GAME in a cross-platform way

using Mono-Game, i have some custom content files in some binary format (not .xnb) in run-time i need to read the content of those files. i prefer to get a stream, but if something will give me a ...
0
votes
0answers
58 views

Texture Editing with Multhi-Threading

So I have this giant Texture2D(4096 * 4096, don't ask why) and all its data stored in an array of Colors. When I hit left MouseButton I create a blue 64 by 64 square at the cursors position using the ...
2
votes
1answer
67 views

In XNA, how do I access a model's dimensions with code?

I'm trying to rotate a model around some axes, but this rotates it around the world origin. I understand that I need to translate the object relative to its own size before rotating it, but I don't ...
0
votes
0answers
73 views

Smooth player movement in a tile map based engine

The character is moving too much fast, it teleports! Note that a tile is 80x80. Each cell has 4 bools to say if you can go up, down, right, left. Am I doing something wrong with Lerp? This is the ...
0
votes
1answer
105 views

Actually Implementing “C# as a scripting Language” in XNA

Following an example from this thread, I've made an application that dynamically loads in C# "scripts" (actually, plugins) into my game -- but I've hit a snag: how do I reference the assemblies for ...
0
votes
0answers
67 views

XNA 4.0 - Using premade .xnb font files

Basically, for our college project, we need to use a font in xna. The only problem is that we are not allowed to install it due to admin rights. Is it possible to use and load the .xnb file that gets ...
1
vote
1answer
33 views

Model texturing not seamless at certain zooms? (C# XNA)

I found a very odd glitch with my game this morning. XNA doesn't render certain textured models properly, while other models are completely unaffected. And it's not even like my models are made ...
3
votes
1answer
101 views

Is creating a blend state like this possible?

I'm wanting to create a custom blend state that is similar to XNA's BlendState.Additive, but slightly different. I'm wanting something like the 'custom' output below: Is something like this ...
0
votes
1answer
51 views

XNA - Darkening background and drawing something on top

In a game a group of friends and I are working on using XNA, we wanted to create an effect where we could darken the screen and draw something else on top of the darkened portion. For example, we have ...
0
votes
0answers
62 views

Unity or XNA allowing modifications from Steam Workshop

I'm about to start a sandbox project game for Steam, so modifications are important - before I begin, how do I allow people to create mods for the game through the Steam Workshop? I've looked but I've ...