diff --git a/2d/finite_state_machine/debug/Explanations.tscn b/2d/finite_state_machine/debug/Explanations.tscn index 9fc00960..14c03dbb 100644 --- a/2d/finite_state_machine/debug/Explanations.tscn +++ b/2d/finite_state_machine/debug/Explanations.tscn @@ -16,7 +16,7 @@ size_flags_vertical = 4 custom_fonts/bold_font = ExtResource( 1 ) custom_fonts/normal_font = ExtResource( 2 ) bbcode_enabled = true -bbcode_text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton. +bbcode_text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton. States are common in games. You can use the pattern to: @@ -25,7 +25,7 @@ States are common in games. You can use the pattern to: 3. Improve your code's structure. Look at the scene tree and FileSystem tab: without looking at the code, you'll know what the Player can or cannot do. You can read more about States in the excellent [url=http://gameprogrammingpatterns.com/state.html]Game Programming Patterns ebook[/url]." -text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton. +text = "This example shows how to apply the State programming pattern in GDscript, including Hierarchical States, and a pushdown automaton. States are common in games. You can use the pattern to: diff --git a/2d/isometric/README.md b/2d/isometric/README.md index 8b1f4ea8..15c35512 100644 --- a/2d/isometric/README.md +++ b/2d/isometric/README.md @@ -3,7 +3,7 @@ This demo shows a traditional isometric view with depth sorting. A character can move around the level and will also slide around objects, -as well as be occluded when standing in front or behind them. +as well as be occluded when standing in front or behind them. Language: GDScript diff --git a/2d/navigation/README.md b/2d/navigation/README.md index e139b056..b6c9b3f3 100644 --- a/2d/navigation/README.md +++ b/2d/navigation/README.md @@ -4,7 +4,7 @@ Example of using 2D navigation using a [`NavigationPolygon`](https://docs.godotengine.org/en/latest/classes/class_navigationpolygon.html) in a [`NavigationPolygonInstance`](https://docs.godotengine.org/en/latest/classes/class_navigationpolygoninstance.html) node. It uses the 2D navigation API to request a path between two points, -and then traverses the resulting path. +and then traverses the resulting path. Language: GDScript diff --git a/2d/physics_platformer/platform/moving_platform.gd b/2d/physics_platformer/platform/moving_platform.gd index 37a039b4..8386bb8d 100644 --- a/2d/physics_platformer/platform/moving_platform.gd +++ b/2d/physics_platformer/platform/moving_platform.gd @@ -13,5 +13,5 @@ func _physics_process(delta): var d = sin(accum) var xf = Transform2D() - xf[2]= motion * d + xf[2]= motion * d ($Platform as RigidBody2D).transform = xf diff --git a/3d/physics_tests/README.md b/3d/physics_tests/README.md index 61fff997..dd5eba7e 100644 --- a/3d/physics_tests/README.md +++ b/3d/physics_tests/README.md @@ -1,12 +1,12 @@ # 3D Physics Tests -This demo contains a series of tests for the 3D +This demo contains a series of tests for the 3D physics engine. They can be used for different purpose: -- Functional tests to check for regressions and +- Functional tests to check for regressions and compare the behavior between physics engines -- Performance tests to evaluate and compare +- Performance tests to evaluate and compare performance between physics engines Language: GDScript diff --git a/3d/platformer/player/player.gd b/3d/platformer/player/player.gd index 7627bc4d..050048e7 100644 --- a/3d/platformer/player/player.gd +++ b/3d/platformer/player/player.gd @@ -133,7 +133,7 @@ func _physics_process(delta): func adjust_facing(p_facing, p_target, p_step, p_adjust_rate, current_gn): var n = p_target # Normal. var t = n.cross(current_gn).normalized() - + var x = n.dot(p_facing) var y = t.dot(p_facing) diff --git a/LICENSE.md b/LICENSE.md index af60d773..9710bc1a 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. +Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. \ Copyright (c) 2014-2020 Godot Engine contributors. Permission is hereby granted, free of charge, to any person obtaining diff --git a/audio/bpm_sync/bpm_sync.gd b/audio/bpm_sync/bpm_sync.gd index 3149e2e6..b75d381d 100644 --- a/audio/bpm_sync/bpm_sync.gd +++ b/audio/bpm_sync/bpm_sync.gd @@ -31,7 +31,7 @@ func _process(_delta): return var time = 0.0 - if sync_source == SyncSource.SYSTEM_CLOCK: + if sync_source == SyncSource.SYSTEM_CLOCK: # Obtain from ticks. time = (OS.get_ticks_usec() - time_begin) / 1000000.0 # Compensate. diff --git a/format.sh b/format.sh index f96caef2..a1308089 100755 --- a/format.sh +++ b/format.sh @@ -17,6 +17,8 @@ while IFS= read -rd '' f; do sed -i '1s/^\xEF\xBB\xBF//' "$f" # Ensures that files end with newline characters. tail -c1 < "$f" | read -r _ || echo >> "$f"; + # Remove trailing space characters. + sed -z -i 's/\x20\x0A/\x0A/g' "$f" done git diff > patch.patch diff --git a/gui/translation/LICENSE.DroidSans.txt b/gui/translation/LICENSE.DroidSans.txt index 636f1e29..d3a2eaa8 100644 --- a/gui/translation/LICENSE.DroidSans.txt +++ b/gui/translation/LICENSE.DroidSans.txt @@ -3,9 +3,9 @@ Copyright (C) 2008 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/loading/threads/README.md b/loading/threads/README.md index 8e954d6e..267193da 100644 --- a/loading/threads/README.md +++ b/loading/threads/README.md @@ -1,6 +1,6 @@ # Loading with Threads -An example using a thread to load an image. +An example using a thread to load an image. Language: GDScript diff --git a/misc/2.5d/assets/ui/overlay.tscn b/misc/2.5d/assets/ui/overlay.tscn index cc5d123f..59574984 100644 --- a/misc/2.5d/assets/ui/overlay.tscn +++ b/misc/2.5d/assets/ui/overlay.tscn @@ -18,7 +18,7 @@ rect_min_size = Vector2( 500, 50 ) text = " Controls: WASD to move, Space to jump, R to reset, Shift to walk, T to toggle isometric controls, C to view cube demo, Tab to toggle hints. -UIOJKL to change view mode. U = Forty Five deg, I = Isometric, +UIOJKL to change view mode. U = Forty Five deg, I = Isometric, O = Top Down, J = Front Side, K = Oblique Y, L = Oblique Z Not every view mode is meant to be good, it's just to showcase what the system can do. diff --git a/misc/2.5d/assets/ui/overlay_cube.tscn b/misc/2.5d/assets/ui/overlay_cube.tscn index 4cd80f1e..a5fc7dd4 100644 --- a/misc/2.5d/assets/ui/overlay_cube.tscn +++ b/misc/2.5d/assets/ui/overlay_cube.tscn @@ -18,7 +18,7 @@ rect_min_size = Vector2( 500, 50 ) text = " Controls: WASDQE to rotate, R to reset, C to return to the world, Tab to toggle hints. -UIOKL to change view mode. U = Forty Five deg, I = Isometric, +UIOKL to change view mode. U = Forty Five deg, I = Isometric, O = Top Down, K = Oblique Y, L = Oblique Z Not every view mode is meant to be good, it's just to showcase what the system can do. diff --git a/misc/instancing/README.md b/misc/instancing/README.md index 0e82a1e2..38290917 100644 --- a/misc/instancing/README.md +++ b/misc/instancing/README.md @@ -1,7 +1,7 @@ # Instancing Demo A demo showing how to use scene instancing to -make many duplicates of the same object. +make many duplicates of the same object. Language: GDScript diff --git a/misc/joypads/README.md b/misc/joypads/README.md index 8307ae18..1e6e7a38 100644 --- a/misc/joypads/README.md +++ b/misc/joypads/README.md @@ -1,6 +1,6 @@ # Joypads Demo -A tool for testing joypad input. +A tool for testing joypad input. Language: GDScript diff --git a/misc/regex/README.md b/misc/regex/README.md index 1b8ff36a..67a07581 100644 --- a/misc/regex/README.md +++ b/misc/regex/README.md @@ -1,7 +1,7 @@ # RegEx (Regular Expressions) A demo showing regex functionality and usage. -Can also serve as a playground for regex testing. +Can also serve as a playground for regex testing. Language: GDScript diff --git a/misc/sensors/main.gd b/misc/sensors/main.gd index c3b19d0b..feefa11a 100644 --- a/misc/sensors/main.gd +++ b/misc/sensors/main.gd @@ -1,11 +1,11 @@ extends Node -# Below are a number of helper functions that show how you can use the raw sensor data to determine the orientation +# Below are a number of helper functions that show how you can use the raw sensor data to determine the orientation # of your phone/device. The cheapest phones only have an accelerometer only the most expensive phones have all three. # Note that none of this logic filters data. Filters introduce lag but also provide stability. There are plenty # of examples on the internet on how to implement these. I wanted to keep this straight forward. -# We draw a few arrow objects to visualize the vectors and two cubes to show two implementation for orientating +# We draw a few arrow objects to visualize the vectors and two cubes to show two implementation for orientating # these cubes to our phones orientation. # This is a 3D example however reading the phones orientation is also invaluable for 2D @@ -73,7 +73,7 @@ func rotate_by_gyro(p_gyro, p_basis, p_delta): return rotate * p_basis -# This function corrects the drift in our matrix by our gravity vector +# This function corrects the drift in our matrix by our gravity vector func drift_correction(p_basis, p_grav): # as always, make sure our vector is normalized but also invert as our gravity points down var real_up = -p_grav.normalized() @@ -110,7 +110,7 @@ func _process(delta): else: # The gravity vector is calculated by the OS by combining the other sensor inputs. # If we don't have a gravity vector, from now on, use accelerometer... - grav = acc + grav = acc if mag.length() < 0.1: mag = Vector3(1.0, 0.0, 0.0) diff --git a/misc/tween/README.md b/misc/tween/README.md index 770ee511..cc7ebeb3 100644 --- a/misc/tween/README.md +++ b/misc/tween/README.md @@ -1,6 +1,6 @@ # Tween Interpolation -A demo showing advanced tween usage. +A demo showing advanced tween usage. Language: GDScript diff --git a/misc/window_management/README.md b/misc/window_management/README.md index d7254c3d..5ce77723 100644 --- a/misc/window_management/README.md +++ b/misc/window_management/README.md @@ -8,7 +8,7 @@ A demo showing the various window management features available through - Minimizing and maximizing. - Moving the window around. - Capturing or hiding the mouse. -- Getting various information about the screens, including DPI. +- Getting various information about the screens, including DPI. Language: GDScript diff --git a/mono/2.5d/addons/node25d-cs/Node25D.cs b/mono/2.5d/addons/node25d-cs/Node25D.cs index bdfc9d90..229af0ee 100644 --- a/mono/2.5d/addons/node25d-cs/Node25D.cs +++ b/mono/2.5d/addons/node25d-cs/Node25D.cs @@ -96,7 +96,7 @@ public class Node25D : Node2D, IComparable { spatialNode = GetChild(0); } - + GlobalPosition = transform25D.FlatPosition; } diff --git a/mono/2.5d/addons/node25d-cs/main_screen/.broken-cs-files/Viewport25D.cs b/mono/2.5d/addons/node25d-cs/main_screen/.broken-cs-files/Viewport25D.cs index f1ead376..c4bbc21d 100644 --- a/mono/2.5d/addons/node25d-cs/main_screen/.broken-cs-files/Viewport25D.cs +++ b/mono/2.5d/addons/node25d-cs/main_screen/.broken-cs-files/Viewport25D.cs @@ -59,7 +59,7 @@ public class Viewport25D : Control { return; } - + // View mode polling. var viewModeChangedThisFrame = false; var newViewMode = viewModeButtonGroup.GetPressedButton().GetIndex(); @@ -69,7 +69,7 @@ public class Viewport25D : Control viewModeChangedThisFrame = true; RecursiveChangeViewMode(GetTree().EditedSceneRoot); } - + // Zooming. if (Input.IsMouseButtonPressed((int)ButtonList.WheelUp)) { @@ -80,11 +80,11 @@ public class Viewport25D : Control zoomLevel -= 1; } float zoom = GetZoomAmount(); - + // Viewport size. Vector2 size = GetGlobalRect().Size; viewport2d.Size = size; - + // Viewport transform. Transform2D viewportTrans = Transform2D.Identity; viewportTrans.x *= zoom; @@ -92,7 +92,7 @@ public class Viewport25D : Control viewportTrans.origin = viewportTrans.BasisXform(viewportCenter) + size / 2; viewport2d.CanvasTransform = viewportTrans; viewportOverlay.CanvasTransform = viewportTrans; - + // Delete unused gizmos. var selection = editorInterface.GetSelection().GetSelectedNodes(); var overlayChildren = viewportOverlay.GetChildren(); diff --git a/mono/2.5d/assets/ui/overlay.tscn b/mono/2.5d/assets/ui/overlay.tscn index cc5d123f..59574984 100644 --- a/mono/2.5d/assets/ui/overlay.tscn +++ b/mono/2.5d/assets/ui/overlay.tscn @@ -18,7 +18,7 @@ rect_min_size = Vector2( 500, 50 ) text = " Controls: WASD to move, Space to jump, R to reset, Shift to walk, T to toggle isometric controls, C to view cube demo, Tab to toggle hints. -UIOJKL to change view mode. U = Forty Five deg, I = Isometric, +UIOJKL to change view mode. U = Forty Five deg, I = Isometric, O = Top Down, J = Front Side, K = Oblique Y, L = Oblique Z Not every view mode is meant to be good, it's just to showcase what the system can do. diff --git a/mono/2.5d/assets/ui/overlay_cube.tscn b/mono/2.5d/assets/ui/overlay_cube.tscn index 4cd80f1e..a5fc7dd4 100644 --- a/mono/2.5d/assets/ui/overlay_cube.tscn +++ b/mono/2.5d/assets/ui/overlay_cube.tscn @@ -18,7 +18,7 @@ rect_min_size = Vector2( 500, 50 ) text = " Controls: WASDQE to rotate, R to reset, C to return to the world, Tab to toggle hints. -UIOKL to change view mode. U = Forty Five deg, I = Isometric, +UIOKL to change view mode. U = Forty Five deg, I = Isometric, O = Top Down, K = Oblique Y, L = Oblique Z Not every view mode is meant to be good, it's just to showcase what the system can do. diff --git a/mono/dodge_the_creeps/Main.cs b/mono/dodge_the_creeps/Main.cs index 537a890f..282ab7e0 100644 --- a/mono/dodge_the_creeps/Main.cs +++ b/mono/dodge_the_creeps/Main.cs @@ -84,7 +84,7 @@ public class Main : Node // Choose the velocity. mobInstance.SetLinearVelocity(new Vector2(RandRange(150f, 250f), 0).Rotated(direction)); - + GetNode("HUD").Connect("StartGame", mobInstance, "OnStartGame"); } } diff --git a/mono/dodge_the_creeps/Mob.cs b/mono/dodge_the_creeps/Mob.cs index 1d69371e..c91a17c5 100644 --- a/mono/dodge_the_creeps/Mob.cs +++ b/mono/dodge_the_creeps/Mob.cs @@ -23,7 +23,7 @@ public class Mob : RigidBody2D { QueueFree(); } - + public void OnStartGame() { QueueFree(); diff --git a/networking/multiplayer_bomber/README.md b/networking/multiplayer_bomber/README.md index 1afa65d6..dcedc37c 100644 --- a/networking/multiplayer_bomber/README.md +++ b/networking/multiplayer_bomber/README.md @@ -2,7 +2,7 @@ A multiplayer implementation of the classical bomberman game. One of the players should press "host", while the other -should type in his address and press "play". +should type in his address and press "play". Language: GDScript diff --git a/networking/multiplayer_pong/README.md b/networking/multiplayer_pong/README.md index 4c9511ae..eb9fa7f2 100644 --- a/networking/multiplayer_pong/README.md +++ b/networking/multiplayer_pong/README.md @@ -2,7 +2,7 @@ A multiplayer demo of the classical pong game. One of the players should press "host", while the -other should select the address and press "join". +other should select the address and press "join". Language: GDScript diff --git a/networking/multiplayer_pong/scripts/ball.gd b/networking/multiplayer_pong/scripts/ball.gd index 1011968f..87ca4b73 100644 --- a/networking/multiplayer_pong/scripts/ball.gd +++ b/networking/multiplayer_pong/scripts/ball.gd @@ -14,7 +14,7 @@ func _process(delta): # even if it's sightly out of sync between them, # so each player sees the motion as smooth and not jerky. if not stopped: - translate(_speed * delta * direction) + translate(_speed * delta * direction) # Check screen bounds to make ball bounce. var ball_pos = position diff --git a/networking/multiplayer_pong/scripts/pong.gd b/networking/multiplayer_pong/scripts/pong.gd index f0805ca4..db795ff4 100644 --- a/networking/multiplayer_pong/scripts/pong.gd +++ b/networking/multiplayer_pong/scripts/pong.gd @@ -18,7 +18,7 @@ func _ready(): # while all nodes in clients inherit from puppet. # set_network_master is tree-recursive by default. if get_tree().is_network_server(): - # For the server, give control of player 2 to the other peer. + # For the server, give control of player 2 to the other peer. player2.set_network_master(get_tree().get_network_connected_peers()[0]) else: # For the client, give control of player 2 to itself. diff --git a/networking/webrtc_signaling/server_node/.eslintrc.json b/networking/webrtc_signaling/server_node/.eslintrc.json index a22aae1c..10419820 100644 --- a/networking/webrtc_signaling/server_node/.eslintrc.json +++ b/networking/webrtc_signaling/server_node/.eslintrc.json @@ -74,7 +74,7 @@ "implicit-arrow-linebreak": "error", "indent": [ "error", - "tab" + "tab" ], "indent-legacy": "off", "init-declarations": "error", diff --git a/viewport/2d_in_3d/README.md b/viewport/2d_in_3d/README.md index 39424770..d56e345b 100644 --- a/viewport/2d_in_3d/README.md +++ b/viewport/2d_in_3d/README.md @@ -11,7 +11,7 @@ Renderer: GLES 2 The Pong game is rendered to a custom [`Viewport`](https://docs.godotengine.org/en/latest/classes/class_viewport.html) node rather than the main Viewport. In the code, -`get_texture()` is called on the Viewport to get a +`get_texture()` is called on the Viewport to get a [`ViewportTexture`](https://docs.godotengine.org/en/latest/classes/class_viewporttexture.html), which is then assigned to the quad's material's albedo texture. diff --git a/viewport/3d_in_2d/README.md b/viewport/3d_in_2d/README.md index 60fc8fc6..f654b59a 100644 --- a/viewport/3d_in_2d/README.md +++ b/viewport/3d_in_2d/README.md @@ -11,7 +11,7 @@ Renderer: GLES 2 The 3D robot is rendered to a custom [`Viewport`](https://docs.godotengine.org/en/latest/classes/class_viewport.html) node rather than the main Viewport. In the code, -`get_texture()` is called on the Viewport to get a +`get_texture()` is called on the Viewport to get a [`ViewportTexture`](https://docs.godotengine.org/en/latest/classes/class_viewporttexture.html), which is then assigned to the sprite's texture. diff --git a/viewport/dynamic_split_screen/CameraController.gd b/viewport/dynamic_split_screen/CameraController.gd index 3f9e0994..ee53da0d 100644 --- a/viewport/dynamic_split_screen/CameraController.gd +++ b/viewport/dynamic_split_screen/CameraController.gd @@ -2,20 +2,20 @@ extends Spatial # Handle the motion of both players' camera as well as communication with the # SplitScreen shader to achieve the dynamic split screen effet -# -# Cameras are place on the segment joining the two players, either in the middle +# +# Cameras are place on the segment joining the two players, either in the middle # if players are close enough or at a fixed distance if they are not. -# In the first case, both cameras being at the same location, only the view of -# the first one is used for the entire screen thus allowing the players to play +# In the first case, both cameras being at the same location, only the view of +# the first one is used for the entire screen thus allowing the players to play # on a unsplit screen. # In the second case, the screen is split in two with a line perpendicular to the # segement joining the two players. -# +# # The points of customization are: # max_separation: the distance between players at which the view starts to split # split_line_thickness: the thickness of the split line in pixels # split_line_color: color of the split line -# adaptive_split_line_thickness: if true, the split line thickness will vary +# adaptive_split_line_thickness: if true, the split line thickness will vary # depending on the distance between players. If false, the thickness will # be constant and equal to split_line_thickness diff --git a/viewport/dynamic_split_screen/README.md b/viewport/dynamic_split_screen/README.md index ea608dfb..0412db5a 100644 --- a/viewport/dynamic_split_screen/README.md +++ b/viewport/dynamic_split_screen/README.md @@ -32,7 +32,7 @@ achieve the effect. The cameras are placed on the segment joining the two players, either in the middle if they're close enough or at a fixed -distance otherwise. +distance otherwise. ## How to use it diff --git a/viewport/screen_capture/README.md b/viewport/screen_capture/README.md index 02b5488b..135869da 100644 --- a/viewport/screen_capture/README.md +++ b/viewport/screen_capture/README.md @@ -1,6 +1,6 @@ # Screen Capture -An example showing how to take screenshots of the screen. +An example showing how to take screenshots of the screen. Language: GDScript diff --git a/visual_script/circle_pop/README.md b/visual_script/circle_pop/README.md index c1bbbf47..b3e7432a 100644 --- a/visual_script/circle_pop/README.md +++ b/visual_script/circle_pop/README.md @@ -2,7 +2,7 @@ Demo of a simple game using visual script. You must click the circles to "pop" them in -order to stop their invasion of the screen. +order to stop their invasion of the screen. Language: [VisualScript](https://docs.godotengine.org/en/latest/getting_started/scripting/visual_script/index.html)