Answer Questions
PAzevedo No news about XNA 2?
It has been a long time (feeling instead of real time) since XNA 1 released. I've been waiting for news about the next big thing. But it seems it's rather quite; no early info is out. What will be the next exciting things I can only guess... 1) Maybe it's an XNA Game Studio Professional which works with VS Pro version. But I'd rather like an XNA SDK to work with any IDE. 2) Maybe it's great enhancement to the framework. Many more D3DX stuff come into XNA, lifting XNA to the same level as MDX/native DX in functionality. Hmm...I hope the functionalities are not dropped just because they're not supported on XBox. Mitch Walker - MSFT wrote: Jim Perry wrote: March ...Show All
Hussain Saffar Matrix Interpolation and gameTime
I made a simple cube and created two translation matrices: start = Matrix .CreateTranslation(-20, 0, 0); finish = Matrix .CreateTranslation(20, 0, 0); Then, I figured I could create this simple animation using linear interpolation and the game time, by using the general formula inside a game component: effect.World = Matrix .Lerp(start, finish, (currentTime - startTime) / (endTime - startTime)); I tried all four permutations of updating the time (ElapsedGameTime in update/draw and ElapsedRealTime in update/draw), although I would think that updating in the draw method with ElapsedRealTime would provide the smoothest interpolation. The problem is that the animation is not completely smooth. It has some ...Show All
prog.gabi New Community Tutorial and Sample
We added two new community items today. The first is a tutorial that covers creating the game pong from the ground up. This tutorial was created by David Bailey. http://www.xnaspot.com/Tutorial_Pong.aspx The other is sample that shows how to use shaders in XNA. The sample was created by Phillip Quantrill. http://www.xnaspot.com/Sample_ShaderExample.aspx If you have any samples, games, tutorials, screen shots, or comments that you would like to share please send them to Submit@XNASpot.com . ...Show All
Ash McConnell Framework proposal and sample code - GameComponents with component-specific "update frequencies"
Please see https://connect.microsoft.com/feedback/ViewFeedback.aspx FeedbackID=195728&SiteID=226 and give your feedback! Currently the GameComponent class has no mechanisms for having components with a "lower priority" that are not updated as frequently. Examples could include a component that manages game resources, purging unused ones similar to a garbage collector on a less-frequent interval. I've written a rough, prototype implementation. It should be usable right now with minor modifications, provided you use your own class that inherits from GameComponent. public class IntervalGameComponent { private int updateFrequency = 0; private TimeSpan componentElapsed; [Default ...Show All
AlexDcosta WOW's BLP loading problem
I am trying to load blp file of world of warcraft. I do it in the following steps: 1:read in the header from blp file 2:read in the data from blp file according to the header 3:create texture according to the blp_header info 4:lock the texture--copy data into it--unlock. It works but I wonder if I am doing the effecient way I wonder if D3DXCreateTextureFromFile work the same way: load data-->create texture-->copy data. thx in advanced. If the raw texture data are saved in the same format that the texture requires you may be able to load it directly to the locked texture. This will save you the copy. But you need to be careful about the stride. If you can’t load it as one large block multiple calls to the load function ...Show All
MukilanP 2D Movement based on Rotation
Hi I'm looking for a simple way to do X, Y movement based on the angle of rotation. So if my object is facing the north-east, pressing up will move the object along the X/Y axis in that direction. Thanks Thanks that worked! x += Math.Cos(angle) * speed; y += Math.Sin(angle) * speed; where angle is in radians (1 lap = 2*PI). Regret sleeping through trig :) ...Show All
hazz Day 1 - Where you at?
So day 1 of the XNA madness has come to a close, with many more to follow. How far has everyone gotten on their first game projects I haven't spent nearly as much time as I wanted to on this, but I managed to get my head to bounce around the screen. I think the next step would be to add another head (i.e. angelina jolie) to bounce around. Maybe I'll even add collision detection so that if the heads hit, she says something like "I want you so much!" and I go "Yeah, whatever" and bounce. ...not sure if I should have mentioned the idea for this game...now everyone's going to steal it and make millions. But enough about my awesome game in the works. If anyone has anything worth checking out, upload it somewhere and post the link in this th ...Show All
Ralf_from_Europe So how does this (non)commercial business work?
Can anyone please enlighten me on how this all will work. How I see it, there are two points for having XNA. 1. To let gamers make Xbox 360 non-commercial games freely to play on their own consoles. 2. To let gamers make Xbox 360 commercial games that they may transfer over live. But can we sell these games & start a business And where do our limits end & then begin again with Pro I have been trying to start a video game business for years now, working with teams and software, and Microsoft XNA can be a new pedestal for my team and business. Thanks in advance. So I can program it to work on the PC C# 2005 Express Goto http://msdn.m ...Show All
JuKiM Very simple shader not working on 360 but ok on PC?
Hi All, I'm having problems with the following shader code, which implements a particle system, it works fine on the PC and yet appears to render nothing on the Xbox 360. Can anyone lend their shader expertise Is anything obviously wrong with this code UPDATE: Shawn Hargreaves (MSFT) was kind enough to reply to another thread concerning this problem, apparently pixel shaders differ slightly between the Xbox 360 and Windows. I know it's a big ask, however if anyone has the knowlege of 360 shaders and has a moment - you would have my extreme gratitude if you could modify the below pixel shader so it works on the 360. Pretty please (Credit to the excellent Derek Nedelman of ThreeSixBox.com as the author of this ...Show All
cool_chandu Static properties for nonstatic member variables?
The example space wars game does this, could anyone explain to me (or point me towards a resouce that explains) how this works Do classes that use static property fields for nonstatic member variables only work when there's one instance Thanks, sorry if this is a stupid question... Ah, that makes sense. So in a sense those fields become shared, right yes :-) and you'll even find that the "static" keyword is "Shared" in vb.net :-D the way static properties work in .net is that they belong to the one global/static instance of that type. if you don't specify that the class is a "static class", then you can also create instances of t ...Show All
SAD1 How to get a lit sphere colored sphere/cube in XNA
I've been trying to do this for the past few days asking many questions to get to this seemingly simple goal, but i just run into problems at every step. In MDX I just created a mesh object, then: myMesh = mesh.Box(...) or myMesh = mesh.Sphere(...) In XNA I've had to go through making custom vertex formats, manually drawing all the sides of the box, and now even worse it seems I have to manually input the vertex normals and am STILL unsuccesful...i have no idea if i'm expected to do this for a sphere. This seems too massive a step back for something that is supposed to be superior to MDX, so I clearly have to be missing out on a key point... I realised MDX is being discontinued and i decided to move on to XNA, but I'm considering just goin ...Show All
BachP How to disable driver anti-aliasing
I need to preserve the exact colors (and thus, hard edges) when I read back the rendered image via an offscreen surface filled with GetRenderTargetData. There is an option in the control panel where the driver forces anti-aliasing for all applications. If I do not set the quality-performance slider correctly, I will get anti-aliasing. Is there a way (in code) to prevent that Using another render target with a float texture format seems to be the only way. Thanks a lot! Eric, Have you tried setting D3DRS_MULTISAMPLEANTIALIAS = false in the SetRenderState for your device This should disable anti-aliasing for anything rendering from the device. Thanks. Cale ...Show All
Skapol My shadow maps work on Windows, not Xbox 360
I'm having some problems getting my shadow maps to work on the Xbox 360, but they work great under Windows. There seems to be some weird SetRenderTarget and ResolveRenderTarget behaviors I don't really understand on the Xbox 360. I’ve got too much code to post here, so some pseudocode is at the bottom. I realize it may be hard to help without seeing the actual code, so if more information is needed, I’d be happy to provide it. Any advice on what I might be doing wrong is greatly appreciated. Thanks! clear render target to ambient light color for each light { set render target to light's depth map clear render target draw scene depth from light's perspective resolve render target } for each light { set render targe ...Show All
Mystret mesh.BoundingSphere and mesh.ParentBone.Transform -- Scale?
I exported a model from 3ds max, but I can't get the bounding volumes to line up with the model. XNA 3D Tutorial 1 shows using the mesh.ParentBone.Transform property as the world matrix. When I do this, the model is accurately oriented, but it's scale is more than double it's original scale. The model is larger than the radius of mesh.BoundingVolume indiciates. I tried to render with an identity world matrix and the model is the correct scale! Unfortunately, it's coordinate system is like Max's with the XY plane lying flat and the Z axis running up and down. I may be missing something totally obvious (it is 4am) but why is the bone's Transform scaling Thanks! Yep, thanks -- I figured this ou ...Show All
auSwDev Direct X 7 Direct Draw alphablending
Hello, I'm currently using Direct X 7(Direct Draw) & VB 2005 Express. I've already encountered some problem and solved it, and this might be the last question needed to accomplish my work. By Jack's help, I've found DirectX4VB.COM which has several useful examples and descriptions. But since it has based on VB 6, there were several techniques unappliable under VB 2005. Especially alphablend( - I really need this technique to fade in-out a surface)function. It contains following reference declaration and it requires custom DLL. is there any easy-alphablend or gamma-control(for only specific surface) example or description for DD7 I appriciate your kind answer. I've looked into several DD7 alphablend samples coded by C, but ...Show All
