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
0answers
29 views

(XNA) Pseudo-3D Buildings/Hills (like Road Rash)

So I was doing a pseudo-3d game in FNA (XNA) like roadrash or outrunners. The road is built from quads using 'UserIndexedPrimitives' and 'BasicEffect' which are calculated using pseudo-3d perspective ...
0
votes
0answers
44 views

C# Monogame/XNA: Workinging with positions on 2D tile-based game

Lately, I have started working on a simple MMORPG 2D tile based world (for learning purpose only). I started working on the server (networking, messages encoding/decoding and ect), and assumed 2 ...
0
votes
0answers
14 views

View matrix slightly translating my camera

I have made my own camera class in Xna (well, FNA, but same underlying framework). It contains a projection & view matrix. I calculate those matrices like this: ...
0
votes
0answers
30 views

Creating a weighted mesh from skeleton data

I am trying to wrap my head around animation, but I am having some problems. The lower body looks ok, but upper body is still very wrong. I think my problem is that I have introduced some scaling ...
2
votes
1answer
1k views

Drawing Shape in DebugView

As the title says, I need to draw a shape/polygon in Farseer using debugview. I have this piece of code which converts a Texture to polygon: ...
0
votes
1answer
42 views

how are the vertex properties of meshpart decided based on model format in xna

Exactly how the question says , how does the vertex properties like vertex stride and the data stored in the mesh part decided based on the format of a model and how would i determine that and then ...
5
votes
2answers
461 views

Collision detection problem in XNA4/Monogame

I have been trying to get 3D collision detection working for a while and I think (hope) you people can help me. For my project I have created a 'sprite3d' kinda class which is called ...
7
votes
1answer
668 views

Understanding how texCUBE works and writing cubemaps properly into a cube rendertarget

My goal is to create accurate reflections, sampled from a dynamic cubemap, for specific 3d objects (mostly lights) in XNA 4.0. To sample the cubemap I compute the 3d reflection vector in a classic ...
6
votes
1answer
271 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. ...
3
votes
1answer
259 views

C# XNA colliders, physics, inclined plane/terrain/colliders

Currently I'm working on a project to learn game programming. But I'm not sure if I have the right approach on several things, and that's what I'm here for. What I'm trying to create is a small world ...
0
votes
2answers
1k views

Monogame Drawing Text

I'm really new at XNA. I've been following some tutorials at gameprogrammingadventures.org but when it comes to conversations I don't really like how the author does it so I've been trying to ...
0
votes
1answer
25 views

Monogame - SpriteFont Exception: Text contains characters that cannot be resolved by this SpriteFont

I'm trying to put text on the screen and if I put anything but an empty string I get "Text contains characters that cannot be resolved by this SpriteFont.\nParameter name: text" ...
0
votes
2answers
623 views

How to render many tiles fast if zoomed out? (Monogame/xna)

I'm currently trying to optimize my tile engine. I used monogame with the spritebatch first, but that doesn’t works well. I have read many articles how I could optimize my rendering code. I moved ...
1
vote
2answers
136 views

How should I be loading a player's content and its bullets content later in the game

I'm trying out Monogame because my course has a simple game programming class in it which is just going over basics. The final project will be using Monogame so I've been getting ahead and making my ...
5
votes
1answer
153 views

transfer 3d model processing from Xna to Android?

I developed an XNA scenario in a desktop application and I need to make the same scenario in an Android app so I need to process data on the desktop computer and just display it in Android app using ...
0
votes
1answer
164 views

How to get tile rotation from TiledSharp and convert it to XNA/MonoGame

I am currently working on a game using XNA and Tiled. I use Tiled to create my maps and load them using TiledSharp. Some of my maps have tiles that are rotated by using one or more of the left rotate, ...
0
votes
2answers
282 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
2answers
317 views

Rotating sprite 180 deg

I should say first, that I have the rotation down. Its just that I want my square to rotate exactly 180 degrees. Currently, it will rotate but it will rotate but by less each jump. So after several ...
0
votes
2answers
96 views

Collision stickyness problem on multiple inputs

I've been trying for a couple of days to solve an issue I'm having with top-down 2D collisions, whenever I collide with tiles that have adjacent collidable tiles my player sticks to the wall, If I ...
5
votes
2answers
15k views

Rotate vector by matrix?

If I have a Vector, say (1,1), how can I rotate it around the origin (0,0)? I'm working in XNA if that helps.
2
votes
1answer
43 views

Frame-rate drops when drawing 2D map tiles

Update: I figured out it has nothing to do with the camera but instead framerate drops when drawing my map tiles onto the screen. Here’s a link to a video showcasing the bug in action (For further ...
0
votes
2answers
40 views

XNA Rotate Vector2 around Origin

I have a Rectangle and a Vector2 position, my sprite is being drawn at this position. The rectangle is meant to be a collision system with the cursor, when I rotate my sprite around the origin and ...
2
votes
2answers
58 views

Getting Rendered Sprite Size

I need the rendered dimensions of a sprite, I'm calling Draw in the class below: ...
2
votes
1answer
174 views

Should I store ads in the background or recreate them every time I need them?

I am developing an XNA game for Windows Phone 7 and 8. The game is level-based. After finishing each level a screen comes up with a bit of stats summary. I wish to embed an ad in this screen, on which ...
0
votes
0answers
20 views

How do I export an XNA crossplateform project to Nintendo 3ds or Nintendo Switch? [duplicate]

I would like to document my self a bit about 3ds and switch game creation. I know that modern game engine have builtin tools to export games to these platforms, but I could not find - in google ...
0
votes
1answer
57 views

How to check if a custom Control is focused?

So I am building custom UI for my MonoGame project. I've gotten pretty far already, having created Controls such as: Button Panel TextBox Form ComboBox CheckBox etc. All of these controls obviously ...
1
vote
1answer
118 views

How to add a animation to myPlayer

I'm currently making a shoot em up in monogame. I want to add just one animation to my object. No commands or transitions between animations for different actions: just an object swapping between ...
0
votes
1answer
42 views

Game() parametters Content and Window are not pre initialized

I've been experiencing a really Strange problem since recently, Every variables of XNA Framework Game class seems not to be initialized before my extending Game1 class. Variables does not seem to be ...
1
vote
1answer
1k views

Issue importing TileMaps/TileSets in Monogame.Extended 1.0

I've just started coding my first ever videogame using Monogame/Xna. I've reached a point where I would like to start editing maps and importing them into my game using the program Tiled. After ...
0
votes
0answers
51 views

Playing Video for Splash screens etc using Monogame

I've been searching around on internet a way to display a video using XNA/Monogame. But everything tend to go in the direction of the class Microsoft.XNA.Framework.Media.Video. Unfortunatly, my xna ...
0
votes
1answer
174 views

How can I do a Metroid like transition between two tilemaps with Monogame Extended?

I want to do a transition like those in the Metroid games. Here is an example of what i mean: https://www.youtube.com/watch?v=RKJ3MAi0ZI0. You enter the door, the screen fades to black and the camera ...
0
votes
1answer
171 views

Draw a texture2D at specific coordinates on another Texture2D

I have a ShipTexture and a Sail Texture. I need to draw the sail texture at a specific location on the shipTexture (call it the sailMountPoint) regardless of the location vector associated with the ...
0
votes
1answer
35 views

How to stop movement from moving multiple spaces when a directional key is pressed

I am making a 15 piece puzzle game and having difficulty making my sprite move one tile at a time, when i initially press the left key the sprite moves once, but after that the sprite moves multiple ...
0
votes
0answers
26 views

TextureImporter unexpected failure in Visual Studio 2019 Monogame 3.7.1

I'm trying to get XNA and Visual Studio working properly on my Windows 10 laptop. I'm getting a persistent bunch of 39 errors loading textures with Monogame. I've researched this on GitHub too, tried ...
0
votes
1answer
41 views

How to flip a rectangle

I'm curently working on a system that make the player character look towards the mouse pointer. My system is effective but i'm having an issue while displaying the rectangle. In the Following code i ...
0
votes
3answers
3k views

Why use textures that are Power of Two? [duplicate]

Possible Duplicate: Why are textures always square powers of two? What if they aren’t? I am using C# and XNA (also MonoGame for other platforms than Windows) to create a game in 2D. Ususally for ...
0
votes
1answer
47 views

Check if point is inside convex hull

I first tried with a simple axis aligned bounding box to test my algorithm (later shape will be different but always convex 6 faces), but even this case did not work, it always tells me that the point ...
32
votes
10answers
68k views

In Pong, how do you calculate the ball's direction when it bounces off the paddle?

I'm trying to wrap my head around this very Hello World-y problem in game development. I've created a TicTacToe game in XNA so I guess the next step would be a Breakout clone. Keep in mind that I ...
11
votes
5answers
3k views

Detecting “Any Button Press”

I'm trying to allow the player to press any button to continue from the main page. I was able to do this by making a List of Buttons and looping through these and checking for one of them being down; ...
0
votes
2answers
513 views

Calculate ticks for animation delay

Hi guys I am trying to calculate the correct elapsedTime for each frame in my animation. Example I have a sprite called stance that has 20 frames I want to give each frame a tick delay property that ...
0
votes
2answers
958 views

How to draw the elements that are in a Texture2D list in XNA

I have a Texture2D list called blockTexture that has 2 elements in it. I use the following line to draw the first element. ...
0
votes
1answer
357 views

XNA/Winforms - Nothing being drawn after calling SetRenderTarget(null)

I'm creating a basic scene/level editor using XNA/Winforms using the base classes from http://xbox.create.msdn.com/en-US/education/catalog/sample/winforms_series_1 Everything works fine and gets drawn ...
2
votes
1answer
98 views

Sprites looks blurried on fullscreen

I'm trying to make a pixel art game and my resolution is 384 x 224, but when I change to fullscreen the sprites looks blurry and I don't know how I can disable bilinear filtering. I tried ...
1
vote
1answer
120 views

Monogame/XNA - How do you resize a Texture2D and then scale it?

Problem: It seems like the Draw() call allows us to use either Destination Rectangle for resizing (5of8) or Scale (6of8/7of8) but not both. Purpose: I would like to resize a button from 567x634 to ...
4
votes
3answers
2k views

Textureing subdivided Icosahedron in XNA, seam problem

*****Look below for the updated source code*** I have started to to make some different types of objects and create them by code in XNA. Right now I have finished the code for creating a Icosahedron. ...
0
votes
0answers
59 views

Sprite Distortion (Ghosting While Moving and Artifacts when Mirroring to External Display)

I am working on my first MonoGame project. I love the framework so far! I have implemented my own letterbox/pillarboxing to scale my native resolution by the maximum integer scale allowable on my ...
1
vote
1answer
166 views

XNA 4.0 How to combine triangles vertices 3D

Preview for the problem: I'm making a similar game to Minecraft (a game that it's world is made by cubes), but the fps of the game is getting low only by rendering a little amount of cubes in the ...
0
votes
0answers
35 views

HLSL Xna Deferred light issue

My point lights seem to have problems when the camera is far away… is it the depth map? Anyway i'll show you the code Here is my GBUffer fx : ...
0
votes
0answers
56 views

1
2 3 4 5
62