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.

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. XNA Game Studio includes the XNA Framework, which is a set of managed libraries designed for game development based on Microsoft .NET Framework 2.0. This documentation collection contains technology overviews, tutorials, and reference material related to XNA Game Studio.

http://msdn.microsoft.com/en-us/library/bb200104.aspx

687 questions
6
votes
2 answers

Sloped tiles in Platformer

I'm extreme new to game development and this is my second project. I’m working on a platform game that expands on the Platformer example provided at the app hub, so far I’ve got parallax scrolling (horizontal and vertical), moving platforms, tight…
Nexus1216
  • 81
  • 1
  • 4
6
votes
2 answers

How does one specify raster operations in XNA?

I'm looking for a way to add a sprite using a particular logic operation (like XOR). I can't find anything on Google and I'm not sure where to look in the documentation. I've looked into SpriteBatch.Begin(...) and its Draw method and several options…
Corey Ogburn
  • 1,135
  • 1
  • 10
  • 21
4
votes
3 answers

XNA VertexBuffer.SetData performance suggestions

I have a 3d world in a grid layout where each grid cell contains its separate vertex and index buffer for the mesh/terrain of that cell. When the player moves outside the boundaries of his cell, i dynamically load more cells in his walking direction…
CodeSpeaker
  • 161
  • 6
3
votes
1 answer

How to use elapsed game time for timing

I want that my ship shoots beam after every 2 seconds. How do I make that happen? and also I want that after 50 shots I want to give 10 seconds to reload the gun. I know both of my problems can be solved by gameTime.ElapsedGameTime but how should I…
Hussain Murtaza
  • 307
  • 2
  • 3
  • 6
3
votes
2 answers

Using 2D sprites and 3D models together

I have gone through a few posts that talks about changing the GraphicsDevice.BlendState and GraphicsDevice.DepthStencilState (SpriteBatch & Render states). . however even after changing the states .. i cant see my 3D model on the screen.. I see the…
Sweta Dwivedi
  • 299
  • 1
  • 17
3
votes
3 answers

How to make multiple levels game in XNA game studio 4.0?

I am doing 2D game using XNA framework 4.0. I'd like the game to have multiple levels. Where do I store the levels and how do I implement a scoring system for the game? Can I use XML for storing data for that levels and scores? Finally, is there any…
Manasi K
  • 31
  • 1
  • 2
3
votes
2 answers

Cutting out smaller rectangles from a larger rectangle

The world is initially a rectangle. The player can move on the world border and then "cut" the world via orthogonal paths (not oblique). When the player reaches the border again I have a list of path segments they just made. I'm trying to calculate…
Mauro Destro
  • 131
  • 3
3
votes
1 answer

How to resize an image loaded using ContentManager in XNA

I am new to XNA programming and I loaded the background image using ContentManager as a Texture2D object. The background image which I have is of size 480*320. I have kept the minimum game window size as 640*480. My question is how would i resize…
Gamer
  • 85
  • 1
  • 7
2
votes
1 answer

What size window should i use for making an Xbox 360 game in XNA

I have a basic understanding of XNA 4.0 and i want to create an xbox game. What size window should i use? should i use the 16:9 aspect ratio then put it in full screen?
Battle_Pasture
  • 601
  • 8
  • 19
2
votes
2 answers

Load Texture From Image Content In Runtime

Basically I wrote a world editor for a game I'm working on. Looking ahead, I was brainstorming ways to save the created world including the tile-sets (this game will rely on a tile engine). I was hoping to save the image data of each tile-set in the…
2
votes
1 answer

How to get file paths in XNA 4.0?

Is it possible to use OpenFileDialog in XNA 4.0 to get the file path? If not, what is the alternative? I'm using XNA 4.0 to create a graphic display (not a game) and I have a file that contains informations on how and what to draw on screen. The…
NDraskovic
  • 347
  • 4
  • 18
2
votes
1 answer

How do I draw thick lines in XNA 4.0?

I can draw some curves using this: GraphicsDevice.DrawUserPrimitives (PrimitiveType.LineStrip, Points, 0, count); Now I try to set the PointSize to make the line thicker but I can only find a solution for XNA 3.0…
tinu
  • 123
  • 1
  • 5
2
votes
1 answer

XNA 2D - How can I draw a sprite over another?

I'm working on a simple 2D game that is similar to the classic Invader arcade. What I want to know is: How can I draw a new sprite over the player sprite upon colliding with an enemy/a bullet? Better yet, how can I hide the player so that the hit…
Tommy
  • 21
  • 1
  • 2
2
votes
2 answers

XNA 2D - How to switch to a new sprite upon collision and delete itself

Let's say I have a 2D spaceship that shoots at moving rocks. If a bullet intersects one of the rocks' bounding boxes, that rock will animate according to a new spritesheet and remove itself. My question is this: How can I load the new animated rock…
Tomy
  • 21
  • 2
2
votes
1 answer

2D layerDepth not working XNA 4.0

I'm struggling with getting the depth layer to work properly. No matter what I do, the line is drawn over the top of the circle texture. public void Draw(SpriteBatch spriteBatch) { spriteBatch.Begin( …
Ben
  • 23
  • 1
  • 3
1
2 3