Commit Graph

665 Commits

Author SHA1 Message Date
tetrapod00
3eb1469ed0 Add FAQ entry "Which programming language is fastest?"
Compares the performance of C#, GDScript, and C++.

Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
Co-Authored-By: Andre Sacilotto <66838864+andresacilotto@users.noreply.github.com>
2024-11-30 07:50:30 +01:00
tetrapod00
4f1c98685d Remove performance comparison from C# Basics 2024-11-30 07:49:54 +01:00
tetrapod00
eb2a0a003c Fix wrong editor setting in Overview of Debugging Tools 2024-11-30 07:49:41 +01:00
Mark Wilson
8b1a1b644c Improved style for cross-language examples.
* Replaced "foo"/"bar" example values with "my value".
* Changed C# public field to property and GDScript to match.
* Used PascalCase for C# property.
* Used camelCase for C# local variable.
* Used "var" for C# local variable declarations.
* Used PascalCase for GDScript class/script variable.
* Improved clarity of comments documenting expected output.
* Eliminated horizontal scroll in C# code example.
* Fixed a comma splice in the page text.
* Removed an out-of-date warning block.
2024-11-30 07:49:31 +01:00
Max Hilbrunner
b2b3ea580a C# exports: Fix semicolon syntax error
Co-authored-by: Loregret <31369647+Loregret@users.noreply.github.com>
2024-11-30 07:17:35 +01:00
Hugo Locurcio
d9f223aa14 Document @export_custom and additional range hints in GDScript exports
This also adds a hint suffix example to C# exports.

Co-authored-by: Shawn Hardern <126725649+ShawnHardern@users.noreply.github.com>
2024-11-30 07:15:17 +01:00
tetrapod00
d651092a27 Update list of debugging settings 2024-11-30 07:13:43 +01:00
tetrapod00
e336118dc9 Improve GDScript format strings tutorial
Remove usages of "integral".
Add section on string concatenation.
Improve organization.
Fix incorrect examples.
2024-11-30 07:13:09 +01:00
Kleidon
ea02eb44b5 Fix "or_greater"/"or_less" code example
The code example demonstrating the usage of the "or_greater" and "or_less" hints for the export_range annotation does not declare a variable after the annotation, which is inconsistent with the previous three code examples in the section.
Also, giving the export_range a step of 1 does not create a slider for the property in the editor, like the text suggests, but it instead creates a spin box. The step should be changed to a float so the property can appear as a slider.
2024-11-30 07:12:08 +01:00
tetrapod00
b71ff5c73d Improve display of rubric fake headers with heading-level option 2024-11-30 07:07:47 +01:00
Andrey Solomatin
10ca7b1d8d Made edits to match GDScript code order
Updated gdscript_documentation_comments.rst
2024-11-30 07:06:20 +01:00
Anaclecio Brederodes
92aa6f195e Correctly name enum type
Previously the example defined a "MyEnum" enum, but used a "SpellElements" type export. I've changed so it now defines a "SpellElements" enum.
2024-11-30 07:05:19 +01:00
Hugo Locurcio
a5b086aa61 Use negative index for get_child() in Singletons (Autoload) 2024-11-30 07:04:16 +01:00
tetrapod00
88601c21e3 Improve GDScript Basics sidebar navigation by changing header levels
Promotes many headers up one level, so they appear in the sidebar.
Removes the redundant Language header, since the whole page is about the language.
2024-11-30 07:03:52 +01:00
tetrapod00
253baa6c64 Fix unreachable pages in sidebar under C# Diagnostics 2024-11-30 07:02:47 +01:00
tetrapod00
14cd3078a3 Remove references to 3.x minor versions
Removes notes about features being introduced in 3.x minor versions. In 4.x, these
details are no longer relevant.
2024-11-30 07:01:03 +01:00
tetrapod00
0b495a66b0 Fix docstring written as comment 2024-11-30 07:00:28 +01:00
Hugo Locurcio
6c43491cc5 Document filename requirements in C# global classes
- Flesh out the introduction.
2024-11-30 06:57:54 +01:00
Hugo Locurcio
b5e097d435 Document Variant not being nullable 2024-11-30 06:57:24 +01:00
Hugo Locurcio
c86adb0bda Clarify restrictions on nested array types in Static typing in GDScript 2024-11-30 06:57:06 +01:00
Aaron Franke
a04b7d9780 Add a note about GDScript format strings in C++ (#10061) 2024-11-30 06:56:03 +01:00
Lukas Tenbrink
ef9d2db714 Add a gdextension online documentation guide. (#9966)
* Add a gdextension online documentation guide.

---------

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Co-authored-by: Patrick Exner (FlameLizard) <patrick.exner1@web.de>
2024-11-30 06:55:48 +01:00
A Thousand Ships
d57d5f894e [GDScript] Clarify initialization of enum values
# Conflicts:
#	tutorials/scripting/gdscript/gdscript_basics.rst
2024-11-30 06:51:33 +01:00
notPelf
8835289fe7 Add info about layer mask exporting to physics_introduction.rst (#10242)
* Update physics_introduction.rst

The docs page for raycasting provides a link to the physics introduction page for how to set a collision mask on a raycast created in code. The physics introduction page does not mention export annotations for exporting a collision mask. This pull request adds a brief bit about exporting layer masks, and links to the export annotation docs.

---------

Co-authored-by: tetrapod <145553014+tetrapod00@users.noreply.github.com>
2024-11-17 11:22:00 +01:00
Hugo Locurcio
8a263cb63f Fix Code order section saying it's the first section in GDScript style guide
It's not the first section of the page anymore.
2024-10-04 03:56:01 +02:00
Hugo Locurcio
697ddf54b0 Fix outdated reference to register_class function in GDExtension C++ example
This was replaced by the `GDREGISTER_CLASS` macro in Godot 4.0.
2024-10-04 03:55:54 +02:00
tetrapod00
f7e8509a17 Improve sidebar navigation by removing headers
- Ensure most pages are reachable through the sidebar, by removing headers on pages that are mostly indexes.
- This also means that some pages now have navigable headers again.
2024-10-04 03:55:12 +02:00
Lukas Tenbrink
9acbb3ad61 Fix kbd description in gdextension docs system. 2024-10-04 03:54:53 +02:00
Junwan Park
0a5fc87ffb Fix builtin_types link in tutorial gdscript_basics page
It's linked to a wrong position.
2024-10-04 03:54:19 +02:00
tetrapod00
bd0da40feb Add documentation for GDScript when statement 2024-10-04 03:53:42 +02:00
Hugo Locurcio
14c1e6f0ab Fix incorrect setup instructions in The profiler 2024-10-04 03:52:01 +02:00
Hugo Locurcio
5f13e67349 Document PackedVector4Array
This type was added in Godot 4.3.
2024-10-04 03:51:42 +02:00
Hugo Locurcio
8e2be506e0 Fix incorrect statement in node_type being case-insensitive in Creating script templates
On case-sensitive filesystems, the case must match the actual node name,
so the folder will most likely need to use uppercase characters in its name
(e.g. `MeshInstance3D`).
2024-10-04 03:51:25 +02:00
Hugo Locurcio
1e81218d42 Fix ADD_PROPERTY() calls in GDExtension C++ example to use correct syntax
This matches how properties are declared in core Godot.
2024-10-04 03:50:56 +02:00
gachipan
9de6082171 Remove confusing end of sentence from the_profiler.rst documentation
Cut off the end of a sentence that doesn't make sense:

"You can also start profiling at any time before or during gameplay, depending on if you want."

It seems like removing the "depending on if you want." improves clarity of the documentation.
2024-10-04 03:47:37 +02:00
RedStainedInk
dfdb5bcd2c Removed outdated information about Mono SDK beeing necessary
Mono SDK isn't necessary any more for Godot .NET to work properly on Linux. All functionality that was needed from Mono back then is now provided by .NET proper.

I fear Mono SDK might even cause some conflict with up-to-date .NET.
2024-10-04 03:46:28 +02:00
Matthew
542a8a4a82 Merge pull request #9773 from darkstarworks/master
Update 07.killing_player.rst
2024-10-04 03:44:36 +02:00
Hana - Piralein
0f3fabbb5a Update codespell path and fix spelling errors 2024-10-04 03:44:22 +02:00
Kongfa Waroros
050c9b94a9 Update certain example code snippets to use the new syntax 2024-10-04 03:41:25 +02:00
bruvzg
c14a6216e8 [GDExtension] Add missing iOS instructions and build/config example code. 2024-10-04 03:40:48 +02:00
Raul Santos
47327606b0 C#: Remove references to GODOT_SERVER and GODOT_HTML5 defines
- The `GODOT_SERVER` preprocessor define is no longer available in Godot 4, since the dedicated server platform was removed.
- Replaced a reference to `GODOT_HTML5` with `GODOT_WEB` since that platform was also renamed in Godot 4.
- Remove note about `<DefineConstants>` that only really applies to Godot 3.
2024-10-04 03:40:36 +02:00
Patrick Exner
d29c88d0a0 Fix project structure diagram in gdextension docs system docs 2024-10-04 03:40:08 +02:00
DDoop
e9035f7cf0 Add warnings for classes named "Editor" in GDscript and C# pages, class_name keyword/global class attribute (#9548)
* Added warning about Editor hiding class_names beginning with Editor prefix

---------

Co-authored-by: Max Hilbrunner <mhilbrunner@users.noreply.github.com>
2024-08-14 19:42:36 +02:00
Balázs Kalydi
91717ff234 Update GDExtension tutorial with the hot reload feature (#9618)
Although the tutorial assumed the hot reload feature, it wasn't enabled in the example config file. Also it didn't mention that it only works if it's compiled in debug mode.
2024-08-14 19:31:17 +02:00
Patrick Exner (FlameLizard)
b21addcf51 Add page about gdextension docs generation (#9667)
* Adding page about gdextension docs generation

---------

Co-authored-by: Max Hilbrunner <mhilbrunner@users.noreply.github.com>
2024-08-14 19:27:31 +02:00
skyace65
f15784d14b Add info in instancing for opening the demo project 2024-08-11 22:45:27 -04:00
Max Hilbrunner
083f7589b9 Merge pull request #9708 from thejacer87/patch-1
Update gdscript_styleguide.rst
2024-08-06 05:58:39 +02:00
Jace Bennest
d71c24c699 Update gdscript_styleguide.rst
fixes typo
2024-08-04 10:48:19 -07:00
Tristan A.
a2d29557ed CSharp example missing return type 2024-08-02 22:34:28 +02:00
Muller-Castro
a36ff907f9 Add typed loop variable example in GDScript reference (#9388) 2024-08-02 02:30:20 +02:00