slowmike

Members
  • Content count

    226
  • Joined

  • Last visited

Community Reputation

144 Neutral

About slowmike

  • Rank
    Member
  1. 64 bit gaming

    I've been thinking about building a new computer from the ground up. I'm currently trying to decide if I should go with a 64 bit system for the 1st time ever, or stick with the 32 bit. After searching the web, I've found that 64 bits systems will run 32 bit games, such as WoW, but I can't seem to find out if any games are released in 64 bit format. So, are there any games out yet that can actually take advantage of a 64 bit system and all the extra ram and such?
  2. locally rotate in directx

    You may want to look at this thread that I started. I'm not sure if it'll help you out, but it might be worth a look. The code examples are using DirectX w/ C++. Good Luck!
  3. camera tutorial that allows full flips on x-axis?

    WooHoo! I finally got what I wanted. // CalcViewMatrix // Yaw rotation D3DXMATRIX yawMatrix; D3DXMatrixRotationAxis(&yawMatrix, &m_camUp, DEGTORAD(m_camYaw)); D3DXVec3TransformCoord(&m_camAim, &m_camAim, &yawMatrix); // Rotate look vector D3DXVec3TransformCoord(&m_camRight, &m_camRight, &yawMatrix); // Rotate right vector // Pitch rotation D3DXMATRIX pitchMatrix; D3DXMatrixRotationAxis(&pitchMatrix, &m_camRight, DEGTORAD(m_camPitch)); D3DXVec3TransformCoord(&m_camAim, &m_camAim, &pitchMatrix); // Rotate look vector D3DXVec3TransformCoord(&m_camUp, &m_camUp, &pitchMatrix); // Rotate up vector // Roll rotation D3DXMATRIX rollMatrix; D3DXMatrixRotationAxis(&rollMatrix, &m_camAim, DEGTORAD(m_camRoll)); D3DXVec3TransformCoord(&m_camRight, &m_camRight, &rollMatrix); // Rotate right vector D3DXVec3TransformCoord(&m_camUp, &m_camUp, &rollMatrix); // Rotate up vector // Create view matrix D3DXMATRIX viewMatrix; D3DXMatrixIdentity(&viewMatrix); viewMatrix._11 = m_camRight.x; viewMatrix._12 = m_camUp.x; viewMatrix._13 = m_camAim.x; viewMatrix._21 = m_camRight.y; viewMatrix._22 = m_camUp.y; viewMatrix._23 = m_camAim.y; viewMatrix._31 = m_camRight.z; viewMatrix._32 = m_camUp.z; viewMatrix._33 = m_camAim.z; viewMatrix._41 = - D3DXVec3Dot(&m_camPos, &m_camRight); viewMatrix._42 = - D3DXVec3Dot(&m_camPos, &m_camUp); viewMatrix._43 = - D3DXVec3Dot(&m_camPos, &m_camAim); m_D3DDevice->SetTransform(D3DTS_VIEW, &viewMatrix); m_camYaw = 0.0f; m_camPitch = 0.0f; m_camRoll = 0.0f; I'm resetting yaw, pitch, and roll at the end of each call to CalcViewMatrix. I've got member functions altering their values based on input. And I'm keeping track of all the camera vectors that make up the matrix(at/look/up/right). Thanks to all that replied to this thread. You've been very helpful. (I'll be doing rating bumps in a minute.)
  4. camera tutorial that allows full flips on x-axis?

    Quote:Original post by jyk Quote:Original post by slowmike Great. Thanks for the replies. Ok. I've got everything working fine, except that I need a clean way to calculate an upVector for my camera to be used in CalcViewMatrix(). Simply using upVec(0,1,0) is no good for what I'm doing. So, given two points (camPos and camLookAt) is there a function for obtaining a vector at a 90 degree angle that I could use for my upVector?If you've already (correctly) implemented a 6DOF camera, you should already have the up vector available. A position and 'look-at' point do not uniquely define an orientation, so if your camera is actually 6DOF, then you must be storing some information in addition to these two points. If you can tell us what that info is, we can tell you how to compute the up vector. Good point. Ok, so now everything works. My camera's upVector is already what it should be. My real problem now is that when I want to rotate my camera left/right I alter the value of Yaw, but that only rotates around the Y axis. Either I still have a local/global problem that I'm not aware of, or I need to find out how much to alter Pitch and Roll in addition to the Yaw. Because right now, if I'm looking almost straight up, and try to rotate, I basically just spin around a point in the imaginary ceiling of my world. I've basically borrowed Brain me's code snippet to try and get this working, so here's what I've got. (Thanks btw) // CalcViewMatrix() D3DXMATRIX camRot; D3DXMatrixRotationYawPitchRoll(&camRot, m_camYawAngle, m_camPitchAngle, m_camRollAngle); D3DXVECTOR3 worldUp; D3DXVECTOR3 worldAhead; D3DXVECTOR3 localUp = D3DXVECTOR3(0,1,0); D3DXVECTOR3 localAhead = D3DXVECTOR3(0,0,1); D3DXVec3TransformCoord(&worldUp, &localUp, &camRot); D3DXVec3TransformCoord(&worldAhead, &localAhead, &camRot); D3DXVECTOR3 lookAt = m_camPos + worldAhead; D3DXMATRIX matView; D3DXMatrixLookAtLH(&matView, &m_camPos, &lookAt, &worldUp); m_D3DDevice->SetTransform(D3DTS_VIEW, &matView); Currently, if I want to aim the camera up/down, I alter m_camPitchAngle. If I want to aim the camera left/right, I alter m_camYawAngle.
  5. camera tutorial that allows full flips on x-axis?

    Great. Thanks for the replies. Ok. I've got everything working fine, except that I need a clean way to calculate an upVector for my camera to be used in CalcViewMatrix(). Simply using upVec(0,1,0) is no good for what I'm doing. So, given two points (camPos and camLookAt) is there a function for obtaining a vector at a 90 degree angle that I could use for my upVector?
  6. camera tutorial that allows full flips on x-axis?

    Thanks for your reply KulSeran. After I read-up on quaternions, I'll try to get this to work in my program.
  7. C++ / DirectX Hi, I'm looking for a solid camera tutorial or class code that allows FULL rotation on all axis. I'm working on a game set in space and the only Up or Down direction is in relation to my ship(camera). I'm looking for answers to my problem below. By myself, I got it so I'm able to rotate left/right in complete circles. Or I can rotate up/down in complete circles. But for some reason, after rotating left/right, the up/down rotations become wacked. When the camera gets near straight up/down, it sort of spins 180 degrees. When the up/down rotations work properly (before rotating left or right), I'm starting from camPos=(0,0,0) camAim = (0,0,10).
  8. Due to updating my SDK to August 2008, my older programs that used Direct Music no longer compile. I'm trying to implement Direct Sound in my current project, but I'm not sure how to load a .WAV file since DS doesn't have its own functions for doing so. MSDN says to look in DXUTsound.cpp for some classes to help with this, but I can't seem to locate that file. I'd prefer to have some sample source code to look over anyways, but I can't seem to find any examples online. I'm going to keep looking online, and I'll probably get the latest SDK update, but I don't think this will help me. If anyone can help, that'd be great. Maybe just some source code for loading a .WAV file and copying it into an IDirectSoundBuffer. Just keep in mind that I don't want to use any deprecated Direct Music stuff. Thanks!
  9. SPORE ctd cell stage

    Thanks for the replies. I finally found a fix for my problem! Well, I found someone else that found a fix. Click here to see the thread with the fix. All I had to do was set DirectX to use the RETAIL version of Direct3D in the DirectX Control Panel. Now, everything works great. WooHoo!
  10. SPORE ctd cell stage

    XP SP3(spit on 3) Anybody else that bought Spore having problems? For me, the game crashes to the desktop 100% of the time after I enter a planet name and click the play button. The screen goes black and then 3 seconds later I'm at my desktop. If I run the game in windowed mode, the same thing happens except I also get a program_must_shutdown popup. I can use the Create option and make creatures, but I can't play the game. I more than meet the system requirements, and everything up until that point runs fast and smooth. I've tried lowering all the game settings. I've tried with and without the EA Download Manager installed. I've completely uninstalled the previously released Creature Creator as instructed by the game, then did a complete uninstall/reinstall. My drivers are all updated. I tried lowering audio hardware acceleration as suggested in the help file. I'm lost at this point and I'm just hoping for a patch to fix this problem. Does anyone have the same problem that I'm having? Any educated ideas? Thanks! :-(
  11. distant object renders over near object

    I created a new project with the code stripped down to the bare essentials, but the problem remains. Quote:Original post by RabidDog Do you have a zbuffer setup, with write enabled and ztest less than equal? Can someone please explain which steps this quote is referring to? Thank you.
  12. distant object renders over near object

    Quote:Also, don't forget to clear the depth buffer. d3dDevice->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, clearColor, 1.0f, 0); I make this call once per frame, right before BeginScene. I'm still looking into the problem myself. It's just taking some time, because I'm a bit busy right now.
  13. distant object renders over near object

    D3DPRESENT_PARAMETERS d3dpp; ZeroMemory(&d3dpp, sizeof(D3DPRESENT_PARAMETERS)); if(fullscreen) { d3dpp.Windowed = false; d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP; d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT; d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT; } else { d3dpp.Windowed = true; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; } d3dpp.BackBufferFormat = d3ddm.Format; d3dpp.BackBufferCount = 1; d3dpp.BackBufferWidth = winWidth; d3dpp.BackBufferHeight = winHeight; d3dpp.hDeviceWindow = hwnd; d3dpp.EnableAutoDepthStencil = true; d3dpp.AutoDepthStencilFormat = D3DFMT_D16; if(FAILED(d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &d3dpp, &d3dDevice))) return false; For the debug runtimes.. I selected "Use Debug" in the control panel, but I couldn't find where to complete this step: "Under Managed Projects, you need to select "Enable unmanaged debugging" in the Debug section of the project properties." I'm going to trace back some pointers to see if I've got some garbage data that's not triggering an error. Thanks for the help.
  14. distant object renders over near object

    I'm setting the render state, D3DRS_ZENABLE to true. (??) Any code snippet in particular that you'd like to see?
  15. I've got an object located at about 10.0f on the Z axis and another object at about 1.0f on the Z axis. For some reason, the object that's farther away is being rendered in front of the closer object. Any thoughts? When I move my camera (point of view), I can see that both objects are located at their correct 3D positions. But no matter which side of the world I'm looking in from (front or back), the same object is always displayed in front of the other. I'm thinking it has something to do with my World, View, or Projection matrix. Or maybe it's a render_state problem. I know that I'm rendering the object that's always displayed in front last, but this isn't 2D, so it shouldn't matter the order in which the objects are being rendered. Correct? Thanks.