|
don't abandon me |
Loki66
Member #17,089
May 2019
|
Hello to all |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Loki66, as you may have noticed, there aren't many people left on this site to answer your question. I've seen it, but collision detection can be quite the involved discussion. I was going to post my solution, but it doesn't always work. Circle circle collision can be very complicated. Of course a simple overlap check will work for low velocities, but not for high velocity. I have the opposite problem, my intercept based detection algorithm works well for high velocity, but not low velocity. You can view my intercept library Merlin here : https://github.com/EdgarReynaldo/Merlin EDIT Also, as I said, it can be a very involved discussion. May I ask, what is your native language? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
jmasterx
Member #11,410
October 2009
|
I'd guess Italian Agui GUI API -> https://github.com/jmasterx/Agui |
Mark Oates
Member #1,146
March 2001
|
Circle circle is not very intuitive to grasp at first. The best solution I know of requires subdividing the frame's timestep (usually a frame's timestep is 1/60 per second). The technique involves calculating all the collision times for all of the circles in that timeframe, finding the smallest sub-step in that frame, moving time forward up to the sub-step and changing the trajectories of those two colliding circles. At that point, you may have some "remainder" time in your frame. Rinse and repeat until you have used the entire 1/60 timestep. That accounts for all circle sizes, all velocities, can handle all the multiple sub-collisions and reactions that can occur within a frame, and is actually quite performant! I could go into the math involved in "calculating all the collision times for all of the circles in that timeframe" if anybody's interested. It's actually a really fun algo to implement. -- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
In my Merlin library I used a collision table. (N x N-1)/2 pairs of possible collisions. When you calculate an intercept it never changes unless the object's velocity or acceleration change, so no need to recalculate it. Simply sort the collision times ascending on time and apply in order. Each time a collision occurs, you need to recheck both objects entries in the collision table, resort, advance time, etc.... My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
BitCruncher
Member #11,279
August 2009
|
This kinda begs the (probably already asked) question: Where the heck is everybody? I guess they just moved on? I remember when this place was happening .
|
Mark Oates
Member #1,146
March 2001
|
They're here. I wouldn't be surprised if most of them are reading this right now. -- |
Onewing
Member #6,152
August 2005
|
In the shadows, they wait, growing stronger, to rise yet again. ------------ |
Mark Oates
Member #1,146
March 2001
|
Fuk yuh Onewing in the house. Bam, what you been up to? -- |
Rodolfo Lam
Member #16,045
August 2015
|
From time to time you can see people in the online users tab. They just don’t talk or prefer not to.
|
Loki66
Member #17,089
May 2019
|
Hi Edgar Reynaldo, I'm italian. I tried to compile your Merlin projects, but it gives me errors because it can't find allegro.h in *.hpp header I found a site that looks interesting: Thank you all for your help |
jmasterx
Member #11,410
October 2009
|
Loki66 said: Hi Edgar Reynaldo, I'm italian. No weigh! Agui GUI API -> https://github.com/jmasterx/Agui |
Mark Oates
Member #1,146
March 2001
|
Wow Loki66, that is one killer tutorial! Nice find! And thanks for sharing. -- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
jmasterx said: No weigh! He doesn't weigh anything?! My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Mark Oates
Member #1,146
March 2001
|
Edgar Reynaldo said: He doesn't weigh anything?! Weight a minute! 🤔 -- |
Loki66
Member #17,089
May 2019
|
Hello to all Edgar my English is not good, I also started using visual basic in 2018 and jmasterx you guessed my nationality, good boy I would like to ask SiegeLord if it is possible to have the mouse coordinates, event.mouse.dx and event.mouse.dy float format. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Loki66 - I showed you Merlin so you could get an idea of the code. If you want to build it you'll need to edit the .cbp projects to change the include and linker search directories to find allegro. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
bamccaig
Member #7,536
July 2006
|
Mark Oates said: Bam, what you been up to? Mostly avoiding hard work, consuming mind altering substances, and fearing impending doom. Meanwhile, my wife keeps steering us toward a normal life so I'm probably going to end up knocking her up within a single gesture of available "receptivity" and then wish to goodness sakes I could still afford, let alone be socially allowed to be, fucking rekt. Cannabis has been legal in Canada for a year now. Shouldn't you be baked right now too?! Append: My post was pretty derailey, but in my defense also pretty baited. Let me see if I can contribute something: Edgar Reynaldo said: If you want to build it you'll need to edit the .cbp projects to change the include and linker search directories to find allegro. I feel like this is a major failing of any IDE. There needs to be a shared configuration, and it needs to know of "environmental variables" and help the user to figure those out. To me editing a CBP would be like editing the Makefile. If I need to edit the Makefile then you fucked up. I might need to override some settings in my environment, for example, but I shouldn't need to edit the Makefile. I think that's mostly a symptom of Windows, but perhaps it has contaminated GUI's in general. I avoid GUI's. Good commands cannot be beaten. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Edgar Reynaldo
Major Reynaldo
May 2007
|
The .cbp projects are purely for my convenience. I just haven't gotten around to writing a CMakeLists.txt for Merlin yet. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Loki66
Member #17,089
May 2019
|
Hello to all Attached there is a "word" file in which there is the algorithm and a folder with the program in which two circles move and collide (02 Algoritmi.rar). If anyone wants to try it, can you tell me if it's ok or not? Edgar Reynaldo, I ran your projects and read them, but I don't know C ++ enough to understand your program. We don't kill this site |
|