Stuttering in D3D application Full screen or windowed mode I've seen what you described in Windowed mode on many different computers. I've only seen it happen on one computer in full screen mode. My guess for Windowed mode is that it has something to do with GDI (because, the more stuff GDI is doing, the worse it gets and the delay seems to always be in the present function). My guess for full screen mode is that another process is blocking the application about once a second (because the delay seems to happen at random times during execution). I know it's not GC related in either case. -Jeremy Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
How to only draw visible meshes? Performance problems. For this reason, I have started 2 projects. One for two dimensional layout of a scene, the other for 3 dimensional.
Now, when I say 2 dimensional, I don't mean 2d game but a layout like a landscape/terrain where all objects are more a less laid out north/south/east/west. But an outerspace game is fully 3 dimensional in the the player can go up/down too.
The projects are Quadtree (landscape type) and Octtree (outerspace type). They are functional in that they do cull out objects that are not visible on the screen. They are extendable in that you get the source code (to modify at will) and also that they provide a base class that itself is derrived from DrawableGameComponent. This base class allows you to draw whatever you like when visible, but it's update get called each frame. They also handle drawing models for you when visible.
Quadtree:
http://www.codeplex.com/quadtreeload
Octtree
http://hosted.filefront.com/ClydeCoulter
They both come with the source for a test game that demonstrate some of what you can do with them. The Quadtree project also comes with a tutorial on creating heightmaps and textures for them. Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Changes from Beta 2 to Release 1? A class diagram would be very nice to have on hand... I remember my first DotNet 1.0 purchase included some very nice posters of the entire Dot Net Library - it would be nice to be able to get ahold of something like - heck i'd even pay for it :)
Thanks again for all your hard work to turn out such a dream come true! XNA is truely the greatest thing since sliced bread! Keep up the good work!
Sincerly,
An XNA+XBox360 evangelist,
Terry Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
The Unofficial "Hooray I'm Done With my DBP Game" Thread Almost done with mine but I'll have to wait until tomorrow night to upload it. It's pass midnight right now and I need sleep. Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Normals - Crazy mirrored artifacts You need to allocate an array of Vector3's for your normals and then loop through all your faces and add all the face normals into this array for each vertex. Then you can normalize in the end and you'll have your vertex normals; Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Remembering the storage device (Xbox) No, I don't mind at all.
Note that I'm trying to subtly hint something here. Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
I need help with game screenshots Another way to save screenshots is to use a screencap program. In fact, some programs will even allow you to capture a video of your gameplay, but the resulting file size is half a gig for just 30 seconds of footage. See, e.g., www.fraps.com Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Dealing With .X Files To Effects / Shaders I also just found this blog entry that answers a lot of the questions I have (or had as the case may be :)... http://blogs.msdn.com/shawnhar/archive/2006/11/20/models-meshes-parts-and-bones.aspx Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Rotating points in 3D OK. I didn't get very far. I see those transform functions require a transform matrix as a parameter but I don't remember much about matrices from college. :) Could you help me out with some examples Lets say I want to rotate around X by 10 degrees, what matrix would I use What about for Y and Z What if I wanted to move it 10 steps to the left
Thanks again
Gary Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Shooting i got both of u so thanx. but in this,
List<myBullet> _Bullets
ia that calling this
struct myBullet { int x, y; int speed; int damage; }
then what is the _Bullets is it the texture or something Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
dotproduct3 support? How can I tell if the dotproduct3 texture operations are supported I'm assuming this can still be done in with the effects framework as I don't see a way to do it in through the framework API... Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Diffuse HLSL for Skinned Mesh You might want to get the directional lighting sorted out first (i.e. the case with the light being characterized just by direction and color), because that's the simplest to write and debug, while allowing you to determine what you're doing wrong. Once you get that to work, you can easily change it to do point lighting.
The two common mistakes in computing lighting on a skinned mesh are:
mixing coordinate systems, e.g. using world-space vertex position and normal with camera-space light parameters.
using the pre-skinning vertex position and normal (transformed or not) for the lighting computation. Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Saving out Vector3's Untested:
void ScanNode(NodeContent node)
{
MeshContent mesh = node as MeshContent;
if (mesh != null)
{
foreach (GeometryContent geometry in mesh.Geometry)
{
for (int i = 0; i < geometry.Indices.Count; i += 3)
{
int index1 = geometry.Indices[i + 0];
int index2 = geometry.Indices[i + 1];
int index3 = geometry.Indices[i + 2];
Vector3 vertex1 = geometry.Vertices.Positions[index1];
Vector3 vertex2 = geometry.Vertices.Positions[index2];
Vector3 vertex3 = geometry.Vertices.Positions[index3];
// these three vertices make up one triangle
}
}
}
foreach (NodeContent child in node.Children)
ScanNode(child);
} Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Problems with SurfaceFormat.Bgra1010102 on the XBOX360 Are you saying that you are running at 800 * 600 on a standard TV The dashboard when it comes up, will impose it's own settings on the screen in order to ensure it displays correctly. Normally this would not affect the colours of the game running behind it, unless your 1010102 setting is not actually 1010102 at all. Can you show us the actual code you are using to set this 1010102 surface up. I should add that I have tried setting up the 1010102 surface for rendering and have no issues at all. It definitely seems to me as if you are doing something wrong somewhere. Are yu setting the prefered width and height parameters for the 360 and ensuring that you are not trying to set unsupported caps Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Where are the Creators Club? Hi,
Where can i buy the creators club subscription Cant find it on XBOX life anyware... Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Shooting to make something shoot would this work:
Vector2 bullet
Vector2 player
Bullet = Player;
if(GamePad.GetState(PlayerIndex.One).Button.A == ButtonState.Pressed)
Bullet.X += 5;
if not could you post some code taht would Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
How do you canncel your XNA Creators Club subscription? Ok, sorry about that. I hadn't heard that -- I will get the right people to check on this.
[Edit]
Once you've purchased a subscription, you can access the subscription from Xbox Live. Just select "account management" from your user profile, and then select "memberships". The XNA Creators Club membership will be listed, and you can select it and choose "modify membership".
[/Edit]
--Stephen Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Anyone else rolling their own numerics? Just wondering how many other people out there are finding that XNA numerical classes/structures fall a little short of their needs and therefore are writing their own For us, we needed to give our scene graph objects a coordinate frame where the rotation, scale, and translation transformation components are kept separate from one another; this is something similar to what is described in the book 3D Game Engine Architecture ( http://www.amazon.com/Game-Engine-Architecture-Engineering-Applications/dp/012229064X ). XNA didn't quite fulfill this niche, which is understandable as I imagine one constraint during its design was to make it easier to use. So, in the end, I'm thinking about writing my own 3x3 matrix struct, and my own Transform struct (which represents the above mentioned coordinate frame construct). Has anyone run into any problems integrating their owns numerics with XNA's Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
How can I directly stop drawing a pixel? OK. Ive not tried this at all, so this is just off the top of my head ;)
OK, so if you are followinf the example in my previous post, we are rendering the output to the x component of our depth texture. Now if we change the texture to a format that supports more channels (You'll have to excuse me as I'm at work atm, with very little access to documentation - Vector2 texture maybe ), we could always store some more interesting values in the y,z, or w parts of the texture. So say for example we are rendering our depth texture using this pixel shader -
struct PS_OUTPUT { float4 color : COLOR0; float4 depth : COLOR1; };
PS_OUTPUT PixelShader(float2 textureCoordinate1 : TEXCOORD0, float2 depth : TEXCOORD1 ) : COLOR { PS_OUTPUT Out = (PS_OUTPUT)0; Out.color = tex2D(textureSampler1, textureCoordinate1).rgba; Out.depth.x = depth.x; return (Out); }
we could put something into the out.depth.y which is say a 1 or a 0. Then in our screen rendering effect, in the pixel shader you could try something like
#define XFILTER 0.002f #define YFILTER 0.002f
float4 PixelShader(float2 textureCoordinate1 : TEXCOORD0) : COLOR0 { float depth = (tex2D(depthSampler, textureCoordinate1).r)* (tex2D(depthSampler, textureCoordinate1).g) *0.0015f; float4 tex1 = tex2D(textureSampler, textureCoordinate1).rgba; float2 offset1=float2(XFILTER*depth,YFILTER*depth); float4 tex2 = tex2D(textureSampler, textureCoordinate1+offset1).rgba; float2 offset2=float2(XFILTER*depth,-YFILTER*depth); float4 tex3 = tex2D(textureSampler, textureCoordinate1+offset2).rgba; float2 offset3=float2(-XFILTER*depth,-YFILTER*depth); float4 tex4 = tex2D(textureSampler, textureCoordinate1+offset3).rgba; float2 offset4=float2(-XFILTER*depth,YFILTER*depth); float4 tex5 = tex2D(textureSampler, textureCoordinate1+offset4).rgba; float4 final = (tex1+tex2+tex3+tex4+tex5)/5; return (final); }
The result in that case would be that no Depth of field was applied if the y (g) component of the 1st pixel shader was 0 (as anything mu;tiplied by zero is zero). Obviously this might not fit your case, but the theory is the same - write the data that says yes or no to another channel in the object rendering pass. Then use that value in the screen rectangle rendering pass. Hope this is of some use to you. I'd be interested if it works ! N Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Starting work on my GUI system andyfraser wrote: Can I suggest that high on the list of priorities for a UI would be that it is skinnable. I think it is really important that the UI match the style of the game and it also means that all our XNA games don't look the same
Agreed! This is a priority IMO and probably not tough to take into account. Coming up with layout requirements for allowing skins shouldn't be difficult.
edit: this article might be something to take into consideration. Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Camera woes very nice looking map man, i see u know what your doing. i would just like to know if u need any help with the art/texture side of things with this game. i have done a post here ill just copy and past so u can see what im all about. once again nice work so far.
"Texture artist looking for work
if you need someone to do textures for your levels i would be more than happy to help you out there, i have been doing computer art for 5 years and working on game textures for 2 years. i can do photorealistic textures at high and low resolution for 3d and 2d game levels, i can do particle effects textures at low and high resolution. I¡¯m not very skilled in starting skins for 3d objects but if given a low quality out line for the skin i can do it up to look much better.
If you would like to see some of my work all you have to do is ask and ill send a email with it, and if you would like me to do the textures for you i would just like to know what type of game your thinking of making or making now.
Thanks for your Time, David fink (dafin0)" Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Where is the PositionColoredNormal Vertex type in XNA? Here's a link on implementing a vertex structure: http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Vertex_format.php Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Rotation help I don't think gimbal lock is what I'm experiencing. My rotations are occurring exactly as I would have expected them to. What I'm asking for is a different behavior. I have tried managing my rotations using quaternions and I am seeing the same result. I'm not having an issue with what it's doing...it's correct. I just need something else. :) Thanks! Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
equivalent to progressive mesh Pick one . Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
XACT with XNA Hi I recently attempted to use XACT for a 2d game using C++, and i got an error when loading the global settings file, which i never managed to debug and so used a different audio API instead. Now i am coding audio for a 3D game using XNA and C#, the same thing happens when i attempt to load the xgs file. However it throws a much more helpful sounding Exception: "XACT could not load the data provided. Make sure you are using the correct version of the XACT tool." I have checked that i have the most up to date, december 2006 version of XACT. I heard that only the august 2006 version of the actual creation tool works with XNA, is this true it seems a bit silly if it is, does it mean i have to use the august 06 version of DirectX if i want to use XNA properly Is there anyway of just downloading august 2006 version of XACT without reinstalling the whole SDK Also does anyone know if is there any plans in giving XACT anywhere near half the useful features that DirectSound has Thanks :) Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Can I use standard tcp/ip protocol on XBOX360? Hmmm. I was considering trying to write a raytracer to take advantage
of the power of the 360. Now I think it may not be very practical as I
would have no way of getting any image that was rendered by the
raytracer back to my PC is that correct Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
ResourceManagementMode & LoadGraphicsContent Hi. i have question about: void LoadGraphicsContent(bool loadAllContent); what belongs to what group (ResourceManagementMode) i see that Texture have parameter that control it, but where is Effect, Model... is there any list what is automatic and what is manual Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Rotating a 2d sprite Hey all,
I would like to know if it is possible to rotate a 2d sprite at a given angle If so, how
thanks alot,
ggcourtois Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Private Network Functionality with XNA You're correct. The XNA team knows this is a big deal. Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Multiuser games? XNA contains no network support. For Windows games however you can use the network pieces included in the .NET Framework. You cannot do networked games on the 360 at this time. Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Sprite Blitting question - Wondering if this is still a problem It sounds like interpolation fuzz... If you have a black pixel moving over a white pixel, if the black pixel is at xx.5, I am guessing the draw system would interpolate a grey value to approximate the partial pixel...
I'd personally keep the movement as float values (as floating point movement is more flexible) and the drawing as integers... as you were doing. Tag: Game Technologies: DirectX 101 how do i learn to write games 4 mobile Game Technologies: DirectX, XNA, XACT, etc.
Sumit_Dagar_8eba6d
a basic question on how yo start writing codes 4 mobile games