Commit Graph

1468 Commits

Author SHA1 Message Date
Hugo Locurcio
84eabb3cf7 Add .clang-format and use it to format shader files (#1249) 2025-09-22 16:15:54 +02:00
David Briscoe
aecf661c9c Fix and improve Role Playing Game: Gamepad, TileMapLayer, upgrade for 4.4.1 (#1248)
* Improve gamepad behaviour in rpg

Fix gamepad can't do dialogue.
Fix character often plays bump animation with gamepad when there's no
obstacles around.

Add gamepad A to ui_accept so gamepads can press buttons in dialogue and
combat.

Use get_vector so we get an automatic deadzone on our input.

Round our input direction so we don't pass Vector2i(0,0) to
request_move, get denied, and then do a bump animation.

* Use SpriteFrames instead of animating texture

Seems like Godot 4 doesn't allow toggling AnimationPlayer tracks by
making children editable so the texture is no longer being set and the
player is invisible. Regardless, this workflow is also not scalable to
multiple enemy types. Instead, use SpriteFrames to setup different
visuals for each slime.

Triggers animations from code alongside AnimationPlayer calls because
doing it in AnimationPlayer seemed unnecessarily complex.

* Give all slimes a common base class

Split player input handling from walker to allow both slimes to use the
same visual setup. In a real game, you'd want this kind of setup so
enemies are able to walk on the grid too.

Remove unused actor.gd -- looks like this was an early version of
walker.gd.

Setup opponent slime as type=Actor because otherwise you can't fight
them.

* Convert TileMap to TileMapLayer

Used "Extract TileMap layers as individual TileMapLayer nodes" in the
TileMap editor and removed the 0 layer argument from functions in
grid.gd

* Explain and rename facing direction node

When I first started looking into the character, I couldn't figure out
what this play button texture was for. After experimenting, it might be
an old version of the character visuals or a demo to show how to make
your character rotate.

* Fade to black between scenes

Fix blue screen when entering combat.

Our fade ColorRect was hidden so it never displayed. We removed the
exploration scene before fading so the fade started with an empty scene
with a blue skybox.

* Loop idle animation in combat

Add AnimationTree to combat character setup so we can tell when the
take_damage animation completes. This was harder than expected because
by default Godot modulates to black and sets scale to 0 unless you
specify otherwise with the RESET animation.

* Add a CanvasLayer above each clickable Control root

Fix mouse can't click buttons.

Seems like we're not able to click buttons in Godot 4 without a
CanvasLayer root. Adding that makes it work, but required some
restructuring to point at the correct node. In cases like combat+ui,
change it to emit a signal to use the "call down, signal up" pattern.

* Remove error comment that no longer occurs

Neither winning nor fleeing triggers this warning on Godot
v4.4.1.stable.official [49a5bc7b6].

* Rename parent -> grid

Make it clearer that the parent of the player and other pawns is
expected to be our Grid class.
2025-09-16 15:42:25 +02:00
0x1hue
b45ef5497b Fix uniform sets in Compute Texture demo (#1247)
- Move texture references into separate vars for clarity.

This fixes compatibility with 4.5 while preserving compatibility with 4.4.1.
2025-09-14 01:35:59 +02:00
Aaron Franke
2fc0497915 Merge pull request #1237 from godotengine/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-08-11 21:51:41 -07:00
dependabot[bot]
d588eb58ce Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 02:09:28 +00:00
Christen Lofland
bf4d1038d6 Minor spelling fixes in strings, comments and non-code files. (#1236)
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2025-08-04 17:19:57 -07:00
Wilson Enrique Alvarez Torres
48aaefbf12 Simplify mesh custom drawing demo (#1231)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2025-07-22 02:52:01 +02:00
Switchbreak
ba8718ed09 Fix "Parse message failed" error in WebRTC Signaling Demo Project (#1209) 2025-07-18 16:36:02 +02:00
Matthew
219eeacced Merge pull request #1218 from BastiaanOlij/openxr_render_models_demo
Added an OpenXR render models demo
2025-07-14 15:59:26 -04:00
Matthew
28e2fc1f15 Merge pull request #1229 from Calinou/control-gallery-add-foldablecontainer
Add FoldableContainer to the Control Gallery demo
2025-07-13 08:32:49 -04:00
Bastiaan Olij
d438fcc8d6 Added an OpenXR render models demo 2025-07-11 12:57:44 +10:00
Hugo Locurcio
7d525f4c9b Add FoldableContainer to the Control Gallery demo
This bumps the demo requirement to Godot 4.5, as FoldableContainer
is only present in 4.5 and later.
2025-07-08 01:04:55 +02:00
Simon Ruderich
89b2660d69 Migrate Navigation AStar demo to TileMapLayer and perform various cleanups (#1208)
* navigation_astar: replace deprecated TileMap with TileMapLayer

* navigation_astar: use get_used_cells() instead of iterating over region

This also removes the confusing use of Tile.OBSTACLE. The tile enum is
mostly used for atlas coordinates but in this case it is compared with
the source id which only happens to be zero as well.

* navigation_astar: use constants for atlas coordinates

This makes it more obvious how to set cells in larger tilesets where the
second position is not zero.

It also removes the constant OBSTACLE which is unused since the last
commit.

* navigation_astar: mention get_used_rect()

Using it in this example is more complex (as the border has no cells)
but it's good to know.
2025-06-30 18:09:02 +02:00
smix8
9acb5528b6 Update NavigationChunk demos (#1221)
Updates NavigationChunk demos for `NavigationMeshSourceGeometryData2D.get_bounds()`
function and new NavigationAgent no post-processing option.
2025-06-25 19:21:12 +02:00
Sebastian Javier D'Alessandro Szymanowski
1280ef63e7 Fix project main scene path in Pong demos (#1217)
Signed-off-by: Sebastian Javier D'Alessandro Szymanowski <sdalessandro@fi.uba.ar>
2025-06-25 19:09:48 +02:00
Aaron Franke
0d6b7722c0 Merge pull request #1098 from BastiaanOlij/openxr_hand_tracking_demo_settings
Updated hand tracking demo based on Godot changes in PR 95153
2025-06-24 03:29:37 -05:00
Bastiaan Olij
dbe9f48dcc Updated OpenXR hand tracking demo based on Godot changes in PR 95153 2025-06-24 11:45:33 +10:00
Rémi Verschelde
8be477ce38 Merge pull request #1212 from BastiaanOlij/mobile_vr_interface_demo
Simple demo for Mobile VR Interface
2025-06-21 11:43:49 +02:00
Bastiaan Olij
16f4b10bc6 Simple demo for Mobile VR Interface 2025-06-19 15:01:40 +10:00
Rémi Verschelde
1cd5f27f8e Merge pull request #1211 from Calinou/move-compute-shader-heightmap-demo
Move Compute Shader Heightmap demo to the `compute/` folder
2025-06-09 16:55:12 +02:00
Hugo Locurcio
da2f21baac Move Compute Shader Heightmap demo to the compute/ folder
- Use GitHub admonition syntax in its README.
2025-06-09 16:31:35 +02:00
Hugo Locurcio
c97a648356 Improve Run-time File Saving and Loading demo (#1196)
- Add runtime MP3 and WAV loading with example files.
- Add runtime FBX loading (but no example files, due to known issues with
  the current FBX runtime loading implementation).
- Use supersampling for the 3D preview to further improve quality.
- Shorten file path to example glTF scene.
- Mention audio duration in the UI when loading an audio file.
2025-05-30 20:13:31 +02:00
Hugo Locurcio
f78efc69ee Add a custom drawing in 2D demo (#1185) 2025-05-30 17:29:06 +02:00
Hugo Locurcio
dc3670e25a Add a 3D tonemapping and color correction demo (#857)
This showcases various tonemapping operators and their interaction
with several color correction textures (1D and 3D).

A script generating neutral 3D LUT textures is also included.

Co-authored-by: Allen Pestaluky <allenpestaluky@gmail.com>
2025-05-30 16:08:51 +02:00
Varga
a445398c60 Add an audio effects demo (#1201)
Co-authored-by: dkleitsas <86194775+dkleitsas@users.noreply.github.com>
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2025-05-29 02:43:03 +02:00
K. S. Ernest (iFire) Lee
3ced51c91c Merge pull request #1183 from BastiaanOlij/openxr_hand_fallback_modifier
OpenXR: Added a fallback modifier implementation
2025-05-27 22:33:28 -07:00
K. S. Ernest (iFire) Lee
1f58baa94c Merge pull request #1197 from PizzaLovers007/rhythm-game
Add a simple rhythm game demo
2025-05-22 14:15:54 -07:00
Alex
6a2de9c3ee Disable GitHub Actions export_web workflow in forks (#1205) 2025-05-19 01:44:35 +02:00
PizzaLovers007
be7a046c1e Add a simple rhythm game demo 2025-05-17 16:55:21 -05:00
Varga
ba2755359d Fix nonexistent function error in Multiplayer Bomber demo (#1202) 2025-05-08 00:19:16 +02:00
Hugo Locurcio
2d64c95990 Update 3D Sprites screenshot to match the recent bugfix 2025-04-28 16:05:47 +02:00
Tianle
9456158841 Fix the bug of shader effect (#1198)
The normal was not calculated correctly

Remove extra parenthesis
2025-04-24 10:06:53 -07:00
Tianle
90f309174d Add Sprite3D and AnimatedSprite3D demo (#1191) 2025-04-24 17:45:14 +02:00
Hugo Locurcio
a531235db3 Use Jolt Physics in all 3D demos that use physics, improve physics tests demos (#1195)
- Add options for physics ticks per second, time scale, max physics steps per frame
  and physics interpolation to the 2D and 3D physics tests demos.
  - Physics ticks per second are always multiplied by time scale so that
    time scale does not affect the physics simulation quality.
- Enable 4× MSAA for better debug shape display. Remove meshes/lights as
  the debug collision fill make these unnecessary.
  - Switch to the Mobile rendering method in the 2D physics tests demo
    to allow for 2D MSAA, as it's not implemented in Compatibility yet.
- Improve collision shapes color in the 2D and 3D physics tests demos
  for better visibility. Each PhysicsBody type now has its own collision
  shape color.
2025-04-21 21:59:31 +02:00
Bastiaan Olij
debdec8469 OpenXR: Added a fallback modifier implementation to the hand tracking demo, if hand tracking is not available 2025-04-21 13:17:21 +10:00
Hugo Locurcio
819d201cc4 Enable physics interpolation in all 3D demos (#1074)
This makes use of the new built-in 3D physics interpolation
added in Godot 4.4.
2025-04-15 16:54:41 +02:00
Hugo Locurcio
a88ca219b8 Add block placement preview to Voxel demo, improve debug display (#1190)
- Allow placing/breaking blocks when further away (up to 5 blocks instead of 4).
- Add a background to the debug display to improve readability on bright backgrounds.
- Simplify coordinate display using the `%v` placeholder available in 4.3 onwards.
2025-04-15 16:53:12 +02:00
Hugo Locurcio
c05d05009b Improve flat terrain generation in the Voxel demo (#1189)
This adds 2 layers of dirt below the grass layer and a layer of indestructible
bedrock below it so you can't fall off the world.
2025-04-15 15:03:12 +02:00
Hugo Locurcio
b06917acaa Fix incorrect class_name declaration in 2D physics tests demo (#1188) 2025-04-14 22:51:18 +02:00
Mikael Hermansson
9db52662cb Change physics joint tests to freeze bodies as kinematic in the Physics tests demos (#1177) 2025-04-14 18:58:55 +02:00
Hugo Locurcio
7befd7c718 Enable physics interpolation in all 2D demos (#1070)
This makes uses of the new built-in 2D physics interpolation
added in 4.3.

For 3D demos, a separate PR requiring `master` will be made later.
2025-04-14 18:58:38 +02:00
Hugo Locurcio
90617ba1e8 Fix camera colliding with the player in 3D platformer demo (#1187)
This was most common at low physics tick rates like 20 TPS.

This also fixes an issue with the RigidBody character demo having
movement speed depending on the physics tick rate.
2025-04-14 17:05:50 +02:00
Aaron Franke
f7a1433739 Fix pick block in Voxel demo 2025-04-13 04:57:12 -07:00
J.M. de Jong
d21c03d09c Remove broken int type check in WebRTC Signaling demo (#1186)
JSON.parse_string() parses all numbers as floats, even if there are no decimals.
`str(JSON.parse_string('{"type": 3}').asdf)` would result in `"3.0"`, which is not a valid int.
Because of this, the demo is not working.
2025-04-06 23:15:48 +02:00
Aaron Franke
d169ec17e2 Fix block face checks and explicitly define normals in voxel demo (#1182) 2025-04-02 08:41:10 -07:00
Aaron Franke
fad2469531 Merge pull request #1179 from Calinou/update-for-4.4
Update demos for Godot 4.4
2025-03-20 20:43:57 -05:00
Hugo Locurcio
4d49bbd1b8 Update demos for Godot 4.4
- Resave all files with Godot 4.4 to make use of script/shader UIDs.
- Use AgX tonemapping in all demos that used a tonemapper other than Linear.
2025-03-21 02:00:41 +01:00
utsav132
5557b10cfa Fix mob playback animation being started before the animation is set in Dodge the Creeps (#1175)
The '$AnimatedSprite2D.play()' is called at the beginning in the '_ready' function,
when it should actually be called at the end, after selecting the animation.
2025-03-07 19:43:58 +01:00
Hugo Locurcio
fdb2f50a20 Add a graphics tablet input demo (#1162) 2025-02-10 18:17:34 +01:00
Jason Yundt
0d46333c4e Update Platformer 2D to Godot 4.3 (#1145)
* Update Platformer 2D to Godot v4.3

Before this change, if you tries to import the Platformer 2D project
using Godot v4.3 (the latest stable version of Godot, at the moment),
you would get the following warning:

> Warning: This project was last edited in Godot 4.2.
> Opening will change it to Godot 4.3.
>
> Open anyway? Project will be modified.

This change updates the project to Godot 4.3 so that that warning no
longer appears. When you upgrade to a newer version of Godot, sometimes
certain files will automatically be updated by the Godot Editor after
the upgrade has been completed. Specifically, the files won’t get
updated until after they’re opened in the Godot Editor. When creating
this commit, I tried to open every single file for Platformer 2D in the
Godot Editor to make sure that all of those automatic changes are
included in this commit.

* Replace Platformer2D’s TileMap with a TileMapLayer

Before this change, the Platformer 2D used a TileMap Node. TileMaps are
deprecated. TileMapLayers should be used instead [1].

[1]: <https://docs.godotengine.org/en/4.3/classes/class_tilemap.html#tilemap>
2025-02-06 15:23:15 +01:00