Skip to content

Conversation

@AGulev
Copy link
Contributor

@AGulev AGulev commented Aug 11, 2025

Added new [box2d] section in game.project:

  • velocity_iterations (default: 10) - Box2D 2.2 velocity solver iterations
  • position_iterations (default: 10) - Box2D 2.2 position solver iterations
  • sub_step_count (default: 4) - Box2D 3.x sub-stepping count

Using these new parameters, users can reduce iterations for better performance or increase for higher precision.

Fix #10692

@AGulev AGulev requested a review from deurell August 11, 2025 09:24
velocity_threshold = 0.9
max_fixed_timesteps = 3

[box2d]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use more real life values for clarity?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is save_data_project test. The only goal of this file is having all the fields filled with non-default values. It contains all the file formats with all the fields filled (including game.proejct)

Copy link
Contributor

@deurell deurell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Also a nice tutorial on game.proj params. 👍

@AGulev AGulev merged commit ab386c9 into dev Aug 11, 2025
65 of 68 checks passed
@AGulev AGulev deleted the issue-10692 branch August 11, 2025 14:36
@aglitchman
Copy link
Contributor

Thank you so much!

@AGulev
Copy link
Contributor Author

AGulev commented Aug 13, 2025

Thank you so much!

My pleasure

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

Successfully merging this pull request may close these issues.

Configurable sub-step for 2D physics

4 participants