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.
0
votes
1answer
139 views
How to prevent the player from clicking too fast [closed]
I'm having trouble with some bullets in my game, the M1911, which is supposed to be semi-auto is only capable of shooting one projectile per mouse click (trying to learn how to do multiple ones at ...
0
votes
2answers
160 views
How to create Button/Switch-Like Tile where you can step on it and change its value?
If the player steps on a Button-Tile when its true, it becomes false. If the player steps on a Button-Tile when it is false, it becomes true.
The problem is, when the player stands on (intersects) ...
-1
votes
2answers
83 views
Trying to reduce health by a certain value once XNA [closed]
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, ...
2
votes
3answers
414 views
MonoGame and normal windowed desktop application
I am trying to move all my XNA projects to Monogame. But in project templates I found only XAML and horrible metro application template. Is MonoGame support creating application in good old windowed ...
0
votes
1answer
70 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
65 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 ...
1
vote
2answers
164 views
Applying Angular Acceleration in a Basic Physics Model
I'm attempting to use a basic physics system to create an arcade flight model. So far I have managed to get the aircraft moving forward, apply gravity, etc. However, after trying to implement torque I ...
2
votes
1answer
101 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
99 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
50 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 ...
-1
votes
1answer
67 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.
...
1
vote
2answers
221 views
Weird behavior with XNA SpriteBatch.Draw origin
I have a texture with 256x256 pixels.
Consider this piece of code:
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
...
1
vote
1answer
60 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 ...
1
vote
2answers
110 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 = ...
0
votes
1answer
70 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 ...
0
votes
1answer
70 views
XNA 4 VertexPositionTexture triangleStrip sporadically disappearing [closed]
I am drawing a traingleStrip using VertexPositionTexture and BasicEffect that extends from the first person perspective of the screen out a certain distance on the Z axis. In a loop I pass start and ...
0
votes
2answers
48 views
XNA model texture maps [closed]
Is it possible to make a texture maps for XNA .fbx models? Just one texture file for the whole model.
0
votes
2answers
106 views
XNA change a specific color of a model to another
Is it possible to change a specific color of a model to another?
Example:
Everything that's blue should be red or something like that.
And is it possible to do this without the use of effects? I ...
-1
votes
1answer
115 views
Is there any physics engine for XNA? [closed]
I am an XNA game developer. I am now starting to develop physics games on XNA but the problem is that I don't know about any physics engine desinged for XNA. Please if you know about it kindly help ...
3
votes
1answer
133 views
Reading text files XNA 4.0 on Xbox 360
I'm working on porting a game from PC to Xbox 360.
When I want to create a level I read a .txt file that I store in my content
I read the whole file as a string using this method
...
3
votes
1answer
129 views
'perfect' platformer base Xna
When a player touches a ground peice in a game, he seems to sink through the ground then slowly rise back up, and when he has risen back up, he is very jittery.
if (touchingTheGround())
{
...
2
votes
1answer
1k views
XNA + Windows Forms: How make them work together without making the trick of the custom GraphicsDeviceControl?
What I've found is a solution where you have to code a custom GraphicsDeviceControl to put inside the form (the well known tutorial from the APPHub), but that's not what I'm searching for.
I would ...
9
votes
1answer
285 views
How do I prevent XNA from pausing Updates while the window is being resized/moved?
XNA stops calling Update and Draw while the game window is being resized or moved.
Why? Is there a way to prevent this behaviour?
(It causes my network code to desynchronise, because network ...
1
vote
1answer
109 views
XNA effect lighting like basic effect lighting
Is it possible to make lighting in a normal effect work like the lighting in the basic effect?
With a basic effect it's really easy:
BasicEffect effect;
effect.EnableDefaultLighting();
-2
votes
3answers
149 views
Can I use a list to spawn enemies? [closed]
I need to have about 10 enemies in my game, can I use a list to spawn them all in?
This is what I was working on but it only spawns 1 enemy in the coordinates of the last added to the list.
Here are ...
0
votes
2answers
160 views
3d to 2d Collision
I have a 3d model which rotates around my screen, it's always on the Z axis = 0 where everything of my 2d images are. My 2d images fly out of the center and get bigger to give the view as getting ...
0
votes
1answer
49 views
Distorted edges in model rendering xna
The edges of my model are not rendered smooth in xna. See here. What can i do for this, as when designer renders the same model in maya, edges are smooth. And is it possible to render models in xna ...
0
votes
0answers
67 views
Why would rotating the camera effect my pick ray?
So i'm trying to get terrain picking going.
I set up my ray, and I can pick out models, or sprites, whatever I want, no problem.
But when I try and get my 3D coords based off terrain collision it ...
-1
votes
2answers
1k views
C# XNA Handle mouse events?
I'm making a 2D game engine called Clixel over on GitHub. The problem I have relates to two classes, ClxMouse and ClxButton. In it I have a mouse class - the code for that can be viewed here.
...
2
votes
1answer
153 views
XNA 4.0, FBX and Texture Loading Failures
I've been going through several tutorials on how to use XNA and understand a lot thus far. I've got a screen, I've got 2D sprites working, got a shader system operational, so far so good. Now I've ...
-1
votes
1answer
87 views
XNA Framework doesn't recognise controller [closed]
So just a little bit of XNA code:
if (this.IsActive && (Keyboard.GetState().GetPressedKeys().Length > 0 || Mouse.GetState().LeftButton == ButtonState.Pressed || ...
0
votes
0answers
96 views
Xna problem drawing tIDE map
So i was trying to add tIDE to my project but i hit a Keyntfoundexception
map.Draw(mapDisplayDevice, viewport);
Any help would be usefull here is the rest of the class:
using System;
using ...
1
vote
1answer
59 views
XNA draw model partially
Is it possible to draw a model partially (along the X, Y or Z axis) to make an extending barrier or something like that? (Scaling doesn't work because of the textures)
2
votes
2answers
138 views
Collision detection against large arbitrarily shaped textures
What is the most effecient way to do collision detection on strangely shaped textures in XNA? Here is an example texture:
As you can see, it is far from a perfect square. I want the player to ...
0
votes
2answers
594 views
XNA Health Bar continually decreasing
As per the Health bar tutorial on ... http://www.xnadevelopment.com/tutorials/notsohealthy/NotSoHealthy.shtml
I have set up the above, how do I make it decrease by 1 health per second?
I want to ...
-2
votes
1answer
121 views
Does this UV mapping method look ok? [closed]
i'm having a spot of trouble trying to get my voxels textures in the right place.
I am using a very simple mechanism that assumes all sides of any given block are always individually specified (i'll ...
2
votes
2answers
168 views
World space and model space the dummies version [closed]
I'm by no means a 3d programmer but have recently taken it upon myself to build a Voxel based game and I'm having a little trouble understanding some of the concepts around matrices (what with my ...
0
votes
0answers
66 views
What is an efficient/safe way to broker head to head communication for a mobile game
I have a mobile game written in XNA/MonoGame with a wcf server and I am currently designing the head to head competition mode. Previously I have created a game that used UDP to set up communication ...
4
votes
0answers
101 views
Should the networking of my game be a component or a service?
I am working on a windows game and I am trying to understand the XNA GameComponents and GameServices classes and use. From what I understand about a component is that it has an Update method that ...
0
votes
1answer
153 views
Is a HashTable the best way to store replay data in C#?
I'm looking to make a deterministic replay in my 2D game. I want to follow a similar approach to braid in storing the relevant information every frame (at 60 frames per second).
I wanted to know what ...
0
votes
1answer
60 views
A view and projection matrix oddity?
I have a bit of a dilemma ...
So i setup my scene how I want it with some bits in it and now I want to move all my camera related code in to a camera class however doing so is proving to be a pain in ...
-2
votes
1answer
120 views
Extension method must be defined in a non-generic static class when adding static bool function [closed]
I try to use first answer of Checking for alternate keys with XNA IsKeyDown but the compiler shows me Extension method must be defined in a non-generic static class. How can I fix this issue?
1
vote
0answers
135 views
Shaders Working in XNA but not Monogame Win8
Hey so I'm bringing a shader over from XNA to Win8. To test things I'm using josack's tutorial on pixel shaders:
http://blog.josack.com/2011/07/xna-2d-dynamic-lighting.html
I've got it running in my ...
30
votes
7answers
10k views
How'd they do it: Millions of tiles in Terraria
I've been working up a game engine similar to Terraria, mostly as a challenge, and while I've figured out most of it, I can't really seem to wrap my head around how they handle the millions of ...
1
vote
2answers
258 views
How do I stop XNA/Visual Studio from rebuilding my content project every time I build?
My group and I are working on a game in XNA 4.0 with Visual Studio 2010/2012. The main solution has 6 projects: 2 XNA game projects (1 executable/ 1 class library), 1 WPF executable for the level ...
-2
votes
1answer
117 views
Collision detection between player camera and a 3D model doesn't work [closed]
For some reason I can't get the collision right. My player/camera goes through the model, which is not what I wanted.
I just want to apply collision detection to the only model and prevent ...
-2
votes
1answer
190 views
Moving A Sprite In The Direction Its Facing XNA [duplicate]
There are many questions on this site that explain this except they seem to all be in Java.
I want to move a sprite in the direction it's facing, in XNA. I know you must use Radians and lots of ...
1
vote
0answers
222 views
XNA - How to move skinned model and merge animations
After you helped me to resolve my loadContent problem I've wrote some code and made 3D model with animation. Because XNA 4.0 doesn't support .fbx with multiple animations I've generated 3 models with ...
0
votes
2answers
96 views
Returning The Position Of A Sprite Drawn & Updated By A List [closed]
My problem is this, when iceBoy hits any of the newGrounds in the ground.groundAmmount list, it will return the specific position of this newGround so that i can set iceBoy's position based on the ...
0
votes
1answer
83 views
Receiving server data inside game loop
I'm planning on how my multiplayer game client game loop should work. While I'm convinced that server should be moved from game loop into it's own thread, I'm not sure what should I do about receiving ...



