Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limitation in Physics Engine Speed #6465

Closed
1 task done
FrostyFlame1 opened this issue Mar 18, 2024 · 1 comment
Closed
1 task done

Limitation in Physics Engine Speed #6465

FrostyFlame1 opened this issue Mar 18, 2024 · 1 comment

Comments

@FrostyFlame1
Copy link

Is there an existing issue for this?

Describe the bug

The physics engine locks the speed of a moving object, in this case a ball, with a max speed of 1200. This means that even when setting a high timescale for the scene, physics objects are calculated separately and never travel faster than 1200 pixels per second.

This limitation could potentially hinder creativity and limit the possibilities of what we can achieve with GDevelop. Furthermore, this speed limit implies that the testing of games, especially for bugs, could take longer.

image

Steps to reproduce

link of the game: https://gdevelop.io/game-example/free/spherez

GDevelop platform

Desktop

GDevelop version

5.3.195

Platform info

No response

Additional context

No response

@tristanbob
Copy link
Contributor

This is a limitation of Box2D:

Units in Box2D are tuned to be meters, so at a typical framerate of 60Hz a body covering 2 units per timestep is moving at 120 m/s
https://www.iforce2d.net/b2dtut/gotchas#speedlimit

Don't worry, there is an easy way to make the objects in your game move faster! Edit scene properties and change scale from 100 (this is why it moves 1200 pixels/second) to a higher value, such as 200 (this would go a max speed of 2400 pixels a second).

The only downsides to that change are:

  • Existing forces (including gravity) will need to be adjusted as everything will move faster
  • Collisions with a low velocity (like a glancing blow) are less likely to bounce away, and instead stick to the surface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants