4ian / GDevelop

:video_game: Open-source, cross-platform game engine designed to be used by everyone.

Home Page:https://gdevelop.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limitation in Physics Engine Speed

FrostyFlame1 opened this issue · comments

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

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