panicq

Members
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

115 Neutral

About panicq

  • Rank
    Member
  1. Collision response

    Thank you for the answer, but what do you mean with: "have collided directly in line with their centers-of-mass" ?
  2. Ok, thank for advises, I'll fix my frame rate for physics and let a free frame rate for my logic.   Have a nice day.
  3. Collision response

    Hello,   I've just implement a collision check method between 2 circles (something really simple ), now I want a collision response.   I've seen many tutorials that throw formulas without explain their means, but I'm sure I could get a general approach with the mass of the object and the velocity of each objects and some factors for bounciness and friction, but I dont get the way the are related after a collision happened. Do you have a nice way to get a general collision response ?   PS: This is for platformer, but I'm thinking of reusing this kind of physics in an other game ;)   Thanks in advance,   Have a nice day.
  4. Hum ok, i'll see. And if I don't wan to fix the timestep, wich is the case in many games ?
  5. Hello,   I've a little problem of logic in a game i'm currently working on.   I've vX += acceleration * dT which represent the velocity in X and x += vX * dT;   I've done so because of the reading of book. But after thinking about it and tying with values It seams not really accurate:   imagine acceleration = 1 and two computers A with dT = 1s and B with dt = 2s.   With A:   at the beginning vX = x = 0;   vX += 1 * 1; // = 1 x += 1 * 1; // = 1   vX += 1 * 1; // = 2 x += 2 * 1; // = 3   vX += 1 * 1; // = 3 x += 6 * 1;  // = 6   so at 1s x = 1 px at 2s x = 3 px at 3s x = 6 px at 4s x = 10 px   With B:   vX += 1 * 2; // = 2 x += 2 * 2; // = 4   vX += 1 * 2; // = 4 x += 4 * 2; // = 12   so at 2s x = 4 px at 4s x = 12 px     So here we clearly see that at 4s both x values are not at the same position, wich is clearly not ideal for my gameplay.   Any Idea on what should be really done ?   Thx
  6. Okay so in fact when we pass a XMVECTOR as a parameter to a function it is passed directly through registers (but is it copied or passed as a reference ?) and we should use the corresponding typedef on the platform we use. And __vectorcall or __fastcall are functions that are automatically called when we argument is read, and this functions choose wich way the arguement should be send to register ?
  7. Thx for your answers,   But, it is still not as easy to understand for me. You told me that FXMVECTOR call a __vectorcall function, but FXMVECTOR is a typedef of XMVECTOR wich is a datatype, so when it calls a function ? . What I really dont understand is that XMVECTOR is a 16 bytes chunk of memory, which represent a mathematical vector, so why should we use FXMVECTOR on an other platform, and WHY (beacause it's heavy) we don't pass it as a reference in many functions such as:   XMVECTOR XMVector3Lenght(FMXVECTOR V);   I'm lost. And if I'm using DirectXMath is to advance in my book (Real-Time 3D Rendering with directX and HLSL)   Thx
  8. Hello,   I'm new to directX and I'm reading a book where the author talks about "Calling conventions", and it's quite obscure to me even with the doc. Could you explain to me why in functions like   void XMStoreFloat2(XMFLOAT* dest, FXMVECTOR V);   ...we don't pass the XMVECTOR as a reference or a pointer ? And why are we using alias like FXMVECTOR, GXMVECTOR, or CXMMATRIX  ? And why is there an order of "input parameters", and why we always need to return a pointer and a reference of XMVECTOR ?   I understood that there is a link with the "Single Instruction Multiple Datas" way of computing instructions in the CPU but I dont cleary understand what the link is.   Thanks in advance.      
  9. What is strange, is that I've correctly link to the lib folder that contains the .dylib, so what I've finaly done is to drag and drope the .dylib file in XCode manually and some errors disappeared. But I have always 9 errors beacause of gl3w...   Undefined symbols for architecture x86_64:   "sb6IsExtensionSupported(char const*)", referenced from:       sb6::application::run(sb6::application*) in main.o   "sb6::application::app", referenced from:       sb6::application::run(sb6::application*) in main.o       sb6::application::glfw_onResize(int, int) in main.o       sb6::application::glfw_onKey(int, int) in main.o       sb6::application::glfw_onMouseButton(int, int) in main.o       sb6::application::glfw_onMouseMove(int, int) in main.o       sb6::application::glfw_onMouseWheel(int) in main.o   "_gl3wClearBufferfv", referenced from:       MyApplication::render(double) in main.o   "_gl3wDebugMessageCallback", referenced from:       sb6::application::run(sb6::application*) in main.o   "_gl3wDebugMessageCallbackARB", referenced from:       sb6::application::run(sb6::application*) in main.o   "_gl3wEnable", referenced from:       sb6::application::run(sb6::application*) in main.o   "_gl3wInit", referenced from:       sb6::application::run(sb6::application*) in main.o   "_gl3wIsSupported", referenced from:       sb6::application::run(sb6::application*) in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)  
  10. Hello, As the title says, I'm trying to compile the samples from the blue superbible on mac, but I get some Linker errors. 27 errors: Undefined symbols for architecture x86_64:   "sb6IsExtensionSupported(char const*)", referenced from:       sb6::application::run(sb6::application*) in main.o   "sb6::application::app", referenced from:       sb6::application::run(sb6::application*) in main.o       sb6::application::glfw_onResize(int, int) in main.o       sb6::application::glfw_onKey(int, int) in main.o       sb6::application::glfw_onMouseButton(int, int) in main.o       sb6::application::glfw_onMouseMove(int, int) in main.o       sb6::application::glfw_onMouseWheel(int) in main.o   "_gl3wClearBufferfv", referenced from:       MyApplication::render(double) in main.o   "_gl3wDebugMessageCallback", referenced from:       sb6::application::run(sb6::application*) in main.o   "_gl3wDebugMessageCallbackARB", referenced from:       sb6::application::run(sb6::application*) in main.o   "_gl3wEnable", referenced from:       sb6::application::run(sb6::application*) in main.o   "_gl3wInit", referenced from: Any idea on how I should resolve this ?   Thanks :)