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

XNA4\ Monogame 3d Collision detection Help please

i have been trying to get 3d collision working for a while and i think(hope) you people can help me so for my project i have created a 'sprite3d' kinda class which is called ModelEntity and there ...
1
vote
1answer
30 views

Monogame / XNA - Is there a limit when drawing at far position (> 1 billion ? = strange behavior)

So I'm making an "unlimited" 2D Tile-Engine with procedural generation (simple noise based) in Monogame, and I'm loading/unloading Chunck by Chunck as you go along. It's working pretty well now. ...
0
votes
0answers
38 views

XNA - Efficient way to get pixel color from rendertarget2D

I'm stuck with a framerate perf down with getData from a rendertarget, what's your idea, what are the other options I can use ? I explain my problem : I'm making a board game, the objects or monsters ...
2
votes
0answers
37 views

Monogame Startup Memory Spike

I am currently porting a game from WP7 using XNA to WP8.1 using MonoGame. I have been putting considerable effort into optimizing my game to be under the 185MB memory limit for low-memory phones. I ...
1
vote
0answers
123 views

How should we begin to create our 2D Tower Defense? [closed]

Me and my friend are going to make a 2D Tower Defence game as our last assignment in highschool that has to be finished april/june next year. We both know a handy bit of Java and C# but our game is ...
2
votes
1answer
84 views

Reflections on moving water

I've been working on a simple game with semi-realistic water. I followed some tutorials to get: a flat water surface reflection and refraction (blended using fresnel term) ripples using a ...
0
votes
1answer
85 views

XNA 2D rotation Matrix offset/origin

I'm currently struggling with finding the offset for my original camera translation after I have applied a rotation for it. transform = Matrix.CreateScale(new Vector3(1, 0.75f, 1)) ...
0
votes
1answer
29 views

MonoGame - Left/Right Sided Collision Not Working

I'm working on a platformer as part of my course, the problem I have come across is Left/Right sided collision is not working very well. I already have bottom & top collision working. Here is an ...
0
votes
1answer
53 views

Monogame/XNA Making animations play once per click

I'm currently making a #gbjam entry and everything has been going smoothly up to this point. My issue being that I've implemented a shooting mechanic and along with it an animation to play as a shot ...
1
vote
1answer
21 views

Strange anomalies when using WinForms with XNA

I haven't seen any questions related to my issue, and this leads me to believe I'm missing something minor, however; The Problem I'm creating a game that is effectively launched from a windows form. ...
0
votes
1answer
45 views

Applying texture to a 3D object

I am trying to draw a 3D cube on the screen, using MonoGame. The cube was created in Blender and exported as an fbx file. The following is what the cube looks like in VS when opened in the editor: ...
0
votes
1answer
49 views

Background Scrolling like Zelda - A Link To The Past with XNA [duplicate]

i am trying to create a background that scrolls like the one in zelda - a link to the past. in other words: i have a bigger "screen" than the camera covers, so i need to scroll over it, when moving. ...
0
votes
1answer
32 views

Sound Effects on Monogame delay

I have recently added some Sound Effects to my game, but the problem that I am dealing with now, is that they have for a half of second delay, or more sometimes. Also, if I press repeatedly on that ...
1
vote
4answers
60 views

MonoGame/XNA 3D fbx model produces strange rendering output

The Problem: I have been making a model of a Steampunk-themed street light in Blender for use in my MonoGame/XNA Game. To test it I exported it to the *.fbx file format using the fbx export plugin ...
6
votes
2answers
189 views

Spaceship Shield Flare

I'm trying to implement a system whereby a "shield flare" will be shown whenever a projectile impacts the shield. The shield itself is one like in Star Wars, where it's more like a skin around the ...
0
votes
1answer
25 views

XNA Line to Rectangle Collision return first pixel

I have the following code: public static bool LineIntersectsRect(Point p1, Point p2, Rectangle r) { return LineIntersectsLine(p1, p2, new Point(r.X, r.Y), new Point(r.X + r.Width, ...
3
votes
2answers
200 views

How can I implement screen transitions like in the 2D Zelda games?

I want to implement a screen transition in the style of the 2D Legend of Zelda games (like this). That is, I'd the screen to remain static until the player moves to an exit, at which point the next ...
0
votes
0answers
25 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
1answer
30 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
222 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
66 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
75 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
123 views

Advice on how to store level design info? [closed]

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
51 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
44 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
31 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
42 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
30 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
18 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
14 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
44 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
32 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
30 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
114 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
32 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
2answers
105 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
32 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 ...
4
votes
1answer
76 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
44 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
66 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
2answers
48 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) { ...
1
vote
0answers
40 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
24 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
52 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
41 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
76 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
32 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
33 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
58 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 ...