Answer Questions
lawrieg OpenGL's modelView to DirectX World matrix
Hello. I'm writing a rendering library for this application that originally uses OpenGL. I am to write an alternative DirectX renderer. So my problem is, what do I have to do to the OpenGL modelView matrix to be able to use it as the World matrix in DirectX This is the projection matrix setup used in OpenGL: gluPerspective(45.0f, (GLfloat)width/(GLfloat)height, 0.1f, 100.0f); This is my DirectX Projection matrix setup: D3DXMatrixPerspectiveFovLH(&proj, D3DX_PI * 0.25f, width / height, 0.1f, 100.0f); I set my View matrix to identity. I'm using the same vertex coordinates as in OpenGL, and need to (obviously) get them to transform to the same coordinates on screen. So I need to do *something* to the modelView matrix and pop it i ...Show All
CJohnson game time
hi all, in my main draw function of my game i call a function splash.Draw(gameTime); in the splash.Draw() function i have a line of code Console .WriteLine(( float )gt.ElapsedRealTime.Seconds); this along with every other member of gt just returns zero, i cant figure n e reason this should happen, if i call the same function in the main Update or draw functions of the game it still returns zero, is there a reason it should do this many thanks Hi, Do you have the Float elapsed =0; in the public What this is doing is creating a flot for the seconds total to be stored. When you are reporting you need do have a global variable to increment wverytime it goes into the update as it wi ...Show All
xRuntime 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
hrubesh Anyone know any good 3D (for 2D) programming tutorials?
Hiya, after playing with XNA, I decided my best bet would be to delve into DirectX using c# and the SDK, I've looked at loads of tutorials regarding programming a 2D game, and mostly (and surprisingly), I understand whats going on! :) The problem I have is that nealy all the well versed tutorials I've found for 2D in Managed DirectX are based on DirectDraw, which for most of my understanding, is obselete! Can anyone point me in the right direction on how to setup Direct3D for 2D game programming in C# e.g. links to tutorials, examples etc Any advice would be great! Thanks in advance Dabz P.S. I'm not sure if this is in the right place, if it isnt, sorry about that! Here are a couple of excellent ...Show All
fripper What language versions of the VC# express are supported?
I'd like to know if just the English version of the Visual C# Express IDE is supported because I'm using the German version so far. The XNA Game Studio Express should be able to integrate with other language versions of C# Express than English, but as you said XNA itself will not be localized, so XNA specific things will be in English in any C# Express version. From the FAQ: Q:Is the XNA Game Studio Express subscription available for programmers worldwide Are you planning on localizing the software A: XNA Game Studio Express development tools and environment for Windows will be available for download worldwide from http://msdn.com/xna. The XNA Game Studio Express subscription for Xbox 360 is available in nearly all countr ...Show All
Maheep What does creators club include right now?
I'm a little puzzled about what the creators club actually includes, I've checked the FAQs and can't really find an answer. I have however managed to find the following: "The XNA Creators Club is available on Xbox LiveR Marketplace for $49 (U.S.) for a four-month subscription, or $99 (U.S.) for an annual subscription. Both subscriptions provide aspiring game developers with access to thousands of game assets from Microsoft and key partners such as Turbo Squid Inc., as well as white papers, specialized starter kits, samples and technical product support to help turn Your World, Your Game into a reality." I signed up for a year because it sounds like quite a good package, however there seems to be no information provided on ...Show All
GrahamY Arcball not center in the middle of the mesh...
I use Arcball and everything is working The only problem is that the Rotation happen in the foot of the Dwarf I try to rotate Apparently the trackball is centered at 0,0,0 and not in the center of the Mesh As I understand it we need 2 vector center at the center of the mesh and going to the surface of the trackballl After we have those we can do the CrossProduct and the DotProduct to get the Quaternion ScreenToVector is supposed to get those but right now it use 0,0,0 as the center of the ball and not the center of the mesh Or maybe I need to translate the mesh to the center… Currently I dont use the Transformation of the pts * the inverse of the ViewMatrice in the Begin and Move function of the Trackball The que ...Show All
xplosiv_1 Converting to and from a view matrix.
Hello everybody. I am trying to convert back and forth between a view matrix (created with matrix. CreateLookAt ) and a position, rotation and scale. I believe I have figured out how to convert into a view matrix from a position, rotation and scale like this: Matrix sc = Matrix.CreateScale(_scale); Matrix rot = Matrix.CreateRotationX(_rotation.X) * Matrix.CreateRotationY(_rotation.Y) * Matrix.CreateRotationZ(_rotation.Z); Matrix trans = Matrix.CreateTranslation(_position); Matrix transformation = sc * rot * trans; Vector3 orig = Vector3.Transform(Vector3.Zero, transformation); Vector3 target = Vector3.Transform(Vector3.Forward, transformation); Vector3 upPoint = Vector3.Transform(Vector3.Up, transformation); v ...Show All
canadian_coder 360 question.
So far with all ive read i just have one question. When we get the pro version and i make my whole game using 3d files in the .swm format wioll i just be able to open the project in XNA pro and basically play it on the 360 or will i have to redo alot of my code with the pro version Not sure if I understand this thread completely (so I can be mistaken), but there is no express versus pro thing going on in our first release. In release version of XNA Game Studio Express, you will be able to build your games to target both the Windows and Xbox 360 using our tools. The difference is that in order to deploy/debug/launch your games on the Xbox 360, you will need a subscription to the Creator's Club. Hope ...Show All
Jay2801 Animation sample?
Great work on XNA GSE 1.0! I downloaded it today and signed up for the 360 Creator's Club. Getting the basic engine code I've been working on under Windows for the past few weeks compiling and running on 360 was far easier than I was expecting (though it would be nice if the IDE had better support for projects that target both platforms). One aspect of the engine I've been avoiding for a while is mesh animation, as there has been talk around here for weeks that a sample would be released and I'd much rather start from a sample, even if it is very simplistic, than dig though the documentation enough to figure out how all the classes fit together. So my simple question is.. any updates on this sample Has it been made available and I'm j ...Show All
tiomeg Camera fade
I'd like to fade my camera from 1 view into another. To add a degree of simplicity, the current and target views need not be animating when the transition occurs. This sounds far fetched, perhaps... but I thought may I could freeze the current frame, and use it as a texture on a face which covers the entire screen. Then, have another textured face behind this with the target view as a texture, then simply fade out the texture infront. I'd really like to avoid doing it this way though as it feels a little hacky. Can anyone think of a better way What is the best way to create a render target texture which mimmics the origional surface texture I'm having trouble creating a render-to-texture surface wh ...Show All
Halo25 Setting project up to be cross platform
Hello Any advice on what's the best practice for setting up your game to run on both PC and Xbox Even better if there could be an included example of this. I'd like to develop my game on the PC and only running the 360 version periodically. In the past I've set up seperate builds so I'd have a release\debug versions for PC, PS2 and Xbox1. I've seen posts mentioning creating one solution with two projects in and then adding the source to the other project as a link. I have my project like this but I find I'm having to add any new source files twice, once to the PC version and once to the 360 version. The same goes for any data I decide to add. This doesn't seem the best way of dealing with it so has anybody come acros ...Show All
Philippe Galipeau XNA tutorial!!! PLEASE!
Hi. Can someone write me a little tutorial that teach me how use XNA Game Studio Express (beta1) I've downloaded it but I don't know how use it. I'm good in C# programming but i've never used Visual C# 2005 Express. How can I use the Spacewar Example with Visual C# Please Help Me!!! What is the Starter Kit in which folder can i find the files of SpaceWar project for Visual C# express At least thousands. thx. this works ;) i bet, that thousands of freaks are testing and playing with the XNA... It is currently programed to use the XBox 360 controller. You will have to modify the code to get it to work with the keyboard. Wait...wai ...Show All
Mirai Cannot run XNA projects
I have directx sdk august 2006 release and .net 2.0 framework, c# 2005 express, & xna express Creating a new project, without adding any additional code, the project will not run under start with/ or without debugging. I have tried the multiswap fix in other posts. It seems that you do not have graphic card support directx9c or Shader model 2.0 Hmm, the review from here says: The SiS 760 Chipset built-in a high performance 256bit 2D/3D graphics engines with a Rendering Engine compliant to Direct3D 8.1 edit: beat me to it. :) the same graphics error that the other posters are getting. I tried using multiswap = false on lines 20 & 109 and that didn't work. Doesn ...Show All
rravech Partly opaque texture
I'm loading image files (mainly BMP or JPG) into textures. I want to render the texture partly opaque. is it possible I just want to mention that i don't know if the image contains alpha channels, because i get the picture as an input from the user. Thanks. I'm not sure I completly understood was is "partly opaque" to you, but here are some hints that I hope will help: - You can determine if your texture as either transparency or is partly opaque by examining the texture format : Simply check the number of alpha bits in the format. - You can also iterate through all pixels and check for alpha values. Render the texture as usual (mapped on triangles) but with D3DRS_ALPHABLENDENABLE rend ...Show All
