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.
-1
votes
2answers
49 views
Trying to reduce health by a certain value once XNA
I've got a bullet and collision data for the bullet, when the bullet collides, it's supposed to cut an integer off of the max health for the object.
Basically heres what I want:
Object is shot, ...
-1
votes
0answers
47 views
How to move a bullet from the player to the cursor? XNA
I have a bullet that currently works in my game, but with some odd issues.
I'm making a top down shooter and I want the bullet to move from a point on the players location (from the guns muzzle ...
-2
votes
0answers
28 views
xna 2d tank game [closed]
I need help. I am making game with terrain. I have 2 questions :
I don't have any idea to make that 2d tank.. Should I use some
animated sprite or what? I want to make my tank animated ...
0
votes
1answer
46 views
Why spritebatch.Draw shows blank output? [closed]
In my code below, I think it's correctly done. But idk, the image called by _bg is does not shown up. The screen only show White. Weirdly, there is 0 error message when I run it.
(The RenderTarget2D ...
0
votes
1answer
41 views
XNA Camera Positioning All Wrong
I've been working in 3DSMax for years now and decided to give XNA 4.0 a try. I've got the majority of it working, however the camera is being a pain to me and I can't discern what's gone wrong. I ...
-2
votes
0answers
92 views
Why are my game snapshots sometimes all black? [closed]
I want to take snapshot of the game when the user right-clicks. This code works, but sometimes the snapshot is nothing but an image with all black pixels.
snapshot = new ...
2
votes
1answer
68 views
Issues upscaling pixel art with SampleState.PointClamp
I'm developing a 2D game, and I'm striving to create a nice blocky low-res appearance for the game, yet allow it to be played at variable resolutions. So, I've researched resolution independency and ...
0
votes
1answer
74 views
Are there any guidelines/articles/tutorials for creating a network protocol for games? [closed]
I am currently developing a little 2D sandbox game with multiplayer functionality in XNA 4.0 and the latest lidgren-lib for networking.
I found myself quickly at a point where sending a players ...
-2
votes
1answer
32 views
XNA rendertarget sprite batch problem [closed]
When using this code:
public static Texture2D ShowHealthBar(SpriteBatch spriteBatch,Texture2D empty, Texture2D full, float health)
{
spriteBatch.Begin();
RenderTarget2D ...
-4
votes
0answers
18 views
Drawn elements are disappearing [closed]
I have such issue:
I'm writing a snake game. This error comes, when food is disappearing. When it happens, and snake is trying to eat it, parts of my snake between the neck and tail are disappearing. ...
-1
votes
1answer
59 views
Animation from bones?
I have a model loaded into my XNA project, it has bones that were created in 3DS Max and I am wondering can I animate my model using code?
All I will be doing is basic movements such as an arm swing.
...
0
votes
1answer
39 views
Strange Per-Pixel Collision in XNA
I'm having a very strange problem where the bounding box for one of my objects in my game isn't exactly over the texture, this results in the collision being reported somewhere else. Its not really ...
1
vote
1answer
42 views
XNA texture overlay with offset
Is it possible to overlay one texture over another and make them into a new texture? It should also work with an offset.
Here's an example:
This texture
and this texture
should make this ...
0
votes
1answer
59 views
Texture not carrying over to game correctly?
I have created my map for my game using 3DS Max. I have then applied textures to the map within 3DS Max, where the textures all show correctly. I export the map as a .fbx file to use within an XNA ...
1
vote
2answers
84 views
XNA texture GetData exception
When using this code:
public static Texture2D MakeTexRed(Texture2D tex)
{
Texture2D drawTex = new Texture2D(Game1.graphics.GraphicsDevice, tex.Width, tex.Height);
Color[] data = ...