• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

180 Neutral

About ogracian

  • Rank
  1. Troubles in isometric space...

    Hey Wyrframe! Thanks for your help, I really appreciate it. Now, regarding your idea, I liked the "solid" and "phantom" rectangle method, it is elegant and simple to implement, and yes; I am using a fixed camera angle with orthographic projection so it will fit fine in my current code ;) Best Regards, Oscar
  2. Hello, I am working on a 2D isometric game (my first isometric game!), but unfortunately I am stuck, so I hope some people here could enlighten me. My main trouble is related to how I project the camera view area into my grids plane (defined in x-z plane). Currently I am doing it as follows: 1. I define my view area in the X-Y Plane (aka screen), I move the camera around using this view area. 2. To find the visible area on my grid, I project the 4 corners of my view area to isometric space (x-z plane) and compute a axis aligned bounding box from this 4 points. 3. This projected area (the AABB in x-z plane) is what I use to for intersections test against my entities / tiles rectangles (also in x-z plane). This approach works fine ONLY if my objects have a height == 0 (on plane), if I test this area against a entity with a height of 64 (to say something), it miss it at some places, mostly at the corners. I guess this trouble is related to how I manage my objects with a height > 0, I just sets its bounding box size to be the radius of the entity, much like vector max = new vector(entity_width, entity_height, entity_length); float radius = max.length() * 0.5; entity_box.setFromCenterExtents(entityPos.x, entityPos.y, entityPos.z, radius, radius); Thanks in advance, Oscar
  3. Hello, Not really sure if this is exactly what you are looking for, but Lighthouse has posted a tutorial about radar approach which inlcude full source code, maybe it helps you. http://www.lighthouse3d.com/opengl/viewfrustum/index.php?camspace Regards, Oscar
  4. native char* slower on VS2005?

    Well about VC2005 performance, I have been doing some tests too, mainly with math functions (vector, matrix op), and the VC2005 produce SLOWER code than VC2003, and not to mention SLOWER than Intel C++ 9.0, thats why I am still using VC 2003 [smile] There are some posts about VC2005 beeing slower than VC2003 on msnd forums: http://forums.microsoft.com/MSDN/ShowPost.aspx?PageIndex=2&SiteID=1&PostID=128085&PageID=1 Oscar
  5. OpenGL Consoles and OpenGL

    Hello, Well as far as I know the incoming PS3 will use OpenGL (or at least a very similar graphics API), and will use NVIDIA CG languange for high level shader programming. Saludos! Oscar
  6. Hello, Well maybe the trouble is the way you are getting your device data, try using your GetDeviceData and Acquire methods inside a loop, to makesure DInput "catch" any inpu, like the following way: while (1) { elements = 1; hr = IDirectInputDevice7_GetDeviceData(in.keyboard, sizeof(DIDEVICEOBJECTDATA), &od, &elements, 0); // if it did not work, try and re-acquire the device if (FAILED(hr)) IDirectInputDevice7_Acquire(in.keyboard); // If it failed, or there was no events, stop if (FAILED(hr) || elements==0) break; // Process your data here } Hope that helps you, Oscar
  7. This is a great article about how to sync your frame time. http://www.gaffer.org/articles/Timestep.html Hope that helps, Oscar
  8. OpenGL Effect File Equivalent

    Also you could try the CgFX (CG toolkit), which is very similar to Direct3D effect files. Regards, Oscar
  9. Dynamic Camera

    Hi, You could test your players against your camera's frustum, so if someone is out of it or partially intersects it, zoom out your camera until your players complete fit on your camera frustum. About the pan, mmm, I guess you couls point your camera at some point in the middle of your 2 players (fighting game right?), so as players moves, pan the camera so it keeps aligned with your target point. Hope that helps, regards Oscar [Edited by - ogracian on October 6, 2005 5:44:45 PM]
  10. Cool, thats great!, I have used in the past (when licensee cost about $1000),and is a really cool grpahics engine. By the way congratulations for your class project "Goliath", it looks really cool!. Regards, Oscar
  11. Hello, Just by curiosity how could you get the Renderware engine, I ask this because as far as I know it is really expensive, or dose it have a learning edition? About torque I have never used but I could recommend the Cipher engine, it is a really good and powerfull engine with a structure REALLY similar to Quake III engine, maybe you could take a look at it (www.cipherengine.com) Regards, Oscar
  12. Help "shaking" the camera...

    Hi, Thank you all people for your help, I finally got it working!. Regards, Oscar
  13. Using a stack for the gamestate

    Hello, I guess the following link would help you about it. http://tonyandpaige.com/tutorials/game1.html Regards, Oscar
  14. Help "shaking" the camera...

    Hi, Thanks for your help, I have turned on vsync and no more tears : ). But my current method is not frame time sync so I am not very happy with it. About the SIN methdo you suggest, could you develop a little about it? Thanks, Oscar
  15. Hello, I am coding a game but I want to "shake" the camera when a explosion ocurrs, I have implemented a simple test but I am not really happy with it, because my current method is not frameTime sync, and show some image "tear" so I appreciate if someone could help me with about it. Here is my current code: void ShakeCamera(void) { if (!m_iShakeCam) return; CEngine * pEngine = CEngine::GetInst(); float frameTime = 0.001f * pEngine->GetFrameTime(); CCamera * pCamera = pEngine->GetCamera(); // // Do shake int shakeDir = 2 - (rand() % 5); pCamera->Pos = m_InitialCamPos + pCamera->GetRight() * shakeDir * m_fShakePower; pCamera->Pos += pCamera->GetUp() * shakeDir * m_fShakePower; // // Update shake duration time m_fShakeDuration -= frameTime; if (m_fShakeDuration < 0.0f) { // // Shake done, reset data m_iShakeCam = 0; pCamera->SetPos(m_InitialCamPos); } } Thanks in advance, Oscar [Edited by - ogracian on August 9, 2005 2:25:22 AM]
  • Advertisement