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

Position is not what it should be when attaching fixture

In XNA / Farseer I have something like this: Body body = BodyFactory.CreateRectangle(world, 1f, 2f, 1f); FixtureFactory.AttachCircle(0.5f, 1f, body, new Vector2(0f, 1f)); I have been told that ...
1
vote
0answers
16 views

Drawing Farseer Fixtures

Is there any way how to draw a Polygon / Fixture from Farseer Physics with XNA? As I deform these polygons at runtime I can't take any texture from my Content folder, the texture must be generated at ...
3
votes
2answers
149 views

2D Collision Detection XNA C#

I've read all around the net, watched videos, tried things and in the end I can't make a decent platform collision detection. I've followed this tutorial. It didn't work out at 100%. My object stops ...
0
votes
1answer
56 views

Real-time movement client to server to client(s)

So the way that I tried to create a MMO like server communication was by sending strings to every-player containing information and making the client split the string. Example "John" , 42, 64 : ...
2
votes
1answer
67 views

How animated block in voxel engine?

In my voxel engine (XNA 4.0) I'm use a vertex buffer for the entire chunk and update it after the set block, changing block metadata or light level. This is not too frequent operation compared with ...
1
vote
5answers
97 views

Advice on how to store level design info?

I'm building a 2D tile-based puzzle game in C#, using Monogame. The game board is an 8x6 grid of tiles, each of which can contain a number of objects. Conveniently, the number of possibilities for ...
0
votes
1answer
44 views

Pass-through pixel shader not displaying properly

I'm new to shaders, HLSL and XNA in general. I'm trying to write a pass-through pixel shader but I'm experiencing some odd behaviour. I created a simple texture, shown below: Here's what I see when ...
0
votes
1answer
39 views

Sprites not showing (C# - XNA 4.0)

I'm following a tutorial from XNA GPA, but in my project, none of the sprites are loading. I've followed all of the instructions exactly, and the code works as expected when I copy it from my project ...
0
votes
1answer
24 views

Problem disposing content from a screen's content manager

I have a problem with my game. I am using multiple classes for different screens, for exemple: Main Menu is one screen, When playing is another, and so on... I decided to use multiple ...
1
vote
1answer
36 views

What's wrong with my HLSL depth shader?

I'm trying to render depth texture in XNA 4.0. I'm read few different tutorials several times and realy cannot understand what I'm doing wrong. Depth shader: float4x4 WVPMatrix; struct ...
0
votes
0answers
27 views

XNA 2D Tile Baseed Map Collision Messing Up On Inside Corners

I'm creating a 2D Over the head game and the collision system works fine for straight walls and outside corners although not for inside corners. The walls are done by each solid tile having a ...
0
votes
1answer
14 views

Mapping “Color” parameter from SpriteBatch.DrawString() function to a custom shader

I've recently found a nice way to render text in XNA with custom font AND custom shader. Here is the game code**: using System; using System.Collections.Generic; using System.Linq; using ...
1
vote
0answers
13 views

Reading messages from a certain client in Lidgren

I'm setting up a game with Lidgren, and I was wondering if there was a way to read a message from a certain client instead of just from the server as a whole, such as- //Why doesn't this exist? ...
0
votes
1answer
35 views

Draw transparency

I want to draw a terrain in a Texture2D at runtime in order to make collisions work with Farseer Physics later on. What I need is to make some parts of my original texture, which is just a colored ...
1
vote
1answer
27 views

Math behind XNA's spriteBatch.draw() color parameter?

I'm trying to make a shader that changes the color of a sprite the way the XNA spriteBatch.draw() color parameter changes color. I don't know exactly what it is called (the closest word I can think of ...
2
votes
0answers
29 views

Lidgren not starting server properly

I have a server set up for my game with Lidgren, and it works well when I have it set up on one machine, but if I try to run the server on another machine, I am unable to connect from other machines. ...
2
votes
2answers
103 views

XNA realistic water: How to clip along a mesh instead of a plane

I hope you can help me with the following problem: I'm developing a 3d game (in XNA) with an ocean. I want it to look semi-realistic. So far, I'm rendering 4 things: The ocean floor (terrain) on ...
0
votes
1answer
31 views

Rectangle Collision Not Correct

As you can see on the top corner it says COL: False/True. This is if the player bounds and the tiles which are solids. The rectangles for the tiles and players are checked if they intercept ...
2
votes
1answer
76 views

Change in direction should slow down object and accelerate in new heading

I'm trying to implement some sort of faux space physics in my 2D game. I have a top down view of my space ship. You can change direction and set a speed up to a maximum which then accelerates the ship ...
0
votes
0answers
31 views

xna multiplayer movement

So I have a tcp sockets network setup with the ability for clients to connect to the server. I'm currently trying to do movement. And iv discovers that tcp is terrible for sending out the x and y ...
3
votes
0answers
58 views

Are concurrent Update and Draw calls possible in XNA?

I am making a real-time game in XNA and I would like to reduce the Update() call frequency while getting as many Draw() calls as possible. This would enable the program to finish long calculations in ...
1
vote
1answer
37 views

Adding shadow and other effects on a spritefont Monogame

Is there a way that I can add shadow effect on text drawn in monogame? Because you cannot add shadow effect when creating a new spritefont file in Monogame Content Pipeline. Thanks.
0
votes
1answer
61 views

Monogame / XNA - Multple 2D Cameras (Rectangle) on screen

I recently started building a simple 2D roguelike game using Monogame 3.4. I was keen on building the game "engine" myself as I saw it as a fun learning curve. Monogame was pretty much the best option ...
1
vote
1answer
39 views

Rotation before scaling image/Lower resolution rotation? (XNA/C#)

Currently, when I rotate the image using SpriteBatch.Draw() the image is rotated after it is scaled. Resulting in: Which is using the code public override void Draw(GameTime gameTime) { ...
0
votes
0answers
33 views

Issues with 2D raycasting lighting under limitations of HLSL 3.0 pixel shader

I've been writing my own HLSL pixel shader for dynamic lighting using raycasting. Unfortunately, since I'm using this out of XNA, I can only use up to ps_3_0. As you can see, the limitations ...
0
votes
0answers
21 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
50 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
39 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 ...
2
votes
1answer
74 views

Problem with Rotation - C#/XNA

I have a projecile(Hook) and the tail of the projectile(yellow balls) TailProjectile class draws a ball at the exact position of the projectile(hook) and let it there until the projectile ends I'd ...
1
vote
0answers
31 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 ...
-3
votes
2answers
53 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
26 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 ...
0
votes
0answers
55 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
103 views

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

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
52 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 - ...
3
votes
1answer
100 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
55 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
89 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
44 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
195 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
62 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
76 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
102 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
64 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
79 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
1answer
53 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
59 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
48 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 ...