Questions tagged [xna-4.0]

XNA Game Studio 4.0 is a programming environment that allows you to use Visual Studio to create games for Windows Phone, the Xbox 360 console, and Windows-based computers.

Filter by
Sorted by
Tagged with
0 votes
0 answers
90 views

XNA games C# application executable work on one win7 not the other one

Our company wrote a game in XNA studio 4 almost ten years ago. we try to reinstall it in win7 with only the executable. Both installed XNA Game Studio 4.0. Below is the environments parameter I can ...
sandy's user avatar
  • 1
0 votes
1 answer
738 views

MonoGame/Xna gamepad inputs and joystick

I've been around xna game development since very recently, and I'm actually developing a sort of Library for my games. But then I want to make an enemy with default Player settings for keys layouts ...
Louis BERTRAND's user avatar
1 vote
1 answer
2k views

Handling input from an ECS input system into actions in another system/actions on a entity?

Some background on my engine, each system stores a reference to an entity which has the relevant components for that system. For example movement system has only entities which possess position ...
Yrrah98's user avatar
  • 13
0 votes
3 answers
617 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 ...
vK31RON's user avatar
2 votes
1 answer
478 views

How do you write Texture2DContent and read it as Texture2D in the XNA content pipeline?

I'm trying to create a custom Monogame content pipeline extension that packs a bunch of individual sprites into a single sprite. I need help figuring out how to write and read the texture in the ...
Scott Lin's user avatar
  • 131
1 vote
2 answers
81 views

XNA: Classes with Texture2D to be treated as one

Summarised Problem: I have an Animation class that I want to be able to treat as a Texture2D field when need be. I do not ...
sfbea's user avatar
  • 13
0 votes
0 answers
623 views

XNA 4.0 C# How to draw cube with the index method

EDIT NOTE: I was trying to impliment indexing to my code instead of instancing. I left the indexing method because in my case, I don't need to use it. Preview Untill now I have drawed my cube with ...
Omer Eli's user avatar
1 vote
1 answer
318 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 ...
Omer Eli's user avatar
0 votes
1 answer
305 views

XNA 4.0 How to change GraphicsDevice Default DepthStencilState Value

I want to change one of the deafult values of my GraphicsDevice to that: GraphicsDevice.DepthStencilState.DepthBufferEnable = true; But I know only to change it ...
Omer Eli's user avatar
-2 votes
1 answer
284 views

What is a Linker Map Address ()

I need to know how to execute a linker map address and use a draw method in xna 4.0 to for example in c# My subfolder has this in it textures models sounds ui scripts shaders linker map address <...
John Nay's user avatar
0 votes
1 answer
154 views

Monogame Effect World Translation Z and alpha in objects not visible behind

I have an effect in each triangle and rectangle: In the triangle class I have: ...
Juan Pablo Garcia Coello's user avatar
0 votes
1 answer
395 views

Xna Spritefont from installed fonts

I am using Spritefont in my game and I have downloaded a .ttf font and installed it on my machine. I am now using this font in my game. My question is if this game is run on another machine will the ....
Michael Grinnell's user avatar
0 votes
1 answer
335 views

Reading a text file and changing each digit into a value inside an array c#

I'm having a bit of an ordeal with the StreamReader. I'm working on a game where you build the map with a 2D array by imputing different numbers so the array like this: ...
Pavvel's user avatar
  • 29
1 vote
2 answers
328 views

When drawing text, numbers appear as D1 or NumPad1 rather than just numbers

Been writing a class for a main menu, there's a play button and when pressed it goes to a window that asks for coordinates, sadly when writing with the keys and using the numbers the output is either ...
Pavvel's user avatar
  • 29
1 vote
0 answers
101 views

XNA Displaying/Drawing from a text file [closed]

I wrote this code in the Load Content of XNA 4.0 for reading the star map, after actually adding it to my content, and I have no idea how to write/draw it onto my application, any suggestions? ...
Pavvel's user avatar
  • 29
0 votes
1 answer
43 views

Getting a sampler of the default rendertarget (null)

I've been working on a mod for "Duck Game" that adds dark levels like in Spelunky. I read this guide on how to make shaders, but in my case I don't have access to the draw method and since the game ...
eim64's user avatar
  • 1
1 vote
0 answers
57 views

XNA Further faces are shown through closer faces

I'm trying to draw a 'axis' model named 'XYZ'. The problem is that it is rendered wrong (screenshot below). You can see that the blue face can be seen through the red face. The black, green and red ...
NicusorN5's user avatar
1 vote
0 answers
27 views

XNA game for Xbox360

I learn XNA 4 and made a simple game for Windows. Now i want to run it on Xbox360. I choose "Create Copy of Project for Xbox360" and build it. After that i have in bin folder two files with extensions ...
denny7794's user avatar
  • 111
0 votes
1 answer
214 views

Vector for bullet direction XNA C#

im creating a platform shooter. the gun can be rotated using the thumbsticks. i want to use a line of fire newBullet.bulletVel variable as a Vector 2. this variable ...
Lonchenzo's user avatar
0 votes
1 answer
455 views

understanding image rotation XNA C#

I do not understand how the rotation of the image i have works. Is it something to do with the ThumbSticks on the Xbox Pad? or properties of a float? if someone could explain to me what is actually ...
Lonchenzo's user avatar
0 votes
1 answer
710 views

TileMap collision detection

I'm currently working on a project in XNA and I'm trying to implement collision detection but can't wrap my head around how exactly i'm going to do it. I'm using the Tiled application to create my ...
Michael Bell's user avatar
0 votes
1 answer
72 views

Crouching Up and Down XNA C# Controller

The game is a 2D platformer. The problem I have is when I press the B button to crouch from standing, I do not know how to implement a function where B can be pressed again to move back to the ...
Lonchenzo's user avatar
0 votes
1 answer
3k views

2D collision detection for a block game

Background Knowledge: The player can be freely transformed around the screen but each block is locked to a grid. This grid is 16x16 pixels and the players bounding box is 20x44 pixels. The blocks are ...
Isaac Skelton's user avatar
1 vote
0 answers
103 views

Pixel-perfect collision appear to have random behaviour

So I was sitting with my programming teacher with this issue for about two hours and we couldn't figure out anything specific that could possibly be the issue. Therefore I'm taking some measures and I'...
A. Ben's user avatar
  • 53
1 vote
1 answer
338 views

Why do I get this error when converting an XNA .fx to a MonoGame .fx?

I am learning game development in Monogame via book for XNA 4.0. In the code below which is for drawing the terrain, I get the error in the comment. Im using an effect from Monogame content pipeline ...
Yohai Pouny 's user avatar
1 vote
1 answer
114 views

Using a Windows forms Textbox control in an XNA game

What I want to do is this: Use a standard Textbox control in an XNA game. This will be the only control used, and the game is designed in xna alone. I (for some reason) cannot get the game to "see" ...
J. Price's user avatar
4 votes
1 answer
1k views

XNA / MonoGame - render transparent background using stencil buffer problem (3d)

I'm trying to render 3d texture quads with the following properties: With lighting (rule out "AlphaTestEffect"). Transparent background (no opacity levels, just binary opaque or transparent). No ...
Ronen Ness's user avatar
2 votes
2 answers
70 views

How to force XNA to render model very far away as a light dot?

Making a space strategy game focusing on commanding a large fleet, with 1000+ ships per side.(I'm new in XNA 3D...below is a test screenshot. The ships will be scaled down another 2-5 times) When a ...
That Frank Guy's user avatar
1 vote
2 answers
210 views

How Should I Go About Updating My XNA Game?

So, I've created an XNA game, but I'm not selling it... it's just a private game to give away to my friends, more of a practice project. But say I find a bug, or think of a new feature... I don't ...
Daniel G's user avatar
  • 111
1 vote
0 answers
153 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 ...
Lord Wolfram's user avatar
1 vote
1 answer
885 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 ...
Giora Guttsait's user avatar
1 vote
0 answers
171 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 '...
Michael Astwood's user avatar
0 votes
2 answers
420 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 ...
Gman0064's user avatar
1 vote
1 answer
166 views

How can i show all edges in monogame?

I am using Monogame 3.5 and i have simple model of cube. I use BasicEffect to draw it. I want it transparent so i use ...
user84284's user avatar
2 votes
1 answer
708 views

Having trouble creating multiple sprites from one class

So I am trying to make more than one sprite using a single class but I cannot seem to get the sprites to be drawn at all or drawn in different places (they are all just on top of one another). In my ...
TeaBelliedTich's user avatar
0 votes
1 answer
563 views

Exception whilst doing a full screen negative colors effect

I'm trying to solve a bug I have in my XNA game. I have an Effect that I want to apply on the screen when I activate an Item. Currently, I have this weird bug where it throws an exception in the ...
Giora Guttsait's user avatar
-1 votes
1 answer
76 views

Game State being skipped

One of my game states is being skipped (pressing space goes straight to the 'GameScreen' game state skipping the 'CharSelect' state). All help is appreciated. ...
TeaBelliedTich's user avatar
1 vote
1 answer
806 views

How do I make 2 players from one Class?

I am teaching myself XNA and only started a few days ago. I am making a clone of Pong and have made a class for the Paddle: I am wondering how I can create 2 paddles one for each player from the one ...
TeaBelliedTich's user avatar
0 votes
1 answer
470 views

How to draw a sprite at a floating point xy coordinate with interlaced drawing?

I have a 2D game made in MonoGame (XNA 4.0 framework). Here's what I want to do: draw a 2d image at a floating point xy coordinate such as 125.5, 300.12 (and do NOT round them to an int). the image ...
DrZ214's user avatar
  • 338
1 vote
3 answers
6k views

How to restart the game when pressed enter in XNA

If the following code allows the game to exit when pressed esc .. ...
hTeeML's user avatar
  • 43
2 votes
1 answer
742 views

How to link the game class to the main menu class in XNA?

So I got my game in another class and my main menu in another class. This is the update method in my Main menu class ...
hTeeML's user avatar
  • 43
0 votes
1 answer
597 views

Updating score in collision detection game in XNA

I created a collision detection game in XNA but I have a problem with the scoring. As online tutorials says, I initialised it score = 0; This is in the update ...
hTeeML's user avatar
  • 43
0 votes
2 answers
1k 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. ...
hTeeML's user avatar
  • 43
2 votes
1 answer
265 views

Creating or saving model (.fbx or .stl) file in XNA

I have drawn a 3-D Sphere in XNA with the help of vertices (without fbx file). Now I want create a .fbx file or .stl file of this 3D sphere from XNA, is there any way to do this? or how can I save ...
uncle_scrooge's user avatar
0 votes
1 answer
258 views

XNA Platformer - Where should tile collision handling be?

I've started using XNA and am working on a simple 2D platformer (single level). However, I am stuck as to where the collision detection should be handled. Here is my current project structure: The ...
Kendall's user avatar
  • 107
7 votes
2 answers
332 views

Adjust Aim Angle for Motion with Accelerating Bullet

So, here's my problem: I have a turret attached to a ship that moves at a variable speed through my game world, shooting at the centre of another ship travelling through the game world in a possibly ...
Jack's user avatar
  • 299
2 votes
4 answers
405 views

Wall-Sliding, Stuck at Corners

I am having trouble with my 2-D wall-sliding. Namely, when the player avatar collides with the wall, it "snaps" to the corner (see screenshot, below) and sticks there. The red, transparent rectangle ...
Ravenscar's user avatar
  • 173
0 votes
2 answers
221 views

WP 8.1 XNA custom game loop (render when dirty?)

I need to know whether it's possible to create a XNA game for Windows Phone 8.1 (which I've already) using monogame with a custom game loop. OpenGL ES has this possibility (GL_RENDERMODE_WHENDIRTY or ...
Ahmet Zambak's user avatar
1 vote
1 answer
87 views

add random walls with an array in 3D xna 4

I'm trying to add walls to my 3D game. I created a wall entity and added model array ...
Dusty's user avatar
  • 111
2 votes
1 answer
1k views

Creating a Static function inside my class to handle small housekeeping tasks

I have used Unity 3D for quite some time, and a lot of my game programming experience originates from using UnityEngine. Writing in XNA, I am setting up a nested list of objects. Each object will be ...
Gnemlock's user avatar
  • 5,243

1
2 3 4 5
14