From ff10a807d01c4817ea88bb25b350b582a5083386 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 2 Feb 2020 21:04:09 -0500 Subject: [PATCH 01/10] Update GD Paint demo --- 2d/gd_paint/PaintControl.gd | 198 ++++++++++++++---------------- 2d/gd_paint/PaintTools.png.import | 34 +++++ 2d/gd_paint/Paint_root.tscn | 53 ++++---- 2d/gd_paint/ToolsPanel.gd | 98 +++++++-------- 2d/gd_paint/icon.png.import | 34 +++++ 5 files changed, 239 insertions(+), 178 deletions(-) create mode 100644 2d/gd_paint/PaintTools.png.import create mode 100644 2d/gd_paint/icon.png.import diff --git a/2d/gd_paint/PaintControl.gd b/2d/gd_paint/PaintControl.gd index bd08f548..2372112f 100644 --- a/2d/gd_paint/PaintControl.gd +++ b/2d/gd_paint/PaintControl.gd @@ -1,52 +1,50 @@ extends Control -# The TL position of the canvas +# A constant for whether or not we're needing to undo a shape. +const UNDO_MODE_SHAPE = -2 +# A constant for whether or not we can undo. +const UNDO_NONE = -1 +# How large is the image (it's actually the size of DrawingAreaBG, because that's our background canvas). +const IMAGE_SIZE = Vector2(930, 720) + +# Enums for the various modes and brush shapes that can be applied. +enum BrushModes { + PENCIL, ERASER, CIRCLE_SHAPE, RECTANGLE_SHAPE +} +enum BrushShapes { + RECTANGLE, CIRCLE +} + +# The top-left position of the canvas. var TL_node # A list to hold all of the dictionaries that make up each brush. var brush_data_list = [] # A boolean to hold whether or not the mouse is inside the drawing area, the mouse position last _process call -# and the position of the mouse when the left mouse button was pressed +# and the position of the mouse when the left mouse button was pressed. var is_mouse_in_drawing_area = false var last_mouse_pos = Vector2() var mouse_click_start_pos = null # A boolean to tell whether we've set undo_elements_list_num, which holds the size of draw_elements_list # before a new stroke is added (unless the current brush mode is 'rectangle shape' or 'circle shape', in -# which case we do things a litte differently. See the undo_stroke function for more details) +# which case we do things a litte differently. See the undo_stroke function for more details). var undo_set = false var undo_element_list_num = -1 -# A constant for whether or not we're needing to undo a shape -const UNDO_MODE_SHAPE = -2 -# A constant for whether or not we can undo -const UNDO_NONE = -1 - -# Enums for the various modes and brush shapes that can be applied -enum BRUSH_MODES { - pencil, eraser, circle_shape, rectangle_shape -} -enum BRUSH_SHAPES { - rectangle, circle -} - -# The current brush settings: The mode, size, color, and shape we have currently selected -var brush_mode = BRUSH_MODES.pencil +# The current brush settings: The mode, size, color, and shape we have currently selected. +var brush_mode = BrushModes.PENCIL var brush_size = 32 -var brush_color = Color(1, 1, 1, 1) -var brush_shape = BRUSH_SHAPES.circle; +var brush_color = Color.black +var brush_shape = BrushShapes.CIRCLE; # The color of the background. We need this for the eraser (see the how we handle the eraser -# in the _draw function for more details) -var bg_color = Color(1, 1, 1, 1) - -# How large is the image (it's actually the size of DrawingAreaBG, because that's our background canvas) -const IMAGE_SIZE = Vector2(930, 720) - +# in the _draw function for more details). +var bg_color = Color.white func _ready(): - # Get the top left position node. We need this to find out whether or not the mouse is inside the canvas + # Get the top left position node. We need this to find out whether or not the mouse is inside the canvas. TL_node = get_node("TLPos") set_process(true) @@ -54,92 +52,92 @@ func _ready(): func _process(_delta): var mouse_pos = get_viewport().get_mouse_position() - # Check if the mouse is currently inside the canvas/drawing-area + # Check if the mouse is currently inside the canvas/drawing-area. is_mouse_in_drawing_area = false if mouse_pos.x > TL_node.global_position.x: if mouse_pos.y > TL_node.global_position.y: is_mouse_in_drawing_area = true if Input.is_mouse_button_pressed(BUTTON_LEFT): - # If we do not have a position for when the mouse was first clicked, then this most + # If we do not have a position for when the mouse was first clicked, then this must # be the first time is_mouse_button_pressed has been called since the mouse button was - # released, so we need to store the position + # released, so we need to store the position. if mouse_click_start_pos == null: mouse_click_start_pos = mouse_pos - # If the mouse is inside the canvas and the mouse is 1px away from the position of the mouse last _process call + # If the mouse is inside the canvas and the mouse is 1px away from the position of the mouse last _process call. if check_if_mouse_is_inside_canvas(): if mouse_pos.distance_to(last_mouse_pos) >= 1: - # If we are in pencil or eraser mode, then we need to draw - if brush_mode == BRUSH_MODES.pencil or brush_mode == BRUSH_MODES.eraser: + # If we are in pencil or eraser mode, then we need to draw. + if brush_mode == BrushModes.PENCIL or brush_mode == BrushModes.ERASER: # If undo has not been set, meaning we've started a new stroke, then store the size of the - # draw_elements_list so we can undo from this point in time + # draw_elements_list so we can undo from this point in time. if undo_set == false: undo_set = true undo_element_list_num = brush_data_list.size() - # Add the brush object to draw_elements_array + # Add the brush object to draw_elements_array. add_brush(mouse_pos, brush_mode) else: - # We've finished our stroke, so we can set a new undo (if a new storke is made) + # We've finished our stroke, so we can set a new undo (if a new storke is made). undo_set = false - # If the mouse is inside the canvas + # If the mouse is inside the canvas. if check_if_mouse_is_inside_canvas(): # If we're using either the circle shape mode, or the rectangle shape mode, then - # add the brush object to draw_elements_array - if brush_mode == BRUSH_MODES.circle_shape or brush_mode == BRUSH_MODES.rectangle_shape: + # add the brush object to draw_elements_array. + if brush_mode == BrushModes.CIRCLE_SHAPE or brush_mode == BrushModes.RECTANGLE_SHAPE: add_brush(mouse_pos, brush_mode) # We handle undo's differently than either pencil or eraser mode, so we need to set undo - # element_list_num to -2 so we can tell if we need to undo a shape. See undo_stroke for details + # element_list_num to -2 so we can tell if we need to undo a shape. See undo_stroke for details. undo_element_list_num = UNDO_MODE_SHAPE # Since we've released the left mouse, we need to get a new mouse_click_start_pos next time #is_mouse_button_pressed is true. mouse_click_start_pos = null - # Store mouse_pos as last_mouse_pos now that we're done with _process + # Store mouse_pos as last_mouse_pos now that we're done with _process. last_mouse_pos = mouse_pos func check_if_mouse_is_inside_canvas(): - # Make sure we have a mouse click starting position + # Make sure we have a mouse click starting position. if mouse_click_start_pos != null: # Make sure the mouse click starting position is inside the canvas. # This is so if we start out click outside the canvas (say chosing a color from the color picker) - # and then move our mouse back into the canvas, it won't start painting + # and then move our mouse back into the canvas, it won't start painting. if mouse_click_start_pos.x > TL_node.global_position.x: if mouse_click_start_pos.y > TL_node.global_position.y: - # Make sure the current mouse position is inside the canvas + # Make sure the current mouse position is inside the canvas. if is_mouse_in_drawing_area == true: return true return false func undo_stroke(): - # Only undo a stroke if we have one + # Only undo a stroke if we have one. if undo_element_list_num == UNDO_NONE: return - # If we are undoing a shape, then we can just remove the latest brush + # If we are undoing a shape, then we can just remove the latest brush. if undo_element_list_num == UNDO_MODE_SHAPE: if brush_data_list.size() > 0: brush_data_list.remove(brush_data_list.size() - 1) - # Now that we've undone a shape, we cannot undo again until another stoke is added + # Now that we've undone a shape, we cannot undo again until another stoke is added. undo_element_list_num = UNDO_NONE # NOTE: if we only had shape brushes, then we could remove the above line and could let the user - # undo until we have a empty element list + # undo until we have a empty element list. # Otherwise we're removing a either a pencil stroke or a eraser stroke. else: - # Figure out how many elements/brushes we've added in the last stroke + # Figure out how many elements/brushes we've added in the last stroke. var elements_to_remove = brush_data_list.size() - undo_element_list_num - # Remove all of the elements we've added this in the last stroke + # Remove all of the elements we've added this in the last stroke. #warning-ignore:unused_variable for elment_num in range(0, elements_to_remove): brush_data_list.pop_back() - # Now that we've undone a stoke, we cannot undo again until another stoke is added + # Now that we've undone a stoke, we cannot undo again until another stoke is added. undo_element_list_num = UNDO_NONE # Redraw the brushes @@ -159,12 +157,12 @@ func add_brush(mouse_pos, type): new_brush.brush_color = brush_color # If the new bursh is a rectangle shape, we need to calculate the top left corner of the rectangle and the - # bottom right corner of the rectangle - if type == BRUSH_MODES.rectangle_shape: + # bottom right corner of the rectangle. + if type == BrushModes.RECTANGLE_SHAPE: var TL_pos = Vector2() var BR_pos = Vector2() - # Figure out the left and right positions of the corners and assign them to the proper variable + # Figure out the left and right positions of the corners and assign them to the proper variable. if mouse_pos.x < mouse_click_start_pos.x: TL_pos.x = mouse_pos.x BR_pos.x = mouse_click_start_pos.x @@ -172,7 +170,7 @@ func add_brush(mouse_pos, type): TL_pos.x = mouse_click_start_pos.x BR_pos.x = mouse_pos.x - # Figure out the top and bottom positions of the corners and assign them to the proper variable + # Figure out the top and bottom positions of the corners and assign them to the proper variable. if mouse_pos.y < mouse_click_start_pos.y: TL_pos.y = mouse_pos.y BR_pos.y = mouse_click_start_pos.y @@ -180,80 +178,72 @@ func add_brush(mouse_pos, type): TL_pos.y = mouse_click_start_pos.y BR_pos.y = mouse_pos.y - # Assign the positions to the brush + # Assign the positions to the brush. new_brush.brush_pos = TL_pos new_brush.brush_shape_rect_pos_BR = BR_pos - # If the brush isa circle shape, then we need to calculate the radius of the circle - if type == BRUSH_MODES.circle_shape: - # Get the center point inbetween the mouse position and the position of the mouse when we clicked + # If the brush isa circle shape, then we need to calculate the radius of the circle. + if type == BrushModes.CIRCLE_SHAPE: + # Get the center point inbetween the mouse position and the position of the mouse when we clicked. var center_pos = Vector2((mouse_pos.x + mouse_click_start_pos.x) / 2, (mouse_pos.y + mouse_click_start_pos.y) / 2) # Assign the brush position to the center point, and calculate the radius of the circle using the distance from - # the center to the top/bottom positon of the mouse + # the center to the top/bottom positon of the mouse. new_brush.brush_pos = center_pos new_brush.brush_shape_circle_radius = center_pos.distance_to(Vector2(center_pos.x, mouse_pos.y)) - # Add the brush and update/draw all of the brushes + # Add the brush and update/draw all of the brushes. brush_data_list.append(new_brush) update() func _draw(): - # Go through all of the brushes in brush_data_list + # Go through all of the brushes in brush_data_list. for brush in brush_data_list: - - # If the brush is a pencil - if brush.brush_type == BRUSH_MODES.pencil: - # If the brush shape is a rectangle, then we need to make a Rect2 so we can use draw_rect. - # Draw_rect draws a rectagle at the top left corner, using the scale for the size. - # So we offset the position by half of the brush size so the rectangle's center is at mouse position - if brush.brush_shape == BRUSH_SHAPES.rectangle: - var rect = Rect2(brush.brush_pos - Vector2(brush.brush_size / 2, brush.brush_size / 2), Vector2(brush.brush_size, brush.brush_size)) + match brush.brush_type: + BrushModes.PENCIL: + # If the brush shape is a rectangle, then we need to make a Rect2 so we can use draw_rect. + # Draw_rect draws a rectagle at the top left corner, using the scale for the size. + # So we offset the position by half of the brush size so the rectangle's center is at mouse position. + if brush.brush_shape == BrushShapes.RECTANGLE: + var rect = Rect2(brush.brush_pos - Vector2(brush.brush_size / 2, brush.brush_size / 2), Vector2(brush.brush_size, brush.brush_size)) + draw_rect(rect, brush.brush_color) + # If the brush shape is a circle, then we draw a circle at the mouse position, + # making the radius half of brush size (so the circle is brush size pixels in diameter). + elif brush.brush_shape == BrushShapes.CIRCLE: + draw_circle(brush.brush_pos, brush.brush_size / 2, brush.brush_color) + BrushModes.ERASER: + # NOTE: this is a really cheap way of erasing that isn't really erasing! + # However, this gives similar results in a fairy simple way! + + # Erasing works exactly the same was as pencil does for both the rectangle shape and the circle shape, + # but instead of using brush.brush_color, we instead use bg_color instead. + if brush.brush_shape == BrushShapes.RECTANGLE: + var rect = Rect2(brush.brush_pos - Vector2(brush.brush_size / 2, brush.brush_size / 2), Vector2(brush.brush_size, brush.brush_size)) + draw_rect(rect, bg_color) + elif brush.brush_shape == BrushShapes.CIRCLE: + draw_circle(brush.brush_pos, brush.brush_size / 2, bg_color) + BrushModes.RECTANGLE_SHAPE: + # We make a Rect2 with the postion at the top left. To get the size we take the bottom right position + # and subtract the top left corner's position. + var rect = Rect2(brush.brush_pos, brush.brush_shape_rect_pos_BR - brush.brush_pos) draw_rect(rect, brush.brush_color) - # If the brush shape is a circle, then we draw a circle at the mouse position, - # making the radius half of brush size (so the circle is brush size pixels in diameter) - elif brush.brush_shape == BRUSH_SHAPES.circle: - draw_circle(brush.brush_pos, brush.brush_size / 2, brush.brush_color) - - # If the brush is a eraser - elif brush.brush_type == BRUSH_MODES.eraser: - # NOTE: this is a really cheap way of erasing that isn't really erasing! - # However, this gives similar results in a fairy simple way! - - # Erasing works exactly the same was as pencil does for both the rectangle shape and the circle shape, - # but instead of using brush.brush_color, we instead use bg_color instead. - if brush.brush_shape == BRUSH_SHAPES.rectangle: - var rect = Rect2(brush.brush_pos - Vector2(brush.brush_size / 2, brush.brush_size / 2), Vector2(brush.brush_size, brush.brush_size)) - draw_rect(rect, bg_color) - elif brush.brush_shape == BRUSH_SHAPES.circle: - draw_circle(brush.brush_pos, brush.brush_size / 2, bg_color) - - # If the brush is a rectangle shape - elif brush.brush_type == BRUSH_MODES.rectangle_shape: - # We make a Rect2 with the postion at the top left. To get the size we take the bottom right position - # and subtract the top left corner's position - var rect = Rect2(brush.brush_pos, brush.brush_shape_rect_pos_BR - brush.brush_pos) - draw_rect(rect, brush.brush_color) - - # If the brush is a circle shape - elif brush.brush_type == BRUSH_MODES.circle_shape: - # We simply draw a circle using stored in brush - draw_circle(brush.brush_pos, brush.brush_shape_circle_radius, brush.brush_color) + BrushModes.CIRCLE_SHAPE: + # We simply draw a circle using stored in brush. + 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 + # Wait a couple frames so the save dialog isn't in the way. yield (get_tree(), "idle_frame") yield (get_tree(), "idle_frame") - # Get the viewport image + # Get the viewport image. var img = get_viewport().get_texture().get_data() # Crop the image so we only have canvas area. var cropped_image = img.get_rect(Rect2(TL_node.global_position, IMAGE_SIZE)) - # Flip the image on the Y-axis (it's flipped upside down by default) + # Flip the image on the Y-axis (it's flipped upside down by default). cropped_image.flip_y() - # Save the image with the passed in path we got from the save dialog + # Save the image with the passed in path we got from the save dialog. cropped_image.save_png(path) - diff --git a/2d/gd_paint/PaintTools.png.import b/2d/gd_paint/PaintTools.png.import new file mode 100644 index 00000000..8763b5e3 --- /dev/null +++ b/2d/gd_paint/PaintTools.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/PaintTools.png-636e86a6d210b52282c946752bbcc6f1.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://PaintTools.png" +dest_files=[ "res://.import/PaintTools.png-636e86a6d210b52282c946752bbcc6f1.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/2d/gd_paint/Paint_root.tscn b/2d/gd_paint/Paint_root.tscn index af0c2ef8..a9714d62 100644 --- a/2d/gd_paint/Paint_root.tscn +++ b/2d/gd_paint/Paint_root.tscn @@ -37,7 +37,7 @@ margin_left = 20.0 margin_top = 10.0 margin_right = 330.0 margin_bottom = 24.0 -text = "Selected tool: pencil" +text = "Selected tool: Pencil" align = 1 [node name="ButtonToolPencil" type="Button" parent="ToolsPanel"] @@ -105,52 +105,59 @@ margin_left = 20.0 margin_top = 140.0 margin_right = 330.0 margin_bottom = 190.0 -color = Color( 1, 1, 1, 1 ) -[node name="LabelBrushSize" type="Label" parent="ToolsPanel"] +[node name="BrushSettings" type="Control" parent="ToolsPanel"] +margin_top = 200.0 +margin_right = 350.0 +margin_bottom = 375.0 + +[node name="LabelBrushSize" type="Label" parent="ToolsPanel/BrushSettings"] margin_left = 20.0 -margin_top = 210.0 +margin_top = 10.0 margin_right = 330.0 -margin_bottom = 224.0 +margin_bottom = 24.0 text = "Brush size: 32px" align = 1 -[node name="HScrollBarBrushSize" type="HScrollBar" parent="ToolsPanel"] +[node name="HScrollBarBrushSize" type="HScrollBar" parent="ToolsPanel/BrushSettings"] margin_left = 20.0 -margin_top = 230.0 +margin_top = 30.0 margin_right = 330.0 -margin_bottom = 260.0 -min_value = 1.0 +margin_bottom = 60.0 +min_value = 2.0 +step = 1.0 value = 32.0 -[node name="LabelBrushShape" type="Label" parent="ToolsPanel"] +[node name="LabelBrushShape" type="Label" parent="ToolsPanel/BrushSettings"] margin_left = 20.0 -margin_top = 280.0 +margin_top = 80.0 margin_right = 330.0 -margin_bottom = 294.0 -text = "Brush shape: circle" +margin_bottom = 94.0 +text = "Brush shape: Circle" align = 1 -[node name="ButtonShapeBox" type="Button" parent="ToolsPanel"] +[node name="ButtonShapeBox" type="Button" parent="ToolsPanel/BrushSettings"] +editor/display_folded = true margin_left = 100.0 -margin_top = 300.0 +margin_top = 100.0 margin_right = 160.0 -margin_bottom = 360.0 +margin_bottom = 160.0 -[node name="Sprite" type="Sprite" parent="ToolsPanel/ButtonShapeBox"] +[node name="Sprite" type="Sprite" parent="ToolsPanel/BrushSettings/ButtonShapeBox"] position = Vector2( 30, 30 ) scale = Vector2( 2.5, 2.5 ) texture = ExtResource( 3 ) region_enabled = true region_rect = Rect2( 0, 16, 16, 16 ) -[node name="ButtonShapeCircle" type="Button" parent="ToolsPanel"] +[node name="ButtonShapeCircle" type="Button" parent="ToolsPanel/BrushSettings"] +editor/display_folded = true margin_left = 190.0 -margin_top = 300.0 +margin_top = 100.0 margin_right = 250.0 -margin_bottom = 360.0 +margin_bottom = 160.0 -[node name="Sprite" type="Sprite" parent="ToolsPanel/ButtonShapeCircle"] +[node name="Sprite" type="Sprite" parent="ToolsPanel/BrushSettings/ButtonShapeCircle"] position = Vector2( 30, 30 ) scale = Vector2( 2.5, 2.5 ) texture = ExtResource( 3 ) @@ -209,5 +216,5 @@ margin_bottom = 400.0 resizable = true access = 2 filters = PoolStringArray( "*.png" ) -current_dir = "/home/ubuntu_noah/Documents/New_2019_GitHub_Repositories/godot-demo-projects/2d/gd_paint" -current_path = "/home/ubuntu_noah/Documents/New_2019_GitHub_Repositories/godot-demo-projects/2d/gd_paint/" +current_dir = "/home/aaronfranke/workspace/godot-demo-projects/2d/gd_paint" +current_path = "/home/aaronfranke/workspace/godot-demo-projects/2d/gd_paint/" diff --git a/2d/gd_paint/ToolsPanel.gd b/2d/gd_paint/ToolsPanel.gd index e1026a37..894427b1 100644 --- a/2d/gd_paint/ToolsPanel.gd +++ b/2d/gd_paint/ToolsPanel.gd @@ -1,83 +1,80 @@ extends Panel - var paint_control -var label_tools -var label_brush_size -var label_brush_shape -var label_stats +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_stats = $LabelStats var save_dialog - func _ready(): - # Get PaintControl and SaveFileDialog + # 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 - get_node("ButtonUndo").connect("pressed", self, "button_pressed", ["undo_stroke"]) - get_node("ButtonSave").connect("pressed", self, "button_pressed", ["save_picture"]) - get_node("ButtonClear").connect("pressed", self, "button_pressed", ["clear_picture"]) + # Assign all of the needed signals for the oppersation buttons. + $ButtonUndo.connect("pressed", self, "button_pressed", ["undo_stroke"]) + $ButtonSave.connect("pressed", self, "button_pressed", ["save_picture"]) + $ButtonClear.connect("pressed", self, "button_pressed", ["clear_picture"]) - # Assign all of the needed signals for the brush buttons - get_node("ButtonToolPencil").connect("pressed", self, "button_pressed", ["mode_pencil"]) - get_node("ButtonToolEraser").connect("pressed", self, "button_pressed", ["mode_eraser"]) - get_node("ButtonToolRectangle").connect("pressed", self, "button_pressed", ["mode_rectangle"]) - get_node("ButtonToolCircle").connect("pressed", self, "button_pressed", ["mode_circle"]) - get_node("ButtonShapeBox").connect("pressed", self, "button_pressed", ["shape_rectangle"]) - get_node("ButtonShapeCircle").connect("pressed", self, "button_pressed", ["shape_circle"]) + # Assign all of the needed signals for the brush buttons. + $ButtonToolPencil.connect("pressed", self, "button_pressed", ["mode_pencil"]) + $ButtonToolEraser.connect("pressed", self, "button_pressed", ["mode_eraser"]) + $ButtonToolRectangle.connect("pressed", self, "button_pressed", ["mode_rectangle"]) + $ButtonToolCircle.connect("pressed", self, "button_pressed", ["mode_circle"]) + $BrushSettings/ButtonShapeBox.connect("pressed", self, "button_pressed", ["shape_rectangle"]) + $BrushSettings/ButtonShapeCircle.connect("pressed", self, "button_pressed", ["shape_circle"]) - # Assign all of the needed signals for the other brush settings (and ColorPickerBackground) - get_node("ColorPickerBrush").connect("color_changed", self, "brush_color_changed") - get_node("ColorPickerBackground").connect("color_changed", self, "background_color_changed") - get_node("HScrollBarBrushSize").connect("value_changed", self, "brush_size_changed") + # Assign all of the needed signals for the other brush settings (and ColorPickerBackground). + $ColorPickerBrush.connect("color_changed", self, "brush_color_changed") + $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") - # Get all of the labels so we can update them when settings change - label_tools = get_node("LabelTools") - label_brush_size = get_node("LabelBrushSize") - label_brush_shape = get_node("LabelBrushShape") - label_stats = get_node("LabelStats") - - # Set physics process so we can update the status label + # Set physics process so we can update the status label. set_physics_process(true) func _physics_process(_delta): - # Update the status label with the newest brush element count + # Update the status label with the newest brush element count. label_stats.text = "Brush objects: " + String(paint_control.brush_data_list.size()) func button_pressed(button_name): - # If a brush mode button is pressed + # If a brush mode button is pressed. var tool_name = null var shape_name = null if button_name == "mode_pencil": - paint_control.brush_mode = paint_control.BRUSH_MODES.pencil - tool_name = "pencil" + paint_control.brush_mode = paint_control.BrushModes.PENCIL + brush_settings.modulate = Color(1, 1, 1, 1) + tool_name = "Pencil" elif button_name == "mode_eraser": - paint_control.brush_mode = paint_control.BRUSH_MODES.eraser - tool_name = "eraser" + paint_control.brush_mode = paint_control.BrushModes.ERASER + brush_settings.modulate = Color(1, 1, 1, 1) + tool_name = "Eraser" elif button_name == "mode_rectangle": - paint_control.brush_mode = paint_control.BRUSH_MODES.rectangle_shape - tool_name = "rectangle shape" + paint_control.brush_mode = paint_control.BrushModes.RECTANGLE_SHAPE + brush_settings.modulate = Color(1, 1, 1, 0.5) + tool_name = "Rectangle shape" elif button_name == "mode_circle": - paint_control.brush_mode = paint_control.BRUSH_MODES.circle_shape - tool_name = "circle shape" + paint_control.brush_mode = paint_control.BrushModes.CIRCLE_SHAPE + brush_settings.modulate = Color(1, 1, 1, 0.5) + tool_name = "Circle shape" # If a brush shape button is pressed elif button_name == "shape_rectangle": - paint_control.brush_shape = paint_control.BRUSH_SHAPES.rectangle - shape_name = "rectangle" + paint_control.brush_shape = paint_control.BrushShapes.RECTANGLE + shape_name = "Rectangle" elif button_name == "shape_circle": - paint_control.brush_shape = paint_control.BRUSH_SHAPES.circle - shape_name = "circle"; + paint_control.brush_shape = paint_control.BrushShapes.CIRCLE + shape_name = "Circle"; # If a opperation button is pressed elif button_name == "clear_picture": @@ -88,7 +85,7 @@ func button_pressed(button_name): elif button_name == "undo_stroke": paint_control.undo_stroke() - # Update the labels (in case the brush mode or brush shape has changed) + # Update the labels (in case the brush mode or brush shape has changed). if tool_name != null: label_tools.text = "Selected tool: " + tool_name if shape_name != null: @@ -96,25 +93,24 @@ func button_pressed(button_name): func brush_color_changed(color): - # Change the brush color to whatever color the color picker is + # Change the brush color to whatever color the color picker is. paint_control.brush_color = color func background_color_changed(color): - # Change the background color to whatever colorthe background color picker is + # Change the background color to whatever colorthe background color picker is. get_parent().get_node("DrawingAreaBG").modulate = color paint_control.bg_color = color - # Because of how the eraser works we also need to redraw the paint control + # Because of how the eraser works we also need to redraw the paint control. paint_control.update() func brush_size_changed(value): - # Change the size of the brush, and update the label to reflect the new value + # Change the size of the brush, and update the label to reflect the new value. paint_control.brush_size = ceil(value) label_brush_size.text = "Brush size: " + String(ceil(value)) + "px" func save_file_selected(path): - # Call save_picture in paint_control, passing in the path we recieved from SaveFileDialog + # Call save_picture in paint_control, passing in the path we recieved from SaveFileDialog. paint_control.save_picture(path) - diff --git a/2d/gd_paint/icon.png.import b/2d/gd_paint/icon.png.import new file mode 100644 index 00000000..96cbf462 --- /dev/null +++ b/2d/gd_paint/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 From 49a01d6f87abacec39a085e269e1b8a450c8e025 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 2 Feb 2020 21:43:09 -0500 Subject: [PATCH 02/10] Update grid based movement demo --- 2d/grid_based_movement/grid/grid.gd | 2 +- 2d/grid_based_movement/pawns/Actor.tscn | 1 - 2d/grid_based_movement/pawns/actor.gd | 10 +++--- 2d/grid_based_movement/pawns/pawn.gd | 1 + 2d/grid_based_movement/project.godot | 35 +++++++++++++++++++ .../tilesets/grid/GridTiles.tscn | 1 - .../tilesets/grid_lines/GridLinesTiles.tscn | 1 - 7 files changed, 42 insertions(+), 9 deletions(-) diff --git a/2d/grid_based_movement/grid/grid.gd b/2d/grid_based_movement/grid/grid.gd index 2f4ea0fe..1d8c18e3 100644 --- a/2d/grid_based_movement/grid/grid.gd +++ b/2d/grid_based_movement/grid/grid.gd @@ -1,6 +1,6 @@ extends TileMap -enum CellType { EMPTY = -1, ACTOR, OBSTACLE, OBJECT} +enum CellType { EMPTY = -1, ACTOR, OBSTACLE, OBJECT } func _ready(): for child in get_children(): diff --git a/2d/grid_based_movement/pawns/Actor.tscn b/2d/grid_based_movement/pawns/Actor.tscn index 9e4dee9b..ded5fad6 100644 --- a/2d/grid_based_movement/pawns/Actor.tscn +++ b/2d/grid_based_movement/pawns/Actor.tscn @@ -82,4 +82,3 @@ position = Vector2( 1.43051e-06, -1.90735e-06 ) texture = ExtResource( 2 ) centered = false offset = Vector2( -32, -32 ) - diff --git a/2d/grid_based_movement/pawns/actor.gd b/2d/grid_based_movement/pawns/actor.gd index f522da51..4a46f0b4 100644 --- a/2d/grid_based_movement/pawns/actor.gd +++ b/2d/grid_based_movement/pawns/actor.gd @@ -1,9 +1,9 @@ extends "pawn.gd" -onready var Grid = get_parent() +onready var grid = get_parent() func _ready(): - update_look_direction(Vector2(1, 0)) + update_look_direction(Vector2.RIGHT) func _process(_delta): @@ -12,7 +12,7 @@ func _process(_delta): return update_look_direction(input_direction) - var target_position = Grid.request_move(self, input_direction) + var target_position = grid.request_move(self, input_direction) if target_position: move_to(target_position) else: @@ -21,8 +21,8 @@ func _process(_delta): func get_input_direction(): return Vector2( - int(Input.is_action_pressed("ui_right")) - int(Input.is_action_pressed("ui_left")), - int(Input.is_action_pressed("ui_down")) - int(Input.is_action_pressed("ui_up")) + Input.get_action_strength("move_right") - Input.get_action_strength("move_left"), + Input.get_action_strength("move_down") - Input.get_action_strength("move_up") ) diff --git a/2d/grid_based_movement/pawns/pawn.gd b/2d/grid_based_movement/pawns/pawn.gd index aa7b556f..8aacdb4b 100644 --- a/2d/grid_based_movement/pawns/pawn.gd +++ b/2d/grid_based_movement/pawns/pawn.gd @@ -1,4 +1,5 @@ extends Node2D enum CellType { ACTOR, OBSTACLE, OBJECT } +#warning-ignore:unused_class_variable export(CellType) var type = CellType.ACTOR diff --git a/2d/grid_based_movement/project.godot b/2d/grid_based_movement/project.godot index d78e31c0..ff85a1b5 100644 --- a/2d/grid_based_movement/project.godot +++ b/2d/grid_based_movement/project.godot @@ -26,6 +26,41 @@ window/size/height=720 window/stretch/mode="2d" window/stretch/aspect="expand" +[input] + +move_right={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) + ] +} +move_left={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null) + ] +} +move_down={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null) + ] +} +move_up={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null) + ] +} + [rendering] environment/default_environment="res://default_env.tres" diff --git a/2d/grid_based_movement/tilesets/grid/GridTiles.tscn b/2d/grid_based_movement/tilesets/grid/GridTiles.tscn index 8d3bed4d..d4c318b7 100644 --- a/2d/grid_based_movement/tilesets/grid/GridTiles.tscn +++ b/2d/grid_based_movement/tilesets/grid/GridTiles.tscn @@ -17,4 +17,3 @@ texture = ExtResource( 2 ) [node name="Object" type="Sprite" parent="."] position = Vector2( 160, 32 ) texture = ExtResource( 3 ) - diff --git a/2d/grid_based_movement/tilesets/grid_lines/GridLinesTiles.tscn b/2d/grid_based_movement/tilesets/grid_lines/GridLinesTiles.tscn index 26097a60..6b44776f 100644 --- a/2d/grid_based_movement/tilesets/grid_lines/GridLinesTiles.tscn +++ b/2d/grid_based_movement/tilesets/grid_lines/GridLinesTiles.tscn @@ -7,4 +7,3 @@ [node name="Grass" type="Sprite" parent="."] position = Vector2( 32, 32 ) texture = ExtResource( 1 ) - From db6967868fbc766ada8f7fda1e7cdc6a38505c4b Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 2 Feb 2020 22:00:48 -0500 Subject: [PATCH 03/10] Update HDR demo --- 2d/hdr/beach_cave.gd | 9 ++++----- 2d/hdr/beach_cave.tscn | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/2d/hdr/beach_cave.gd b/2d/hdr/beach_cave.gd index ddb31320..e56d3ed9 100644 --- a/2d/hdr/beach_cave.gd +++ b/2d/hdr/beach_cave.gd @@ -1,17 +1,16 @@ - extends Node2D -# Member variables const CAVE_LIMIT = 1000 +onready var cave = $Cave func _input(event): - if event is InputEventMouseMotion and event.button_mask&1: + if event is InputEventMouseMotion and event.button_mask > 0: var rel_x = event.relative.x - var cavepos = $cave.position + var cavepos = cave.position cavepos.x += rel_x if cavepos.x < -CAVE_LIMIT: cavepos.x = -CAVE_LIMIT elif cavepos.x > 0: cavepos.x = 0 - $cave.position = cavepos + cave.position = cavepos diff --git a/2d/hdr/beach_cave.tscn b/2d/hdr/beach_cave.tscn index b1d2c0f3..5095987f 100644 --- a/2d/hdr/beach_cave.tscn +++ b/2d/hdr/beach_cave.tscn @@ -19,10 +19,10 @@ glow_strength = 0.88 glow_blend_mode = 0 glow_bicubic_upscale = true -[node name="hdr" type="Node2D"] +[node name="BeachCave" type="Node2D"] script = ExtResource( 1 ) -[node name="beach" type="Sprite" parent="."] +[node name="Beach" type="Sprite" parent="."] modulate = Color( 2, 2, 2, 1 ) self_modulate = Color( 2, 2, 2, 1 ) texture = ExtResource( 2 ) @@ -30,13 +30,13 @@ centered = false region_enabled = true region_rect = Rect2( 0, 0, 3840, 720 ) -[node name="cave" type="Sprite" parent="."] +[node name="Cave" type="Sprite" parent="."] self_modulate = Color( 0.233166, 0.221219, 0.23582, 1 ) scale = Vector2( 1.2, 1 ) texture = ExtResource( 3 ) centered = false -[node name="environment" type="WorldEnvironment" parent="."] +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = SubResource( 1 ) [node name="Camera2D" type="Camera2D" parent="."] From 7421736568b39c3e17c346dd7def35f0ea1abbee Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 2 Feb 2020 22:19:14 -0500 Subject: [PATCH 04/10] Update hex map demo --- 2d/hexagonal_map/icon.png | Bin 5527 -> 20380 bytes 2d/hexagonal_map/map.tscn | 5 +- 2d/hexagonal_map/project.godot | 14 +- 2d/hexagonal_map/{ => tiles}/WWT-01.png | Bin .../{ => tiles}/WWT-01.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-02.png | Bin .../{ => tiles}/WWT-02.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-03.png | Bin .../{ => tiles}/WWT-03.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-04.png | Bin .../{ => tiles}/WWT-04.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-05.png | Bin .../{ => tiles}/WWT-05.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-06.png | Bin .../{ => tiles}/WWT-06.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-07.png | Bin .../{ => tiles}/WWT-07.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-08.png | Bin .../{ => tiles}/WWT-08.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-09.png | Bin .../{ => tiles}/WWT-09.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-10.png | Bin .../{ => tiles}/WWT-10.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-11.png | Bin .../{ => tiles}/WWT-11.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-12.png | Bin .../{ => tiles}/WWT-12.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-13.png | Bin .../{ => tiles}/WWT-13.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-14.png | Bin .../{ => tiles}/WWT-14.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-15.png | Bin .../{ => tiles}/WWT-15.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-16.png | Bin .../{ => tiles}/WWT-16.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-17.png | Bin .../{ => tiles}/WWT-17.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-18.png | Bin .../{ => tiles}/WWT-18.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-19.png | Bin .../{ => tiles}/WWT-19.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-20.png | Bin .../{ => tiles}/WWT-20.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-21.png | Bin .../{ => tiles}/WWT-21.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-22.png | Bin .../{ => tiles}/WWT-22.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-23.png | Bin .../{ => tiles}/WWT-23.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-24.png | Bin .../{ => tiles}/WWT-24.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-25.png | Bin .../{ => tiles}/WWT-25.png.import | 6 +- 2d/hexagonal_map/{ => tiles}/WWT-26.png | Bin .../{ => tiles}/WWT-26.png.import | 6 +- 2d/hexagonal_map/tileset.tres | 158 ++++++++++++------ 2d/hexagonal_map/tileset_edit.tscn | 107 ++++++------ 2d/hexagonal_map/troll.gd | 20 +-- 2d/hexagonal_map/troll.tscn | 2 +- 59 files changed, 255 insertions(+), 207 deletions(-) rename 2d/hexagonal_map/{ => tiles}/WWT-01.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-01.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-02.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-02.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-03.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-03.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-04.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-04.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-05.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-05.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-06.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-06.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-07.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-07.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-08.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-08.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-09.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-09.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-10.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-10.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-11.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-11.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-12.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-12.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-13.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-13.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-14.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-14.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-15.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-15.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-16.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-16.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-17.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-17.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-18.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-18.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-19.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-19.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-20.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-20.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-21.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-21.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-22.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-22.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-23.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-23.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-24.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-24.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-25.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-25.png.import (72%) rename 2d/hexagonal_map/{ => tiles}/WWT-26.png (100%) rename 2d/hexagonal_map/{ => tiles}/WWT-26.png.import (72%) diff --git a/2d/hexagonal_map/icon.png b/2d/hexagonal_map/icon.png index a3e7e96fa33fa3772a0239e90a825efc99b29537..68882f837500329e3257191cb96e8620d120cfaa 100644 GIT binary patch literal 20380 zcmV)}KzqN5P)000McNlirufUqiIcImPn{$4B9=;tx zD&;a@8i~?;*{61`v*y}s%rU+({>^}|UthnzetrG=`t|ke>(|$>ucAx*Zr<#N-+hns z%Y;$``{|6^cN%U#ZMi&?Ts<&6`K0CT@3_O49(;;tp1y^!mY@Hd_c{Ag!&6V+V3S|t z!K*u7`jAJe%pdvV&ypy7@E7j$P49Rc$es`UgHJKsIp?|OTke1CE{`rB@%DE;!Dl}H zGJo<RcOW8&L@9}B3Rok#eXn7jVIJYI3;1ZsQE;+c@xT0!pZxt5 zI6z!%)KTFvjxH4<3qDn)OnaaY}srS6?eHzZ}Xh|I(}2R+bV=dGbwy z#-0}*1@7GL%JL6)WwXgVKEEu>mEoP=wkk%xQl>-U&F?5hnvSkf*FZ(+Qd>r_n0RQ`@RQ~9XKf{B^;jPY#|D)~HbE|cs?K0yOxx9*y z1&glZ#?65!W?s90AO=ConXXgVHnSWo(K}bsq zfz4%MoDx>cOKa8lZAbBU|Ih#VmESiRXF$KZ>-2M7D~Zvu+a`n(SR*M(uv}`iPF$W( z481}rNd_*j0+UOWm>8Cdwo^FgiMbFX2n5kfl25FUG@=N?C;&kThLi*I6ww-dj09h5 zV7*|xN*E)!dBY;5fg(v6{3P%(F$^A~C0ZE*n#EwzcB16MgZmpOk~?<>7E3`v9DAqV z3+W#N+u!LgRQ*oh;D`R)n~+-l(Z1JzN$c2Y14=uGjBE|ou-rbvv6wpGNO2{9sN!D`7odvXRXB<_$%MKT^DQVNvT zbgkyF5BMq44T?Z5o9-Y$%&boxkDF(V;jed{dLripB{7bPlmrdTb7fXEm}!|$j^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Y^`gU6k`yUpuc>7bG^>6|+bN6*#Aw(bMlyoC zCjluySCTA4;SVuE@{YFdi7{|})e<7V>u>&NQtj{SsL2NS-(@++wLOHIl7Z@d2tt$G(6-vbde22q~5CUTiLX5op zQV$}Yu5WIB&YSvD6yQVuWix%VZ~LN8V*1wOICF7na8ph3^R=h$s#2=c>>0*H-DD;= zQX5k$<8EDzHED@>A>meNFJJ|W1gW~1lp!4N-#zL6aMTU`22tVKjOLk zZ~b#d{-=Mt{A-6ZwpvbcTh=)1Lu-aY)wf8z7snO6}{<7qsNr|~qN#?yEj Z{}U4++UD Date: Sun, 2 Feb 2020 22:48:37 -0500 Subject: [PATCH 05/10] Update isometric demo --- 2d/isometric/dungeon.tscn | 8 ++++---- 2d/isometric/project.godot | 14 ++++++++++++- 2d/isometric/tileset.tres | 36 +++++++++++++++++----------------- 2d/isometric/tileset_edit.tscn | 25 ++++++++++++----------- 2d/isometric/troll.gd | 20 ++++--------------- 2d/isometric/troll.tscn | 3 +-- 6 files changed, 52 insertions(+), 54 deletions(-) diff --git a/2d/isometric/dungeon.tscn b/2d/isometric/dungeon.tscn index d39d891a..40bd38d1 100644 --- a/2d/isometric/dungeon.tscn +++ b/2d/isometric/dungeon.tscn @@ -3,9 +3,9 @@ [ext_resource path="res://tileset.tres" type="TileSet" id=1] [ext_resource path="res://troll.tscn" type="PackedScene" id=2] -[node name="dungeon" type="Node2D"] +[node name="Dungeon" type="Node2D"] -[node name="floor" type="TileMap" parent="."] +[node name="Floor" type="TileMap" parent="."] mode = 1 tile_set = ExtResource( 1 ) cell_size = Vector2( 128, 64 ) @@ -13,7 +13,7 @@ cell_tile_origin = 1 format = 1 tile_data = PoolIntArray( -851956, 0, -1200553578, -851955, 0, -1200553578, -851954, 0, -1200553578, -786420, 1, -1200553578, -786419, 0, -1200553578, -786418, 0, -1200553578, -720884, 0, -1200553578, -720883, 0, -1200553578, -720882, 0, -1200553578, -655348, 1, -1200553578, -655347, 0, -1200553578, -655346, 0, -1200553578, -589812, 1, -1200553578, -589811, 0, -1200553578, -589810, 0, -1200553578, -524276, 0, -1200553578, -524275, 1, -1200553578, -524274, 0, -1200553578, -458740, 0, -1200553578, -458739, 0, -1200553578, -458738, 0, -1200553578, -393210, 0, -1200553578, -393209, 0, -1200553578, -393208, 0, -1200553578, -393207, 0, -1200553578, -393206, 0, -1200553578, -393205, 0, -1200553578, -393204, 0, -1200553578, -393203, 0, -1200553578, -393202, 0, -1200553578, -327674, 0, -1200553578, -327673, 0, -1200553578, -327672, 1, -1200553578, -327671, 1, -1200553578, -327670, 1, -1200553578, -327669, 1, -1200553578, -327668, 1, -1200553578, -327667, 0, -1200553578, -327666, 0, -1200553578, -262138, 0, -1200553578, -262137, 0, -1200553578, -262136, 0, -1200553578, -262135, 0, -1200553578, -262134, 0, -1200553578, -262133, 0, -1200553578, -262132, 0, -1200553578, -262131, 0, -1200553578, -262130, 0, -1200553578, -196602, 0, -1200553578, -196601, 0, -1200553578, -196600, 0, -1200553578, -196599, 0, -1200553578, -196598, 0, -1200553578, -196597, 0, -1200553578, -196596, 0, -1200553578, -196595, 0, -1200553578, -196594, 0, -1200553578, -131066, 0, -1200553578, -131065, 0, -1200553578, -131064, 0, -1200553578, -131063, 0, -1200553578, -65530, 0, -1200553578, -65529, 0, -1200553578, -65528, 0, -1200553578, -65527, 0, -1200553578, 6, 0, -1200553578, 7, 1, -1200553578, 8, 0, -1200553578, 9, 0, -1200553578, 65542, 0, -1200553578, 65543, 0, -1200553578, 65544, 0, -1200553578, 65545, 0, -1200553578, 131078, 0, -1200553578, 131079, 0, -1200553578, 131080, 0, -1200553578, 131081, 0, -1200553578, 196614, 0, -1200553578, 196615, 0, -1200553578, 196616, 0, -1200553578 ) -[node name="walls" type="TileMap" parent="."] +[node name="Walls" type="TileMap" parent="."] mode = 1 tile_set = ExtResource( 1 ) cell_size = Vector2( 128, 64 ) @@ -22,5 +22,5 @@ cell_y_sort = true format = 1 tile_data = PoolIntArray( -917493, 2, -1200553578, -917492, 2, -1200553578, -917491, 2, -1200553578, -917490, 2, -1200553578, -917489, 2, -1200553578, -851957, 2, -1200553578, -851956, 3, -1200553578, -851954, 3, -1200553578, -851953, 2, -1200553578, -786421, 2, -1200553578, -786420, 3, -1200553578, -786418, 3, -1200553578, -786417, 2, -1200553578, -720885, 2, -1200553578, -720881, 2, -1200553578, -655349, 2, -1200553578, -655348, 2, -1200553578, -655346, 3, -1200553578, -655345, 2, -1200553578, -589813, 2, -1200553578, -589809, 2, -1200553578, -524277, 2, -1200553578, -524273, 2, -1200553578, -458747, 2, -1200553578, -458746, 2, -1200553578, -458745, 2, -1200553578, -458744, 536870916, -1200553578, -458743, 536870916, -1200553578, -458742, 2, -1200553578, -458741, 2, -1200553578, -458740, 2, -1200553578, -458738, 2, -1200553578, -458737, 2, -1200553578, -393211, 2, -1200553578, -393209, 3, -1200553578, -393205, 3, -1200553578, -393201, 2, -1200553578, -327675, 4, -1200553578, -327665, 2, -1200553578, -262139, 4, -1200553578, -262129, 2, -1200553578, -196603, 2, 0, -196601, 3, 0, -196593, 2, -1200553578, -131067, 2, 0, -131062, 2, -1200553578, -131061, 2, -1200553578, -131060, 2, -1200553578, -131059, 2, -1200553578, -131058, 2, -1200553578, -131057, 2, -1200553578, -65531, 2, 0, -65530, 2, 0, -65527, 2, -1200553578, -65526, 2, -1200553578, 5, 2, -1200553578, 10, 2, 0, 65541, 2, -1200553578, 65546, 2, 0, 131077, 2, -1200553578, 131081, 3, 0, 131082, 2, 0, 196613, 2, -1200553578, 196618, 2, 0, 262149, 2, -1200553578, 262150, 2, -1200553578, 262151, 2, -1200553578, 262152, 2, -1200553578, 262153, 2, -1200553578, 262154, 2, -1200553578 ) -[node name="troll" parent="walls" instance=ExtResource( 2 )] +[node name="Troll" parent="Walls" instance=ExtResource( 2 )] position = Vector2( 368.142, 347.007 ) diff --git a/2d/isometric/project.godot b/2d/isometric/project.godot index f4dfed4f..c20e1b1e 100644 --- a/2d/isometric/project.godot +++ b/2d/isometric/project.godot @@ -35,24 +35,36 @@ gen_mipmaps=false [input] -move_bottom={ +move_down={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null) ] } move_left={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null) ] } move_right={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) ] } move_up={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null) ] } diff --git a/2d/isometric/tileset.tres b/2d/isometric/tileset.tres index 3779b9e7..f82ce4ba 100644 --- a/2d/isometric/tileset.tres +++ b/2d/isometric/tileset.tres @@ -3,80 +3,80 @@ [ext_resource path="res://isotiles.png" type="Texture" id=1] [sub_resource type="ConvexPolygonShape2D" id=1] - -custom_solver_bias = 0.0 points = PoolVector2Array( -4, -30, 60, 2, -4, 34, -68, 2 ) [sub_resource type="ConvexPolygonShape2D" id=2] - -custom_solver_bias = 0.0 points = PoolVector2Array( -4, -22, 12, -22, 28, -6, 4, 10, -4, 10, -20, -6 ) [sub_resource type="ConvexPolygonShape2D" id=3] - -custom_solver_bias = 0.0 points = PoolVector2Array( -21.905, 23.3748, 50.095, -8.62516, 66.095, -0.62516, -5.90501, 31.3748 ) [resource] - -0/name = "base" +0/name = "Base" 0/texture = ExtResource( 1 ) 0/tex_offset = Vector2( -66, -42 ) 0/modulate = Color( 1, 1, 1, 1 ) 0/region = Rect2( 28, 92, 132, 84 ) -0/is_autotile = false +0/tile_mode = 0 0/occluder_offset = Vector2( 0, 0 ) 0/navigation_offset = Vector2( 0, 0 ) 0/shapes = [ ] -1/name = "base2" +0/z_index = 0 +1/name = "Base2" 1/texture = ExtResource( 1 ) 1/tex_offset = Vector2( -66, -42 ) 1/modulate = Color( 1, 1, 1, 1 ) 1/region = Rect2( 220, 92, 132, 84 ) -1/is_autotile = false +1/tile_mode = 0 1/occluder_offset = Vector2( 0, 0 ) 1/navigation_offset = Vector2( 0, 0 ) 1/shapes = [ ] -2/name = "wall" +1/z_index = 0 +2/name = "Wall" 2/texture = ExtResource( 1 ) 2/tex_offset = Vector2( -69.3109, -99.8051 ) 2/modulate = Color( 1, 1, 1, 1 ) 2/region = Rect2( 28, 220, 132, 136 ) -2/is_autotile = false +2/tile_mode = 0 2/occluder_offset = Vector2( 0, 0 ) 2/navigation_offset = Vector2( 0, 0 ) 2/shapes = [ { "autotile_coord": Vector2( 0, 0 ), "one_way": false, +"one_way_margin": 1.0, "shape": SubResource( 1 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) } ] -3/name = "column" +2/z_index = 0 +3/name = "Column" 3/texture = ExtResource( 1 ) 3/tex_offset = Vector2( -69.5632, -100.446 ) 3/modulate = Color( 1, 1, 1, 1 ) 3/region = Rect2( 220, 220, 132, 136 ) -3/is_autotile = false +3/tile_mode = 0 3/occluder_offset = Vector2( 0, 0 ) 3/navigation_offset = Vector2( 0, 0 ) 3/shapes = [ { "autotile_coord": Vector2( 0, 0 ), "one_way": false, +"one_way_margin": 1.0, "shape": SubResource( 2 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) } ] -4/name = "door1" +3/z_index = 0 +4/name = "Door1" 4/texture = ExtResource( 1 ) 4/tex_offset = Vector2( -50.3623, -90.8164 ) 4/modulate = Color( 1, 1, 1, 1 ) 4/region = Rect2( 24, 408, 132, 136 ) -4/is_autotile = false +4/tile_mode = 0 4/occluder_offset = Vector2( 0, 0 ) 4/navigation_offset = Vector2( 0, 0 ) 4/shapes = [ { "autotile_coord": Vector2( 0, 0 ), "one_way": false, +"one_way_margin": 1.0, "shape": SubResource( 3 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) } ] - +4/z_index = 0 diff --git a/2d/isometric/tileset_edit.tscn b/2d/isometric/tileset_edit.tscn index 42ad21f2..4ecdb885 100644 --- a/2d/isometric/tileset_edit.tscn +++ b/2d/isometric/tileset_edit.tscn @@ -2,9 +2,9 @@ [ext_resource path="res://isotiles.png" type="Texture" id=1] -[node name="Node2D" type="Node2D"] +[node name="TilesetEdit" type="Node2D"] -[node name="base" type="Sprite" parent="."] +[node name="Base" type="Sprite" parent="."] position = Vector2( 150.049, 61.1264 ) texture = ExtResource( 1 ) centered = false @@ -12,7 +12,7 @@ offset = Vector2( -66, -42 ) region_enabled = true region_rect = Rect2( 28, 92, 132, 84 ) -[node name="base2" type="Sprite" parent="."] +[node name="Base2" type="Sprite" parent="."] position = Vector2( 257.013, 124.86 ) texture = ExtResource( 1 ) centered = false @@ -20,7 +20,7 @@ offset = Vector2( -66, -42 ) region_enabled = true region_rect = Rect2( 220, 92, 132, 84 ) -[node name="wall" type="Sprite" parent="."] +[node name="Wall" type="Sprite" parent="."] position = Vector2( 421.311, 137.805 ) texture = ExtResource( 1 ) centered = false @@ -28,12 +28,12 @@ offset = Vector2( -69.3109, -99.8051 ) region_enabled = true region_rect = Rect2( 28, 220, 132, 136 ) -[node name="StaticBody2D" type="StaticBody2D" parent="wall"] +[node name="StaticBody2D" type="StaticBody2D" parent="Wall"] -[node name="collision" type="CollisionPolygon2D" parent="wall/StaticBody2D"] +[node name="collision" type="CollisionPolygon2D" parent="Wall/StaticBody2D"] polygon = PoolVector2Array( -68, 2, -4, 34, 60, 2, -4, -30 ) -[node name="column" type="Sprite" parent="."] +[node name="Column" type="Sprite" parent="."] position = Vector2( 359.563, 266.446 ) texture = ExtResource( 1 ) centered = false @@ -41,12 +41,12 @@ offset = Vector2( -69.5632, -100.446 ) region_enabled = true region_rect = Rect2( 220, 220, 132, 136 ) -[node name="StaticBody" type="StaticBody2D" parent="column"] +[node name="StaticBody" type="StaticBody2D" parent="Column"] -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="column/StaticBody"] +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Column/StaticBody"] polygon = PoolVector2Array( -20, -6, -4, 10, 4, 10, 28, -6, 12, -22, -4, -22 ) -[node name="door1" type="Sprite" parent="."] +[node name="Door1" type="Sprite" parent="."] position = Vector2( -24.1548, 142.216 ) texture = ExtResource( 1 ) centered = false @@ -54,8 +54,7 @@ offset = Vector2( -50.3623, -90.8164 ) region_enabled = true region_rect = Rect2( 24, 408, 132, 136 ) -[node name="StaticBody2D" type="StaticBody2D" parent="door1"] +[node name="StaticBody2D" type="StaticBody2D" parent="Door1"] -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="door1/StaticBody2D"] +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Door1/StaticBody2D"] polygon = PoolVector2Array( -5.90501, 31.3748, 66.095, -0.62516, 50.095, -8.62516, -21.905, 23.3748 ) - diff --git a/2d/isometric/troll.gd b/2d/isometric/troll.gd index 4b955e69..27e31627 100644 --- a/2d/isometric/troll.gd +++ b/2d/isometric/troll.gd @@ -1,24 +1,12 @@ extends KinematicBody2D -# This is a demo showing how KinematicBody2D -# move_and_slide works. - -# Member variables const MOTION_SPEED = 160 # Pixels/second - func _physics_process(_delta): var motion = Vector2() - - if Input.is_action_pressed("move_up"): - motion += Vector2(0, -1) - if Input.is_action_pressed("move_bottom"): - motion += Vector2(0, 1) - if Input.is_action_pressed("move_left"): - motion += Vector2(-1, 0) - if Input.is_action_pressed("move_right"): - motion += Vector2(1, 0) - + 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 = motion.normalized() * MOTION_SPEED - + #warning-ignore:return_value_discarded move_and_slide(motion) diff --git a/2d/isometric/troll.tscn b/2d/isometric/troll.tscn index f50d7f0a..80d039f4 100644 --- a/2d/isometric/troll.tscn +++ b/2d/isometric/troll.tscn @@ -6,7 +6,7 @@ [sub_resource type="CircleShape2D" id=1] radius = 16.0 -[node name="troll" type="KinematicBody2D"] +[node name="Troll" type="KinematicBody2D"] script = ExtResource( 1 ) [node name="Sprite" type="Sprite" parent="."] @@ -19,4 +19,3 @@ shape = SubResource( 1 ) [node name="Camera2D" type="Camera2D" parent="."] current = true - From 746928b623000cfab1cfcda1921654ff003867ff Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 2 Feb 2020 23:35:33 -0500 Subject: [PATCH 06/10] Update kinematic character --- 2d/kinematic_character/colworld.gd | 7 -- 2d/kinematic_character/player.gd | 46 ++++------- 2d/kinematic_character/player.tscn | 4 +- 2d/kinematic_character/project.godot | 27 +++--- 2d/kinematic_character/world.gd | 6 ++ .../{colworld.tscn => world.tscn} | 82 +++++++++---------- 6 files changed, 79 insertions(+), 93 deletions(-) delete mode 100644 2d/kinematic_character/colworld.gd create mode 100644 2d/kinematic_character/world.gd rename 2d/kinematic_character/{colworld.tscn => world.tscn} (94%) diff --git a/2d/kinematic_character/colworld.gd b/2d/kinematic_character/colworld.gd deleted file mode 100644 index 5fa91dec..00000000 --- a/2d/kinematic_character/colworld.gd +++ /dev/null @@ -1,7 +0,0 @@ -extends Node2D - - -func _on_princess_body_enter(body): - # The name of this editor-generated callback is unfortunate - if body.get_name() == "player": - $youwin.show() diff --git a/2d/kinematic_character/player.gd b/2d/kinematic_character/player.gd index 5d0935b5..e1923167 100644 --- a/2d/kinematic_character/player.gd +++ b/2d/kinematic_character/player.gd @@ -1,11 +1,6 @@ extends KinematicBody2D -# This demo shows how to build a kinematic controller. - -# Member variables -const GRAVITY = 500.0 # pixels/second/second - -# Angle in degrees towards either side that the player can consider "floor" +# Angle in degrees towards either side that the player can consider "floor". const FLOOR_ANGLE_TOLERANCE = 40 const WALK_FORCE = 600 const WALK_MIN_SPEED = 10 @@ -14,55 +9,42 @@ const STOP_FORCE = 1300 const JUMP_SPEED = 200 const JUMP_MAX_AIRBORNE_TIME = 0.2 -const SLIDE_STOP_VELOCITY = 1.0 # one pixel/second -const SLIDE_STOP_MIN_TRAVEL = 1.0 # one pixel +const SLIDE_STOP_VELOCITY = 1.0 # Pixels/second +const SLIDE_STOP_MIN_TRAVEL = 1.0 # Pixels var velocity = Vector2() var on_air_time = 100 var jumping = false - var prev_jump_pressed = false +onready var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") func _physics_process(delta): - # Create forces - var force = Vector2(0, GRAVITY) - - var walk_left = Input.is_action_pressed("move_left") - var walk_right = Input.is_action_pressed("move_right") + var force = Vector2(0, gravity) + var walk = Input.get_action_strength("move_right") - Input.get_action_strength("move_left") var jump = Input.is_action_pressed("jump") - var stop = true - - if walk_left: - if velocity.x <= WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED: - force.x -= WALK_FORCE - stop = false - elif walk_right: - if velocity.x >= -WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED: - force.x += WALK_FORCE - stop = false - - if stop: + if (velocity.x <= WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED) or (velocity.x >= -WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED): + force.x += WALK_FORCE * walk + + if abs(walk) < 0.5: var vsign = sign(velocity.x) var vlen = abs(velocity.x) - vlen -= STOP_FORCE * delta if vlen < 0: vlen = 0 - velocity.x = vlen * vsign - # Integrate forces to velocity + # Integrate forces to velocity. velocity += force * delta - # Integrate velocity into motion and move - velocity = move_and_slide(velocity, Vector2(0, -1)) + # Integrate velocity into motion and move. + velocity = move_and_slide(velocity, Vector2.UP) if is_on_floor(): on_air_time = 0 if jumping and velocity.y > 0: - # If falling, no longer jumping + # If falling, no longer jumping. jumping = false if on_air_time < JUMP_MAX_AIRBORNE_TIME and jump and not prev_jump_pressed and not jumping: diff --git a/2d/kinematic_character/player.tscn b/2d/kinematic_character/player.tscn index b1805ee5..18c61b9f 100644 --- a/2d/kinematic_character/player.tscn +++ b/2d/kinematic_character/player.tscn @@ -6,10 +6,10 @@ [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 7, 7 ) -[node name="player" type="KinematicBody2D"] +[node name="Player" type="KinematicBody2D"] script = ExtResource( 1 ) -[node name="sprite" type="Sprite" parent="."] +[node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 2 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] diff --git a/2d/kinematic_character/project.godot b/2d/kinematic_character/project.godot index f06b9108..e88da30d 100644 --- a/2d/kinematic_character/project.godot +++ b/2d/kinematic_character/project.godot @@ -16,7 +16,7 @@ _global_script_class_icons={ [application] config/name="Kinematic Character" -run/main_scene="res://colworld.tscn" +run/main_scene="res://world.tscn" config/icon="res://icon.png" [display] @@ -37,26 +37,27 @@ singletons=[ ] jump={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) - ] -} -move_bottom={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null) ] } move_left={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null) ] } move_right={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) - ] -} -move_up={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) ] } @@ -64,6 +65,10 @@ move_up={ multithread/thread_rid_pool_prealloc=60 +[physics] + +2d/default_gravity=500 + [rendering] environment/default_clear_color=Color( 0.156, 0.1325, 0.25, 1 ) diff --git a/2d/kinematic_character/world.gd b/2d/kinematic_character/world.gd new file mode 100644 index 00000000..040ea17b --- /dev/null +++ b/2d/kinematic_character/world.gd @@ -0,0 +1,6 @@ +extends Node2D + +func _on_princess_body_enter(body): + # The name of this editor-generated callback is unfortunate. + if body.get_name() == "Player": + $WinText.show() diff --git a/2d/kinematic_character/colworld.tscn b/2d/kinematic_character/world.tscn similarity index 94% rename from 2d/kinematic_character/colworld.tscn rename to 2d/kinematic_character/world.tscn index 0c98bca6..c7dbbde4 100644 --- a/2d/kinematic_character/colworld.tscn +++ b/2d/kinematic_character/world.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=19 format=2] -[ext_resource path="res://colworld.gd" type="Script" id=1] +[ext_resource path="res://world.gd" type="Script" id=1] [ext_resource path="res://obstacle.png" type="Texture" id=2] [ext_resource path="res://player.tscn" type="PackedScene" id=3] [ext_resource path="res://princess.png" type="Texture" id=4] @@ -111,7 +111,7 @@ extents = Vector2( 8, 8 ) [sub_resource type="RectangleShape2D" id=12] extents = Vector2( 32, 8 ) -[node name="colworld" type="Node2D"] +[node name="World" type="Node2D"] script = ExtResource( 1 ) [node name="TileMap" type="TileMap" parent="."] @@ -120,48 +120,48 @@ cell_size = Vector2( 16, 16 ) format = 1 tile_data = PoolIntArray( -720908, 0, 0, -720907, 0, 0, -720906, 0, 0, -720905, 0, 0, -720904, 0, 0, -720903, 0, 0, -720902, 0, 0, -720901, 0, 0, -720900, 0, 0, -720899, 0, 0, -720898, 0, 0, -720897, 0, 0, -786432, 0, 0, -786431, 0, 0, -786430, 0, 0, -786429, 0, 0, -786428, 0, 0, -786427, 0, 0, -786426, 0, 0, -786425, 0, 0, -786424, 0, 0, -786423, 0, 0, -786422, 0, 0, -786421, 0, 0, -786420, 0, 0, -786419, 0, 0, -786418, 0, 0, -786417, 0, 0, -786416, 0, 0, -786415, 0, 0, -786414, 0, 0, -786413, 0, 0, -786412, 0, 0, -786411, 0, 0, -786410, 0, 0, -786409, 0, 0, -786408, 0, 0, -786407, 0, 0, -786406, 0, 0, -786405, 0, 0, -786404, 0, 0, -786403, 0, 0, -786402, 0, 0, -786401, 0, 0, -786400, 0, 0, -786399, 0, 0, -786398, 0, 0, -786397, 0, 0, -786396, 0, 0, -786395, 0, 0, -786394, 0, 0, -786393, 0, 0, -786392, 0, 0, -786391, 0, 0, -786390, 0, 0, -786389, 0, 0, -786388, 0, 0, -655372, 0, 0, -655371, 0, 0, -655370, 0, 0, -655369, 0, 0, -655368, 0, 0, -655367, 0, 0, -655366, 0, 0, -655365, 0, 0, -655364, 0, 0, -655363, 0, 0, -655362, 0, 0, -655361, 0, 0, -720896, 0, 0, -720895, 0, 0, -720894, 0, 0, -720893, 0, 0, -720892, 0, 0, -720891, 0, 0, -720890, 0, 0, -720889, 0, 0, -720888, 0, 0, -720887, 0, 0, -720886, 0, 0, -720885, 0, 0, -720884, 0, 0, -720883, 0, 0, -720882, 0, 0, -720881, 0, 0, -720880, 0, 0, -720879, 0, 0, -720878, 0, 0, -720877, 0, 0, -720876, 0, 0, -720875, 0, 0, -720874, 0, 0, -720873, 0, 0, -720872, 0, 0, -720871, 0, 0, -720870, 0, 0, -720869, 0, 0, -720868, 0, 0, -720867, 0, 0, -720866, 0, 0, -720865, 0, 0, -720864, 0, 0, -720863, 0, 0, -720862, 0, 0, -720861, 0, 0, -720860, 0, 0, -720859, 0, 0, -720858, 0, 0, -720857, 0, 0, -720856, 0, 0, -720855, 0, 0, -720854, 0, 0, -720853, 0, 0, -720852, 0, 0, -589836, 0, 0, -589835, 0, 0, -589834, 0, 0, -589833, 0, 0, -589832, 0, 0, -589831, 0, 0, -589830, 0, 0, -589829, 0, 0, -589828, 0, 0, -589827, 0, 0, -589826, 0, 0, -589825, 0, 0, -655360, 0, 0, -655359, 0, 0, -655358, 0, 0, -655357, 0, 0, -655356, 0, 0, -655355, 0, 0, -655354, 0, 0, -655353, 0, 0, -655352, 0, 0, -655351, 0, 0, -655350, 0, 0, -655349, 0, 0, -655348, 0, 0, -655347, 0, 0, -655346, 0, 0, -655345, 0, 0, -655344, 0, 0, -655343, 0, 0, -655342, 0, 0, -655341, 0, 0, -655340, 0, 0, -655339, 0, 0, -655338, 0, 0, -655337, 0, 0, -655336, 0, 0, -655335, 0, 0, -655334, 0, 0, -655333, 0, 0, -655332, 0, 0, -655331, 0, 0, -655330, 0, 0, -655329, 0, 0, -655328, 0, 0, -655327, 0, 0, -655326, 0, 0, -655325, 0, 0, -655324, 0, 0, -655323, 0, 0, -655322, 0, 0, -655321, 0, 0, -655320, 0, 0, -655319, 0, 0, -655318, 0, 0, -655317, 0, 0, -655316, 0, 0, -524300, 0, 0, -524299, 0, 0, -524298, 0, 0, -524297, 0, 0, -524296, 0, 0, -524295, 0, 0, -524294, 0, 0, -524293, 0, 0, -524292, 0, 0, -524291, 0, 0, -524290, 0, 0, -524289, 0, 0, -589824, 0, 0, -589823, 0, 0, -589822, 0, 0, -589821, 0, 0, -589820, 0, 0, -589819, 0, 0, -589818, 0, 0, -589817, 0, 0, -589816, 0, 0, -589815, 0, 0, -589814, 0, 0, -589813, 0, 0, -589812, 0, 0, -589811, 0, 0, -589810, 0, 0, -589809, 0, 0, -589808, 0, 0, -589807, 0, 0, -589806, 0, 0, -589805, 0, 0, -589804, 0, 0, -589803, 0, 0, -589802, 0, 0, -589801, 0, 0, -589800, 0, 0, -589799, 0, 0, -589798, 0, 0, -589797, 0, 0, -589796, 0, 0, -589795, 0, 0, -589794, 0, 0, -589793, 0, 0, -589792, 0, 0, -589791, 0, 0, -589790, 0, 0, -589789, 0, 0, -589788, 0, 0, -589787, 0, 0, -589786, 0, 0, -589785, 0, 0, -589784, 0, 0, -589783, 0, 0, -589782, 0, 0, -589781, 0, 0, -589780, 0, 0, -458764, 0, 0, -458763, 0, 0, -458762, 0, 0, -458761, 0, 0, -458760, 0, 0, -458759, 0, 0, -458758, 0, 0, -458757, 0, 0, -458756, 0, 0, -458755, 0, 0, -458754, 0, 0, -458753, 0, 0, -524288, 0, 0, -524287, 0, 0, -524286, 0, 0, -524285, 0, 0, -524284, 0, 0, -524283, 0, 0, -524282, 0, 0, -524281, 0, 0, -524280, 0, 0, -524279, 0, 0, -524278, 0, 0, -524277, 0, 0, -524276, 0, 0, -524275, 0, 0, -524274, 0, 0, -524273, 0, 0, -524272, 0, 0, -524271, 0, 0, -524270, 0, 0, -524269, 0, 0, -524268, 0, 0, -524267, 0, 0, -524266, 0, 0, -524265, 0, 0, -524264, 0, 0, -524263, 0, 0, -524262, 0, 0, -524261, 0, 0, -524260, 0, 0, -524259, 0, 0, -524258, 0, 0, -524257, 0, 0, -524256, 0, 0, -524255, 0, 0, -524254, 0, 0, -524253, 0, 0, -524252, 0, 0, -524251, 0, 0, -524250, 0, 0, -524249, 0, 0, -524248, 0, 0, -524247, 0, 0, -524246, 0, 0, -524245, 0, 0, -524244, 0, 0, -393228, 0, 0, -393227, 0, 0, -393226, 0, 0, -393225, 0, 0, -393224, 0, 0, -393223, 0, 0, -393222, 0, 0, -393221, 0, 0, -393220, 0, 0, -393219, 0, 0, -393218, 0, 0, -393217, 0, 0, -458752, 0, 0, -458751, 0, 0, -458750, 0, 0, -458749, 0, 0, -458748, 0, 0, -458747, 0, 0, -458746, 0, 0, -458745, 0, 0, -458744, 0, 0, -458743, 0, 0, -458742, 0, 0, -458741, 0, 0, -458740, 0, 0, -458739, 0, 0, -458738, 0, 0, -458737, 0, 0, -458736, 0, 0, -458735, 0, 0, -458734, 0, 0, -458733, 0, 0, -458732, 0, 0, -458731, 0, 0, -458730, 0, 0, -458729, 0, 0, -458728, 0, 0, -458727, 0, 0, -458726, 0, 0, -458725, 0, 0, -458724, 0, 0, -458723, 0, 0, -458722, 0, 0, -458721, 0, 0, -458720, 0, 0, -458719, 0, 0, -458718, 0, 0, -458717, 0, 0, -458716, 0, 0, -458715, 0, 0, -458714, 0, 0, -458713, 0, 0, -458712, 0, 0, -458711, 0, 0, -458710, 0, 0, -458709, 0, 0, -458708, 0, 0, -327692, 0, 0, -327691, 0, 0, -327690, 0, 0, -327689, 0, 0, -327688, 0, 0, -327687, 0, 0, -327686, 0, 0, -327685, 0, 0, -327684, 0, 0, -327683, 0, 0, -327682, 0, 0, -327681, 0, 0, -393216, 0, 0, -393215, 0, 0, -393214, 0, 0, -393213, 0, 0, -393212, 0, 0, -393211, 0, 0, -393210, 0, 0, -393209, 0, 0, -393208, 0, 0, -393207, 0, 0, -393206, 0, 0, -393205, 0, 0, -393204, 0, 0, -393203, 0, 0, -393202, 0, 0, -393201, 0, 0, -393200, 0, 0, -393199, 0, 0, -393198, 0, 0, -393197, 0, 0, -393196, 0, 0, -393195, 0, 0, -393194, 0, 0, -393193, 0, 0, -393192, 0, 0, -393191, 0, 0, -393190, 0, 0, -393189, 0, 0, -393188, 0, 0, -393187, 0, 0, -393186, 0, 0, -393185, 0, 0, -393184, 0, 0, -393183, 0, 0, -393182, 0, 0, -393181, 0, 0, -393180, 0, 0, -393179, 0, 0, -393178, 0, 0, -393177, 0, 0, -393176, 0, 0, -393175, 0, 0, -393174, 0, 0, -393173, 0, 0, -393172, 0, 0, -262156, 0, 0, -262155, 0, 0, -262154, 0, 0, -262153, 0, 0, -262152, 0, 0, -262151, 0, 0, -262150, 0, 0, -262149, 0, 0, -262148, 0, 0, -262147, 0, 0, -262146, 0, 0, -262145, 0, 0, -327680, 0, 0, -327679, 0, 0, -327678, 0, 0, -327677, 0, 0, -327676, 0, 0, -327675, 0, 0, -327674, 0, 0, -327673, 0, 0, -327672, 0, 0, -327671, 0, 0, -327670, 0, 0, -327669, 0, 0, -327668, 0, 0, -327667, 0, 0, -327666, 0, 0, -327665, 0, 0, -327664, 0, 0, -327663, 0, 0, -327662, 0, 0, -327661, 0, 0, -327660, 0, 0, -327659, 0, 0, -327658, 0, 0, -327657, 0, 0, -327656, 0, 0, -327655, 0, 0, -327654, 0, 0, -327653, 0, 0, -327652, 0, 0, -327651, 0, 0, -327650, 0, 0, -327649, 0, 0, -327648, 0, 0, -327647, 0, 0, -327646, 0, 0, -327645, 0, 0, -327644, 0, 0, -327643, 0, 0, -327642, 0, 0, -327641, 0, 0, -327640, 0, 0, -327639, 0, 0, -327638, 0, 0, -327637, 0, 0, -327636, 0, 0, -196620, 0, 0, -196619, 0, 0, -196618, 0, 0, -196617, 0, 0, -196616, 0, 0, -196615, 0, 0, -196614, 0, 0, -196613, 0, 0, -196612, 0, 0, -196611, 0, 0, -196610, 0, 0, -196609, 0, 0, -262144, 0, 0, -262143, 0, 0, -262142, 0, 0, -262141, 0, 0, -262140, 0, 0, -262139, 0, 0, -262138, 0, 0, -262137, 0, 0, -262136, 0, 0, -262135, 0, 0, -262134, 0, 0, -262133, 0, 0, -262132, 0, 0, -262131, 0, 0, -262130, 0, 0, -262129, 0, 0, -262128, 0, 0, -262127, 0, 0, -262126, 0, 0, -262125, 0, 0, -262124, 0, 0, -262123, 0, 0, -262122, 0, 0, -262121, 0, 0, -262120, 0, 0, -262119, 0, 0, -262118, 0, 0, -262117, 0, 0, -262116, 0, 0, -262115, 0, 0, -262114, 0, 0, -262113, 0, 0, -262112, 0, 0, -262111, 0, 0, -262110, 0, 0, -262109, 0, 0, -262108, 0, 0, -262107, 0, 0, -262106, 0, 0, -262105, 0, 0, -262104, 0, 0, -262103, 0, 0, -262102, 0, 0, -262101, 0, 0, -262100, 0, 0, -131084, 0, 0, -131083, 0, 0, -131082, 0, 0, -131081, 0, 0, -131080, 0, 0, -131079, 0, 0, -131078, 0, 0, -131077, 0, 0, -131076, 0, 0, -131075, 0, 0, -131074, 0, 0, -131073, 0, 0, -196608, 0, 0, -196607, 0, 0, -196606, 0, 0, -196605, 0, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -196601, 0, 0, -196600, 0, 0, -196599, 0, 0, -196598, 0, 0, -196597, 0, 0, -196596, 0, 0, -196595, 0, 0, -196594, 0, 0, -196593, 0, 0, -196592, 0, 0, -196591, 0, 0, -196590, 0, 0, -196589, 0, 0, -196588, 0, 0, -196587, 0, 0, -196586, 0, 0, -196585, 0, 0, -196584, 0, 0, -196583, 0, 0, -196582, 0, 0, -196581, 0, 0, -196580, 0, 0, -196579, 0, 0, -196578, 0, 0, -196577, 0, 0, -196576, 0, 0, -196575, 0, 0, -196574, 0, 0, -196573, 0, 0, -196572, 0, 0, -196571, 0, 0, -196570, 0, 0, -196569, 0, 0, -196568, 0, 0, -196567, 0, 0, -196566, 0, 0, -196565, 0, 0, -196564, 0, 0, -65548, 0, 0, -65547, 0, 0, -65546, 0, 0, -65545, 0, 0, -65544, 0, 0, -65543, 0, 0, -65542, 0, 0, -65541, 0, 0, -65540, 0, 0, -65539, 0, 0, -65538, 0, 0, -65537, 0, 0, -131072, 0, 0, -131071, 0, 0, -131070, 0, 0, -131069, 0, 0, -131068, 0, 0, -131067, 0, 0, -131066, 0, 0, -131065, 0, 0, -131064, 0, 0, -131063, 0, 0, -131062, 0, 0, -131061, 0, 0, -131060, 0, 0, -131059, 0, 0, -131058, 0, 0, -131057, 0, 0, -131056, 0, 0, -131055, 0, 0, -131054, 0, 0, -131053, 0, 0, -131052, 0, 0, -131051, 0, 0, -131050, 0, 0, -131049, 0, 0, -131048, 0, 0, -131047, 0, 0, -131046, 0, 0, -131045, 0, 0, -131044, 0, 0, -131043, 0, 0, -131042, 0, 0, -131041, 0, 0, -131040, 0, 0, -131039, 0, 0, -131038, 0, 0, -131037, 0, 0, -131036, 0, 0, -131035, 0, 0, -131034, 0, 0, -131033, 0, 0, -131032, 0, 0, -131031, 0, 0, -131030, 0, 0, -131029, 0, 0, -131028, 0, 0, -12, 0, 0, -11, 0, 0, -10, 0, 0, -9, 0, 0, -8, 0, 0, -7, 0, 0, -6, 0, 0, -5, 0, 0, -4, 0, 0, -3, 0, 0, -2, 0, 0, -1, 0, 0, -65536, 0, 0, -65535, 0, 0, -65534, 0, 0, -65533, 0, 0, -65532, 0, 0, -65531, 0, 0, -65530, 0, 0, -65529, 0, 0, -65528, 0, 0, -65527, 0, 0, -65526, 0, 0, -65525, 0, 0, -65524, 0, 0, -65523, 0, 0, -65522, 0, 0, -65521, 0, 0, -65520, 0, 0, -65519, 0, 0, -65518, 0, 0, -65517, 0, 0, -65516, 0, 0, -65515, 0, 0, -65514, 0, 0, -65513, 0, 0, -65512, 0, 0, -65511, 0, 0, -65510, 0, 0, -65509, 0, 0, -65508, 0, 0, -65507, 0, 0, -65506, 0, 0, -65505, 0, 0, -65504, 0, 0, -65503, 0, 0, -65502, 0, 0, -65501, 0, 0, -65500, 0, 0, -65499, 0, 0, -65498, 0, 0, -65497, 0, 0, -65496, 0, 0, -65495, 0, 0, -65494, 0, 0, -65493, 0, 0, -65492, 0, 0, 65524, 0, 0, 65525, 0, 0, 65526, 0, 0, 65527, 0, 0, 65528, 0, 0, 65529, 0, 0, 65530, 0, 0, 65531, 0, 0, 65532, 0, 0, 65533, 0, 0, 65534, 0, 0, 65535, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 21, 0, 0, 22, 0, 0, 23, 0, 0, 24, 0, 0, 25, 0, 0, 26, 0, 0, 27, 0, 0, 28, 0, 0, 29, 0, 0, 30, 0, 0, 31, 0, 0, 32, 0, 0, 33, 0, 0, 34, 0, 0, 35, 0, 0, 36, 0, 0, 37, 0, 0, 38, 0, 0, 39, 0, 0, 40, 0, 0, 41, 0, 0, 42, 0, 0, 43, 0, 0, 44, 0, 0, 131060, 0, 0, 131061, 0, 0, 131062, 0, 0, 131063, 0, 0, 131064, 0, 0, 131065, 0, 0, 131066, 0, 0, 131067, 0, 0, 131068, 0, 0, 131069, 0, 0, 131070, 0, 0, 131071, 0, 0, 65536, 0, 0, 65537, 0, 0, 65538, 0, 0, 65539, 0, 0, 65540, 0, 0, 65541, 0, 0, 65542, 0, 0, 65543, 0, 0, 65544, 0, 0, 65545, 0, 0, 65546, 0, 0, 65547, 0, 0, 65548, 0, 0, 65549, 0, 0, 65550, 0, 0, 65551, 0, 0, 65552, 0, 0, 65553, 0, 0, 65554, 0, 0, 65555, 0, 0, 65556, 0, 0, 65557, 0, 0, 65558, 0, 0, 65559, 0, 0, 65560, 0, 0, 65561, 0, 0, 65562, 0, 0, 65563, 0, 0, 65564, 0, 0, 65565, 0, 0, 65566, 0, 0, 65567, 0, 0, 65568, 0, 0, 65569, 0, 0, 65570, 0, 0, 65571, 0, 0, 65572, 0, 0, 65573, 0, 0, 65574, 0, 0, 65575, 0, 0, 65576, 0, 0, 65577, 0, 0, 65578, 0, 0, 65579, 0, 0, 65580, 0, 0, 196596, 0, 0, 196597, 0, 0, 196598, 0, 0, 196599, 0, 0, 196600, 0, 0, 196601, 0, 0, 196602, 0, 0, 196603, 0, 0, 196604, 0, 0, 196605, 0, 0, 196606, 0, 0, 196607, 0, 0, 131072, 0, 0, 131073, 0, 0, 131103, 0, 0, 131104, 0, 0, 131105, 0, 0, 131106, 0, 0, 131107, 0, 0, 131108, 0, 0, 131109, 0, 0, 131110, 0, 0, 131111, 0, 0, 131112, 0, 0, 131113, 0, 0, 131114, 0, 0, 131115, 0, 0, 131116, 0, 0, 262132, 0, 0, 262133, 0, 0, 262134, 0, 0, 262135, 0, 0, 262136, 0, 0, 262137, 0, 0, 262138, 0, 0, 262139, 0, 0, 262140, 0, 0, 262141, 0, 0, 262142, 0, 0, 262143, 0, 0, 196608, 0, 0, 196609, 0, 0, 196639, 0, 0, 196640, 0, 0, 196641, 0, 0, 196642, 0, 0, 196643, 0, 0, 196644, 0, 0, 196645, 0, 0, 196646, 0, 0, 196647, 0, 0, 196648, 0, 0, 196649, 0, 0, 196650, 0, 0, 196651, 0, 0, 196652, 0, 0, 327668, 0, 0, 327669, 0, 0, 327670, 0, 0, 327671, 0, 0, 327672, 0, 0, 327673, 0, 0, 327674, 0, 0, 327675, 0, 0, 327676, 0, 0, 327677, 0, 0, 327678, 0, 0, 327679, 0, 0, 262144, 0, 0, 262145, 0, 0, 262175, 0, 0, 262176, 0, 0, 262177, 0, 0, 262178, 0, 0, 262179, 0, 0, 262180, 0, 0, 262181, 0, 0, 262182, 0, 0, 262183, 0, 0, 262184, 0, 0, 262185, 0, 0, 262186, 0, 0, 262187, 0, 0, 262188, 0, 0, 393204, 0, 0, 393205, 0, 0, 393206, 0, 0, 393207, 0, 0, 393208, 0, 0, 393209, 0, 0, 393210, 0, 0, 393211, 0, 0, 393212, 0, 0, 393213, 0, 0, 393214, 0, 0, 393215, 0, 0, 327680, 0, 0, 327681, 0, 0, 327685, 0, 0, 327686, 0, 0, 327687, 0, 0, 327688, 0, 0, 327689, 0, 0, 327690, 0, 0, 327691, 0, 0, 327692, 0, 0, 327693, 0, 0, 327697, 0, 0, 327711, 0, 0, 327712, 0, 0, 327713, 0, 0, 327714, 0, 0, 327715, 0, 0, 327716, 0, 0, 327717, 0, 0, 327718, 0, 0, 327719, 0, 0, 327720, 0, 0, 327721, 0, 0, 327722, 0, 0, 327723, 0, 0, 327724, 0, 0, 458740, 0, 0, 458741, 0, 0, 458742, 0, 0, 458743, 0, 0, 458744, 0, 0, 458745, 0, 0, 458746, 0, 0, 458747, 0, 0, 458748, 0, 0, 458749, 0, 0, 458750, 0, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393237, 0, 0, 393238, 0, 0, 393247, 0, 0, 393248, 0, 0, 393249, 0, 0, 393250, 0, 0, 393251, 0, 0, 393252, 0, 0, 393253, 0, 0, 393254, 0, 0, 393255, 0, 0, 393256, 0, 0, 393257, 0, 0, 393258, 0, 0, 393259, 0, 0, 393260, 0, 0, 524276, 0, 0, 524277, 0, 0, 524278, 0, 0, 524279, 0, 0, 524280, 0, 0, 524281, 0, 0, 524282, 0, 0, 524283, 0, 0, 524284, 0, 0, 524285, 0, 0, 524286, 0, 0, 524287, 0, 0, 458752, 0, 0, 458753, 0, 0, 458783, 0, 0, 458784, 0, 0, 458785, 0, 0, 458786, 0, 0, 458787, 0, 0, 458788, 0, 0, 458789, 0, 0, 458790, 0, 0, 458791, 0, 0, 458792, 0, 0, 458793, 0, 0, 458794, 0, 0, 458795, 0, 0, 458796, 0, 0, 589812, 0, 0, 589813, 0, 0, 589814, 0, 0, 589815, 0, 0, 589816, 0, 0, 589817, 0, 0, 589818, 0, 0, 589819, 0, 0, 589820, 0, 0, 589821, 0, 0, 589822, 0, 0, 589823, 0, 0, 524288, 0, 0, 524289, 0, 0, 524313, 0, 0, 524314, 0, 0, 524319, 0, 0, 524320, 0, 0, 524321, 0, 0, 524322, 0, 0, 524323, 0, 0, 524324, 0, 0, 524325, 0, 0, 524326, 0, 0, 524327, 0, 0, 524328, 0, 0, 524329, 0, 0, 524330, 0, 0, 524331, 0, 0, 524332, 0, 0, 655348, 0, 0, 655349, 0, 0, 655350, 0, 0, 655351, 0, 0, 655352, 0, 0, 655353, 0, 0, 655354, 0, 0, 655355, 0, 0, 655356, 0, 0, 655357, 0, 0, 655358, 0, 0, 655359, 0, 0, 589824, 0, 0, 589825, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589845, 0, 0, 589846, 0, 0, 589847, 0, 0, 589855, 0, 0, 589856, 0, 0, 589857, 0, 0, 589858, 0, 0, 589859, 0, 0, 589860, 0, 0, 589861, 0, 0, 589862, 0, 0, 589863, 0, 0, 589864, 0, 0, 589865, 0, 0, 589866, 0, 0, 589867, 0, 0, 589868, 0, 0, 720884, 0, 0, 720885, 0, 0, 720886, 0, 0, 720887, 0, 0, 720888, 0, 0, 720889, 0, 0, 720890, 0, 0, 720891, 0, 0, 720892, 0, 0, 720893, 0, 0, 720894, 0, 0, 720895, 0, 0, 655360, 0, 0, 655361, 0, 0, 655391, 0, 0, 655392, 0, 0, 655393, 0, 0, 655394, 0, 0, 655395, 0, 0, 655396, 0, 0, 655397, 0, 0, 655398, 0, 0, 655399, 0, 0, 655400, 0, 0, 655401, 0, 0, 655402, 0, 0, 655403, 0, 0, 655404, 0, 0, 786420, 0, 0, 786421, 0, 0, 786422, 0, 0, 786423, 0, 0, 786424, 0, 0, 786425, 0, 0, 786426, 0, 0, 786427, 0, 0, 786428, 0, 0, 786429, 0, 0, 786430, 0, 0, 786431, 0, 0, 720896, 0, 0, 720897, 0, 0, 720927, 0, 0, 720928, 0, 0, 720929, 0, 0, 720930, 0, 0, 720931, 0, 0, 720932, 0, 0, 720933, 0, 0, 720934, 0, 0, 720935, 0, 0, 720936, 0, 0, 720937, 0, 0, 720938, 0, 0, 720939, 0, 0, 720940, 0, 0, 851956, 0, 0, 851957, 0, 0, 851958, 0, 0, 851959, 0, 0, 851960, 0, 0, 851961, 0, 0, 851962, 0, 0, 851963, 0, 0, 851964, 0, 0, 851965, 0, 0, 851966, 0, 0, 851967, 0, 0, 786432, 0, 0, 786433, 0, 0, 786463, 0, 0, 786464, 0, 0, 786465, 0, 0, 786466, 0, 0, 786467, 0, 0, 786468, 0, 0, 786469, 0, 0, 786470, 0, 0, 786471, 0, 0, 786472, 0, 0, 786473, 0, 0, 786474, 0, 0, 786475, 0, 0, 786476, 0, 0, 917492, 0, 0, 917493, 0, 0, 917494, 0, 0, 917495, 0, 0, 917496, 0, 0, 917497, 0, 0, 917498, 0, 0, 917499, 0, 0, 917500, 0, 0, 917501, 0, 0, 917502, 0, 0, 917503, 0, 0, 851968, 0, 0, 851969, 0, 0, 851999, 0, 0, 852000, 0, 0, 852001, 0, 0, 852002, 0, 0, 852003, 0, 0, 852004, 0, 0, 852005, 0, 0, 852006, 0, 0, 852007, 0, 0, 852008, 0, 0, 852009, 0, 0, 852010, 0, 0, 852011, 0, 0, 852012, 0, 0, 983028, 0, 0, 983029, 0, 0, 983030, 0, 0, 983031, 0, 0, 983032, 0, 0, 983033, 0, 0, 983034, 0, 0, 983035, 0, 0, 983036, 0, 0, 983037, 0, 0, 983038, 0, 0, 983039, 0, 0, 917504, 0, 0, 917505, 0, 0, 917535, 0, 0, 917536, 0, 0, 917537, 0, 0, 917538, 0, 0, 917539, 0, 0, 917540, 0, 0, 917541, 0, 0, 917542, 0, 0, 917543, 0, 0, 917544, 0, 0, 917545, 0, 0, 917546, 0, 0, 917547, 0, 0, 917548, 0, 0, 1048564, 0, 0, 1048565, 0, 0, 1048566, 0, 0, 1048567, 0, 0, 1048568, 0, 0, 1048569, 0, 0, 1048570, 0, 0, 1048571, 0, 0, 1048572, 0, 0, 1048573, 0, 0, 1048574, 0, 0, 1048575, 0, 0, 983040, 0, 0, 983041, 0, 0, 983071, 0, 0, 983072, 0, 0, 983073, 0, 0, 983074, 0, 0, 983075, 0, 0, 983076, 0, 0, 983077, 0, 0, 983078, 0, 0, 983079, 0, 0, 983080, 0, 0, 983081, 0, 0, 983082, 0, 0, 983083, 0, 0, 983084, 0, 0, 1114100, 0, 0, 1114101, 0, 0, 1114102, 0, 0, 1114103, 0, 0, 1114104, 0, 0, 1114105, 0, 0, 1114106, 0, 0, 1114107, 0, 0, 1114108, 0, 0, 1114109, 0, 0, 1114110, 0, 0, 1114111, 0, 0, 1048576, 0, 0, 1048577, 0, 0, 1048607, 0, 0, 1048608, 0, 0, 1048609, 0, 0, 1048610, 0, 0, 1048611, 0, 0, 1048612, 0, 0, 1048613, 0, 0, 1048614, 0, 0, 1048615, 0, 0, 1048616, 0, 0, 1048617, 0, 0, 1048618, 0, 0, 1048619, 0, 0, 1048620, 0, 0, 1179636, 0, 0, 1179637, 0, 0, 1179638, 0, 0, 1179639, 0, 0, 1179640, 0, 0, 1179641, 0, 0, 1179642, 0, 0, 1179643, 0, 0, 1179644, 0, 0, 1179645, 0, 0, 1179646, 0, 0, 1179647, 0, 0, 1114112, 0, 0, 1114113, 0, 0, 1114143, 0, 0, 1114144, 0, 0, 1114145, 0, 0, 1114146, 0, 0, 1114147, 0, 0, 1114148, 0, 0, 1114149, 0, 0, 1114150, 0, 0, 1114151, 0, 0, 1114152, 0, 0, 1114153, 0, 0, 1114154, 0, 0, 1114155, 0, 0, 1114156, 0, 0, 1245172, 0, 0, 1245173, 0, 0, 1245174, 0, 0, 1245175, 0, 0, 1245176, 0, 0, 1245177, 0, 0, 1245178, 0, 0, 1245179, 0, 0, 1245180, 0, 0, 1245181, 0, 0, 1245182, 0, 0, 1245183, 0, 0, 1179648, 0, 0, 1179649, 0, 0, 1179654, 0, 0, 1179655, 0, 0, 1179656, 0, 0, 1179679, 0, 0, 1179680, 0, 0, 1179681, 0, 0, 1179682, 0, 0, 1179683, 0, 0, 1179684, 0, 0, 1179685, 0, 0, 1179686, 0, 0, 1179687, 0, 0, 1179688, 0, 0, 1179689, 0, 0, 1179690, 0, 0, 1179691, 0, 0, 1179692, 0, 0, 1310708, 0, 0, 1310709, 0, 0, 1310710, 0, 0, 1310711, 0, 0, 1310712, 0, 0, 1310713, 0, 0, 1310714, 0, 0, 1310715, 0, 0, 1310716, 0, 0, 1310717, 0, 0, 1310718, 0, 0, 1310719, 0, 0, 1245184, 0, 0, 1245185, 0, 0, 1245204, 0, 0, 1245205, 0, 0, 1245206, 0, 0, 1245207, 0, 0, 1245215, 0, 0, 1245216, 0, 0, 1245217, 0, 0, 1245218, 0, 0, 1245219, 0, 0, 1245220, 0, 0, 1245221, 0, 0, 1245222, 0, 0, 1245223, 0, 0, 1245224, 0, 0, 1245225, 0, 0, 1245226, 0, 0, 1245227, 0, 0, 1245228, 0, 0, 1376244, 0, 0, 1376245, 0, 0, 1376246, 0, 0, 1376247, 0, 0, 1376248, 0, 0, 1376249, 0, 0, 1376250, 0, 0, 1376251, 0, 0, 1376252, 0, 0, 1376253, 0, 0, 1376254, 0, 0, 1376255, 0, 0, 1310720, 0, 0, 1310721, 0, 0, 1310751, 0, 0, 1310752, 0, 0, 1310753, 0, 0, 1310754, 0, 0, 1310755, 0, 0, 1310756, 0, 0, 1310757, 0, 0, 1310758, 0, 0, 1310759, 0, 0, 1310760, 0, 0, 1310761, 0, 0, 1310762, 0, 0, 1310763, 0, 0, 1310764, 0, 0, 1441780, 0, 0, 1441781, 0, 0, 1441782, 0, 0, 1441783, 0, 0, 1441784, 0, 0, 1441785, 0, 0, 1441786, 0, 0, 1441787, 0, 0, 1441788, 0, 0, 1441789, 0, 0, 1441790, 0, 0, 1441791, 0, 0, 1376256, 0, 0, 1376257, 0, 0, 1376285, 0, 0, 1376286, 0, 0, 1376287, 0, 0, 1376288, 0, 0, 1376289, 0, 0, 1376290, 0, 0, 1376291, 0, 0, 1376292, 0, 0, 1376293, 0, 0, 1376294, 0, 0, 1376295, 0, 0, 1376296, 0, 0, 1376297, 0, 0, 1376298, 0, 0, 1376299, 0, 0, 1376300, 0, 0, 1507316, 0, 0, 1507317, 0, 0, 1507318, 0, 0, 1507319, 0, 0, 1507320, 0, 0, 1507321, 0, 0, 1507322, 0, 0, 1507323, 0, 0, 1507324, 0, 0, 1507325, 0, 0, 1507326, 0, 0, 1507327, 0, 0, 1441792, 0, 0, 1441793, 0, 0, 1441823, 0, 0, 1441824, 0, 0, 1441825, 0, 0, 1441826, 0, 0, 1441827, 0, 0, 1441828, 0, 0, 1441829, 0, 0, 1441830, 0, 0, 1441831, 0, 0, 1441832, 0, 0, 1441833, 0, 0, 1441834, 0, 0, 1441835, 0, 0, 1441836, 0, 0, 1572852, 0, 0, 1572853, 0, 0, 1572854, 0, 0, 1572855, 0, 0, 1572856, 0, 0, 1572857, 0, 0, 1572858, 0, 0, 1572859, 0, 0, 1572860, 0, 0, 1572861, 0, 0, 1572862, 0, 0, 1572863, 0, 0, 1507328, 0, 0, 1507329, 0, 0, 1507355, 0, 0, 1507356, 0, 0, 1507359, 0, 0, 1507360, 0, 0, 1507361, 0, 0, 1507362, 0, 0, 1507363, 0, 0, 1507364, 0, 0, 1507365, 0, 0, 1507366, 0, 0, 1507367, 0, 0, 1507368, 0, 0, 1507369, 0, 0, 1507370, 0, 0, 1507371, 0, 0, 1507372, 0, 0, 1638388, 0, 0, 1638389, 0, 0, 1638390, 0, 0, 1638391, 0, 0, 1638392, 0, 0, 1638393, 0, 0, 1638394, 0, 0, 1638395, 0, 0, 1638396, 0, 0, 1638397, 0, 0, 1638398, 0, 0, 1638399, 0, 0, 1572864, 0, 0, 1572865, 0, 0, 1572895, 0, 0, 1572896, 0, 0, 1572897, 0, 0, 1572898, 0, 0, 1572899, 0, 0, 1572900, 0, 0, 1572901, 0, 0, 1572902, 0, 0, 1572903, 0, 0, 1572904, 0, 0, 1572905, 0, 0, 1572906, 0, 0, 1572907, 0, 0, 1572908, 0, 0, 1703924, 0, 0, 1703925, 0, 0, 1703926, 0, 0, 1703927, 0, 0, 1703928, 0, 0, 1703929, 0, 0, 1703930, 0, 0, 1703931, 0, 0, 1703932, 0, 0, 1703933, 0, 0, 1703934, 0, 0, 1703935, 0, 0, 1638400, 0, 0, 1638401, 0, 0, 1638413, 0, 0, 1638425, 0, 0, 1638426, 0, 0, 1638431, 0, 0, 1638432, 0, 0, 1638433, 0, 0, 1638434, 0, 0, 1638435, 0, 0, 1638436, 0, 0, 1638437, 0, 0, 1638438, 0, 0, 1638439, 0, 0, 1638440, 0, 0, 1638441, 0, 0, 1638442, 0, 0, 1638443, 0, 0, 1638444, 0, 0, 1769460, 0, 0, 1769461, 0, 0, 1769462, 0, 0, 1769463, 0, 0, 1769464, 0, 0, 1769465, 0, 0, 1769466, 0, 0, 1769467, 0, 0, 1769468, 0, 0, 1769469, 0, 0, 1769470, 0, 0, 1769471, 0, 0, 1703936, 0, 0, 1703937, 0, 0, 1703948, 0, 0, 1703965, 0, 0, 1703966, 0, 0, 1703967, 0, 0, 1703968, 0, 0, 1703969, 0, 0, 1703970, 0, 0, 1703971, 0, 0, 1703972, 0, 0, 1703973, 0, 0, 1703974, 0, 0, 1703975, 0, 0, 1703976, 0, 0, 1703977, 0, 0, 1703978, 0, 0, 1703979, 0, 0, 1703980, 0, 0, 1834996, 0, 0, 1834997, 0, 0, 1834998, 0, 0, 1834999, 0, 0, 1835000, 0, 0, 1835001, 0, 0, 1835002, 0, 0, 1835003, 0, 0, 1835004, 0, 0, 1835005, 0, 0, 1835006, 0, 0, 1835007, 0, 0, 1769472, 0, 0, 1769473, 0, 0, 1769482, 0, 0, 1769483, 0, 0, 1769500, 0, 0, 1769501, 0, 0, 1769503, 0, 0, 1769504, 0, 0, 1769505, 0, 0, 1769506, 0, 0, 1769507, 0, 0, 1769508, 0, 0, 1769509, 0, 0, 1769510, 0, 0, 1769511, 0, 0, 1769512, 0, 0, 1769513, 0, 0, 1769514, 0, 0, 1769515, 0, 0, 1769516, 0, 0, 1900532, 0, 0, 1900533, 0, 0, 1900534, 0, 0, 1900535, 0, 0, 1900536, 0, 0, 1900537, 0, 0, 1900538, 0, 0, 1900539, 0, 0, 1900540, 0, 0, 1900541, 0, 0, 1900542, 0, 0, 1900543, 0, 0, 1835008, 0, 0, 1835009, 0, 0, 1835012, 0, 0, 1835018, 0, 0, 1835019, 0, 0, 1835034, 0, 0, 1835035, 0, 0, 1835039, 0, 0, 1835040, 0, 0, 1835041, 0, 0, 1835042, 0, 0, 1835043, 0, 0, 1835044, 0, 0, 1835045, 0, 0, 1835046, 0, 0, 1835047, 0, 0, 1835048, 0, 0, 1835049, 0, 0, 1835050, 0, 0, 1835051, 0, 0, 1835052, 0, 0, 1966068, 0, 0, 1966069, 0, 0, 1966070, 0, 0, 1966071, 0, 0, 1966072, 0, 0, 1966073, 0, 0, 1966074, 0, 0, 1966075, 0, 0, 1966076, 0, 0, 1966077, 0, 0, 1966078, 0, 0, 1966079, 0, 0, 1900544, 0, 0, 1900545, 0, 0, 1900546, 0, 0, 1900547, 0, 0, 1900548, 0, 0, 1900549, 0, 0, 1900550, 0, 0, 1900551, 0, 0, 1900552, 0, 0, 1900553, 0, 0, 1900554, 0, 0, 1900555, 0, 0, 1900556, 0, 0, 1900557, 0, 0, 1900558, 0, 0, 1900559, 0, 0, 1900560, 0, 0, 1900561, 0, 0, 1900562, 0, 0, 1900563, 0, 0, 1900564, 0, 0, 1900565, 0, 0, 1900566, 0, 0, 1900567, 0, 0, 1900568, 0, 0, 1900569, 0, 0, 1900570, 0, 0, 1900571, 0, 0, 1900572, 0, 0, 1900573, 0, 0, 1900574, 0, 0, 1900575, 0, 0, 1900576, 0, 0, 1900577, 0, 0, 1900578, 0, 0, 1900579, 0, 0, 1900580, 0, 0, 1900581, 0, 0, 1900582, 0, 0, 1900583, 0, 0, 1900584, 0, 0, 1900585, 0, 0, 1900586, 0, 0, 1900587, 0, 0, 1900588, 0, 0, 2031604, 0, 0, 2031605, 0, 0, 2031606, 0, 0, 2031607, 0, 0, 2031608, 0, 0, 2031609, 0, 0, 2031610, 0, 0, 2031611, 0, 0, 2031612, 0, 0, 2031613, 0, 0, 2031614, 0, 0, 2031615, 0, 0, 1966080, 0, 0, 1966081, 0, 0, 1966082, 0, 0, 1966083, 0, 0, 1966084, 0, 0, 1966085, 0, 0, 1966086, 0, 0, 1966087, 0, 0, 1966088, 0, 0, 1966089, 0, 0, 1966090, 0, 0, 1966091, 0, 0, 1966092, 0, 0, 1966093, 0, 0, 1966094, 0, 0, 1966095, 0, 0, 1966096, 0, 0, 1966097, 0, 0, 1966098, 0, 0, 1966099, 0, 0, 1966100, 0, 0, 1966101, 0, 0, 1966102, 0, 0, 1966103, 0, 0, 1966104, 0, 0, 1966105, 0, 0, 1966106, 0, 0, 1966107, 0, 0, 1966108, 0, 0, 1966109, 0, 0, 1966110, 0, 0, 1966111, 0, 0, 1966112, 0, 0, 1966113, 0, 0, 1966114, 0, 0, 1966115, 0, 0, 1966116, 0, 0, 1966117, 0, 0, 1966118, 0, 0, 1966119, 0, 0, 1966120, 0, 0, 1966121, 0, 0, 1966122, 0, 0, 1966123, 0, 0, 1966124, 0, 0, 2097140, 0, 0, 2097141, 0, 0, 2097142, 0, 0, 2097143, 0, 0, 2097144, 0, 0, 2097145, 0, 0, 2097146, 0, 0, 2097147, 0, 0, 2097148, 0, 0, 2097149, 0, 0, 2097150, 0, 0, 2097151, 0, 0, 2031616, 0, 0, 2031617, 0, 0, 2031618, 0, 0, 2031619, 0, 0, 2031620, 0, 0, 2031621, 0, 0, 2031622, 0, 0, 2031623, 0, 0, 2031624, 0, 0, 2031625, 0, 0, 2031626, 0, 0, 2031627, 0, 0, 2031628, 0, 0, 2031629, 0, 0, 2031630, 0, 0, 2031631, 0, 0, 2031632, 0, 0, 2031633, 0, 0, 2031634, 0, 0, 2031635, 0, 0, 2031636, 0, 0, 2031637, 0, 0, 2031638, 0, 0, 2031639, 0, 0, 2031640, 0, 0, 2031641, 0, 0, 2031642, 0, 0, 2031643, 0, 0, 2031644, 0, 0, 2031645, 0, 0, 2031646, 0, 0, 2031647, 0, 0, 2031648, 0, 0, 2031649, 0, 0, 2031650, 0, 0, 2031651, 0, 0, 2031652, 0, 0, 2031653, 0, 0, 2031654, 0, 0, 2031655, 0, 0, 2031656, 0, 0, 2031657, 0, 0, 2031658, 0, 0, 2031659, 0, 0, 2031660, 0, 0, 2162676, 0, 0, 2162677, 0, 0, 2162678, 0, 0, 2162679, 0, 0, 2162680, 0, 0, 2162681, 0, 0, 2162682, 0, 0, 2162683, 0, 0, 2162684, 0, 0, 2162685, 0, 0, 2162686, 0, 0, 2162687, 0, 0, 2097152, 0, 0, 2097153, 0, 0, 2097154, 0, 0, 2097155, 0, 0, 2097156, 0, 0, 2097157, 0, 0, 2097158, 0, 0, 2097159, 0, 0, 2097160, 0, 0, 2097161, 0, 0, 2097162, 0, 0, 2097163, 0, 0, 2097164, 0, 0, 2097165, 0, 0, 2097166, 0, 0, 2097167, 0, 0, 2097168, 0, 0, 2097169, 0, 0, 2097170, 0, 0, 2097171, 0, 0, 2097172, 0, 0, 2097173, 0, 0, 2097174, 0, 0, 2097175, 0, 0, 2097176, 0, 0, 2097177, 0, 0, 2097178, 0, 0, 2097179, 0, 0, 2097180, 0, 0, 2097181, 0, 0, 2097182, 0, 0, 2097183, 0, 0, 2097184, 0, 0, 2097185, 0, 0, 2097186, 0, 0, 2097187, 0, 0, 2097188, 0, 0, 2097189, 0, 0, 2097190, 0, 0, 2097191, 0, 0, 2097192, 0, 0, 2097193, 0, 0, 2097194, 0, 0, 2097195, 0, 0, 2097196, 0, 0, 2228212, 0, 0, 2228213, 0, 0, 2228214, 0, 0, 2228215, 0, 0, 2228216, 0, 0, 2228217, 0, 0, 2228218, 0, 0, 2228219, 0, 0, 2228220, 0, 0, 2228221, 0, 0, 2228222, 0, 0, 2228223, 0, 0, 2162688, 0, 0, 2162689, 0, 0, 2162690, 0, 0, 2162691, 0, 0, 2162692, 0, 0, 2162693, 0, 0, 2162694, 0, 0, 2162695, 0, 0, 2162696, 0, 0, 2162697, 0, 0, 2162698, 0, 0, 2162699, 0, 0, 2162700, 0, 0, 2162701, 0, 0, 2162702, 0, 0, 2162703, 0, 0, 2162704, 0, 0, 2162705, 0, 0, 2162706, 0, 0, 2162707, 0, 0, 2162708, 0, 0, 2162709, 0, 0, 2162710, 0, 0, 2162711, 0, 0, 2162712, 0, 0, 2162713, 0, 0, 2162714, 0, 0, 2162715, 0, 0, 2162716, 0, 0, 2162717, 0, 0, 2162718, 0, 0, 2162719, 0, 0, 2162720, 0, 0, 2162721, 0, 0, 2162722, 0, 0, 2162723, 0, 0, 2162724, 0, 0, 2162725, 0, 0, 2162726, 0, 0, 2162727, 0, 0, 2162728, 0, 0, 2162729, 0, 0, 2162730, 0, 0, 2162731, 0, 0, 2162732, 0, 0, 2293748, 0, 0, 2293749, 0, 0, 2293750, 0, 0, 2293751, 0, 0, 2293752, 0, 0, 2293753, 0, 0, 2293754, 0, 0, 2293755, 0, 0, 2293756, 0, 0, 2293757, 0, 0, 2293758, 0, 0, 2293759, 0, 0, 2228224, 0, 0, 2228225, 0, 0, 2228226, 0, 0, 2228227, 0, 0, 2228228, 0, 0, 2228229, 0, 0, 2228230, 0, 0, 2228231, 0, 0, 2228232, 0, 0, 2228233, 0, 0, 2228234, 0, 0, 2228235, 0, 0, 2228236, 0, 0, 2228237, 0, 0, 2228238, 0, 0, 2228239, 0, 0, 2228240, 0, 0, 2228241, 0, 0, 2228242, 0, 0, 2228243, 0, 0, 2228244, 0, 0, 2228245, 0, 0, 2228246, 0, 0, 2228247, 0, 0, 2228248, 0, 0, 2228249, 0, 0, 2228250, 0, 0, 2228251, 0, 0, 2228252, 0, 0, 2228253, 0, 0, 2228254, 0, 0, 2228255, 0, 0, 2228256, 0, 0, 2228257, 0, 0, 2228258, 0, 0, 2228259, 0, 0, 2228260, 0, 0, 2228261, 0, 0, 2228262, 0, 0, 2228263, 0, 0, 2228264, 0, 0, 2228265, 0, 0, 2228266, 0, 0, 2228267, 0, 0, 2228268, 0, 0, 2359284, 0, 0, 2359285, 0, 0, 2359286, 0, 0, 2359287, 0, 0, 2359288, 0, 0, 2359289, 0, 0, 2359290, 0, 0, 2359291, 0, 0, 2359292, 0, 0, 2359293, 0, 0, 2359294, 0, 0, 2359295, 0, 0, 2293760, 0, 0, 2293761, 0, 0, 2293762, 0, 0, 2293763, 0, 0, 2293764, 0, 0, 2293765, 0, 0, 2293766, 0, 0, 2293767, 0, 0, 2293768, 0, 0, 2293769, 0, 0, 2293770, 0, 0, 2293771, 0, 0, 2293772, 0, 0, 2293773, 0, 0, 2293774, 0, 0, 2293775, 0, 0, 2293776, 0, 0, 2293777, 0, 0, 2293778, 0, 0, 2293779, 0, 0, 2293780, 0, 0, 2293781, 0, 0, 2293782, 0, 0, 2293783, 0, 0, 2293784, 0, 0, 2293785, 0, 0, 2293786, 0, 0, 2293787, 0, 0, 2293788, 0, 0, 2293789, 0, 0, 2293790, 0, 0, 2293791, 0, 0, 2293792, 0, 0, 2293793, 0, 0, 2293794, 0, 0, 2293795, 0, 0, 2293796, 0, 0, 2293797, 0, 0, 2293798, 0, 0, 2293799, 0, 0, 2293800, 0, 0, 2293801, 0, 0, 2293802, 0, 0, 2293803, 0, 0, 2293804, 0, 0, 2424820, 0, 0, 2424821, 0, 0, 2424822, 0, 0, 2424823, 0, 0, 2424824, 0, 0, 2424825, 0, 0, 2424826, 0, 0, 2424827, 0, 0, 2424828, 0, 0, 2424829, 0, 0, 2424830, 0, 0, 2424831, 0, 0, 2359296, 0, 0, 2359297, 0, 0, 2359298, 0, 0, 2359299, 0, 0, 2359300, 0, 0, 2359301, 0, 0, 2359302, 0, 0, 2359303, 0, 0, 2359304, 0, 0, 2359305, 0, 0, 2359306, 0, 0, 2359307, 0, 0, 2359308, 0, 0, 2359309, 0, 0, 2359310, 0, 0, 2359311, 0, 0, 2359312, 0, 0, 2359313, 0, 0, 2359314, 0, 0, 2359315, 0, 0, 2359316, 0, 0, 2359317, 0, 0, 2359318, 0, 0, 2359319, 0, 0, 2359320, 0, 0, 2359321, 0, 0, 2359322, 0, 0, 2359323, 0, 0, 2359324, 0, 0, 2359325, 0, 0, 2359326, 0, 0, 2359327, 0, 0, 2359328, 0, 0, 2359329, 0, 0, 2359330, 0, 0, 2359331, 0, 0, 2359332, 0, 0, 2359333, 0, 0, 2359334, 0, 0, 2359335, 0, 0, 2359336, 0, 0, 2359337, 0, 0, 2359338, 0, 0, 2359339, 0, 0, 2359340, 0, 0, 2490356, 0, 0, 2490357, 0, 0, 2490358, 0, 0, 2490359, 0, 0, 2490360, 0, 0, 2490361, 0, 0, 2490362, 0, 0, 2490363, 0, 0, 2490364, 0, 0, 2490365, 0, 0, 2490366, 0, 0, 2490367, 0, 0, 2424832, 0, 0, 2424833, 0, 0, 2424834, 0, 0, 2424835, 0, 0, 2424836, 0, 0, 2424837, 0, 0, 2424838, 0, 0, 2424839, 0, 0, 2424840, 0, 0, 2424841, 0, 0, 2424842, 0, 0, 2424843, 0, 0, 2424844, 0, 0, 2424845, 0, 0, 2424846, 0, 0, 2424847, 0, 0, 2424848, 0, 0, 2424849, 0, 0, 2424850, 0, 0, 2424851, 0, 0, 2424852, 0, 0, 2424853, 0, 0, 2424854, 0, 0, 2424855, 0, 0, 2424856, 0, 0, 2424857, 0, 0, 2424858, 0, 0, 2424859, 0, 0, 2424860, 0, 0, 2424861, 0, 0, 2424862, 0, 0, 2424863, 0, 0, 2424864, 0, 0, 2424865, 0, 0, 2424866, 0, 0, 2424867, 0, 0, 2424868, 0, 0, 2424869, 0, 0, 2424870, 0, 0, 2424871, 0, 0, 2424872, 0, 0, 2424873, 0, 0, 2424874, 0, 0, 2424875, 0, 0, 2424876, 0, 0, 2555892, 0, 0, 2555893, 0, 0, 2555894, 0, 0, 2555895, 0, 0, 2555896, 0, 0, 2555897, 0, 0, 2555898, 0, 0, 2555899, 0, 0, 2555900, 0, 0, 2555901, 0, 0, 2555902, 0, 0, 2555903, 0, 0, 2490368, 0, 0, 2490369, 0, 0, 2490370, 0, 0, 2490371, 0, 0, 2490372, 0, 0, 2490373, 0, 0, 2490374, 0, 0, 2490375, 0, 0, 2490376, 0, 0, 2490377, 0, 0, 2490378, 0, 0, 2490379, 0, 0, 2490380, 0, 0, 2490381, 0, 0, 2490382, 0, 0, 2490383, 0, 0, 2490384, 0, 0, 2490385, 0, 0, 2490386, 0, 0, 2490387, 0, 0, 2490388, 0, 0, 2490389, 0, 0, 2490390, 0, 0, 2490391, 0, 0, 2490392, 0, 0, 2490393, 0, 0, 2490394, 0, 0, 2490395, 0, 0, 2490396, 0, 0, 2490397, 0, 0, 2490398, 0, 0, 2490399, 0, 0, 2490400, 0, 0, 2490401, 0, 0, 2490402, 0, 0, 2490403, 0, 0, 2490404, 0, 0, 2490405, 0, 0, 2490406, 0, 0, 2490407, 0, 0, 2490408, 0, 0, 2490409, 0, 0, 2490410, 0, 0, 2490411, 0, 0, 2490412, 0, 0, 2621428, 0, 0, 2621429, 0, 0, 2621430, 0, 0, 2621431, 0, 0, 2621432, 0, 0, 2621433, 0, 0, 2621434, 0, 0, 2621435, 0, 0, 2621436, 0, 0, 2621437, 0, 0, 2621438, 0, 0, 2621439, 0, 0, 2555904, 0, 0, 2555905, 0, 0, 2555906, 0, 0, 2555907, 0, 0, 2555908, 0, 0, 2555909, 0, 0, 2555910, 0, 0, 2555911, 0, 0, 2555912, 0, 0, 2555913, 0, 0, 2555914, 0, 0, 2555915, 0, 0, 2555916, 0, 0, 2555917, 0, 0, 2555918, 0, 0, 2555919, 0, 0, 2555920, 0, 0, 2555921, 0, 0, 2555922, 0, 0, 2555923, 0, 0, 2555924, 0, 0, 2555925, 0, 0, 2555926, 0, 0, 2555927, 0, 0, 2555928, 0, 0, 2555929, 0, 0, 2555930, 0, 0, 2555931, 0, 0, 2555932, 0, 0, 2555933, 0, 0, 2555934, 0, 0, 2555935, 0, 0, 2555936, 0, 0, 2555937, 0, 0, 2555938, 0, 0, 2555939, 0, 0, 2555940, 0, 0, 2555941, 0, 0, 2555942, 0, 0, 2555943, 0, 0, 2555944, 0, 0, 2555945, 0, 0, 2555946, 0, 0, 2555947, 0, 0, 2555948, 0, 0, 2686964, 0, 0, 2686965, 0, 0, 2686966, 0, 0, 2686967, 0, 0, 2686968, 0, 0, 2686969, 0, 0, 2686970, 0, 0, 2686971, 0, 0, 2686972, 0, 0, 2686973, 0, 0, 2686974, 0, 0, 2686975, 0, 0, 2621440, 0, 0, 2621441, 0, 0, 2621442, 0, 0, 2621443, 0, 0, 2621444, 0, 0, 2621445, 0, 0, 2621446, 0, 0, 2621447, 0, 0, 2621448, 0, 0, 2621449, 0, 0, 2621450, 0, 0, 2621451, 0, 0, 2621452, 0, 0, 2621453, 0, 0, 2621454, 0, 0, 2621455, 0, 0, 2621456, 0, 0, 2621457, 0, 0, 2621458, 0, 0, 2621459, 0, 0, 2621460, 0, 0, 2621461, 0, 0, 2621462, 0, 0, 2621463, 0, 0, 2621464, 0, 0, 2621465, 0, 0, 2621466, 0, 0, 2621467, 0, 0, 2621468, 0, 0, 2621469, 0, 0, 2621470, 0, 0, 2621471, 0, 0, 2621472, 0, 0, 2621473, 0, 0, 2621474, 0, 0, 2621475, 0, 0, 2621476, 0, 0, 2621477, 0, 0, 2621478, 0, 0, 2621479, 0, 0, 2621480, 0, 0, 2621481, 0, 0, 2621482, 0, 0, 2621483, 0, 0, 2621484, 0, 0, 2752500, 0, 0, 2752501, 0, 0, 2752502, 0, 0, 2752503, 0, 0, 2752504, 0, 0, 2752505, 0, 0, 2752506, 0, 0, 2752507, 0, 0, 2752508, 0, 0, 2752509, 0, 0, 2752510, 0, 0, 2752511, 0, 0, 2686976, 0, 0, 2686977, 0, 0, 2686978, 0, 0, 2686979, 0, 0, 2686980, 0, 0, 2686981, 0, 0, 2686982, 0, 0, 2686983, 0, 0, 2686984, 0, 0, 2686985, 0, 0, 2686986, 0, 0, 2686987, 0, 0, 2686988, 0, 0, 2686989, 0, 0, 2686990, 0, 0, 2686991, 0, 0, 2686992, 0, 0, 2686993, 0, 0, 2686994, 0, 0, 2686995, 0, 0, 2686996, 0, 0, 2686997, 0, 0, 2686998, 0, 0, 2686999, 0, 0, 2687000, 0, 0, 2687001, 0, 0, 2687002, 0, 0, 2687003, 0, 0, 2687004, 0, 0, 2687005, 0, 0, 2687006, 0, 0, 2687007, 0, 0, 2687008, 0, 0, 2687009, 0, 0, 2687010, 0, 0, 2687011, 0, 0, 2687012, 0, 0, 2687013, 0, 0, 2687014, 0, 0, 2687015, 0, 0, 2687016, 0, 0, 2687017, 0, 0, 2687018, 0, 0, 2687019, 0, 0, 2687020, 0, 0, 2818036, 0, 0, 2818037, 0, 0, 2818038, 0, 0, 2818039, 0, 0, 2818040, 0, 0, 2818041, 0, 0, 2818042, 0, 0, 2818043, 0, 0, 2818044, 0, 0, 2818045, 0, 0, 2818046, 0, 0, 2818047, 0, 0, 2752512, 0, 0, 2752513, 0, 0, 2752514, 0, 0, 2752515, 0, 0, 2752516, 0, 0, 2752517, 0, 0, 2752518, 0, 0, 2752519, 0, 0, 2752520, 0, 0, 2752521, 0, 0, 2752522, 0, 0, 2752523, 0, 0, 2752524, 0, 0, 2752525, 0, 0, 2752526, 0, 0, 2752527, 0, 0, 2752528, 0, 0, 2752529, 0, 0, 2752530, 0, 0, 2752531, 0, 0, 2752532, 0, 0, 2752533, 0, 0, 2752534, 0, 0, 2752535, 0, 0, 2752536, 0, 0, 2752537, 0, 0, 2752538, 0, 0, 2752539, 0, 0, 2752540, 0, 0, 2752541, 0, 0, 2752542, 0, 0, 2752543, 0, 0, 2752544, 0, 0, 2752545, 0, 0, 2752546, 0, 0, 2752547, 0, 0, 2752548, 0, 0, 2752549, 0, 0, 2752550, 0, 0, 2752551, 0, 0, 2752552, 0, 0, 2752553, 0, 0, 2752554, 0, 0, 2752555, 0, 0, 2752556, 0, 0, 2883572, 0, 0, 2883573, 0, 0, 2883574, 0, 0, 2883575, 0, 0, 2883576, 0, 0, 2883577, 0, 0, 2883578, 0, 0, 2883579, 0, 0, 2883580, 0, 0, 2883581, 0, 0, 2883582, 0, 0, 2883583, 0, 0, 2818048, 0, 0, 2818049, 0, 0, 2818050, 0, 0, 2818051, 0, 0, 2818052, 0, 0, 2818053, 0, 0, 2818054, 0, 0, 2818055, 0, 0, 2818056, 0, 0, 2818057, 0, 0, 2818058, 0, 0, 2818059, 0, 0, 2818060, 0, 0, 2818061, 0, 0, 2818062, 0, 0, 2818063, 0, 0, 2818064, 0, 0, 2818065, 0, 0, 2818066, 0, 0, 2818067, 0, 0, 2818068, 0, 0, 2818069, 0, 0, 2818070, 0, 0, 2818071, 0, 0, 2818072, 0, 0, 2818073, 0, 0, 2818074, 0, 0, 2818075, 0, 0, 2818076, 0, 0, 2818077, 0, 0, 2818078, 0, 0, 2818079, 0, 0, 2818080, 0, 0, 2818081, 0, 0, 2818082, 0, 0, 2818083, 0, 0, 2818084, 0, 0, 2818085, 0, 0, 2818086, 0, 0, 2818087, 0, 0, 2818088, 0, 0, 2818089, 0, 0, 2818090, 0, 0, 2818091, 0, 0, 2818092, 0, 0 ) -[node name="player" parent="." instance=ExtResource( 3 )] +[node name="Player" parent="." instance=ExtResource( 3 )] position = Vector2( 233.06, 223.436 ) -[node name="moving_platform1" type="KinematicBody2D" parent="."] +[node name="MovingPlatform1" type="KinematicBody2D" parent="."] position = Vector2( 274.142, 152 ) -[node name="collision" type="CollisionShape2D" parent="moving_platform1"] +[node name="Collision" type="CollisionShape2D" parent="MovingPlatform1"] shape = SubResource( 3 ) -[node name="sprite" type="Sprite" parent="moving_platform1"] +[node name="Sprite" type="Sprite" parent="MovingPlatform1"] texture = ExtResource( 2 ) -[node name="anim" type="AnimationPlayer" parent="moving_platform1"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="MovingPlatform1"] autoplay = "leftright" playback_process_mode = 0 anims/leftright = SubResource( 4 ) -[node name="moving_platform2" type="KinematicBody2D" parent="."] +[node name="MovingPlatform2" type="KinematicBody2D" parent="."] position = Vector2( 88.3493, 284.689 ) -[node name="collision" type="CollisionShape2D" parent="moving_platform2"] +[node name="Collision" type="CollisionShape2D" parent="MovingPlatform2"] shape = SubResource( 3 ) -[node name="sprite" type="Sprite" parent="moving_platform2"] +[node name="Sprite" type="Sprite" parent="MovingPlatform2"] texture = ExtResource( 2 ) -[node name="anim" type="AnimationPlayer" parent="moving_platform2"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="MovingPlatform2"] autoplay = "updown" playback_process_mode = 0 anims/leftright = SubResource( 5 ) anims/updown = SubResource( 6 ) -[node name="princess" type="Area2D" parent="."] +[node name="Princess" type="Area2D" parent="."] position = Vector2( 97, 72 ) -[node name="collision" type="CollisionShape2D" parent="princess"] +[node name="Collision" type="CollisionShape2D" parent="Princess"] shape = SubResource( 7 ) -[node name="Sprite" type="Sprite" parent="princess"] +[node name="Sprite" type="Sprite" parent="Princess"] texture = ExtResource( 4 ) -[node name="youwin" type="Label" parent="."] +[node name="WinText" type="Label" parent="."] visible = false margin_left = 196.0 margin_top = 41.0 @@ -169,96 +169,96 @@ margin_right = 344.0 margin_bottom = 67.0 size_flags_horizontal = 2 size_flags_vertical = 0 -text = "Thank You Cubio +text = "Thank You Cubio! You Saved The Princess!" align = 1 -[node name="oneway1" type="KinematicBody2D" parent="."] +[node name="OneWay1" type="KinematicBody2D" parent="."] position = Vector2( 439, 308 ) -[node name="sprite" type="Sprite" parent="oneway1"] +[node name="Sprite" type="Sprite" parent="OneWay1"] scale = Vector2( 1, 0.3 ) texture = ExtResource( 2 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="oneway1"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="OneWay1"] shape = SubResource( 8 ) one_way_collision = true -[node name="oneway2" type="KinematicBody2D" parent="."] +[node name="OneWay2" type="KinematicBody2D" parent="."] position = Vector2( 456, 308 ) -[node name="sprite" type="Sprite" parent="oneway2"] +[node name="Sprite" type="Sprite" parent="OneWay2"] scale = Vector2( 1, 0.3 ) texture = ExtResource( 2 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="oneway2"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="OneWay2"] shape = SubResource( 8 ) one_way_collision = true -[node name="oneway3" type="KinematicBody2D" parent="."] +[node name="OneWay3" type="KinematicBody2D" parent="."] position = Vector2( 472, 308 ) -[node name="sprite" type="Sprite" parent="oneway3"] +[node name="Sprite" type="Sprite" parent="OneWay3"] scale = Vector2( 1, 0.3 ) texture = ExtResource( 2 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="oneway3"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="OneWay3"] shape = SubResource( 8 ) one_way_collision = true -[node name="oneway4" type="KinematicBody2D" parent="."] +[node name="OneWay4" type="KinematicBody2D" parent="."] position = Vector2( 487, 308 ) -[node name="sprite" type="Sprite" parent="oneway4"] +[node name="Sprite" type="Sprite" parent="OneWay4"] scale = Vector2( 1, 0.3 ) texture = ExtResource( 2 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="oneway4"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="OneWay4"] shape = SubResource( 8 ) one_way_collision = true -[node name="circle" type="KinematicBody2D" parent="."] +[node name="Circle" type="KinematicBody2D" parent="."] position = Vector2( 241.169, 304.126 ) -[node name="sprite" type="Sprite" parent="circle"] +[node name="Sprite" type="Sprite" parent="Circle"] texture = ExtResource( 5 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="circle"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Circle"] shape = SubResource( 9 ) -[node name="anim" type="AnimationPlayer" parent="circle"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="Circle"] autoplay = "turn" anims/turn = SubResource( 10 ) -[node name="box" type="CollisionShape2D" parent="circle"] +[node name="Box" type="CollisionShape2D" parent="Circle"] position = Vector2( -0.440125, -37.0904 ) shape = SubResource( 11 ) -[node name="boxsprite" type="Sprite" parent="circle"] +[node name="BoxSprite" type="Sprite" parent="Circle"] position = Vector2( 0, -37.4108 ) texture = ExtResource( 2 ) -[node name="platform" type="StaticBody2D" parent="."] +[node name="Platform" type="StaticBody2D" parent="."] position = Vector2( 251.44, 396.557 ) rotation = -0.428054 -[node name="sprite" type="Sprite" parent="platform"] +[node name="Sprite" type="Sprite" parent="Platform"] texture = ExtResource( 6 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="platform"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform"] shape = SubResource( 12 ) -[node name="platform1" type="StaticBody2D" parent="."] +[node name="Platform1" type="StaticBody2D" parent="."] position = Vector2( 369.116, 394.016 ) rotation = 0.465931 -[node name="sprite" type="Sprite" parent="platform1"] +[node name="Sprite" type="Sprite" parent="Platform1"] texture = ExtResource( 6 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="platform1"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="Platform1"] shape = SubResource( 12 ) [node name="Camera2D" type="Camera2D" parent="."] offset = Vector2( 265, 247 ) current = true -[connection signal="body_entered" from="princess" to="." method="_on_princess_body_enter"] +[connection signal="body_entered" from="Princess" to="." method="_on_princess_body_enter"] From c270db06353db707ac7dd1b0425e26745857be76 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 3 Feb 2020 01:55:55 -0500 Subject: [PATCH 07/10] Remove the kinematic collision demo Lots of demos already feature collisions with KinematicBodies --- 2d/kinematic_collision/colworld.tscn | 40 --------------- 2d/kinematic_collision/icon.png | Bin 1426 -> 0 bytes 2d/kinematic_collision/icon.png.import | 34 ------------- 2d/kinematic_collision/obstacle.png | Bin 453 -> 0 bytes 2d/kinematic_collision/obstacle.png.import | 34 ------------- 2d/kinematic_collision/player.gd | 24 --------- 2d/kinematic_collision/player.png | Bin 502 -> 0 bytes 2d/kinematic_collision/player.png.import | 34 ------------- 2d/kinematic_collision/player.tscn | 17 ------- 2d/kinematic_collision/project.godot | 56 --------------------- 10 files changed, 239 deletions(-) delete mode 100644 2d/kinematic_collision/colworld.tscn delete mode 100644 2d/kinematic_collision/icon.png delete mode 100644 2d/kinematic_collision/icon.png.import delete mode 100644 2d/kinematic_collision/obstacle.png delete mode 100644 2d/kinematic_collision/obstacle.png.import delete mode 100644 2d/kinematic_collision/player.gd delete mode 100644 2d/kinematic_collision/player.png delete mode 100644 2d/kinematic_collision/player.png.import delete mode 100644 2d/kinematic_collision/player.tscn delete mode 100644 2d/kinematic_collision/project.godot diff --git a/2d/kinematic_collision/colworld.tscn b/2d/kinematic_collision/colworld.tscn deleted file mode 100644 index 0d527029..00000000 --- a/2d/kinematic_collision/colworld.tscn +++ /dev/null @@ -1,40 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://obstacle.png" type="Texture" id=1] -[ext_resource path="res://player.tscn" type="PackedScene" id=2] - -[sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 8, 8 ) - -[sub_resource type="TileSet" id=2] -0/name = "" -0/texture = ExtResource( 1 ) -0/tex_offset = Vector2( 0, 0 ) -0/modulate = Color( 1, 1, 1, 1 ) -0/region = Rect2( 0, 0, 0, 0 ) -0/tile_mode = 0 -0/occluder_offset = Vector2( 0, 0 ) -0/navigation_offset = Vector2( 0, 0 ) -0/shapes = [ { -"autotile_coord": Vector2( 0, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 1 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 8, 8 ) -} ] -0/z_index = 0 - -[node name="colworld" type="Node2D"] - -[node name="TileMap" type="TileMap" parent="."] -tile_set = SubResource( 2 ) -cell_size = Vector2( 16, 16 ) -format = 1 -tile_data = PoolIntArray( -1, 0, 0, -65536, 0, 0, -65535, 0, 0, -65534, 0, 0, -65533, 0, 0, -65532, 0, 0, -65531, 0, 0, -65530, 0, 0, -65529, 0, 0, -65528, 0, 0, -65527, 0, 0, -65526, 0, 0, -65525, 0, 0, -65524, 0, 0, -65523, 0, 0, -65522, 0, 0, -65521, 0, 0, -65520, 0, 0, -65519, 0, 0, -65518, 0, 0, -65517, 0, 0, -65516, 0, 0, -65515, 0, 0, -65514, 0, 0, -65513, 0, 0, -65512, 0, 0, -65511, 0, 0, -65510, 0, 0, -65509, 0, 0, -65508, 0, 0, -65507, 0, 0, -65506, 0, 0, -65505, 0, 0, -65504, 0, 0, -65503, 0, 0, 65535, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 21, 0, 0, 22, 0, 0, 23, 0, 0, 24, 0, 0, 25, 0, 0, 26, 0, 0, 27, 0, 0, 28, 0, 0, 29, 0, 0, 30, 0, 0, 31, 0, 0, 32, 0, 0, 33, 0, 0, 131071, 0, 0, 65536, 0, 0, 65537, 0, 0, 65538, 0, 0, 65539, 0, 0, 65540, 0, 0, 65541, 0, 0, 65542, 0, 0, 65543, 0, 0, 65544, 0, 0, 65545, 0, 0, 65546, 0, 0, 65547, 0, 0, 65548, 0, 0, 65549, 0, 0, 65550, 0, 0, 65551, 0, 0, 65552, 0, 0, 65553, 0, 0, 65554, 0, 0, 65555, 0, 0, 65556, 0, 0, 65557, 0, 0, 65558, 0, 0, 65559, 0, 0, 65560, 0, 0, 65561, 0, 0, 65562, 0, 0, 65563, 0, 0, 65564, 0, 0, 65565, 0, 0, 65566, 0, 0, 65567, 0, 0, 65568, 0, 0, 65569, 0, 0, 196607, 0, 0, 131072, 0, 0, 131073, 0, 0, 131103, 0, 0, 131104, 0, 0, 131105, 0, 0, 262143, 0, 0, 196608, 0, 0, 196609, 0, 0, 196639, 0, 0, 196640, 0, 0, 196641, 0, 0, 327679, 0, 0, 262144, 0, 0, 262145, 0, 0, 262175, 0, 0, 262176, 0, 0, 262177, 0, 0, 393215, 0, 0, 327680, 0, 0, 327681, 0, 0, 327685, 0, 0, 327686, 0, 0, 327687, 0, 0, 327688, 0, 0, 327689, 0, 0, 327690, 0, 0, 327691, 0, 0, 327692, 0, 0, 327693, 0, 0, 327711, 0, 0, 327712, 0, 0, 327713, 0, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393247, 0, 0, 393248, 0, 0, 393249, 0, 0, 524287, 0, 0, 458752, 0, 0, 458753, 0, 0, 458783, 0, 0, 458784, 0, 0, 458785, 0, 0, 589823, 0, 0, 524288, 0, 0, 524289, 0, 0, 524319, 0, 0, 524320, 0, 0, 524321, 0, 0, 655359, 0, 0, 589824, 0, 0, 589825, 0, 0, 589855, 0, 0, 589856, 0, 0, 589857, 0, 0, 720895, 0, 0, 655360, 0, 0, 655361, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 655376, 0, 0, 655377, 0, 0, 655378, 0, 0, 655379, 0, 0, 655380, 0, 0, 655381, 0, 0, 655391, 0, 0, 655392, 0, 0, 655393, 0, 0, 786431, 0, 0, 720896, 0, 0, 720897, 0, 0, 720909, 0, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720914, 0, 0, 720915, 0, 0, 720916, 0, 0, 720917, 0, 0, 720927, 0, 0, 720928, 0, 0, 720929, 0, 0, 851967, 0, 0, 786432, 0, 0, 786433, 0, 0, 786445, 0, 0, 786446, 0, 0, 786447, 0, 0, 786448, 0, 0, 786449, 0, 0, 786450, 0, 0, 786451, 0, 0, 786452, 0, 0, 786453, 0, 0, 786463, 0, 0, 786464, 0, 0, 786465, 0, 0, 917503, 0, 0, 851968, 0, 0, 851969, 0, 0, 851981, 0, 0, 851982, 0, 0, 851988, 0, 0, 851989, 0, 0, 851999, 0, 0, 852000, 0, 0, 852001, 0, 0, 983039, 0, 0, 917504, 0, 0, 917505, 0, 0, 917517, 0, 0, 917518, 0, 0, 917524, 0, 0, 917525, 0, 0, 917535, 0, 0, 917536, 0, 0, 917537, 0, 0, 1048575, 0, 0, 983040, 0, 0, 983041, 0, 0, 983053, 0, 0, 983054, 0, 0, 983060, 0, 0, 983061, 0, 0, 983071, 0, 0, 983072, 0, 0, 983073, 0, 0, 1114111, 0, 0, 1048576, 0, 0, 1048577, 0, 0, 1048596, 0, 0, 1048597, 0, 0, 1048607, 0, 0, 1048608, 0, 0, 1048609, 0, 0, 1179647, 0, 0, 1114112, 0, 0, 1114113, 0, 0, 1114132, 0, 0, 1114133, 0, 0, 1114143, 0, 0, 1114144, 0, 0, 1114145, 0, 0, 1245183, 0, 0, 1179648, 0, 0, 1179649, 0, 0, 1179668, 0, 0, 1179669, 0, 0, 1179679, 0, 0, 1179680, 0, 0, 1179681, 0, 0, 1310719, 0, 0, 1245184, 0, 0, 1245185, 0, 0, 1245204, 0, 0, 1245205, 0, 0, 1245215, 0, 0, 1245216, 0, 0, 1245217, 0, 0, 1376255, 0, 0, 1310720, 0, 0, 1310721, 0, 0, 1310730, 0, 0, 1310731, 0, 0, 1310748, 0, 0, 1310751, 0, 0, 1310752, 0, 0, 1310753, 0, 0, 1441791, 0, 0, 1376256, 0, 0, 1376257, 0, 0, 1376266, 0, 0, 1376267, 0, 0, 1376284, 0, 0, 1376287, 0, 0, 1376288, 0, 0, 1376289, 0, 0, 1507327, 0, 0, 1441792, 0, 0, 1441793, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441820, 0, 0, 1441823, 0, 0, 1441824, 0, 0, 1441825, 0, 0, 1572863, 0, 0, 1507328, 0, 0, 1507329, 0, 0, 1507338, 0, 0, 1507339, 0, 0, 1507340, 0, 0, 1507341, 0, 0, 1507359, 0, 0, 1507360, 0, 0, 1507361, 0, 0, 1638399, 0, 0, 1572864, 0, 0, 1572865, 0, 0, 1572874, 0, 0, 1572875, 0, 0, 1572876, 0, 0, 1572877, 0, 0, 1572878, 0, 0, 1572879, 0, 0, 1572880, 0, 0, 1572881, 0, 0, 1572882, 0, 0, 1572895, 0, 0, 1572896, 0, 0, 1572897, 0, 0, 1703935, 0, 0, 1638400, 0, 0, 1638401, 0, 0, 1638410, 0, 0, 1638411, 0, 0, 1638412, 0, 0, 1638413, 0, 0, 1638414, 0, 0, 1638415, 0, 0, 1638416, 0, 0, 1638417, 0, 0, 1638418, 0, 0, 1638431, 0, 0, 1638432, 0, 0, 1638433, 0, 0, 1769471, 0, 0, 1703936, 0, 0, 1703937, 0, 0, 1703946, 0, 0, 1703947, 0, 0, 1703967, 0, 0, 1703968, 0, 0, 1703969, 0, 0, 1835007, 0, 0, 1769472, 0, 0, 1769473, 0, 0, 1769482, 0, 0, 1769483, 0, 0, 1769503, 0, 0, 1769504, 0, 0, 1769505, 0, 0, 1900543, 0, 0, 1835008, 0, 0, 1835009, 0, 0, 1835018, 0, 0, 1835019, 0, 0, 1835039, 0, 0, 1835040, 0, 0, 1835041, 0, 0, 1966079, 0, 0, 1900544, 0, 0, 1900545, 0, 0, 1900546, 0, 0, 1900547, 0, 0, 1900548, 0, 0, 1900549, 0, 0, 1900550, 0, 0, 1900551, 0, 0, 1900552, 0, 0, 1900553, 0, 0, 1900554, 0, 0, 1900555, 0, 0, 1900556, 0, 0, 1900557, 0, 0, 1900558, 0, 0, 1900559, 0, 0, 1900560, 0, 0, 1900561, 0, 0, 1900562, 0, 0, 1900563, 0, 0, 1900564, 0, 0, 1900565, 0, 0, 1900566, 0, 0, 1900567, 0, 0, 1900568, 0, 0, 1900569, 0, 0, 1900570, 0, 0, 1900571, 0, 0, 1900572, 0, 0, 1900573, 0, 0, 1900574, 0, 0, 1900575, 0, 0, 1900576, 0, 0, 1900577, 0, 0, 2031615, 0, 0, 1966080, 0, 0, 1966081, 0, 0, 1966082, 0, 0, 1966083, 0, 0, 1966084, 0, 0, 1966085, 0, 0, 1966086, 0, 0, 1966087, 0, 0, 1966088, 0, 0, 1966089, 0, 0, 1966090, 0, 0, 1966091, 0, 0, 1966092, 0, 0, 1966093, 0, 0, 1966094, 0, 0, 1966095, 0, 0, 1966096, 0, 0, 1966097, 0, 0, 1966098, 0, 0, 1966099, 0, 0, 1966100, 0, 0, 1966101, 0, 0, 1966102, 0, 0, 1966103, 0, 0, 1966104, 0, 0, 1966105, 0, 0, 1966106, 0, 0, 1966107, 0, 0, 1966108, 0, 0, 1966109, 0, 0, 1966110, 0, 0, 1966111, 0, 0, 1966112, 0, 0, 1966113, 0, 0, 2097151, 0, 0, 2031616, 0, 0, 2031617, 0, 0, 2031618, 0, 0, 2031619, 0, 0, 2031620, 0, 0, 2031621, 0, 0, 2031622, 0, 0, 2031623, 0, 0, 2031624, 0, 0, 2031625, 0, 0, 2031626, 0, 0, 2031627, 0, 0, 2031628, 0, 0, 2031629, 0, 0, 2031630, 0, 0, 2031631, 0, 0, 2031632, 0, 0, 2031633, 0, 0, 2031634, 0, 0, 2031635, 0, 0, 2031636, 0, 0, 2031637, 0, 0, 2031638, 0, 0, 2031639, 0, 0, 2031640, 0, 0, 2031641, 0, 0, 2031642, 0, 0, 2031643, 0, 0, 2031644, 0, 0, 2031645, 0, 0, 2031646, 0, 0, 2031647, 0, 0, 2031648, 0, 0, 2031649, 0, 0 ) - -[node name="player" parent="." instance=ExtResource( 2 )] -position = Vector2( 115.243, 222.134 ) - -[node name="Camera2D" type="Camera2D" parent="."] -offset = Vector2( 264, 248 ) -current = true diff --git a/2d/kinematic_collision/icon.png b/2d/kinematic_collision/icon.png deleted file mode 100644 index 2774de6110670298596813aa985a969a1c6ccab5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1426 zcmV;D1#S9?P)e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00jC;L_t(|+U;6Pj@w2MeN|me zN*Z~b+0F?J!xxKlf_Up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sf0Q$p(%o9lcMEo&SW5Wog{6e0 z^k6RuwhfbD(Q6xGSxWeEwA{>?)<5 z>EZ#mnZ_C|_V0ciiw1+v5GiMBt-rf*HCNAqk6`$9-45(PM9g_lzjUuW8A$l+^_VXa v)PAV0;p#U}C(h(8Nt~%$QaV$(6iebCN=$z5=^r^D00000NkvXXu0mjfDP6+h diff --git a/2d/kinematic_collision/obstacle.png.import b/2d/kinematic_collision/obstacle.png.import deleted file mode 100644 index 99c1b729..00000000 --- a/2d/kinematic_collision/obstacle.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/obstacle.png-dfb3e99d3af573251007cdf5e1c252b9.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://obstacle.png" -dest_files=[ "res://.import/obstacle.png-dfb3e99d3af573251007cdf5e1c252b9.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/2d/kinematic_collision/player.gd b/2d/kinematic_collision/player.gd deleted file mode 100644 index 4b955e69..00000000 --- a/2d/kinematic_collision/player.gd +++ /dev/null @@ -1,24 +0,0 @@ -extends KinematicBody2D - -# This is a demo showing how KinematicBody2D -# move_and_slide works. - -# Member variables -const MOTION_SPEED = 160 # Pixels/second - - -func _physics_process(_delta): - var motion = Vector2() - - if Input.is_action_pressed("move_up"): - motion += Vector2(0, -1) - if Input.is_action_pressed("move_bottom"): - motion += Vector2(0, 1) - if Input.is_action_pressed("move_left"): - motion += Vector2(-1, 0) - if Input.is_action_pressed("move_right"): - motion += Vector2(1, 0) - - motion = motion.normalized() * MOTION_SPEED - - move_and_slide(motion) diff --git a/2d/kinematic_collision/player.png b/2d/kinematic_collision/player.png deleted file mode 100644 index 0e7d843899f3f6c0ebca826205fbfb9539f1ca64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 502 zcmV-F-CkOoOeVkE3#)pu`j%%rMz1M8|0lgS|w<{5B%%hpwNHGMRdNoH=i z3BzQPN~X7*dMFI?>Y%#lT=$3~;@v}TFLd`K<;e7{clSYeQ%BR)L?%1}u9h=`Yc5)i zNU&Fn$_PU+wg sv+MI1=?2|Nn^k*9dByv8V%IYN0DUsQX@FNMwEzGB07*qoM6N<$g1T(inE(I) diff --git a/2d/kinematic_collision/player.png.import b/2d/kinematic_collision/player.png.import deleted file mode 100644 index a1ab22fc..00000000 --- a/2d/kinematic_collision/player.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/player.png-2dd0af52de4b213777cd8c9df94c0978.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://player.png" -dest_files=[ "res://.import/player.png-2dd0af52de4b213777cd8c9df94c0978.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/2d/kinematic_collision/player.tscn b/2d/kinematic_collision/player.tscn deleted file mode 100644 index 4e7909b1..00000000 --- a/2d/kinematic_collision/player.tscn +++ /dev/null @@ -1,17 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://player.gd" type="Script" id=1] -[ext_resource path="res://player.png" type="Texture" id=2] - -[sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 8, 8 ) - -[node name="player" type="KinematicBody2D"] -script = ExtResource( 1 ) - -[node name="sprite" type="Sprite" parent="."] -texture = ExtResource( 2 ) - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource( 1 ) - diff --git a/2d/kinematic_collision/project.godot b/2d/kinematic_collision/project.godot deleted file mode 100644 index 4049ced0..00000000 --- a/2d/kinematic_collision/project.godot +++ /dev/null @@ -1,56 +0,0 @@ -; Engine configuration file. -; It's best edited using the editor UI and not directly, -; since the parameters that go here are not all obvious. -; -; Format: -; [section] ; section goes between [] -; param=value ; assign values to parameters - -config_version=4 - -_global_script_classes=[ ] -_global_script_class_icons={ - -} - -[application] - -config/name="Kinematic Collision" -run/main_scene="res://colworld.tscn" -config/icon="res://icon.png" - -[display] - -window/stretch/mode="2d" -window/stretch/aspect="expand" - -[gdnative] - -singletons=[ ] - -[input] - -move_bottom={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) - ] -} -move_left={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) - ] -} -move_right={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) - ] -} -move_up={ -"deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) - ] -} - -[rendering] - -environment/default_clear_color=Color( 0.219608, 0.145098, 0.145098, 1 ) From 7af4d281b900828224152a8cab71e567035570c3 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 3 Feb 2020 02:05:41 -0500 Subject: [PATCH 08/10] Update 2D lighting demos Just renaming things, these contain no script. --- 2d/light2d_as_mask/lightmask.tscn | 18 ++-- .../{bg.png => background.png} | Bin .../{bg.png.import => background.png.import} | 6 +- 2d/lights_and_shadows/light_shadows.tscn | 90 +++++++++--------- 4 files changed, 57 insertions(+), 57 deletions(-) rename 2d/lights_and_shadows/{bg.png => background.png} (100%) rename 2d/lights_and_shadows/{bg.png.import => background.png.import} (70%) diff --git a/2d/light2d_as_mask/lightmask.tscn b/2d/light2d_as_mask/lightmask.tscn index 93cd4f5e..f290bdce 100644 --- a/2d/light2d_as_mask/lightmask.tscn +++ b/2d/light2d_as_mask/lightmask.tscn @@ -10,7 +10,7 @@ light_mode = 2 length = 4.0 loop = true tracks/0/type = "value" -tracks/0/path = NodePath("light1:position") +tracks/0/path = NodePath("Light1:position") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false @@ -22,7 +22,7 @@ tracks/0/keys = { "values": [ Vector2( 601.028, 242.639 ), Vector2( 318.649, 327.353 ), Vector2( 381.263, 130.915 ), Vector2( 462.294, 389.968 ) ] } tracks/1/type = "value" -tracks/1/path = NodePath("light2:position") +tracks/1/path = NodePath("Light2:position") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/imported = false @@ -34,7 +34,7 @@ tracks/1/keys = { "values": [ Vector2( 196.528, 185.139 ), Vector2( 135.142, 454.013 ), Vector2( 638.105, 334.923 ), Vector2( 331.375, 101.653 ) ] } tracks/2/type = "value" -tracks/2/path = NodePath("light3:position") +tracks/2/path = NodePath("Light3:position") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/imported = false @@ -46,7 +46,7 @@ tracks/2/keys = { "values": [ Vector2( 442.528, 411.139 ), Vector2( 635.283, 236.8 ), Vector2( 216.215, 396.815 ), Vector2( 682.96, 294.708 ) ] } -[node name="lightmask_demo" type="Control"] +[node name="Lightmask" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 2 @@ -55,7 +55,7 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="burano" type="TextureRect" parent="."] +[node name="Burano" type="TextureRect" parent="."] material = SubResource( 1 ) margin_right = 800.0 margin_bottom = 600.0 @@ -63,22 +63,22 @@ size_flags_horizontal = 2 size_flags_vertical = 2 texture = ExtResource( 1 ) -[node name="light1" type="Light2D" parent="."] +[node name="Light1" type="Light2D" parent="."] position = Vector2( 601.028, 242.639 ) texture = ExtResource( 2 ) mode = 2 -[node name="light2" type="Light2D" parent="."] +[node name="Light2" type="Light2D" parent="."] position = Vector2( 196.528, 185.139 ) texture = ExtResource( 2 ) mode = 2 -[node name="light3" type="Light2D" parent="."] +[node name="Light3" type="Light2D" parent="."] position = Vector2( 442.528, 411.139 ) texture = ExtResource( 2 ) mode = 2 -[node name="anim" type="AnimationPlayer" parent="."] +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] autoplay = "maskmotion" anims/maskmotion = SubResource( 2 ) diff --git a/2d/lights_and_shadows/bg.png b/2d/lights_and_shadows/background.png similarity index 100% rename from 2d/lights_and_shadows/bg.png rename to 2d/lights_and_shadows/background.png diff --git a/2d/lights_and_shadows/bg.png.import b/2d/lights_and_shadows/background.png.import similarity index 70% rename from 2d/lights_and_shadows/bg.png.import rename to 2d/lights_and_shadows/background.png.import index 370cc07f..5fa42254 100644 --- a/2d/lights_and_shadows/bg.png.import +++ b/2d/lights_and_shadows/background.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/bg.png-24bff804693ee063127ad100e04c5185.stex" +path="res://.import/background.png-98289422cd7d93003950872a7b97021f.stex" metadata={ "vram_texture": false } [deps] -source_file="res://bg.png" -dest_files=[ "res://.import/bg.png-24bff804693ee063127ad100e04c5185.stex" ] +source_file="res://background.png" +dest_files=[ "res://.import/background.png-98289422cd7d93003950872a7b97021f.stex" ] [params] diff --git a/2d/lights_and_shadows/light_shadows.tscn b/2d/lights_and_shadows/light_shadows.tscn index e96d810f..d6ff6293 100644 --- a/2d/lights_and_shadows/light_shadows.tscn +++ b/2d/lights_and_shadows/light_shadows.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=12 format=2] -[ext_resource path="res://bg.png" type="Texture" id=1] +[ext_resource path="res://background.png" type="Texture" id=1] [ext_resource path="res://caster.png" type="Texture" id=2] [ext_resource path="res://light.png" type="Texture" id=3] [ext_resource path="res://spot.png" type="Texture" id=4] @@ -65,124 +65,124 @@ tracks/0/keys = { "values": [ Vector2( 692.078, 29.8849 ), Vector2( 309.606, 31.5551 ), Vector2( 40.7064, 238.658 ), Vector2( 685.397, 282.082 ) ] } -[node name="base" type="Node2D"] +[node name="LightShadows" type="Node2D"] -[node name="ambient" type="CanvasModulate" parent="."] +[node name="Ambient" type="CanvasModulate" parent="."] color = Color( 0.27451, 0.27451, 0.27451, 1 ) -[node name="bg" type="Sprite" parent="."] +[node name="Background" type="Sprite" parent="."] position = Vector2( 401.251, 301.906 ) scale = Vector2( 128, 128 ) texture = ExtResource( 1 ) -[node name="casters" type="Node2D" parent="."] +[node name="Casters" type="Node2D" parent="."] -[node name="shadow_caster" type="Sprite" parent="casters"] +[node name="ShadowCaster" type="Sprite" parent="Casters"] position = Vector2( 95.2909, 85.3186 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster"] occluder = SubResource( 1 ) -[node name="shadow_caster1" type="Sprite" parent="casters"] +[node name="ShadowCaster1" type="Sprite" parent="Casters"] position = Vector2( 200.291, 313.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster1"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster1"] occluder = SubResource( 1 ) -[node name="shadow_caster2" type="Sprite" parent="casters"] +[node name="ShadowCaster2" type="Sprite" parent="Casters"] position = Vector2( 76.2909, 405.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster2"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster2"] occluder = SubResource( 1 ) -[node name="shadow_caster3" type="Sprite" parent="casters"] +[node name="ShadowCaster3" type="Sprite" parent="Casters"] position = Vector2( 348.291, 206.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster3"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster3"] occluder = SubResource( 1 ) -[node name="shadow_caster4" type="Sprite" parent="casters"] +[node name="ShadowCaster4" type="Sprite" parent="Casters"] position = Vector2( 239.291, 48.3186 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster4"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster4"] occluder = SubResource( 1 ) -[node name="shadow_caster5" type="Sprite" parent="casters"] +[node name="ShadowCaster5" type="Sprite" parent="Casters"] position = Vector2( 140.291, 561.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster5"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster5"] occluder = SubResource( 1 ) -[node name="shadow_caster6" type="Sprite" parent="casters"] +[node name="ShadowCaster6" type="Sprite" parent="Casters"] position = Vector2( 392.291, 499.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster6"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster6"] occluder = SubResource( 1 ) -[node name="shadow_caster7" type="Sprite" parent="casters"] +[node name="ShadowCaster7" type="Sprite" parent="Casters"] position = Vector2( 735.291, 552.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster7"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster7"] occluder = SubResource( 1 ) -[node name="shadow_caster8" type="Sprite" parent="casters"] +[node name="ShadowCaster8" type="Sprite" parent="Casters"] position = Vector2( 661.291, 371.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster8"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster8"] occluder = SubResource( 1 ) -[node name="shadow_caster9" type="Sprite" parent="casters"] +[node name="ShadowCaster9" type="Sprite" parent="Casters"] position = Vector2( 567.291, 574.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster9"] +[node name="occluder" type="LightOccluder2D" parent="Casters/ShadowCaster9"] occluder = SubResource( 1 ) -[node name="shadow_caster10" type="Sprite" parent="casters"] +[node name="ShadowCaster10" type="Sprite" parent="Casters"] position = Vector2( 420.291, 350.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster10"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster10"] occluder = SubResource( 1 ) -[node name="shadow_caster11" type="Sprite" parent="casters"] +[node name="ShadowCaster11" type="Sprite" parent="Casters"] position = Vector2( 463.291, 106.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster11"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster11"] occluder = SubResource( 1 ) -[node name="shadow_caster12" type="Sprite" parent="casters"] +[node name="ShadowCaster12" type="Sprite" parent="Casters"] position = Vector2( 621.291, 78.3186 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster12"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster12"] occluder = SubResource( 1 ) -[node name="shadow_caster13" type="Sprite" parent="casters"] +[node name="ShadowCaster13" type="Sprite" parent="Casters"] position = Vector2( 761.291, 240.319 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster13"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster13"] occluder = SubResource( 1 ) -[node name="shadow_caster14" type="Sprite" parent="casters"] +[node name="ShadowCaster14" type="Sprite" parent="Casters"] position = Vector2( 771.291, 29.3186 ) texture = ExtResource( 2 ) -[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster14"] +[node name="Occluder" type="LightOccluder2D" parent="Casters/ShadowCaster14"] occluder = SubResource( 1 ) -[node name="red_light" type="Light2D" parent="."] +[node name="RedLight" type="Light2D" parent="."] position = Vector2( 159.289, 452.441 ) texture = ExtResource( 3 ) color = Color( 1, 0.446392, 0.0576646, 1 ) @@ -191,16 +191,16 @@ shadow_gradient_length = 1.3 shadow_filter = 3 shadow_filter_smooth = 11.1 -[node name="blob" type="Sprite" parent="red_light"] +[node name="Blob" type="Sprite" parent="RedLight"] material = SubResource( 2 ) texture = ExtResource( 4 ) -[node name="anim" type="AnimationPlayer" parent="red_light"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="RedLight"] autoplay = "motion" anims/motion = SubResource( 3 ) anims/motion2 = SubResource( 4 ) -[node name="green_light" type="Light2D" parent="."] +[node name="GreenLight" type="Light2D" parent="."] position = Vector2( 753.756, 314.336 ) texture = ExtResource( 3 ) color = Color( 0.49247, 0.878537, 0.409146, 1 ) @@ -209,17 +209,17 @@ shadow_gradient_length = 1.2 shadow_filter = 3 shadow_filter_smooth = 7.1 -[node name="blob" type="Sprite" parent="green_light"] +[node name="blob" type="Sprite" parent="GreenLight"] material = SubResource( 5 ) texture = ExtResource( 4 ) -[node name="anim" type="AnimationPlayer" parent="green_light"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="GreenLight"] autoplay = "m2" anims/m2 = SubResource( 4 ) anims/motion = SubResource( 3 ) -[node name="blue_light" type="Light2D" parent="."] -position = Vector2( 692.078, 29.8849 ) +[node name="BlueLight" type="Light2D" parent="."] +position = Vector2( 692.078, 31.1773 ) texture = ExtResource( 3 ) color = Color( 0.396752, 0.446392, 0.929792, 1 ) shadow_enabled = true @@ -227,11 +227,11 @@ shadow_gradient_length = 1.4 shadow_filter = 3 shadow_filter_smooth = 5.3 -[node name="blob" type="Sprite" parent="blue_light"] +[node name="blob" type="Sprite" parent="BlueLight"] material = SubResource( 6 ) texture = ExtResource( 4 ) -[node name="anim" type="AnimationPlayer" parent="blue_light"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="BlueLight"] autoplay = "motion3" anims/motion = SubResource( 3 ) anims/motion2 = SubResource( 4 ) From b0e1cc022711a31bd550da75fca5948c9989ca52 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 3 Feb 2020 02:36:35 -0500 Subject: [PATCH 09/10] Update 2D navigation demos --- 2d/navigation/navigation.gd | 46 ++-- 2d/navigation_astar/Game.tscn | 2 +- 2d/navigation_astar/character.gd | 50 ++-- 2d/navigation_astar/pathfind_astar.gd | 252 +++++++++--------- .../tileset/tileset_source.tscn | 3 +- 5 files changed, 174 insertions(+), 179 deletions(-) diff --git a/2d/navigation/navigation.gd b/2d/navigation/navigation.gd index 27523c10..336e7130 100644 --- a/2d/navigation/navigation.gd +++ b/2d/navigation/navigation.gd @@ -1,46 +1,44 @@ extends Navigation2D -export(float) var CHARACTER_SPEED = 400.0 +export(float) var character_speed = 400.0 var path = [] +func _process(delta): + var walk_distance = character_speed * delta + move_along_path(walk_distance) + + # The 'click' event is a custom input action defined in -# Project > Project Settings > Input Map tab +# Project > Project Settings > Input Map tab. func _input(event): - if not event.is_action_pressed('click'): + if not event.is_action_pressed("click"): return _update_navigation_path($Character.position, get_local_mouse_position()) -func _update_navigation_path(start_position, end_position): - # get_simple_path is part of the Navigation2D class - # it returns a PoolVector2Array of points that lead you from the - # start_position to the end_position - path = get_simple_path(start_position, end_position, true) - # The first point is always the start_position - # We don't need it in this example as it corresponds to the character's position - path.remove(0) - set_process(true) - - -func _process(delta): - var walk_distance = CHARACTER_SPEED * delta - move_along_path(walk_distance) - - func move_along_path(distance): 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 + # 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) return - - # the position is past the end of the segment + # 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 + # The character reached the end of the path. $Character.position = last_point set_process(false) + + +func _update_navigation_path(start_position, end_position): + # get_simple_path is part of the Navigation2D class. + # It returns a PoolVector2Array of points that lead you + # from the start_position to the end_position. + path = get_simple_path(start_position, end_position, true) + # The first point is always the start_position. + # We don't need it in this example as it corresponds to the character's position. + path.remove(0) + set_process(true) diff --git a/2d/navigation_astar/Game.tscn b/2d/navigation_astar/Game.tscn index b2a44a43..2bd5269c 100644 --- a/2d/navigation_astar/Game.tscn +++ b/2d/navigation_astar/Game.tscn @@ -5,7 +5,7 @@ [ext_resource path="res://character.gd" type="Script" id=3] [ext_resource path="res://sprites/character.png" type="Texture" id=4] -[node name="Game" type="Node"] +[node name="Game" type="Node2D"] [node name="TileMap" type="TileMap" parent="."] tile_set = ExtResource( 1 ) diff --git a/2d/navigation_astar/character.gd b/2d/navigation_astar/character.gd index e1d4e951..b29122ab 100644 --- a/2d/navigation_astar/character.gd +++ b/2d/navigation_astar/character.gd @@ -1,8 +1,8 @@ extends Position2D -export(float) var SPEED = 200.0 +enum States { IDLE, FOLLOW } -enum STATES { IDLE, FOLLOW } +export(float) var speed = 200.0 var _state = null var path = [] @@ -12,38 +12,35 @@ var target_position = Vector2() var velocity = Vector2() func _ready(): - _change_state(STATES.IDLE) - - -func _change_state(new_state): - if new_state == STATES.FOLLOW: - path = get_parent().get_node('TileMap')._get_path(position, target_position) - 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 - target_point_world = path[1] - _state = new_state + _change_state(States.IDLE) func _process(_delta): - if not _state == STATES.FOLLOW: + if not _state == States.FOLLOW: return var arrived_to_next_point = move_to(target_point_world) if arrived_to_next_point: path.remove(0) if len(path) == 0: - _change_state(STATES.IDLE) + _change_state(States.IDLE) return target_point_world = path[0] +func _input(event): + if event.is_action_pressed("click"): + if Input.is_key_pressed(KEY_SHIFT): + global_position = get_global_mouse_position() + else: + target_position = get_global_mouse_position() + _change_state(States.FOLLOW) + + func move_to(world_position): var MASS = 10.0 var ARRIVE_DISTANCE = 10.0 - var desired_velocity = (world_position - position).normalized() * SPEED + var desired_velocity = (world_position - position).normalized() * speed var steering = desired_velocity - velocity velocity += steering / MASS position += velocity * get_process_delta_time() @@ -51,10 +48,13 @@ func move_to(world_position): return position.distance_to(world_position) < ARRIVE_DISTANCE -func _input(event): - if event.is_action_pressed('click'): - if Input.is_key_pressed(KEY_SHIFT): - global_position = get_global_mouse_position() - else: - target_position = get_global_mouse_position() - _change_state(STATES.FOLLOW) +func _change_state(new_state): + if new_state == States.FOLLOW: + path = get_parent().get_node("TileMap")._get_path(position, target_position) + 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 + target_point_world = path[1] + _state = new_state diff --git a/2d/navigation_astar/pathfind_astar.gd b/2d/navigation_astar/pathfind_astar.gd index 21fddfd2..30e6afc0 100644 --- a/2d/navigation_astar/pathfind_astar.gd +++ b/2d/navigation_astar/pathfind_astar.gd @@ -1,22 +1,22 @@ extends TileMap -# You can only create an AStar node from code, not from the Scene tab -onready var astar_node = AStar.new() -# The Tilemap node doesn't have clear bounds so we're defining the map's limits here +const BASE_LINE_WIDTH = 3.0 +const DRAW_COLOR = Color.white + +# The Tilemap node doesn't have clear bounds so we're defining the map's limits here. export(Vector2) var map_size = Vector2(16, 16) -# The path start and end variables use setter methods -# You can find them at the bottom of the script +# The path start and end variables use setter methods. +# You can find them at the bottom of the script. var path_start_position = Vector2() setget _set_path_start_position var path_end_position = Vector2() setget _set_path_end_position var _point_path = [] -const BASE_LINE_WIDTH = 3.0 -const DRAW_COLOR = Color('#fff') - -# get_used_cells_by_id is a method from the TileMap node -# here the id 0 corresponds to the grey tile, the obstacles +# You can only create an AStar node from code, not from the Scene tab. +onready var astar_node = AStar.new() +# get_used_cells_by_id is a method from the TileMap node. +# Here the id 0 corresponds to the grey tile, the obstacles. onready var obstacles = get_used_cells_by_id(0) onready var _half_cell_size = cell_size / 2 @@ -25,123 +25,6 @@ func _ready(): astar_connect_walkable_cells(walkable_cells_list) -# Click and Shift force the start and end position of the path to update -# and the node to redraw everything -#func _input(event): -# if event.is_action_pressed('click') and Input.is_key_pressed(KEY_SHIFT): -# # To call the setter method from this script we have to use the explicit self. -# self.path_start_position = world_to_map(get_global_mouse_position()) -# elif event.is_action_pressed('click'): -# self.path_end_position = world_to_map(get_global_mouse_position()) - - -# Loops through all cells within the map's bounds and -# adds all points to the astar_node, except the obstacles -func astar_add_walkable_cells(obstacles = []): - var points_array = [] - for y in range(map_size.y): - for x in range(map_size.x): - var point = Vector2(x, y) - if point in obstacles: - continue - - points_array.append(point) - # The AStar class references points with indices - # Using a function to calculate the index from a point's coordinates - # ensures we always get the same index with the same input point - var point_index = calculate_point_index(point) - # AStar works for both 2d and 3d, so we have to convert the point - # coordinates from and to Vector3s - astar_node.add_point(point_index, Vector3(point.x, point.y, 0.0)) - return points_array - - -# Once you added all points to the AStar node, you've got to connect them -# The points don't have to be on a grid: you can use this class -# to create walkable graphs however you'd like -# It's a little harder to code at first, but works for 2d, 3d, -# orthogonal grids, hex grids, tower defense games... -func astar_connect_walkable_cells(points_array): - for point in points_array: - var point_index = calculate_point_index(point) - # For every cell in the map, we check the one to the top, right. - # left and bottom of it. If it's in the map and not an obstalce, - # We connect the current point with it - var points_relative = PoolVector2Array([ - Vector2(point.x + 1, point.y), - Vector2(point.x - 1, point.y), - Vector2(point.x, point.y + 1), - Vector2(point.x, point.y - 1)]) - for point_relative in points_relative: - var point_relative_index = calculate_point_index(point_relative) - - if is_outside_map_bounds(point_relative): - continue - if not astar_node.has_point(point_relative_index): - continue - # Note the 3rd argument. It tells the astar_node that we want the - # connection to be bilateral: from point A to B and B to A - # If you set this value to false, it becomes a one-way path - # As we loop through all points we can set it to false - astar_node.connect_points(point_index, point_relative_index, false) - - -# This is a variation of the method above -# It connects cells horizontally, vertically AND diagonally -func astar_connect_walkable_cells_diagonal(points_array): - for point in points_array: - var point_index = calculate_point_index(point) - for local_y in range(3): - for local_x in range(3): - var point_relative = Vector2(point.x + local_x - 1, point.y + local_y - 1) - var point_relative_index = calculate_point_index(point_relative) - - if point_relative == point or is_outside_map_bounds(point_relative): - continue - if not astar_node.has_point(point_relative_index): - continue - astar_node.connect_points(point_index, point_relative_index, true) - - -func is_outside_map_bounds(point): - return point.x < 0 or point.y < 0 or point.x >= map_size.x or point.y >= map_size.y - - -func calculate_point_index(point): - return point.x + map_size.x * point.y - - -func _get_path(world_start, world_end): - self.path_start_position = world_to_map(world_start) - self.path_end_position = world_to_map(world_end) - _recalculate_path() - var path_world = [] - for point in _point_path: - var point_world = map_to_world(Vector2(point.x, point.y)) + _half_cell_size - path_world.append(point_world) - return path_world - - -func _recalculate_path(): - clear_previous_path_drawing() - var start_point_index = calculate_point_index(path_start_position) - var end_point_index = calculate_point_index(path_end_position) - # This method gives us an array of points. Note you need the start and end - # points' indices as input - _point_path = astar_node.get_point_path(start_point_index, end_point_index) - # Redraw the lines and circles from the start to the end point - update() - - -func clear_previous_path_drawing(): - if not _point_path: - return - var point_start = _point_path[0] - var point_end = _point_path[len(_point_path) - 1] - set_cell(point_start.x, point_start.y, -1) - set_cell(point_end.x, point_end.y, -1) - - func _draw(): if not _point_path: return @@ -159,6 +42,121 @@ func _draw(): last_point = current_point +# Click and Shift force the start and end position of the path to update, +# and the node to redraw everything. +#func _input(event): +# if event.is_action_pressed('click') and Input.is_key_pressed(KEY_SHIFT): +# # To call the setter method from this script we have to use the explicit self. +# self.path_start_position = world_to_map(get_global_mouse_position()) +# elif event.is_action_pressed('click'): +# self.path_end_position = world_to_map(get_global_mouse_position()) + + +# Loops through all cells within the map's bounds and +# adds all points to the astar_node, except the obstacles. +func astar_add_walkable_cells(obstacle_list = []): + var points_array = [] + for y in range(map_size.y): + for x in range(map_size.x): + var point = Vector2(x, y) + if point in obstacle_list: + continue + + points_array.append(point) + # The AStar class references points with indices. + # Using a function to calculate the index from a point's coordinates + # ensures we always get the same index with the same input point. + var point_index = calculate_point_index(point) + # AStar works for both 2d and 3d, so we have to convert the point + # coordinates from and to Vector3s. + astar_node.add_point(point_index, Vector3(point.x, point.y, 0.0)) + return points_array + + +# Once you added all points to the AStar node, you've got to connect them. +# The points don't have to be on a grid: you can use this class +# to create walkable graphs however you'd like. +# It's a little harder to code at first, but works for 2d, 3d, +# orthogonal grids, hex grids, tower defense games... +func astar_connect_walkable_cells(points_array): + for point in points_array: + var point_index = calculate_point_index(point) + # For every cell in the map, we check the one to the top, right. + # left and bottom of it. If it's in the map and not an obstalce. + # We connect the current point with it. + var points_relative = PoolVector2Array([ + Vector2(point.x + 1, point.y), + Vector2(point.x - 1, point.y), + Vector2(point.x, point.y + 1), + Vector2(point.x, point.y - 1)]) + for point_relative in points_relative: + var point_relative_index = calculate_point_index(point_relative) + if is_outside_map_bounds(point_relative): + continue + if not astar_node.has_point(point_relative_index): + continue + # Note the 3rd argument. It tells the astar_node that we want the + # connection to be bilateral: from point A to B and B to A. + # If you set this value to false, it becomes a one-way path. + # As we loop through all points we can set it to false. + astar_node.connect_points(point_index, point_relative_index, false) + + +# This is a variation of the method above. +# It connects cells horizontally, vertically AND diagonally. +func astar_connect_walkable_cells_diagonal(points_array): + for point in points_array: + var point_index = calculate_point_index(point) + for local_y in range(3): + for local_x in range(3): + var point_relative = Vector2(point.x + local_x - 1, point.y + local_y - 1) + var point_relative_index = calculate_point_index(point_relative) + if point_relative == point or is_outside_map_bounds(point_relative): + continue + if not astar_node.has_point(point_relative_index): + continue + astar_node.connect_points(point_index, point_relative_index, true) + + +func calculate_point_index(point): + return point.x + map_size.x * point.y + + +func clear_previous_path_drawing(): + if not _point_path: + return + var point_start = _point_path[0] + var point_end = _point_path[len(_point_path) - 1] + set_cell(point_start.x, point_start.y, -1) + set_cell(point_end.x, point_end.y, -1) + + +func is_outside_map_bounds(point): + return point.x < 0 or point.y < 0 or point.x >= map_size.x or point.y >= map_size.y + + +func _get_path(world_start, world_end): + self.path_start_position = world_to_map(world_start) + self.path_end_position = world_to_map(world_end) + _recalculate_path() + var path_world = [] + for point in _point_path: + var point_world = map_to_world(Vector2(point.x, point.y)) + _half_cell_size + path_world.append(point_world) + return path_world + + +func _recalculate_path(): + clear_previous_path_drawing() + var start_point_index = calculate_point_index(path_start_position) + var end_point_index = calculate_point_index(path_end_position) + # This method gives us an array of points. Note you need the start and + # end points' indices as input. + _point_path = astar_node.get_point_path(start_point_index, end_point_index) + # Redraw the lines and circles from the start to the end point. + update() + + # Setters for the start and end path values. func _set_path_start_position(value): if value in obstacles: diff --git a/2d/navigation_astar/tileset/tileset_source.tscn b/2d/navigation_astar/tileset/tileset_source.tscn index 1a9ee15b..a4a4307b 100644 --- a/2d/navigation_astar/tileset/tileset_source.tscn +++ b/2d/navigation_astar/tileset/tileset_source.tscn @@ -4,7 +4,7 @@ [ext_resource path="res://sprites/path_start.png" type="Texture" id=2] [ext_resource path="res://sprites/path_end.png" type="Texture" id=3] -[node name="Node2D" type="Node2D"] +[node name="Tileset" type="Node2D"] [node name="Obstacle" type="Sprite" parent="."] position = Vector2( 32, 32 ) @@ -17,4 +17,3 @@ texture = ExtResource( 2 ) [node name="PathEnd" type="Sprite" parent="."] position = Vector2( 192, 32 ) texture = ExtResource( 3 ) - From 87f42b77e0642e572e1aa337c1e3fa706382c7b7 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 3 Feb 2020 03:53:07 -0500 Subject: [PATCH 10/10] Update 2D shader and SDF demos --- 2d/screen_space_shaders/screen_shaders.gd | 21 ++++----- 2d/screen_space_shaders/screen_shaders.tscn | 46 +++++++++---------- 2d/screen_space_shaders/shaders/BCS.shader | 1 - 2d/screen_space_shaders/shaders/blur.shader | 3 +- .../shaders/contrasted.shader | 1 - 2d/screen_space_shaders/shaders/mirage.shader | 1 - .../shaders/negative.shader | 1 - .../shaders/old_film.shader | 3 +- 2d/screen_space_shaders/shaders/sepia.shader | 4 -- .../shaders/vignette.shader | 2 +- 2d/sdf_font/project.godot | 2 +- 2d/sdf_font/{sdf.tscn => sdf_font_demo.tscn} | 10 ++-- 2d/sprite_shaders/shaders/aura.shader | 4 +- 2d/sprite_shaders/shaders/dropshadow.shader | 2 +- 2d/sprite_shaders/shaders/fatty.shader | 2 +- 2d/sprite_shaders/shaders/outline.shader | 2 +- 2d/sprite_shaders/shaders/silouette.shader | 2 +- 2d/sprite_shaders/sprite_shaders.tscn | 22 ++++----- 18 files changed, 59 insertions(+), 70 deletions(-) rename 2d/sdf_font/{sdf.tscn => sdf_font_demo.tscn} (85%) diff --git a/2d/screen_space_shaders/screen_shaders.gd b/2d/screen_space_shaders/screen_shaders.gd index 2163d950..414941bf 100644 --- a/2d/screen_space_shaders/screen_shaders.gd +++ b/2d/screen_space_shaders/screen_shaders.gd @@ -1,24 +1,23 @@ extends Control - func _ready(): - for c in $pictures.get_children(): - $picture.add_item("PIC: " + c.get_name()) - for c in get_node("effects").get_children(): - $effect.add_item("FX: " + c.get_name()) + for c in $Pictures.get_children(): + $Picture.add_item("PIC: " + c.get_name()) + for c in $Effects.get_children(): + $Effect.add_item("FX: " + c.get_name()) func _on_picture_item_selected(ID): - for c in range($pictures.get_child_count()): + for c in range($Pictures.get_child_count()): if ID == c: - $pictures.get_child(c).show() + $Pictures.get_child(c).show() else: - $pictures.get_child(c).hide() + $Pictures.get_child(c).hide() func _on_effect_item_selected(ID): - for c in range($effects.get_child_count()): + for c in range($Effects.get_child_count()): if ID == c: - $effects.get_child(c).show() + $Effects.get_child(c).show() else: - $effects.get_child(c).hide() + $Effects.get_child(c).hide() diff --git a/2d/screen_space_shaders/screen_shaders.tscn b/2d/screen_space_shaders/screen_shaders.tscn index 135ceabe..8c4b2180 100644 --- a/2d/screen_space_shaders/screen_shaders.tscn +++ b/2d/screen_space_shaders/screen_shaders.tscn @@ -71,27 +71,27 @@ shader_param/flashing = 0.01 shader_param/grain = ExtResource( 19 ) shader_param/vignette = ExtResource( 7 ) -[node name="Control" type="Control"] +[node name="ScreenShaders" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 2 size_flags_vertical = 2 script = ExtResource( 1 ) -[node name="pictures" type="Control" parent="."] +[node name="Pictures" type="Control" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 2 size_flags_vertical = 2 -[node name="burano" type="TextureRect" parent="pictures"] +[node name="Burano" type="TextureRect" parent="Pictures"] margin_right = 40.0 margin_bottom = 40.0 size_flags_horizontal = 2 size_flags_vertical = 2 texture = ExtResource( 2 ) -[node name="roby" type="TextureRect" parent="pictures"] +[node name="Roby" type="TextureRect" parent="Pictures"] visible = false margin_right = 40.0 margin_bottom = 40.0 @@ -99,7 +99,7 @@ size_flags_horizontal = 2 size_flags_vertical = 2 texture = ExtResource( 3 ) -[node name="mountains" type="TextureRect" parent="pictures"] +[node name="Mountains" type="TextureRect" parent="Pictures"] visible = false margin_right = 40.0 margin_bottom = 40.0 @@ -107,7 +107,7 @@ size_flags_horizontal = 2 size_flags_vertical = 2 texture = ExtResource( 4 ) -[node name="forest" type="TextureRect" parent="pictures"] +[node name="Forest" type="TextureRect" parent="Pictures"] visible = false margin_right = 40.0 margin_bottom = 40.0 @@ -115,20 +115,20 @@ size_flags_horizontal = 2 size_flags_vertical = 2 texture = ExtResource( 5 ) -[node name="effects" type="Control" parent="."] +[node name="Effects" type="Control" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 2 size_flags_vertical = 2 -[node name="disabled" type="Control" parent="effects"] +[node name="Disabled" type="Control" parent="Effects"] visible = false margin_right = 40.0 margin_bottom = 40.0 size_flags_horizontal = 2 size_flags_vertical = 2 -[node name="vignette" type="TextureRect" parent="effects"] +[node name="Vignette" type="TextureRect" parent="Effects"] visible = false material = SubResource( 1 ) anchor_right = 1.0 @@ -138,7 +138,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="blur" type="TextureRect" parent="effects"] +[node name="Blur" type="TextureRect" parent="Effects"] visible = false material = SubResource( 2 ) anchor_right = 1.0 @@ -148,7 +148,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="pixelize" type="TextureRect" parent="effects"] +[node name="Pixelize" type="TextureRect" parent="Effects"] visible = false material = SubResource( 3 ) anchor_right = 1.0 @@ -158,7 +158,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="whirl" type="TextureRect" parent="effects"] +[node name="Whirl" type="TextureRect" parent="Effects"] visible = false material = SubResource( 4 ) anchor_right = 1.0 @@ -168,7 +168,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="sepia" type="TextureRect" parent="effects"] +[node name="Sepia" type="TextureRect" parent="Effects"] visible = false material = SubResource( 5 ) anchor_right = 1.0 @@ -180,7 +180,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="negative" type="TextureRect" parent="effects"] +[node name="Negative" type="TextureRect" parent="Effects"] visible = false material = SubResource( 6 ) anchor_right = 1.0 @@ -190,7 +190,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="contrasted" type="TextureRect" parent="effects"] +[node name="Contrasted" type="TextureRect" parent="Effects"] visible = false material = SubResource( 7 ) anchor_right = 1.0 @@ -200,7 +200,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="normalized" type="TextureRect" parent="effects"] +[node name="Normalized" type="TextureRect" parent="Effects"] visible = false material = SubResource( 8 ) anchor_right = 1.0 @@ -210,7 +210,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="BCS" type="TextureRect" parent="effects"] +[node name="BCS" type="TextureRect" parent="Effects"] visible = false material = SubResource( 9 ) anchor_right = 1.0 @@ -222,7 +222,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="mirage" type="TextureRect" parent="effects"] +[node name="Mirage" type="TextureRect" parent="Effects"] visible = false material = SubResource( 10 ) anchor_right = 1.0 @@ -232,7 +232,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="old_film" type="TextureRect" parent="effects"] +[node name="OldFilm" type="TextureRect" parent="Effects"] visible = false material = SubResource( 11 ) anchor_right = 1.0 @@ -244,7 +244,7 @@ size_flags_vertical = 2 texture = ExtResource( 8 ) expand = true -[node name="picture" type="OptionButton" parent="."] +[node name="Picture" type="OptionButton" parent="."] margin_left = 8.0 margin_top = 7.0 margin_right = 131.0 @@ -252,12 +252,12 @@ margin_bottom = 28.0 size_flags_horizontal = 2 size_flags_vertical = 2 -[node name="effect" type="OptionButton" parent="."] +[node name="Effect" type="OptionButton" parent="."] margin_left = 137.0 margin_top = 7.0 margin_right = 260.0 margin_bottom = 28.0 size_flags_horizontal = 2 size_flags_vertical = 2 -[connection signal="item_selected" from="picture" to="." method="_on_picture_item_selected"] -[connection signal="item_selected" from="effect" to="." method="_on_effect_item_selected"] +[connection signal="item_selected" from="Picture" to="." method="_on_picture_item_selected"] +[connection signal="item_selected" from="Effect" to="." method="_on_effect_item_selected"] diff --git a/2d/screen_space_shaders/shaders/BCS.shader b/2d/screen_space_shaders/shaders/BCS.shader index f7775107..9cf101f8 100644 --- a/2d/screen_space_shaders/shaders/BCS.shader +++ b/2d/screen_space_shaders/shaders/BCS.shader @@ -5,7 +5,6 @@ uniform float contrast = 1.5; uniform float saturation = 1.8; void fragment() { - vec3 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0).rgb; c.rgb = mix(vec3(0.0), c.rgb, brightness); diff --git a/2d/screen_space_shaders/shaders/blur.shader b/2d/screen_space_shaders/shaders/blur.shader index a8e2ef3d..116091ec 100644 --- a/2d/screen_space_shaders/shaders/blur.shader +++ b/2d/screen_space_shaders/shaders/blur.shader @@ -1,8 +1,7 @@ shader_type canvas_item; -uniform float amount : hint_range(0.0, 5.0); +uniform float amount: hint_range(0.0, 5.0); void fragment() { - COLOR.rgb = textureLod(SCREEN_TEXTURE, SCREEN_UV, amount).rgb; } diff --git a/2d/screen_space_shaders/shaders/contrasted.shader b/2d/screen_space_shaders/shaders/contrasted.shader index c20e51eb..d5eeef4d 100644 --- a/2d/screen_space_shaders/shaders/contrasted.shader +++ b/2d/screen_space_shaders/shaders/contrasted.shader @@ -1,7 +1,6 @@ shader_type canvas_item; void fragment() { - vec3 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0).rgb; c = mod(c + vec3(0.5), vec3(1.0)); COLOR.rgb = c; diff --git a/2d/screen_space_shaders/shaders/mirage.shader b/2d/screen_space_shaders/shaders/mirage.shader index e2341a20..2b947a7a 100644 --- a/2d/screen_space_shaders/shaders/mirage.shader +++ b/2d/screen_space_shaders/shaders/mirage.shader @@ -4,7 +4,6 @@ uniform float frequency = 60; uniform float depth = 0.005; void fragment() { - vec2 uv = SCREEN_UV; uv.x += sin(uv.y * frequency + TIME) * depth; uv.x = clamp(uv.x, 0.0, 1.0); diff --git a/2d/screen_space_shaders/shaders/negative.shader b/2d/screen_space_shaders/shaders/negative.shader index c52d2117..ecc4b32c 100644 --- a/2d/screen_space_shaders/shaders/negative.shader +++ b/2d/screen_space_shaders/shaders/negative.shader @@ -1,7 +1,6 @@ shader_type canvas_item; void fragment() { - vec3 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0).rgb; c = vec3(1.0) - c; COLOR.rgb = c; diff --git a/2d/screen_space_shaders/shaders/old_film.shader b/2d/screen_space_shaders/shaders/old_film.shader index 4cd378ce..b9565ad6 100644 --- a/2d/screen_space_shaders/shaders/old_film.shader +++ b/2d/screen_space_shaders/shaders/old_film.shader @@ -1,6 +1,6 @@ shader_type canvas_item; -uniform vec4 base : hint_color; +uniform vec4 base: hint_color; uniform sampler2D grain; uniform float grain_strength = 0.3; uniform sampler2D vignette; @@ -9,7 +9,6 @@ uniform float stretch = 0.5; uniform float flashing = 0.01; float make_grain(float time, vec2 uv) { - vec2 ofs = vec2(sin(41.0 * time * sin(time * 123.0)), sin(27.0 * time * sin(time * 312.0))); return texture(grain, (uv + mod(ofs, vec2(1.0, 1.0))) * stretch).r; } diff --git a/2d/screen_space_shaders/shaders/sepia.shader b/2d/screen_space_shaders/shaders/sepia.shader index ec624c6e..1d3b546b 100644 --- a/2d/screen_space_shaders/shaders/sepia.shader +++ b/2d/screen_space_shaders/shaders/sepia.shader @@ -4,11 +4,7 @@ uniform vec4 base : hint_color; void fragment() { vec3 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0).rgb; - - //float v = max(c.r, max(c.g, c.b)); float v = dot(c, vec3(0.33333, 0.33333, 0.33333)); v = sqrt(v); - //v *= v; COLOR.rgb = base.rgb * v; - } diff --git a/2d/screen_space_shaders/shaders/vignette.shader b/2d/screen_space_shaders/shaders/vignette.shader index 32578acf..2471041c 100644 --- a/2d/screen_space_shaders/shaders/vignette.shader +++ b/2d/screen_space_shaders/shaders/vignette.shader @@ -4,7 +4,7 @@ uniform sampler2D vignette; void fragment() { vec3 vignette_color = texture(vignette, UV).rgb; - // Screen texture stores gaussian blurred copies on mipmaps + // Screen texture stores gaussian blurred copies on mipmaps. COLOR.rgb = textureLod(SCREEN_TEXTURE, SCREEN_UV, (1.0 - vignette_color.r) * 4.0).rgb; COLOR.rgb *= texture(vignette, UV).rgb; } diff --git a/2d/sdf_font/project.godot b/2d/sdf_font/project.godot index 8f0f52b6..90e17deb 100644 --- a/2d/sdf_font/project.godot +++ b/2d/sdf_font/project.godot @@ -16,7 +16,7 @@ _global_script_class_icons={ [application] config/name="Signed Distance Field Font Demo" -run/main_scene="res://sdf.tscn" +run/main_scene="res://sdf_font_demo.tscn" config/icon="res://icon.png" [display] diff --git a/2d/sdf_font/sdf.tscn b/2d/sdf_font/sdf_font_demo.tscn similarity index 85% rename from 2d/sdf_font/sdf.tscn rename to 2d/sdf_font/sdf_font_demo.tscn index d2b4834b..e29d7b1b 100644 --- a/2d/sdf_font/sdf.tscn +++ b/2d/sdf_font/sdf_font_demo.tscn @@ -34,21 +34,21 @@ tracks/0/keys = { "values": [ Vector2( 1, 1 ), Vector2( 7, 7 ) ] } -[node name="Root Node" type="Node2D"] +[node name="SDFFontDemo" type="Node2D"] -[node name="base" type="Position2D" parent="."] +[node name="Base" type="Position2D" parent="."] position = Vector2( 500, 300 ) -[node name="rotate" type="AnimationPlayer" parent="base"] +[node name="Rotate" type="AnimationPlayer" parent="Base"] autoplay = "rotate" anims/rotate = SubResource( 1 ) anims/zoomin_zoomout = SubResource( 2 ) -[node name="zoom" type="AnimationPlayer" parent="base"] +[node name="Zoom" type="AnimationPlayer" parent="Base"] autoplay = "zoomin_zoomout" anims/zoomin_zoomout = SubResource( 2 ) -[node name="Label" type="Label" parent="base"] +[node name="Label" type="Label" parent="Base"] margin_left = -169.0 margin_top = -49.0 margin_right = 172.0 diff --git a/2d/sprite_shaders/shaders/aura.shader b/2d/sprite_shaders/shaders/aura.shader index d22787f4..15a477da 100644 --- a/2d/sprite_shaders/shaders/aura.shader +++ b/2d/sprite_shaders/shaders/aura.shader @@ -1,9 +1,9 @@ shader_type canvas_item; render_mode blend_premul_alpha; -// This shader only works properly with premultiplied alpha blend mode +// This shader only works properly with premultiplied alpha blend mode. uniform float aura_width = 2.0; -uniform vec4 aura_color : hint_color; +uniform vec4 aura_color: hint_color; void fragment() { vec4 col = texture(TEXTURE, UV); diff --git a/2d/sprite_shaders/shaders/dropshadow.shader b/2d/sprite_shaders/shaders/dropshadow.shader index 9ee354ab..2ed01a2d 100644 --- a/2d/sprite_shaders/shaders/dropshadow.shader +++ b/2d/sprite_shaders/shaders/dropshadow.shader @@ -2,7 +2,7 @@ shader_type canvas_item; render_mode blend_mix; uniform float radius = 5.0; -uniform vec4 modulate : hint_color; +uniform vec4 modulate: hint_color; void fragment() { vec2 ps = TEXTURE_PIXEL_SIZE; diff --git a/2d/sprite_shaders/shaders/fatty.shader b/2d/sprite_shaders/shaders/fatty.shader index 15de5df0..7f8cf39b 100644 --- a/2d/sprite_shaders/shaders/fatty.shader +++ b/2d/sprite_shaders/shaders/fatty.shader @@ -6,7 +6,7 @@ uniform float fattyness = 2.0; void fragment() { vec2 ruv = UV - vec2(0.5, 0.5); vec2 dir = normalize(ruv); - float len = length(ruv); + float len = length(ruv); len = pow(len * 2.0, fattyness) * 0.5; ruv = len * dir; diff --git a/2d/sprite_shaders/shaders/outline.shader b/2d/sprite_shaders/shaders/outline.shader index 9f2cad9c..ada5725c 100644 --- a/2d/sprite_shaders/shaders/outline.shader +++ b/2d/sprite_shaders/shaders/outline.shader @@ -1,7 +1,7 @@ shader_type canvas_item; uniform float outline_width = 2.0; -uniform vec4 outline_color : hint_color; +uniform vec4 outline_color: hint_color; void fragment() { vec4 col = texture(TEXTURE, UV); diff --git a/2d/sprite_shaders/shaders/silouette.shader b/2d/sprite_shaders/shaders/silouette.shader index de769315..d05bb7ef 100644 --- a/2d/sprite_shaders/shaders/silouette.shader +++ b/2d/sprite_shaders/shaders/silouette.shader @@ -1,7 +1,7 @@ shader_type canvas_item; render_mode blend_mix; -uniform vec4 modulate : hint_color; +uniform vec4 modulate: hint_color; void fragment() { COLOR = vec4(modulate.rgb, texture(TEXTURE, UV).a * modulate.a); diff --git a/2d/sprite_shaders/sprite_shaders.tscn b/2d/sprite_shaders/sprite_shaders.tscn index 51b28bc1..a7a53400 100644 --- a/2d/sprite_shaders/sprite_shaders.tscn +++ b/2d/sprite_shaders/sprite_shaders.tscn @@ -59,57 +59,57 @@ shader_param/amount = 0.5 shader = ExtResource( 10 ) shader_param/amount = 4.0 -[node name="shaders" type="Node2D"] +[node name="SpriteShaders" type="Node2D"] material = SubResource( 1 ) position = Vector2( 263.737, 179.444 ) scale = Vector2( 0.3, 0.3 ) -[node name="normal" type="Sprite" parent="."] +[node name="Normal" type="Sprite" parent="."] material = SubResource( 2 ) position = Vector2( -2.16144, 0 ) texture = ExtResource( 2 ) -[node name="outline" type="Sprite" parent="."] +[node name="Outline" type="Sprite" parent="."] material = SubResource( 3 ) position = Vector2( 400, 0 ) texture = ExtResource( 2 ) -[node name="aura" type="Sprite" parent="."] +[node name="Aura" type="Sprite" parent="."] material = SubResource( 4 ) position = Vector2( 800, 0 ) texture = ExtResource( 2 ) -[node name="blur" type="Sprite" parent="."] +[node name="Blur" type="Sprite" parent="."] material = SubResource( 5 ) position = Vector2( 1200, 0 ) texture = ExtResource( 2 ) -[node name="fatty" type="Sprite" parent="."] +[node name="Fatty" type="Sprite" parent="."] material = SubResource( 6 ) position = Vector2( 1600, 0 ) texture = ExtResource( 2 ) -[node name="dropshadow" type="Sprite" parent="."] +[node name="DropShadow" type="Sprite" parent="."] material = SubResource( 7 ) position = Vector2( 0, 800 ) texture = ExtResource( 2 ) -[node name="offsetshadow" type="Sprite" parent="."] +[node name="OffsetShadow" type="Sprite" parent="."] material = SubResource( 8 ) position = Vector2( 400, 800 ) texture = ExtResource( 2 ) -[node name="silouette" type="Sprite" parent="."] +[node name="Silouette" type="Sprite" parent="."] material = SubResource( 9 ) position = Vector2( 800, 800 ) texture = ExtResource( 2 ) -[node name="glow" type="Sprite" parent="."] +[node name="Glow" type="Sprite" parent="."] material = SubResource( 10 ) position = Vector2( 1200, 800 ) texture = ExtResource( 2 ) -[node name="dissintegrate" type="Sprite" parent="."] +[node name="Disintegrate" type="Sprite" parent="."] material = SubResource( 11 ) position = Vector2( 1600, 800 ) texture = ExtResource( 2 )