How Do I Get Started With XNA? Microsoft's App Hub site provides access to the XNA SDK, tools, samples and educational resources. Shawn Hargreaves' Blog provides details on the inner workings and advanced features of XNA. Supported Platforms for Game Development: Windows XBox Windows Phone 7 ...
3
votes
1answer
68 views
Character jumping movement in isometric tile
When I want to draw my character moving from one tile to another, I would find the displacement vector between two tile's drawing offset and let the character walk in a linear line toward that ...
2
votes
1answer
49 views
Client Server UDP Jumping
I don't really think this is an issue with the fact that UDP can drop packets (I'm using Lidgren and using ReliableInOrder), but basically, in my game, the client send the input keys (if forward is ...
1
vote
4answers
71 views
GameplayScreen does not contain a definition for GraphicsDevice
Long story short: I'm trying to intergrate my game with Microsoft's Game State Management. In doing so I've run into some errors, and the latest one is in the title. I'm not able to display my HUD for ...
5
votes
1answer
88 views
Distribute XNA as a standalone zip or exe (no installer needed)?
I want to know how would I distribute my XNA such that it won't distribute as an installer/setup files? I just want a zip of files such that when the user can run instantly after extracting into a ...
0
votes
1answer
61 views
GameStateManagement and inputs not being recognized
EDIT: I've removed a bit of code from the input class to make this more readable, and updated my StartScreen class, which is now at the bottom. I have the same issues though, but they are explained in ...
1
vote
0answers
52 views
XNA: Networking gone totally out of sync
I'm creating a multiplayer interface for a game in 2D some of my friends made, and I'm stuck with a huge latency or sync problem.
I started by adapting my game to the msdn xna network tutorial and ...
2
votes
1answer
38 views
Can you store negative numbers with XNA HLSL?
I am trying to make a ripple effect with a HLSL shader, it works so far but I need to output negative numbers and that won't work for the calculations. Is there some way to do this with the ...
0
votes
1answer
43 views
XNA:Rectangles Movement Behavior
im trying to create simple pong game, and learning some XNA.
im creating for each paddle 3 rectangles, who represnt the collision when the ball hit them, so i can dicide where to throw the ball back.
...
0
votes
1answer
40 views
XNA: weird effect by matrixTransform of spriteBatch on isometric tile
I wrote a Camera class that contains Matrix (for zooming and moving around). When I zoomed it with any zoom scale other than 1, some isometric grids becomes visible on each of my isometric tile.
...
0
votes
0answers
28 views
How can I stop my Jitter physics meshes being offset?
I'm developing a C# game engine and have hit a snag trying to add physics. I'm using XNA for graphics and Jitter for physics. I am trying to split the XNA model into it's meshes, then create a ...
2
votes
2answers
87 views
How can I make my program get a username?
I am making a program that I want to load music from library/music on any computer.
To do this I use Music.FromUri().
However, I need the username from the current computer in order for the filepath ...
1
vote
0answers
94 views
Having troubles with LibNoise.XNA and generating tileable maps
Following up on my previous post, I found a wonderful port of LibNoise for XNA. I've been working with it for about 8 hours straight and I'm tearing my hair out - I just can not get maps to tile, I ...
1
vote
1answer
88 views
XNA - Drawing zoomed 2D sprites
I have a tile based game. Each tile texture is loaded and then I draw each one next to the other, forming a continuous background. I actually followed this tutorial for the xml files.
...
0
votes
0answers
33 views
Is there a way to determine the fill rate I'm pushing in a WP7 XNA game?
I am writing a game that is targetting WP7 XNA, and I would like to know what sort of fill rate I am pushing at the moment. Is there any way to determine that?
I have the game built as a windows app ...
2
votes
1answer
60 views
How to save an arbitrarily large image to a file in XNA?
I have built a level editor for an XNA-based Megaman clone I am working on and one of the features I would like to implement is the ability to save a full-resolution map of the entire level (like this ...
0
votes
2answers
61 views
Scaling Model in XNA, keep position
I am trying to create a little fun 3D game in XNA, but I am having some problems with scaling my models. I use models from random sites, so my battleship is for an example 10 times larger than my ...
3
votes
2answers
211 views
C# Perlin noise - generating “endless” terrain chunks?
I'm currently writing a little side scroller in C#, to both learn C# and have fun. Right now I have a simple random number generator generating the world but it isn't exactly all that great - so with ...
0
votes
3answers
278 views
Feasible 4D first person gameplay
I put together a quick demo of a 4d first person environment last night in XNA. It uses 3d cross-sectioning instead of projection. (Use A and O to move in and out from 0 to 1 in the W axis.)
In my ...
4
votes
2answers
89 views
Is it possible in HLSL to use bitfields?
I have in memory a representation of my 2d GameMap (think of a Scorched Earth like landscape).
The map is made up of MapElements, a MapElement is made up of 64 bits defined like
struct MapElement {
...
1
vote
1answer
130 views
How should I structure my Tetris clone's code?
I programmed my first game (a Tetris clone in XNA) and all my code is in a Game1.cs file with 730+ SLOC. It's fairly well-commented, and each piece of functionality has its own subroutine, but I have ...
-2
votes
2answers
88 views
C# XNA 4.0 Rectangle Rotation Collision
I can easily rotate my sprite, but how could I rotate my rectangle for my collision (Thinking of using the Separating Axis Theorem, But I have no clue how to apply it) Help or Example would be ...
1
vote
1answer
89 views
Alternatives to multiple sprite batches for achieving 2D particle system depth
In my 2D XNA game, I render all my sprites with a single sprite batch using SpriteSortMode.BackToFront and BlendState.AlphaBlend.
I'm adding a particle system based on the App Hub particles sample. ...
1
vote
1answer
41 views
Problem with HLSL :TextureCoordinate0 is missing
I'm trying to create a very simple game, and am working with HLSL. I got this error in my draw method:
The current vertex declaration does not include all the elements
required by the current ...
1
vote
2answers
192 views
Drawing 2D Images “3D-Like”
So, I want to use textures for weapons in my FPS game instead of actual models. However, if I just draw the texture onto a square in the game, it has the rotation and stuff, but it looks "2D". How ...
0
votes
1answer
59 views
Nested Sprite Batch and background draw
my code looks something like this:
graphicsDevice.Clear(Color.Black);
spriteBatch.Begin();
spriteBatch.Draw(contentLoader.VerticalGradient, tileSafe, null, ...
4
votes
2answers
117 views
Ball Physics : Smoothing the final bounces as the ball comes to rest
I've come against another issue in my little bouncing ball game.
My ball is bouncing around fine except for the last moments when it is about to come to rest. The movement of the ball is smooth for ...
1
vote
1answer
91 views
Ball Physics : Bounce height altered by elasticity of ball and bounce surface
I have created a bouncing ball simulator using XNA and I am happy with my use of gravity, acceleration, change of direction and friction/spin.
However, I am now at a stage where I would like to ...
4
votes
1answer
115 views
Pixel-perfect rendering to a rendertarget with a fullscreen quad
I have some trouble rendering a bunch of values to a rendertarget. The values never end up in the exact range I want them to. Basically I use a fullscreen quad and a pixel shader to render to my ...
2
votes
2answers
158 views
Scroller game level map advice
I'm started a XNA project to make a game similar in gameplay to Super Spy Hunter on a NES, which is used as a feature reference. The first thing I thought of is how to store and display level. ...
5
votes
2answers
272 views
XNA significant loss in fps by just adding a few hundred thousand more triangles?
I've got a minecraftish game that's running nice and smooth with a total of 9.3 million triangles, about 50-70fps average. Then if I try to render 9.9 million triangles I get hell and it drops to ...
2
votes
1answer
104 views
How to implement Ragdoll physics to 2D characters in XNA?
I'm starting a new project with XNA. I want to create a game where the main character is subject to ragdoll physics when killed. I was wondering if anyone can give me any tips on how should I ...
1
vote
1answer
241 views
XNA game looks laggy below 100 fps?
My xna game is running at about 70-90fps and it looks laggy at this fps. I'm using fraps to record the fps and I have a 120hz monitor, over 120hz looks fine but I can't understand why it feels like ...
0
votes
1answer
47 views
Accelerate a Bullet on The Right Direction
I'm creating a simple asteroids 2D game with XNA so I can learn more on game development, I've started by reading this tutorial and, with my previous knowledge from developing Windows Phone ...
4
votes
1answer
81 views
Shadows moving with camera.
I'm using MJP's Cascade Shadow Map code and I'm having major issues with the shadows moving with the camera. Here a video to demonstrate what's going on. Also, is there a way to fix the dueling ...
0
votes
0answers
71 views
Projecting a World point onto 2D Isometric grid for XNA?
I am trying to project a point onto an isometric using the game's world coordinate, at which (0,0) is the tip of the first tile in a "drawing-diamond" approach ---- using the following reference ...
0
votes
1answer
58 views
CG/CGFX to GLSL
So, I'm making the painful move from my beloved XNA to OpenTK, and I'm stuck:
Since I've got a LOT of existing shaders written in HLSL, NVidia's CG compiler seems like a natural way to minimize the ...
3
votes
1answer
48 views
XNA4 - Trouble updating part of a Texture2D
I have a big Color[] ColorMap in memory (1280x720), and I have a Texture2D that I've uploaded this ColorMap to.
I update parts of the in-memory ColorMap, and want to upload those changed parts to the ...
1
vote
3answers
79 views
XNA create differences in enemies
I created an enemy class for my game. It works well, except for one dilemma. When I spawn more than one enemy, eventually they begin to "overlap" and look like one enemy. I was wondering if anyone had ...
0
votes
1answer
37 views
string and int concatenation resulting in null for a Tetris clone?
I'm writing a tetris clone, and I have sprites (of every possible piece and rotation) loaded through the XNA content pipeline. For example, I have assets "i", "i2", "i3", and "i4" for each rotation of ...
0
votes
2answers
75 views
Timer for pop up text in XNA
I am making an xna game which contains turn-based RPG battle elements. Any good game that features turn-based battle has to have a good feedback to the user.
For example, When my guy attacks, there ...
1
vote
2answers
93 views
Tutorial or Example of creating custom sprite tool/map editor for XNA?
I want to create various sprite tool and map editor using XNA. Now, the problem is I do not know how would I implement the window forms and components (such as button, check box, sprite list, etc.) ...
37
votes
7answers
2k views
What are the dangers of self-teaching game development?
I am about to embark upon a journey into game development. Following answers to my last question, I will be using C# and XNA.
However, I don't personally know any other game developers and I don't ...
2
votes
2answers
92 views
Debug data visualization best practices
I found debugging games especially hard for some obvious reasons. It's hard to monitor some internal values in dynamic, conditional breakpoints helps somehow, but only to detect some specific ...
2
votes
1answer
85 views
How to draw text on a 3d sphere?
I am facing a problem in mapping 3d co-ordinate to screen co-ord . I require it because i want to draw text on the model . model is drawn at the 3d-cordinate, so if i know the position of that co-ord ...
1
vote
1answer
96 views
Cropping a line (laser beam) in XNA
I have a laser sprite that I wish to crop. I want to crop it so when it collides with an item, I can calculate the distance between the starting point, and the ending point, and only draw that. This ...
0
votes
1answer
72 views
XNA Calling Variables from separate Classes
I'm having some issues in XNA. I have a Player class and I would like to call a foreach function from a list which has been declared in the Game1 main class, which is below:
public class Game1 : ...
0
votes
0answers
64 views
Controlling rigged 3D model using Kinect
I am trying to "connect" a rigged 3D model to the skeleton provided by Kinect and I am having serious problems with the shoulder & elbow joints.
As far as I studied my own personal shoulder, I am ...
2
votes
1answer
62 views
Odd offset bug in Farseer/XNA/C#
So I'm using Farseer to create an immovable object:
[...]
private Body body;
public Immovable(World world, ContentManager c, String s, int posx, int posy, int w, int h, String user_data)
{
...
4
votes
2answers
77 views
Detect Mip mapping level in the shader?
Is there a way to do this in pixel shader 2.0/3.0? I've got on or off transparency so when the mipmapping level is different the transparency can take up too much of the texture and make it ...
0
votes
1answer
41 views
Primitives does not show on screen
I'm trying to render terrain, everything compiles fine, but I can't see anything on screen. ( I'm moving camera around in case it was on the other side)
Can't figure out whats wrong.
public class ...