GDevelop
GDevelop copied to clipboard
Issues with Physics Collisions that occur between frames
Edit: Step to recreate the error: Create a project Use physics object and try to trigger events when they collide (👉👉👉 Bouncing object. It's useless to use D2Box and bullet that are for object "passing through"!!! 👈👈👈) As long as the speed of the object is greater than 1 pixel per frame. The collision is broken unstable
https://youtu.be/WSH1oAUDxqA
https://drive.google.com/file/d/1MyFp6qeoOFXh4G9if9xzUa5g4y8ISCJz/view?usp=drivesdk
Other details: Bug happening on windows and android.
Last update of Gdevelop Desktop
(Physic engine for object Bouncing. Not passing through).
The problem seem to be object can go faster than 1px per frame. But it need to be touching pixel to pixel on the drawn frame, it does not trigger event if the object bounce but never have been drawn Touching the object.
Resume: it have been discovered that object moving faster than 1pixel per frame directly impact how stable or accurate, are collision (for object Bouncing on each other not "tunneling/Passing through object" in wich case Box2D do the job)
The "exams" tend to show, collision that are calculated between frame, can be "skipped", in other words the software can only process what he "completely drawn", but speed and Fps can make it so an object will never be drawn next to it. (If object speed =12000 with 60 fps, the object trave 200px/frame Let's say a "Marble" is at 100Px from an obstacle. The next frame the average distance traveled can be (approximately) resume this way.
"Frame 01 cleared" Marble move 100Px < Marble touch obstacle. Marble bounce back Marble move 100Px > "Frame 02 Draw"
The obstacle in that scenario is touched between the frame clearance, and the next frame drawing.
https://youtu.be/WSH1oAUDxqA
Solution : Obviously the engine know the object touched another.
Speed only make it so it's not drawn Touching eache other
Add a function that will trigger the collision the next frame (even if the object is not necessary touching in the frame. It did touched the object in no frame)
Maybe you will need to play with the physic settings and treat is as a "bullet" for the fast speed objects.
Maybe you will need to play with the physic settings and treat is as a "bullet" for the fast speed objects.
Bullet is good for object "passing through" not "bouncing" on each other
The problem is from the core of the engine.
It's to much "framerate dependant" to draw collision for event triggering. while object can go faster than 1 pixel per frame, it need to perfectly touch the object. (considering it bounce. You have can't afford moving more than 1 pixel each frame to be sure it trigger in events.
While it doesn't prevent the bounce to be calculated and handle "Off of frames"
As a reminder, any bug report needs to have the below following details in the opening post. You'll also want to include an example project with your events showing your specific setup and the issue.
Describe the bug
A clear and concise description of what the bug is.
Please double check that the bug is not already reported in the issues list.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
- Please include a link to a game if possible!
- If applicable, add screenshots to help explain your problem.
Other details
- Include any OS/browser version/smartphone that you're using
- Which version of GDevelop are you using? The desktop app or the web-app?
- Add any other context about the problem here.
As a reminder, any bug report needs to have the below following details in the opening post. You'll also want to include an example project with your events showing your specific setup and the issue.
Describe the bug
A clear and concise description of what the bug is.
Please double check that the bug is not already reported in the issues list.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
- Please include a link to a game if possible!
- If applicable, add screenshots to help explain your problem.
Other details
- Include any OS/browser version/smartphone that you're using
- Which version of GDevelop are you using? The desktop app or the web-app?
- Add any other context about the problem here.
Step to recreate the error: Create a project Use physics object and try to trigger events when they collide (👉👉👉 Bouncing object. It's useless to use D2Box and bullet that are for object "passing through"!!! 👈👈👈) As long as the speed of the object is greater than 1 pixel per frame. The collision is broken unstable
https://youtu.be/WSH1oAUDxqA
https://drive.google.com/file/d/1MyFp6qeoOFXh4G9if9xzUa5g4y8ISCJz/view?usp=drivesdk
(Problem is OBVIOUSLY the engine did made the ball bounce. That mean it only ignore it should trigger event colliding
As Silver-Streak said, please put those details like they are in your initial post and add/edit all details that are mentioned in it. For example, the section "Other details" is still missing. You could add them in another comment but I don't think that's the point of it.
I'm not telling you that nobody will take a look into the issue if you don't write it exactly like that but I am convinced that this structure is on one side to help you make sure you systematically thought through the issue but on the other hand makes it much easier for anyone trying to solve it if they have all needed information (conveniently in the usual format) at the top and don't have to read though all comments to read about the details :)
As Silver-Streak said, please put those details like they are in your initial post and add/edit all details that are mentioned in it. For example, the section "Other details" is still missing. You could add them in another comment but I don't think that's the point of it.
I'm not telling you that nobody will take a look into the issue if you don't write it exactly like that but I am convinced that this structure is on one side to help you make sure you systematically thought through the issue but on the other hand makes it much easier for anyone trying to solve it if they have all needed information (conveniently in the usual format) at the top and don't have to read though all comments to read about the details :)
I edited, provided a project, and Everything.
And since 1 month I'm talking about it providing details, trying to speak to Arthuro in french but... Glad to finally know. it was useless. 👍👍
Thanks for all the information. It's normal that you don't get back as fast as you expect because if it's been a month for you, this post was created three days ago on Github.
The forum is also a place of discussion that often opens the publication of an approved bug report here on Github. Direct requests to the team do not ensure the opening of an investigation on a probable bug. We have a procedure to take into account the bugs:
1 - First a search on the forum 2 - Open a topic on the forum to exchange and see if other people have the same problem. 3 - If there is a bug then someone has to open a full bug report on Github. 4 - Sometimes the team does it, sometimes it's you.
Be aware that it's normal that a bug is not fixed right away, in any case there is enough information to allow a developer to look into this issue. When will it happen? Impossible to tell you, developers have their own projects and deadlines.
Thanks for all the information. It's normal that you don't get back as fast as you expect because if it's been a month for you, this post was created three days ago on Github.
The forum is also a place of discussion that often opens the publication of an approved bug report here on Github. Direct requests to the team do not ensure the opening of an investigation on a probable bug. We have a procedure to take into account the bugs:
1 - First a search on the forum 2 - Open a topic on the forum to exchange and see if other people have the same problem. 3 - If there is a bug then someone has to open a full bug report on Github. 4 - Sometimes the team does it, sometimes it's you.
Be aware that it's normal that a bug is not fixed right away, in any case there is enough information to allow a developer to look into this issue. When will it happen? Impossible to tell you, developers have their own projects and deadlines.
I can understand.
Do note that I cannot afford to wait until my game finally can work, and I don't want to live all this one more time.
By the way, try to remember it's children and unacknowledged people that mainly want to use your software. You should make things easier for them.
And if the bug I talked and found is really a bug.
Do note it already existed 1 year ago.
Do note it's possible children hope have been ruined with all this. A free software not working, and people tell them they are wrong... 👍
And publicly spread the word the physics engine is broken since months if not more, if you want a chance to get back all the users that left frustrated as I am right now.
Hi @AshyraStudio, Do you know if this is still an issue? We made improvements on the collision side since this issue when inactive.
I'm closing this since I think that this issue is now resolved. Do not hesitate to re-open it if you consider something is still missing.