Commit Graph

9 Commits

Author SHA1 Message Date
Hugo Locurcio bac1e69164
Use static typing in all demos (#1063)
This leads to code that is easier to understand and runs
faster thanks to GDScript's typed instructions.

The untyped declaration warning is now enabled on all projects
where type hints were added. All projects currently run without
any untyped declration warnings.

Dodge the Creeps and Squash the Creeps demos intentionally don't
use type hints to match the documentation, where type hints haven't
been adopted yet (given its beginner focus).
2024-06-01 12:12:18 +02:00
Danil Alexeev 285139fc4e
Fix GDScript code style regarding colon (demos) 2023-03-06 08:44:13 +03:00
PouleyKetchoupp 7f025e000e Update contact tests in physics tests for 2D & 3D
- Create bodies by duplicating the ones from the scene to allow custom
settings on them for testing purpose
- Rename 3D test with multiple groups of bodies "Contact Islands"
instead of "Contacts Extended" for clarity
- Added "Contact Islands" test for 2D
- Fixed log spamming with "Contact Islands" tests due to printing log
messages for each group of bodies
- Added parameter to randomize spawn positions in order to make
contact separation more balanced (avoids artifacts like a huge column
for circles in 2D test)
- Using smaller shapes and larger amount of objects by default to test
more extreme case
2021-04-21 18:25:35 -07:00
PouleyKetchoupp fa83ee0277 Updated 2D character controller physics tests
Added new test for 2D character controller:
Character - Pixels
Functional test for pixel art related issues around KinematicBody and
RigidBody character controllers.

Adjusted existing tests and added more test cases to cover most use
cases from recent fixed issues and regressions for KinematicBody.

Added a more automated way to run all tests with checks to see which
ones failed in character controller tests.

Also fixed some minor issues with the log scrollbar.
2021-02-22 20:09:43 -07:00
PouleyKetchoupp cdf0ed3be9 Add physics tests for 2D character controller
Two tests for character controller, with options to use RigidBody2D,
KinematicBody2D or KinematicBody2D with RayShape2D.

Tilemap: Tests for moving and jumping within tilemap blocks, with a
specific one-way collision test case scenario based on Block Climb Test
from https://github.com/madmiraal/godot-gym.

Slopes: Tests for moving and jumping in slopes, with different cases
based on snap and stop-on-slope parameters for kinematic bodies.
2021-01-22 17:24:28 -07:00
PouleyKetchoupp 6a738c1ede Add One Way Collision for 2D Physics tests 2021-01-06 20:25:27 -07:00
PouleyKetchoupp 7a437d1d23 Add joints test to 2D/3D physics tests 2020-12-30 20:15:08 -07:00
PouleyKetchoupp 9ad473c633 Add collision pairs test to 2D/3D physics tests
Functional test used for checking/debugging different collision cases for all possible pairs of shape types.
2020-12-18 20:51:54 -07:00
PouleyKetchoupp 8241be5817 Add demo: Physics Tests 2D
Similar to its 3D counterpart, with tests using 2D physics.
2020-12-16 09:11:35 -07:00