Commit Graph

103 Commits

Author SHA1 Message Date
Markus Sauermann
10eb2807b8 Add Split Screen Demo showing input handling (#1023)
* Add Split Screen Demo showing input handling

* Style fixes, layout improvements, update to Godot 4.5

---------

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2025-10-01 22:56:48 -07:00
Hugo Locurcio
5f4a9e409f Use InputEventMouseMotion.screen_relative where relevant in all demos (#1232)
This provides mouse sensitivity that is independent of the viewport
size, without needing to query for project settings.

This also inverts the mouse motion direction in the 3D navigation demo
to better match expectations, and increases mouse sensitivity in the
Window Management demo to be closer to other demos.
2025-10-01 18:54:19 -07:00
Hugo Locurcio
84eabb3cf7 Add .clang-format and use it to format shader files (#1249) 2025-09-22 16:15:54 +02: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
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
David Briscoe
c49e134e13 Explain how to setup GUI in 3D (#1149)
Make it more obvious to newcomers how this demo works so they can
replicate it in their projects.

Change the text to point to how this is working.

Add Editor Descriptions to make it clearer how this is setup.

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2024-12-23 18:55:20 +01:00
Hugo Locurcio
5f0e0ce205 Improve GUI in 3D demo (#1140)
- Increase physics ticks per second to 120, so that UI interactions feel
  smoother and have lower input lag. This happens since input is governed
  by the physics tick due to the use of physics picking.
- Add a placeholder to the LineEdit and select a default option in the OptionButton.
2024-11-25 12:04:29 -08:00
Markus Sauermann
6f44371df1 Fix physics picking in Gui in 3D Demo (#1139)
Physics picking requires that the SubViewport has a consistent state
of the mouse-enter/exit notifications.

Godot V4.3 was changed in comparison to V4.2, so that it now requires
this additional step.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2024-11-25 18:38:26 +01:00
shahriarlabib000
723331f814 updated README and Screenshots (#1111) 2024-08-28 18:09:22 -07:00
shahriarlabib000
9f59648c26 Update robot mesh for Godot 4 in 3D in 2D demo (#1106) 2024-08-26 00:07:36 +02:00
ShatteredReality
b4c73f4888 Fix README links to asset library (#1078)
This updates all links to point to the 4.2 demos instead of the 3.5 ones.

Co-authored-by: A Thousand Ships (she/her) <96648715+AThousandShips@users.noreply.github.com>
2024-06-24 19:29:58 +02:00
Hugo Locurcio
785e3213d5 Use higher shadow filtering quality settings in 3D demos (#1067)
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.
2024-06-06 22:11:18 +02:00
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
Tarik Belabbas
9a5176e430 Fixed minor Godot 3 bit in "gui_in_3d" demo's billboard specific code (#1052) 2024-05-06 23:04:36 -07:00
Hugo Locurcio
31d1c0c112 Remove old and unused project settings, update various demos for 4.2 (#1024)
- 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.
2024-03-26 18:01:58 +01:00
A Thousand Ships
82913393a8 Improve code style (#1021)
* 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"...)`
2024-03-25 17:06:52 +01:00
Markus Sauermann
a69b2f7e21 Rewrite GUI in 3D demo to use Physics Picking for mouse events (#925)
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.
2024-02-24 18:06:19 +01:00
Ryan Roden-Corrent
722bd11689 Update viewport scaling demo to 4.x
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>
2024-02-13 19:17:02 +01:00
Hugo Locurcio
2a962929f3 Update demo files for Godot 4.2.1 (#1013)
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).
2024-02-01 17:30:08 +01:00
MotH
0a84347d11 Sorted tags 2023-06-28 21:27:10 +02:00
Hugo Locurcio
18c76b6dae Add tags to all demo projects
This makes sorting them in the project manager easier, as you can
click tags in the project manager to filter to a specific tag.
2023-06-26 18:03:50 +02:00
Hugo Locurcio
63d1cd9a60 Use 128×128 WebP icons for all demos (#885) 2023-03-29 18:59:57 +02:00
Rémi Verschelde
6947ff4529 Merge pull request #858 from KMouratidis/patch-1
Fix "is mount_event" check in gui_in_3d to work with both 4 beta and 4 rc
2023-02-28 16:41:09 +01:00
Danil Alexeev
1cf4fff74a Remove unnecessary randomize() (#862)
Seed is now automatically randomized on startup in Godot 4.
2023-02-27 18:02:44 +01:00
Kostas Mouratidis
d059806f20 Fix "is mount_event" check in gui_in_3d to work with both 4 beta and 4 rc 2023-02-26 13:10:46 +01:00
Hugo Locurcio
682b933dac Improve dynamic split screen demo (#815) 2023-01-17 21:41:02 +01:00
Hugo Locurcio
2c2c89e040 Improve 2D in 3D demo (#814) 2023-01-17 21:37:16 +01:00
Hugo Locurcio
1d5184e235 Update most demos for Godot 4.0.beta10 (#782) 2023-01-05 16:50:17 +01:00
Aaron Franke
81fef6072b GUI in 3D: Always process GUI even when the scene tree is paused 2022-04-03 04:14:28 -05:00
voylin
e6c19ff4a9 Fix scaling not working after resizing the window (#699) 2022-03-29 19:28:58 -05:00
Aaron Franke
cb52878006 Use StringName literals with Input methods 2022-03-27 19:19:09 -05:00
Aaron Franke
3e3a9e7b6e Update Viewport demos to Godot 4 2022-03-26 19:29:53 -05:00
Aaron Franke
bbe50fc9da Convert demos to Godot 4 using regular expressions in a script 2022-03-26 16:09:10 -05:00
Aaron Franke
b7e0a470c7 Update demos to Godot 3.4 2021-11-05 11:48:47 -05:00
Hugo Locurcio
cbb5c94c6f Allow 3D demos to fallback to GLES2
A GLES2-specific tweak is now documented for the GUI in 3D demo.

This also tweaks shadow quality and performance to find a better
balance and result in smoother shadows, including when using GLES2
(thanks to the use of PCF13 shadow filter mode).

In demos that allow falling back to GLES2, ETC1 texture import
is enabled to allow exporting to Android or HTML5 without having
to tweak anything.
2021-11-05 09:57:51 -05:00
Aaron Franke
6875a21545 Replace built-in scripts and delete strange "e" scripts 2021-06-21 12:33:42 -04:00
Aaron Franke
19312b2899 Simplify 3D robot in the 3D in 2D demo 2021-06-06 23:28:53 -04:00
Aaron Franke
814909538f Update projects to Godot 3.3 2021-04-21 19:17:12 -04:00
Aaron Franke
2ee9b47f6c Use ETC instead of ETC2 for all GLES2 demos 2021-03-29 18:30:14 -04:00
Aaron Franke
4913cd868a Misc fixes and tweaks 2021-03-03 02:59:17 -05:00
Hugo Locurcio
aa65867e43 Improve several demos' configuration
- Enable anisotropic filtering in 3D demos, and set the quality to
  16× on desktop and 4× on mobile.
- Enable 4× MSAA on some 3D demos that didn't use it beforehand.
- On GLES3 demos, disable MSAA on mobile as these demos are often
  more demanding.
- Use more conservative framebuffer allocation settings for better
  performance.
- Use PCF13 shadow filtering in GLES2 demos on desktop to benefit
  from soft shadows in Godot 3.2.4 and later.
  In Godot 3.2.3, this will make shadows smoother but still "blocky".
- Use Lossless compression instead of VRAM compression for
  small textures such as the voxel demo texture atlas.
2021-02-28 22:28:44 +01:00
Hugo Locurcio
4adaaa2eb2 Simplify the 3D scaling demo setup, enable filtering by default
It turns out using a TextureRect node isn't necessary :)

The typical ViewportContainer + Viewport setup can be used just
fine to enable filtering on the ViewportTexture returned by the
Viewport.

The performance of the new method is equivalent to the old one.
2021-02-13 02:56:51 +01:00
Aaron Franke
3d9bcc6d97 Simplify 3D in 2D demo 2020-12-06 22:00:51 -05:00
Aaron Franke
fc54dd9c23 Fix README files, especially in Android IAP demos 2020-11-28 22:05:39 -05:00
Aaron Franke
918a289ee2 Format files using updated file_format.sh 2020-10-01 14:23:54 -04:00
Hugo Locurcio
fe6103256a Allow hiDPI in all demos that support multiple resolutions
This is required to benefit from crisp display on hiDPI monitors.
This also fixes issues related to fullscreen and input handling
when using an hiDPI display on Windows.
2020-10-01 00:56:12 +02:00
Aaron Franke
d4bf89d364 Link to the asset library from the README of each demo 2020-09-10 15:37:10 -04:00
Aaron Franke
fcc7d5c723 Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
Aaron Franke
8dff86d370 Add README files to categories 2020-07-03 20:45:51 -04:00
Aaron Franke
189d6ac9b4 Misc fixes and tweaks to many demos 2020-06-27 21:07:49 -04:00