Browse Source

Merge pull request #491 from aaronfranke/cthulhu

Many tweaks thanks to IAmActuallyCthulhu and some other misc tweaks
Aaron Franke 5 years ago
parent
commit
ba44700ebe
64 changed files with 216 additions and 188 deletions
  1. 1 1
      2d/dodge_the_creeps/HUD.gd
  2. 3 3
      2d/dodge_the_creeps/Main.gd
  3. 2 2
      2d/finite_state_machine/debug/states_stack_displayer.gd
  4. 3 6
      2d/finite_state_machine/player/bullet/bullet.gd
  5. 14 8
      2d/finite_state_machine/player/player_state_machine.gd
  6. 4 0
      2d/finite_state_machine/player/states/motion/in_air/jump.gd
  7. 4 3
      2d/finite_state_machine/player/states/motion/motion.gd
  8. 3 1
      2d/finite_state_machine/state_machine/state_machine.gd
  9. 2 4
      2d/gd_paint/paint_control.gd
  10. 3 3
      2d/gd_paint/paint_root.tscn
  11. 0 0
      2d/gd_paint/paint_tools.png
  12. 3 3
      2d/gd_paint/paint_tools.png.import
  13. 1 1
      2d/gd_paint/project.godot
  14. 7 11
      2d/gd_paint/tools_panel.gd
  15. 2 1
      2d/hexagonal_map/troll.gd
  16. 1 1
      2d/isometric/troll.gd
  17. 7 5
      2d/navigation/navigation.gd
  18. 5 5
      2d/navigation_astar/character.gd
  19. 15 8
      2d/physics_platformer/player/player.gd
  20. 8 17
      2d/platformer/src/Actors/Enemy.gd
  21. 1 0
      2d/platformer/src/Actors/Gun.gd
  22. 2 2
      2d/platformer/src/Actors/Player.gd
  23. 1 1
      2d/platformer/src/Objects/Coin.gd
  24. 0 0
      2d/pong/logic/ball.gd
  25. 0 0
      2d/pong/logic/ceiling_floor.gd
  26. 0 0
      2d/pong/logic/paddle.gd
  27. 0 0
      2d/pong/logic/wall.gd
  28. 4 4
      2d/pong/pong.tscn
  29. 1 1
      2d/role_playing_game/grid_movement/pawns/Actor.gd
  30. 2 2
      2d/role_playing_game/grid_movement/pawns/Character.gd
  31. 1 1
      2d/role_playing_game/grid_movement/pawns/IdleActor.gd
  32. 2 2
      2d/role_playing_game/grid_movement/pawns/Walker.gd
  33. 2 2
      2d/role_playing_game/screens/combat/interface/UI.gd
  34. 1 1
      3d/material_testers/tester.gd
  35. 8 8
      3d/physics_tests/tests.gd
  36. 1 1
      3d/physics_tests/tests_menu.gd
  37. 3 5
      misc/sensors/main.gd
  38. 2 2
      misc/tween/main.gd
  39. 14 7
      mono/2.5d/2.5D Demo (Mono C#).csproj
  40. 6 6
      mono/2.5d/2.5D Demo (Mono C#).sln
  41. 4 0
      mono/README.md
  42. 15 9
      mono/dodge_the_creeps/Dodge the Creeps with C#.csproj
  43. 6 6
      mono/dodge_the_creeps/Dodge the Creeps with C#.sln
  44. 2 2
      mono/dodge_the_creeps/Main.cs
  45. 0 0
      mono/pong/Logic/Ball.cs
  46. 0 0
      mono/pong/Logic/CeilingFloor.cs
  47. 0 0
      mono/pong/Logic/Paddle.cs
  48. 0 0
      mono/pong/Logic/Wall.cs
  49. 17 10
      mono/pong/Pong with C#.csproj
  50. 6 6
      mono/pong/Pong with C#.sln
  51. 4 4
      mono/pong/pong.tscn
  52. 1 1
      networking/multiplayer_pong/ball.tscn
  53. 1 1
      networking/multiplayer_pong/lobby.tscn
  54. 0 0
      networking/multiplayer_pong/logic/ball.gd
  55. 0 0
      networking/multiplayer_pong/logic/lobby.gd
  56. 0 0
      networking/multiplayer_pong/logic/paddle.gd
  57. 0 0
      networking/multiplayer_pong/logic/pong.gd
  58. 1 1
      networking/multiplayer_pong/paddle.tscn
  59. 1 1
      networking/multiplayer_pong/pong.tscn
  60. 1 1
      networking/webrtc_signaling/client/multiplayer_client.gd
  61. 7 7
      networking/webrtc_signaling/client/ws_webrtc_client.gd
  62. 2 2
      networking/webrtc_signaling/demo/client_ui.gd
  63. 8 8
      networking/webrtc_signaling/server/ws_webrtc_server.gd
  64. 1 1
      plugins/addons/material_creator/material_creator.gd

+ 1 - 1
2d/dodge_the_creeps/HUD.gd

@@ -13,7 +13,7 @@ func show_game_over():
 	yield($MessageTimer, "timeout")
 	$MessageLabel.text = "Dodge the\nCreeps"
 	$MessageLabel.show()
-	yield(get_tree().create_timer(1), 'timeout')
+	yield(get_tree().create_timer(1), "timeout")
 	$StartButton.show()
 
 

+ 3 - 3
2d/dodge_the_creeps/Main.gd

@@ -1,6 +1,6 @@
 extends Node
 
-export (PackedScene) var Mob
+export(PackedScene) var Mob
 var score
 
 func _ready():
@@ -28,9 +28,9 @@ func _on_MobTimer_timeout():
 	$MobPath/MobSpawnLocation.offset = randi()
 	var mob = Mob.instance()
 	add_child(mob)
-	var direction = $MobPath/MobSpawnLocation.rotation + PI / 2
+	var direction = $MobPath/MobSpawnLocation.rotation + TAU / 4
 	mob.position = $MobPath/MobSpawnLocation.position
-	direction += rand_range(-PI / 4, PI / 4)
+	direction += rand_range(-TAU / 8, TAU / 8)
 	mob.rotation = direction
 	mob.linear_velocity = Vector2(rand_range(mob.min_speed, mob.max_speed), 0).rotated(direction)
 	# warning-ignore:return_value_discarded

+ 2 - 2
2d/finite_state_machine/debug/states_stack_displayer.gd

@@ -7,8 +7,8 @@ func _process(_delta):
 	var numbers = ""
 	var index = 0
 	for state in fsm_node.states_stack:
-		states_names += state.get_name() + '\n'
-		numbers += str(index) + '\n'
+		states_names += state.get_name() + "\n"
+		numbers += str(index) + "\n"
 		index += 1
 	$States.text = states_names
 	$Numbers.text = numbers

+ 3 - 6
2d/finite_state_machine/player/bullet/bullet.gd

@@ -3,12 +3,14 @@ extends KinematicBody2D
 var direction = Vector2()
 export(float) var speed = 1000.0
 
+onready var root = get_tree().root
+
 func _ready():
 	set_as_toplevel(true)
 
 
 func _physics_process(delta):
-	if is_outside_view_bounds():
+	if not root.get_visible_rect().has_point(position):
 		queue_free()
 
 	var motion = direction * speed * delta
@@ -17,10 +19,5 @@ func _physics_process(delta):
 		queue_free()
 
 
-func is_outside_view_bounds():
-	return position.x > OS.get_screen_size().x or position.x < 0.0 \
-			or position.y > OS.get_screen_size().y or position.y < 0.0
-
-
 func _draw():
 	draw_circle(Vector2(), $CollisionShape2D.shape.radius, Color.white)

+ 14 - 8
2d/finite_state_machine/player/player_state_machine.gd

@@ -1,12 +1,18 @@
 extends "res://state_machine/state_machine.gd"
 
+onready var idle = $Idle
+onready var move = $Move
+onready var jump = $Jump
+onready var stagger = $Stagger
+onready var attack = $Attack
+
 func _ready():
 	states_map = {
-		"idle": $Idle,
-		"move": $Move,
-		"jump": $Jump,
-		"stagger": $Stagger,
-		"attack": $Attack,
+		"idle": idle,
+		"move": move,
+		"jump": jump,
+		"stagger": stagger,
+		"attack": attack,
 	}
 
 
@@ -16,8 +22,8 @@ func _change_state(state_name):
 		return
 	if state_name in ["stagger", "jump", "attack"]:
 		states_stack.push_front(states_map[state_name])
-	if state_name == "jump" and current_state == $Move:
-		$Jump.initialize($Move.speed, $Move.velocity)
+	if state_name == "jump" and current_state == move:
+		jump.initialize(move.speed, move.velocity)
 	._change_state(state_name)
 
 
@@ -25,7 +31,7 @@ func _unhandled_input(event):
 	# Here we only handle input that can interrupt states, attacking in this case,
 	# otherwise we let the state node handle it.
 	if event.is_action_pressed("attack"):
-		if current_state in [$Attack, $Stagger]:
+		if current_state in [attack, stagger]:
 			return
 		_change_state("attack")
 		return

+ 4 - 0
2d/finite_state_machine/player/states/motion/in_air/jump.gd

@@ -22,6 +22,7 @@ func initialize(speed, velocity):
 	max_horizontal_speed = speed if speed > 0.0 else base_max_horizontal_speed
 	enter_velocity = velocity
 
+	
 func enter():
 	var input_direction = get_input_direction()
 	update_look_direction(input_direction)
@@ -31,6 +32,7 @@ func enter():
 
 	owner.get_node("AnimationPlayer").play("idle")
 
+
 func update(delta):
 	var input_direction = get_input_direction()
 	update_look_direction(input_direction)
@@ -40,6 +42,7 @@ func update(delta):
 	if height <= 0.0:
 		emit_signal("finished", "previous")
 
+
 func move_horizontally(delta, direction):
 	if direction:
 		horizontal_speed += air_acceleration * delta
@@ -53,6 +56,7 @@ func move_horizontally(delta, direction):
 
 	owner.move_and_slide(horizontal_velocity)
 
+
 func animate_jump_height(delta):
 	vertical_speed -= gravity * delta
 	height += vertical_speed * delta

+ 4 - 3
2d/finite_state_machine/player/states/motion/motion.gd

@@ -7,9 +7,10 @@ func handle_input(event):
 
 
 func get_input_direction():
-	var input_direction = Vector2()
-	input_direction.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
-	input_direction.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
+	var input_direction = Vector2(
+			Input.get_action_strength("move_right") - Input.get_action_strength("move_left"),
+			Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
+	)
 	return input_direction
 
 

+ 3 - 1
2d/finite_state_machine/state_machine/state_machine.gd

@@ -21,7 +21,9 @@ func _ready():
 	if not start_state:
 		start_state = get_child(0).get_path()
 	for child in get_children():
-		child.connect("finished", self, "_change_state")
+		var err = child.connect("finished", self, "_change_state")
+		if err:
+			printerr(err)
 	initialize(start_state)
 
 

+ 2 - 4
2d/gd_paint/PaintControl.gd → 2d/gd_paint/paint_control.gd

@@ -232,11 +232,9 @@ func _draw():
 				draw_circle(brush.brush_pos, brush.brush_shape_circle_radius, brush.brush_color)
 
 
-
 func save_picture(path):
-	# Wait a couple frames so the save dialog isn't in the way.
-	yield (get_tree(), "idle_frame")
-	yield (get_tree(), "idle_frame")
+	# Wait until the frame has finished before getting the texture.
+	yield(VisualServer, "frame_post_draw")
 	
 	# Get the viewport image.
 	var img = get_viewport().get_texture().get_data()

+ 3 - 3
2d/gd_paint/Paint_root.tscn → 2d/gd_paint/paint_root.tscn

@@ -1,8 +1,8 @@
 [gd_scene load_steps=5 format=2]
 
-[ext_resource path="res://PaintControl.gd" type="Script" id=1]
-[ext_resource path="res://ToolsPanel.gd" type="Script" id=2]
-[ext_resource path="res://PaintTools.png" type="Texture" id=3]
+[ext_resource path="res://paint_control.gd" type="Script" id=1]
+[ext_resource path="res://tools_panel.gd" type="Script" id=2]
+[ext_resource path="res://paint_tools.png" type="Texture" id=3]
 
 [sub_resource type="StyleBoxFlat" id=1]
 bg_color = Color( 1, 1, 1, 1 )

+ 0 - 0
2d/gd_paint/PaintTools.png → 2d/gd_paint/paint_tools.png


+ 3 - 3
2d/gd_paint/PaintTools.png.import → 2d/gd_paint/paint_tools.png.import

@@ -2,15 +2,15 @@
 
 importer="texture"
 type="StreamTexture"
-path="res://.import/PaintTools.png-636e86a6d210b52282c946752bbcc6f1.stex"
+path="res://.import/paint_tools.png-224b64b7ddb26189a369199f6d686b79.stex"
 metadata={
 "vram_texture": false
 }
 
 [deps]
 
-source_file="res://PaintTools.png"
-dest_files=[ "res://.import/PaintTools.png-636e86a6d210b52282c946752bbcc6f1.stex" ]
+source_file="res://paint_tools.png"
+dest_files=[ "res://.import/paint_tools.png-224b64b7ddb26189a369199f6d686b79.stex" ]
 
 [params]
 

+ 1 - 1
2d/gd_paint/project.godot

@@ -19,7 +19,7 @@ config/name="GD Paint"
 config/description="GD Paint is a simple image editor made using Godot and GDScript.
 It supports different types of 'brushes': a basic pen/pencil
 and eraser, as well as a rectangle and a circle brush."
-run/main_scene="res://Paint_root.tscn"
+run/main_scene="res://paint_root.tscn"
 config/icon="res://icon.png"
 
 [display]

+ 7 - 11
2d/gd_paint/ToolsPanel.gd → 2d/gd_paint/tools_panel.gd

@@ -1,20 +1,16 @@
 extends Panel
 
-var paint_control
-
 onready var brush_settings = $BrushSettings
-onready var label_tools = $LabelTools
-onready var label_brush_size = $BrushSettings/LabelBrushSize
-onready var label_brush_shape = $BrushSettings/LabelBrushShape
+onready var label_brush_size = brush_settings.get_node(@"LabelBrushSize")
+onready var label_brush_shape = brush_settings.get_node(@"LabelBrushShape")
 onready var label_stats = $LabelStats
+onready var label_tools = $LabelTools
 
-var save_dialog
+onready var _parent = get_parent()
+onready var save_dialog = _parent.get_node(@"SaveFileDialog")
+onready var paint_control = _parent.get_node(@"PaintControl")
 
 func _ready():
-	# Get PaintControl and SaveFileDialog.
-	paint_control = get_parent().get_node("PaintControl")
-	save_dialog = get_parent().get_node("SaveFileDialog")
-
 	# warning-ignore-all:return_value_discarded
 	# Assign all of the needed signals for the oppersation buttons.
 	$ButtonUndo.connect("pressed", self, "button_pressed", ["undo_stroke"])
@@ -34,7 +30,7 @@ func _ready():
 	$ColorPickerBackground.connect("color_changed", self, "background_color_changed")
 	$BrushSettings/HScrollBarBrushSize.connect("value_changed", self, "brush_size_changed")
 
-	# Assign the 'file_selected' signal in SaveFileDialog.
+	# Assign the "file_selected" signal in SaveFileDialog.
 	save_dialog.connect("file_selected", self, "save_file_selected")
 
 	# Set physics process so we can update the status label.

+ 2 - 1
2d/hexagonal_map/troll.gd

@@ -1,12 +1,13 @@
 extends KinematicBody2D
 
 const MOTION_SPEED = 160 # Pixels/second.
+const TAN30DEG = tan(deg2rad(30))
 
 func _physics_process(_delta):
 	var motion = Vector2()
 	motion.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
 	motion.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
-	motion.y *= 0.57735056839 # tan(30 degrees).
+	motion.y *= TAN30DEG
 	motion = motion.normalized() * MOTION_SPEED
 	#warning-ignore:return_value_discarded
 	move_and_slide(motion)

+ 1 - 1
2d/isometric/troll.gd

@@ -6,7 +6,7 @@ func _physics_process(_delta):
 	var motion = Vector2()
 	motion.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
 	motion.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
-	motion.y *= 0.5
+	motion.y /= 2
 	motion = motion.normalized() * MOTION_SPEED
 	#warning-ignore:return_value_discarded
 	move_and_slide(motion)

+ 7 - 5
2d/navigation/navigation.gd

@@ -3,33 +3,35 @@ extends Navigation2D
 export(float) var character_speed = 400.0
 var path = []
 
+onready var character = $Character
+
 func _process(delta):
 	var walk_distance = character_speed * delta
 	move_along_path(walk_distance)
 
 
-# The 'click' event is a custom input action defined in
+# The "click" event is a custom input action defined in
 # Project > Project Settings > Input Map tab.
 func _unhandled_input(event):
 	if not event.is_action_pressed("click"):
 		return
-	_update_navigation_path($Character.position, get_local_mouse_position())
+	_update_navigation_path(character.position, get_local_mouse_position())
 
 
 func move_along_path(distance):
-	var last_point = $Character.position
+	var last_point = character.position
 	while path.size():
 		var distance_between_points = last_point.distance_to(path[0])
 		# The position to move to falls between two points.
 		if distance <= distance_between_points:
-			$Character.position = last_point.linear_interpolate(path[0], distance / distance_between_points)
+			character.position = last_point.linear_interpolate(path[0], distance / distance_between_points)
 			return
 		# The position is past the end of the segment.
 		distance -= distance_between_points
 		last_point = path[0]
 		path.remove(0)
 	# The character reached the end of the path.
-	$Character.position = last_point
+	character.position = last_point
 	set_process(false)
 
 

+ 5 - 5
2d/navigation_astar/character.gd

@@ -2,6 +2,9 @@ extends Node2D
 
 enum States { IDLE, FOLLOW }
 
+const MASS = 10.0
+const ARRIVE_DISTANCE = 10.0
+
 export(float) var speed = 200.0
 var _state = null
 
@@ -38,9 +41,6 @@ func _unhandled_input(event):
 
 
 func _move_to(world_position):
-	var MASS = 10.0
-	var ARRIVE_DISTANCE = 10.0
-
 	var desired_velocity = (world_position - position).normalized() * speed
 	var steering = desired_velocity - _velocity
 	_velocity += steering / MASS
@@ -55,7 +55,7 @@ func _change_state(new_state):
 		if not _path or len(_path) == 1:
 			_change_state(States.IDLE)
 			return
-		# The index 0 is the starting cell
-		# we don't want the character to move back to it in this example
+		# The index 0 is the starting cell.
+		# We don't want the character to move back to it in this example.
 		_target_point_world = _path[1]
 	_state = new_state

+ 15 - 8
2d/physics_platformer/player/player.gd

@@ -47,6 +47,13 @@ var shoot_time = 1e20
 var Bullet = preload("res://player/Bullet.tscn")
 var Enemy = preload("res://enemy/Enemy.tscn")
 
+onready var sound_jump = $SoundJump
+onready var sound_shoot = $SoundShoot
+onready var sprite = $Sprite
+onready var sprite_smoke = sprite.get_node(@"Smoke")
+onready var animation_player = $AnimationPlayer
+onready var bullet_shoot = $BulletShoot
+
 func _integrate_forces(s):
 	var lv = s.get_linear_velocity()
 	var step = s.get_step()
@@ -54,7 +61,7 @@ func _integrate_forces(s):
 	var new_anim = anim
 	var new_siding_left = siding_left
 	
-	# Get the controls.
+	# Get player input.
 	var move_left = Input.is_action_pressed("move_left")
 	var move_right = Input.is_action_pressed("move_right")
 	var jump = Input.is_action_pressed("jump")
@@ -124,7 +131,7 @@ func _integrate_forces(s):
 			lv.y = -JUMP_VELOCITY
 			jumping = true
 			stopping_jump = false
-			($SoundJump as AudioStreamPlayer2D).play()
+			sound_jump.play()
 		
 		# Check siding.
 		if lv.x < 0 and move_left:
@@ -173,16 +180,16 @@ func _integrate_forces(s):
 	# Update siding.
 	if new_siding_left != siding_left:
 		if new_siding_left:
-			($Sprite as Sprite).scale.x = -1
+			sprite.scale.x = -1
 		else:
-			($Sprite as Sprite).scale.x = 1
+			sprite.scale.x = 1
 		
 		siding_left = new_siding_left
 	
 	# Change animation.
 	if new_anim != anim:
 		anim = new_anim
-		($AnimationPlayer as AnimationPlayer).play(anim)
+		animation_player.play(anim)
 	
 	shooting = shoot
 	
@@ -204,15 +211,15 @@ func _shot_bullet():
 		ss = -1.0
 	else:
 		ss = 1.0
-	var pos = position + ($BulletShoot as Position2D).position * Vector2(ss, 1.0)
+	var pos = position + bullet_shoot.position * Vector2(ss, 1.0)
 		
 	bi.position = pos
 	get_parent().add_child(bi)
 	
 	bi.linear_velocity = Vector2(400.0 * ss, -40)
 	
-	($Sprite/Smoke as Particles2D).restart()
-	($SoundShoot as AudioStreamPlayer2D).play()
+	sprite_smoke.restart()
+	sound_shoot.play()
 	
 	add_collision_exception_with(bi) # Make bullet and this not collide.
 

+ 8 - 17
2d/platformer/src/Actors/Enemy.gd

@@ -36,7 +36,14 @@ func _ready():
 # - If you split the character into a state machine or more advanced pattern,
 #   you can easily move individual functions.
 func _physics_process(_delta):
-	_velocity = calculate_move_velocity(_velocity)
+	# If the enemy encounters a wall or an edge, the horizontal velocity is flipped.
+	if not floor_detector_left.is_colliding():
+		_velocity.x = speed.x
+	elif not floor_detector_right.is_colliding():
+		_velocity.x = -speed.x
+
+	if is_on_wall():
+		_velocity.x *= -1
 
 	# We only update the y value of _velocity as we want to handle the horizontal movement ourselves.
 	_velocity.y = move_and_slide(_velocity, FLOOR_NORMAL).y
@@ -49,22 +56,6 @@ func _physics_process(_delta):
 		animation_player.play(animation)
 
 
-# This function calculates a new velocity whenever you need it.
-# If the enemy encounters a wall or an edge, the horizontal velocity is flipped.
-func calculate_move_velocity(linear_velocity):
-	var velocity = linear_velocity
-
-	if not floor_detector_left.is_colliding():
-		velocity.x = speed.x
-	elif not floor_detector_right.is_colliding():
-		velocity.x = -speed.x
-
-	if is_on_wall():
-		velocity.x *= -1
-
-	return velocity
-
-
 func destroy():
 	_state = State.DEAD
 	_velocity = Vector2.ZERO

+ 1 - 0
2d/platformer/src/Actors/Gun.gd

@@ -11,6 +11,7 @@ onready var sound_shoot = $Shoot
 onready var timer = $Cooldown
 
 
+# This method is only called by Player.gd.
 func shoot(direction = 1):
 	if not timer.is_stopped():
 		return false

+ 2 - 2
2d/platformer/src/Actors/Player.gd

@@ -7,10 +7,10 @@ const FLOOR_DETECT_DISTANCE = 20.0
 export(String) var action_suffix = ""
 
 onready var platform_detector = $PlatformDetector
-onready var sprite = $Sprite
 onready var animation_player = $AnimationPlayer
 onready var shoot_timer = $ShootAnimation
-onready var gun = $Sprite/Gun
+onready var sprite = $Sprite
+onready var gun = sprite.get_node(@"Gun")
 
 
 func _ready():

+ 1 - 1
2d/platformer/src/Objects/Coin.gd

@@ -7,7 +7,7 @@ onready var animation_player = $AnimationPlayer
 # The Coins only detects collisions with the Player thanks to its collision mask.
 # This prevents other characters such as enemies from picking up coins.
 
-# When the player collides with a coin, the coin plays its 'picked' animation.
+# When the player collides with a coin, the coin plays its "picked" animation.
 # The animation takes cares of making the coin disappear, but also deactivates its
 # collisions and frees it from memory, saving us from writing more complex code.
 # Click the AnimationPlayer node to see the animation timeline.

+ 0 - 0
2d/pong/scripts/ball.gd → 2d/pong/logic/ball.gd


+ 0 - 0
2d/pong/scripts/ceiling_floor.gd → 2d/pong/logic/ceiling_floor.gd


+ 0 - 0
2d/pong/scripts/paddle.gd → 2d/pong/logic/paddle.gd


+ 0 - 0
2d/pong/scripts/wall.gd → 2d/pong/logic/wall.gd


+ 4 - 4
2d/pong/pong.tscn

@@ -1,13 +1,13 @@
 [gd_scene load_steps=13 format=2]
 
-[ext_resource path="res://scripts/paddle.gd" type="Script" id=1]
+[ext_resource path="res://logic/paddle.gd" type="Script" id=1]
 [ext_resource path="res://left_pallete.png" type="Texture" id=2]
 [ext_resource path="res://right_pallete.png" type="Texture" id=3]
-[ext_resource path="res://scripts/ball.gd" type="Script" id=4]
+[ext_resource path="res://logic/ball.gd" type="Script" id=4]
 [ext_resource path="res://ball.png" type="Texture" id=5]
 [ext_resource path="res://separator.png" type="Texture" id=6]
-[ext_resource path="res://scripts/wall.gd" type="Script" id=7]
-[ext_resource path="res://scripts/ceiling_floor.gd" type="Script" id=8]
+[ext_resource path="res://logic/wall.gd" type="Script" id=7]
+[ext_resource path="res://logic/ceiling_floor.gd" type="Script" id=8]
 
 [sub_resource type="RectangleShape2D" id=1]
 extents = Vector2( 4, 16 )

+ 1 - 1
2d/role_playing_game/grid_movement/pawns/Actor.gd

@@ -1,4 +1,4 @@
-extends 'Pawn.gd'
+extends "Pawn.gd"
 
 onready var Grid = get_parent()
 var lost = false

+ 2 - 2
2d/role_playing_game/grid_movement/pawns/Character.gd

@@ -1,7 +1,7 @@
-extends 'Pawn.gd'
+extends "Pawn.gd"
 
 #warning-ignore:unused_class_variable
-export (PackedScene) var combat_actor
+export(PackedScene) var combat_actor
 #warning-ignore:unused_class_variable
 var lost = false
 

+ 1 - 1
2d/role_playing_game/grid_movement/pawns/IdleActor.gd

@@ -1,4 +1,4 @@
-extends 'Actor.gd'
+extends "Actor.gd"
 
 func _ready():
 	set_process(false)

+ 2 - 2
2d/role_playing_game/grid_movement/pawns/Walker.gd

@@ -1,8 +1,8 @@
-extends 'Pawn.gd'
+extends "Pawn.gd"
 
 onready var Grid = get_parent()
 #warning-ignore:unused_class_variable
-export (PackedScene) var combat_actor
+export(PackedScene) var combat_actor
 #warning-ignore:unused_class_variable
 var lost = false
 

+ 2 - 2
2d/role_playing_game/screens/combat/interface/UI.gd

@@ -1,7 +1,7 @@
 extends Control
 
-export (NodePath) var combatants_node
-export (PackedScene) var info_scene
+export(NodePath) var combatants_node
+export(PackedScene) var info_scene
 
 func _ready():
 	combatants_node = get_node(combatants_node)

+ 1 - 1
3d/material_testers/tester.gd

@@ -33,7 +33,7 @@ func _ready():
 
 
 func _unhandled_input(ev):
-	if ev is InputEventMouseButton :
+	if ev is InputEventMouseButton:
 		if ev.button_index == BUTTON_WHEEL_UP:
 			zoom -= ZOOM_SPEED
 		if ev.button_index == BUTTON_WHEEL_DOWN:

+ 8 - 8
3d/physics_tests/tests.gd

@@ -3,20 +3,20 @@ extends Node
 
 var _tests = [
 	{
-		"id" : "Functional Tests/Shapes",
-		"path" : "res://tests/functional/test_shapes.tscn",
+		"id": "Functional Tests/Shapes",
+		"path": "res://tests/functional/test_shapes.tscn",
 	},
 	{
-		"id" : "Functional Tests/Compound Shapes",
-		"path" : "res://tests/functional/test_compound_shapes.tscn",
+		"id": "Functional Tests/Compound Shapes",
+		"path": "res://tests/functional/test_compound_shapes.tscn",
 	},
 	{
-		"id" : "Functional Tests/Friction",
-		"path" : "res://tests/functional/test_friction.tscn",
+		"id": "Functional Tests/Friction",
+		"path": "res://tests/functional/test_friction.tscn",
 	},
 	{
-		"id" : "Performance Tests/Contacts",
-		"path" : "res://tests/performance/test_perf_contacts.tscn",
+		"id": "Performance Tests/Contacts",
+		"path": "res://tests/performance/test_perf_contacts.tscn",
 	},
 ]
 

+ 1 - 1
3d/physics_tests/tests_menu.gd

@@ -1,7 +1,7 @@
 extends OptionMenu
 
 
-class TestData :
+class TestData:
 	var id
 	var scene_path
 

+ 3 - 5
misc/sensors/main.gd

@@ -98,9 +98,9 @@ func _process(delta):
 	var gyro = Input.get_gyroscope()
 	
 	# Show our base values
-	get_node("Control/Accelerometer").text = 'Accelerometer: ' + str(acc) + ', gravity: ' + str(grav)
-	get_node("Control/Magnetometer").text = 'Magnetometer: ' + str(mag)
-	get_node("Control/Gyroscope").text = 'Gyroscope: ' + str(gyro)
+	get_node("Control/Accelerometer").text = "Accelerometer: " + str(acc) + ", gravity: " + str(grav)
+	get_node("Control/Magnetometer").text = "Magnetometer: " + str(mag)
+	get_node("Control/Gyroscope").text = "Gyroscope: " + str(gyro)
 	
 	# Check if we have all needed data
 	if grav.length() < 0.1:
@@ -136,5 +136,3 @@ func _process(delta):
 	var gyro_and_grav = get_node("Boxes/GyroAndGrav")
 	var new_basis = rotate_by_gyro(gyro, gyro_and_grav.transform.basis, delta).orthonormalized()
 	gyro_and_grav.transform.basis = drift_correction(new_basis, grav)
-	
-	

+ 2 - 2
misc/tween/main.gd

@@ -111,8 +111,8 @@ func reset_tween():
 		tween.interpolate_property(sprite, "rotation_degrees", 360, 0, 2, state.trans, state.eases, 2)
 
 	if $Modes/Callback.is_pressed():
-		tween.interpolate_callback(self, 0.5, "on_callback", "0.5 second's after")
-		tween.interpolate_callback(self, 0.2, "on_callback", "1.2 second's after")
+		tween.interpolate_callback(self, 0.5, "on_callback", "0.5 seconds after")
+		tween.interpolate_callback(self, 0.2, "on_callback", "1.2 seconds after")
 
 	if $Modes/Follow.is_pressed():
 		follow.show()

+ 14 - 7
mono/2.5d/2.5D Demo (Mono C#).csproj

@@ -11,10 +11,11 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <BaseIntermediateOutputPath>.mono/temp/obj</BaseIntermediateOutputPath>
     <IntermediateOutputPath>$(BaseIntermediateOutputPath)/$(Configuration)</IntermediateOutputPath>
-    <ApiConfiguration Condition=" '$(Configuration)' != 'Release' ">Debug</ApiConfiguration>
-    <ApiConfiguration Condition=" '$(Configuration)' == 'Release' ">Release</ApiConfiguration>
+    <ApiConfiguration Condition=" '$(Configuration)' != 'ExportRelease' ">Debug</ApiConfiguration>
+    <ApiConfiguration Condition=" '$(Configuration)' == 'ExportRelease' ">Release</ApiConfiguration>
+    <GodotProjectGeneratorVersion>1.0.0.0</GodotProjectGeneratorVersion>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ExportDebug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugType>portable</DebugType>
     <Optimize>false</Optimize>
@@ -23,7 +24,7 @@
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ExportRelease|AnyCPU' ">
     <DebugType>portable</DebugType>
     <Optimize>true</Optimize>
     <DefineConstants>$(GodotDefineConstants);GODOT;</DefineConstants>
@@ -31,7 +32,7 @@
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Tools|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugType>portable</DebugType>
     <Optimize>false</Optimize>
@@ -45,7 +46,7 @@
       <Private>False</Private>
       <HintPath>$(ProjectDir)/.mono/assemblies/$(ApiConfiguration)/GodotSharp.dll</HintPath>
     </Reference>
-    <Reference Include="GodotSharpEditor" Condition=" '$(Configuration)' == 'Tools' ">
+    <Reference Include="GodotSharpEditor" Condition=" '$(Configuration)' == 'Debug' ">
       <Private>False</Private>
       <HintPath>$(ProjectDir)/.mono/assemblies/$(ApiConfiguration)/GodotSharpEditor.dll</HintPath>
     </Reference>
@@ -63,5 +64,11 @@
     <Compile Include="assets\player\PlayerSprite.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
+  <ItemGroup>
+    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies">
+      <Version>1.0.0</Version>
+      <PrivateAssets>All</PrivateAssets>
+    </PackageReference>
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-</Project>
+</Project>

+ 6 - 6
mono/2.5d/2.5D Demo (Mono C#).sln

@@ -5,15 +5,15 @@ EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	Debug|Any CPU = Debug|Any CPU
-	Release|Any CPU = Release|Any CPU
-	Tools|Any CPU = Tools|Any CPU
+	ExportDebug|Any CPU = ExportDebug|Any CPU
+	ExportRelease|Any CPU = ExportRelease|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{5CA791DB-5050-44D0-989B-41D559AB1D50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{5CA791DB-5050-44D0-989B-41D559AB1D50}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{5CA791DB-5050-44D0-989B-41D559AB1D50}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{5CA791DB-5050-44D0-989B-41D559AB1D50}.Release|Any CPU.Build.0 = Release|Any CPU
-		{5CA791DB-5050-44D0-989B-41D559AB1D50}.Tools|Any CPU.ActiveCfg = Tools|Any CPU
-		{5CA791DB-5050-44D0-989B-41D559AB1D50}.Tools|Any CPU.Build.0 = Tools|Any CPU
+		{5CA791DB-5050-44D0-989B-41D559AB1D50}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
+		{5CA791DB-5050-44D0-989B-41D559AB1D50}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
+		{5CA791DB-5050-44D0-989B-41D559AB1D50}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
+		{5CA791DB-5050-44D0-989B-41D559AB1D50}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
 	EndGlobalSection
 EndGlobal

+ 4 - 0
mono/README.md

@@ -0,0 +1,4 @@
+# Note: Godot 3.2.2 or newer is required
+
+While most of the demos work with any 3.2.x version, these demos require
+at least Godot 3.2.2 since there are large C#-specific changes in 3.2.2.

+ 15 - 9
mono/dodge_the_creeps/Dodge the Creeps with C#.csproj

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Tools</Configuration>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     <ProjectGuid>{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -12,10 +12,10 @@
     <GodotProjectGeneratorVersion>1.0.7374.16792</GodotProjectGeneratorVersion>
     <BaseIntermediateOutputPath>.mono\temp\obj</BaseIntermediateOutputPath>
     <IntermediateOutputPath>$(BaseIntermediateOutputPath)\$(Configuration)</IntermediateOutputPath>
-    <ApiConfiguration Condition=" '$(Configuration)' != 'Release' ">Debug</ApiConfiguration>
-    <ApiConfiguration Condition=" '$(Configuration)' == 'Release' ">Release</ApiConfiguration>
+    <ApiConfiguration Condition=" '$(Configuration)' != 'ExportRelease' ">Debug</ApiConfiguration>
+    <ApiConfiguration Condition=" '$(Configuration)' == 'ExportRelease' ">Release</ApiConfiguration>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ExportDebug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugType>portable</DebugType>
     <Optimize>false</Optimize>
@@ -24,7 +24,7 @@
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ExportRelease|AnyCPU' ">
     <DebugType>portable</DebugType>
     <Optimize>true</Optimize>
     <DefineConstants>$(GodotDefineConstants);GODOT;</DefineConstants>
@@ -32,7 +32,7 @@
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Tools|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugType>portable</DebugType>
     <Optimize>false</Optimize>
@@ -43,12 +43,12 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="GodotSharp">
-      <HintPath>$(ProjectDir)\.mono\assemblies\$(ApiConfiguration)\GodotSharp.dll</HintPath>
       <Private>False</Private>
+      <HintPath>$(ProjectDir)/.mono/assemblies/$(ApiConfiguration)/GodotSharp.dll</HintPath>
     </Reference>
-    <Reference Include="GodotSharpEditor" Condition=" '$(Configuration)' == 'Tools' ">
-      <HintPath>$(ProjectDir)\.mono\assemblies\$(ApiConfiguration)\GodotSharpEditor.dll</HintPath>
+    <Reference Include="GodotSharpEditor" Condition=" '$(Configuration)' == 'Debug' ">
       <Private>False</Private>
+      <HintPath>$(ProjectDir)/.mono/assemblies/$(ApiConfiguration)/GodotSharpEditor.dll</HintPath>
     </Reference>
     <Reference Include="System" />
   </ItemGroup>
@@ -59,5 +59,11 @@
     <Compile Include="Player.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
+  <ItemGroup>
+    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies">
+      <Version>1.0.0</Version>
+      <PrivateAssets>All</PrivateAssets>
+    </PackageReference>
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
 </Project>

+ 6 - 6
mono/dodge_the_creeps/Dodge the Creeps with C#.sln

@@ -5,15 +5,15 @@ EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	Debug|Any CPU = Debug|Any CPU
-	Release|Any CPU = Release|Any CPU
-	Tools|Any CPU = Tools|Any CPU
+	ExportDebug|Any CPU = ExportDebug|Any CPU
+	ExportRelease|Any CPU = ExportRelease|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}.Release|Any CPU.Build.0 = Release|Any CPU
-		{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}.Tools|Any CPU.ActiveCfg = Tools|Any CPU
-		{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}.Tools|Any CPU.Build.0 = Tools|Any CPU
+		{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
+		{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
+		{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
+		{75CB0382-CCCC-4A4D-ABF0-C6CD04D9F832}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
 	EndGlobalSection
 EndGlobal

+ 2 - 2
mono/dodge_the_creeps/Main.cs

@@ -73,13 +73,13 @@ public class Main : Node
         AddChild(mobInstance);
 
         // Set the mob's direction perpendicular to the path direction.
-        float direction = mobSpawnLocation.Rotation + Mathf.Pi / 2;
+        float direction = mobSpawnLocation.Rotation + Mathf.Tau / 4;
 
         // Set the mob's position to a random location.
         mobInstance.Position = mobSpawnLocation.Position;
 
         // Add some randomness to the direction.
-        direction += RandRange(-Mathf.Pi / 4, Mathf.Pi / 4);
+        direction += RandRange(-Mathf.Tau / 8, Mathf.Tau / 8);
         mobInstance.Rotation = direction;
 
         // Choose the velocity.

+ 0 - 0
mono/pong/Scripts/Ball.cs → mono/pong/Logic/Ball.cs


+ 0 - 0
mono/pong/Scripts/CeilingFloor.cs → mono/pong/Logic/CeilingFloor.cs


+ 0 - 0
mono/pong/Scripts/Paddle.cs → mono/pong/Logic/Paddle.cs


+ 0 - 0
mono/pong/Scripts/Wall.cs → mono/pong/Logic/Wall.cs


+ 17 - 10
mono/pong/Pong with C#.csproj

@@ -11,10 +11,11 @@
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <BaseIntermediateOutputPath>.mono/temp/obj</BaseIntermediateOutputPath>
     <IntermediateOutputPath>$(BaseIntermediateOutputPath)/$(Configuration)</IntermediateOutputPath>
-    <ApiConfiguration Condition=" '$(Configuration)' != 'Release' ">Debug</ApiConfiguration>
-    <ApiConfiguration Condition=" '$(Configuration)' == 'Release' ">Release</ApiConfiguration>
+    <ApiConfiguration Condition=" '$(Configuration)' != 'ExportRelease' ">Debug</ApiConfiguration>
+    <ApiConfiguration Condition=" '$(Configuration)' == 'ExportRelease' ">Release</ApiConfiguration>
+    <GodotProjectGeneratorVersion>1.0.0.0</GodotProjectGeneratorVersion>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ExportDebug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugType>portable</DebugType>
     <Optimize>false</Optimize>
@@ -23,7 +24,7 @@
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ExportRelease|AnyCPU' ">
     <DebugType>portable</DebugType>
     <Optimize>true</Optimize>
     <DefineConstants>$(GodotDefineConstants);GODOT;</DefineConstants>
@@ -31,7 +32,7 @@
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Tools|AnyCPU' ">
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugType>portable</DebugType>
     <Optimize>false</Optimize>
@@ -45,7 +46,7 @@
       <Private>False</Private>
       <HintPath>$(ProjectDir)/.mono/assemblies/$(ApiConfiguration)/GodotSharp.dll</HintPath>
     </Reference>
-    <Reference Include="GodotSharpEditor" Condition=" '$(Configuration)' == 'Tools' ">
+    <Reference Include="GodotSharpEditor" Condition=" '$(Configuration)' == 'Debug' ">
       <Private>False</Private>
       <HintPath>$(ProjectDir)/.mono/assemblies/$(ApiConfiguration)/GodotSharpEditor.dll</HintPath>
     </Reference>
@@ -53,10 +54,16 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Scripts\Ball.cs" />
-    <Compile Include="Scripts\CeilingFloor.cs" />
-    <Compile Include="Scripts\Paddle.cs" />
-    <Compile Include="Scripts\Wall.cs" />
+    <Compile Include="Logic\Ball.cs" />
+    <Compile Include="Logic\CeilingFloor.cs" />
+    <Compile Include="Logic\Paddle.cs" />
+    <Compile Include="Logic\Wall.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies">
+      <Version>1.0.0</Version>
+      <PrivateAssets>All</PrivateAssets>
+    </PackageReference>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
 </Project>

+ 6 - 6
mono/pong/Pong with C#.sln

@@ -5,15 +5,15 @@ EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	Debug|Any CPU = Debug|Any CPU
-	Release|Any CPU = Release|Any CPU
-	Tools|Any CPU = Tools|Any CPU
+	ExportDebug|Any CPU = ExportDebug|Any CPU
+	ExportRelease|Any CPU = ExportRelease|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{EBA5981B-C37E-48C5-A3B6-4390D9834F9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EBA5981B-C37E-48C5-A3B6-4390D9834F9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{EBA5981B-C37E-48C5-A3B6-4390D9834F9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{EBA5981B-C37E-48C5-A3B6-4390D9834F9A}.Release|Any CPU.Build.0 = Release|Any CPU
-		{EBA5981B-C37E-48C5-A3B6-4390D9834F9A}.Tools|Any CPU.ActiveCfg = Tools|Any CPU
-		{EBA5981B-C37E-48C5-A3B6-4390D9834F9A}.Tools|Any CPU.Build.0 = Tools|Any CPU
+		{EBA5981B-C37E-48C5-A3B6-4390D9834F9A}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
+		{EBA5981B-C37E-48C5-A3B6-4390D9834F9A}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
+		{EBA5981B-C37E-48C5-A3B6-4390D9834F9A}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
+		{EBA5981B-C37E-48C5-A3B6-4390D9834F9A}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
 	EndGlobalSection
 EndGlobal

+ 4 - 4
mono/pong/pong.tscn

@@ -1,13 +1,13 @@
 [gd_scene load_steps=13 format=2]
 
-[ext_resource path="res://Scripts/Paddle.cs" type="Script" id=1]
+[ext_resource path="res://Logic/Paddle.cs" type="Script" id=1]
 [ext_resource path="res://left_pallete.png" type="Texture" id=2]
 [ext_resource path="res://right_pallete.png" type="Texture" id=3]
-[ext_resource path="res://Scripts/Ball.cs" type="Script" id=4]
+[ext_resource path="res://Logic/Ball.cs" type="Script" id=4]
 [ext_resource path="res://ball.png" type="Texture" id=5]
 [ext_resource path="res://separator.png" type="Texture" id=6]
-[ext_resource path="res://Scripts/Wall.cs" type="Script" id=7]
-[ext_resource path="res://Scripts/CeilingFloor.cs" type="Script" id=8]
+[ext_resource path="res://Logic/Wall.cs" type="Script" id=7]
+[ext_resource path="res://Logic/CeilingFloor.cs" type="Script" id=8]
 
 [sub_resource type="RectangleShape2D" id=1]
 extents = Vector2( 4, 16 )

+ 1 - 1
networking/multiplayer_pong/ball.tscn

@@ -1,6 +1,6 @@
 [gd_scene load_steps=4 format=2]
 
-[ext_resource path="res://scripts/ball.gd" type="Script" id=1]
+[ext_resource path="res://logic/ball.gd" type="Script" id=1]
 [ext_resource path="res://ball.png" type="Texture" id=2]
 
 [sub_resource type="CircleShape2D" id=1]

+ 1 - 1
networking/multiplayer_pong/lobby.tscn

@@ -1,6 +1,6 @@
 [gd_scene load_steps=2 format=2]
 
-[ext_resource path="res://scripts/lobby.gd" type="Script" id=1]
+[ext_resource path="res://logic/lobby.gd" type="Script" id=1]
 
 [node name="Lobby" type="Control"]
 anchor_left = 0.5

+ 0 - 0
networking/multiplayer_pong/scripts/ball.gd → networking/multiplayer_pong/logic/ball.gd


+ 0 - 0
networking/multiplayer_pong/scripts/lobby.gd → networking/multiplayer_pong/logic/lobby.gd


+ 0 - 0
networking/multiplayer_pong/scripts/paddle.gd → networking/multiplayer_pong/logic/paddle.gd


+ 0 - 0
networking/multiplayer_pong/scripts/pong.gd → networking/multiplayer_pong/logic/pong.gd


+ 1 - 1
networking/multiplayer_pong/paddle.tscn

@@ -1,6 +1,6 @@
 [gd_scene load_steps=4 format=2]
 
-[ext_resource path="res://scripts/paddle.gd" type="Script" id=1]
+[ext_resource path="res://logic/paddle.gd" type="Script" id=1]
 [ext_resource path="res://paddle.png" type="Texture" id=2]
 
 [sub_resource type="CapsuleShape2D" id=1]

+ 1 - 1
networking/multiplayer_pong/pong.tscn

@@ -1,6 +1,6 @@
 [gd_scene load_steps=5 format=2]
 
-[ext_resource path="res://scripts/pong.gd" type="Script" id=1]
+[ext_resource path="res://logic/pong.gd" type="Script" id=1]
 [ext_resource path="res://separator.png" type="Texture" id=2]
 [ext_resource path="res://paddle.tscn" type="PackedScene" id=3]
 [ext_resource path="res://ball.tscn" type="PackedScene" id=4]

+ 1 - 1
networking/webrtc_signaling/client/multiplayer_client.gd

@@ -30,7 +30,7 @@ func stop():
 
 
 func _create_peer(id):
-	var peer : WebRTCPeerConnection = WebRTCPeerConnection.new()
+	var peer: WebRTCPeerConnection = WebRTCPeerConnection.new()
 	peer.initialize({
 		"iceServers": [ { "urls": ["stun:stun.l.google.com:19302"] } ]
 	})

+ 7 - 7
networking/webrtc_signaling/client/ws_webrtc_client.gd

@@ -52,13 +52,13 @@ func _connected(protocol = ""):
 
 
 func _parse_msg():
-	var pkt_str : String = client.get_peer(1).get_packet().get_string_from_utf8()
+	var pkt_str: String = client.get_peer(1).get_packet().get_string_from_utf8()
 
-	var req : PoolStringArray = pkt_str.split('\n', true, 1)
+	var req: PoolStringArray = pkt_str.split("\n", true, 1)
 	if req.size() != 2: # Invalid request size
 		return
 
-	var type : String = req[0]
+	var type: String = req[0]
 	if type.length() < 3: # Invalid type size
 		return
 
@@ -69,11 +69,11 @@ func _parse_msg():
 		emit_signal("lobby_sealed")
 		return
 
-	var src_str : String = type.substr(3, type.length() - 3)
+	var src_str: String = type.substr(3, type.length() - 3)
 	if not src_str.is_valid_integer(): # Source id is not an integer
 		return
 
-	var src_id : int = int(src_str)
+	var src_id: int = int(src_str)
 
 	if type.begins_with("I: "):
 		emit_signal("connected", src_id)
@@ -91,7 +91,7 @@ func _parse_msg():
 		emit_signal("answer_received", src_id, req[1])
 	elif type.begins_with("C: "):
 		# Candidate received
-		var candidate : PoolStringArray = req[1].split('\n', false)
+		var candidate: PoolStringArray = req[1].split("\n", false)
 		if candidate.size() != 3:
 			return
 		if not candidate[1].is_valid_integer():
@@ -124,6 +124,6 @@ func _send_msg(type, id, data) -> int:
 
 
 func _process(delta):
-	var status : int = client.get_connection_status()
+	var status: int = client.get_connection_status()
 	if status == WebSocketClient.CONNECTION_CONNECTING or status == WebSocketClient.CONNECTION_CONNECTED:
 		client.poll()

+ 2 - 2
networking/webrtc_signaling/demo/client_ui.gd

@@ -43,11 +43,11 @@ func _mp_server_disconnect():
 	_log("Multiplayer is disconnected (I am %d)" % client.rtc_mp.get_unique_id())
 
 
-func _mp_peer_connected(id : int):
+func _mp_peer_connected(id: int):
 	_log("Multiplayer peer %d connected" % id)
 
 
-func _mp_peer_disconnected(id : int):
+func _mp_peer_disconnected(id: int):
 	_log("Multiplayer peer %d disconnected" % id)
 
 

+ 8 - 8
networking/webrtc_signaling/server/ws_webrtc_server.gd

@@ -22,18 +22,18 @@ class Peer extends Reference:
 
 
 class Lobby extends Reference:
-	var peers : Array = []
-	var host : int = -1
-	var sealed : bool = false
+	var peers: Array = []
+	var host: int = -1
+	var sealed: bool = false
 	var time = 0
 
-	func _init(host_id : int):
+	func _init(host_id: int):
 		host = host_id
 
 	func join(peer_id, server) -> bool:
 		if sealed: return false
 		if not server.has_peer(peer_id): return false
-		var new_peer : WebSocketPeer = server.get_peer(peer_id)
+		var new_peer: WebSocketPeer = server.get_peer(peer_id)
 		new_peer.put_packet(("I: %d\n" % (1 if peer_id == host else peer_id)).to_utf8())
 		for p in peers:
 			if not server.has_peer(p):
@@ -156,7 +156,7 @@ func _on_data(id):
 func _parse_msg(id) -> bool:
 	var pkt_str: String = server.get_peer(id).get_packet().get_string_from_utf8()
 
-	var req = pkt_str.split('\n', true, 1)
+	var req = pkt_str.split("\n", true, 1)
 	if req.size() != 2: # Invalid request size
 		return false
 
@@ -181,11 +181,11 @@ func _parse_msg(id) -> bool:
 		# Client is sealing the room
 		return lobby.seal(id, server)
 
-	var dest_str : String = type.substr(3, type.length() - 3)
+	var dest_str: String = type.substr(3, type.length() - 3)
 	if not dest_str.is_valid_integer(): # Destination id is not an integer
 		return false
 
-	var dest_id : int = int(dest_str)
+	var dest_id: int = int(dest_str)
 	if dest_id == NetworkedMultiplayerPeer.TARGET_PEER_SERVER:
 		dest_id = lobby.host
 

+ 1 - 1
plugins/addons/material_creator/material_creator.gd

@@ -31,7 +31,7 @@ func apply_pressed():
 		printerr("Material Creator: Can't apply the material, because there are no nodes selected!")
 	
 	var material = _silly_resource_from_values().make_material()
-	# Go through the selected nodes and see if they have the 'set_surface_material'
+	# Go through the selected nodes and see if they have the "set_surface_material"
 	# function (which only MeshInstance has by default). If they do, then set the material
 	# to the silly material.
 	for node in selected_nodes: