The 3D demos aren't very demanding and Godot has been optimized
a bit since 4.0's release, so we can afford using higher quality
shadow settings for less noisy shadow filtering.
This also tweaks shadow bias to reduce shadow acne in the Voxel demo.
The time slider in the Physical Light and Camera units demo now
allows for more precise adjustments.
- Make the attractor in the example dynamic to better showcase its functionality,
and add a visual representation to it.
- Tweak the appearance of attracted particles.
- Fix force field particle display (it wasn't using Local Coords as intended).
- Lower the sun angle to make the background darker (and particles easier to see).
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).
* Use match case instead of if else
This is my first pull request.
* Apply suggestions from code review
---------
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
```
ERROR: Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
at: (scene\resources\2d\tile_set.cpp:4963)
ERROR: The TileSetAtlasSource atlas has no tile at (1, 0).
at: (scene\resources\2d\tile_set.cpp:5400)
ERROR: TileSetAtlasSource has no tile at (1, 0).
at: (scene\resources\2d\tile_set.cpp:5348)
```
This is a silly "fix", but it prevents an empty `[]` from being printed every time
this demo is run without a MIDI device plugged into the computer.
The MIDI devices list is printed if one is plugged into the computer, which I have tested.
This clears out some errors that happen on every load of this demo in Godot 4 onward.
It also makes the fonts actually work, as they did not before.
We probably don't strictly **need** these font settings for a demo, but they were here before.
I don't think `SourceCodePro-Black.ttf` was ever used, based on looking at history. So I removed it.
Both `.tres` files are gone too, as those are not used in Godot 4.
I have updated everything that used `SourceCodePro-Bold.ttf` to the new setup.
- Move all demo projects that don't require Forward+/Mobile-only features
to the Compatibility rendering method. This improves performance significantly
on low-end devices and ensures visuals are identical to a web export
of the demo.
- Set deadzone on all inputs to 0.2 for better gamepad usability.
- Remove reliance on `default_env.tres` to use built-in Environment
resources in the main scene instead (which follows the preview environment
workflow).
- Remove notices pointing to GDNative or VisualScript, since both were
removed in 4.0.
- Various bug fixes and usability tweaks to 10+ demos.
* Remove unnecessary use of `self`
* Connect to signals directly over `connect("name")`
* Use `call_deferred` on callables over `call_deferred("name"))`
* Emit signals directly over `emit_signal("name"...)`
Rework GUI in 3D Demo to handle mouse events via
Physics Picking instead of in _unhandled_input.
This brings several benefits:
- Correctly handle cases, where the 3D-GUI is located behind other
collision objects.
- Proper passive hovering support
This allows also to make simplifications in the code, because
3D-mouse position no longer needs to be calculated manually.
The 3d_scaling demo was updated to use the built-in 3D scaling mechanisms
in the Forward+ and Mobile renderer (Compatibility in 4.3).
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
This re-ports the following demos to Godot 4 following their latest `3.x` versions:
- 2D Navigation with AStarGrid2D
- 2D JRPG Demo
- 2D Isometric Game
- 2D Platformer
Some tweaks have also been made in the process, such as split screen players
having different colors in the 2D Platformer demo.
Co-authored-by: Nonparoxysmic <69494951+Nonparoxysmic@users.noreply.github.com>
- Add fog shader example courtesy of alghost
(https://godotshaders.com/shader/moving-gradient-noise-fog-mist-for-godot-4/).
- Add textured floor to make volumetric fog easier to see.
- Add keys to adjust volumetric fog quality (higher values are sharper).
- Increase volumetric fog energy on one of the SpotLights to show
the difference.
All demos were opened with Godot 4.2.1, with the mesh format
upgraded for 3D demos.
The 3D antialiasing demo now uses Extra Cull Margin on the last
object to prevent it from disappearing too early when the camera
rotates (due to its use of shader-based animation).