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/kinematic_collision/icon.png.import b/2d/gd_paint/icon.png.import similarity index 100% rename from 2d/kinematic_collision/icon.png.import rename to 2d/gd_paint/icon.png.import 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 ) - 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="."] diff --git a/2d/hexagonal_map/icon.png b/2d/hexagonal_map/icon.png index a3e7e96f..68882f83 100644 Binary files a/2d/hexagonal_map/icon.png and b/2d/hexagonal_map/icon.png differ diff --git a/2d/hexagonal_map/map.tscn b/2d/hexagonal_map/map.tscn index 040f9a5c..3c4f8230 100644 --- a/2d/hexagonal_map/map.tscn +++ b/2d/hexagonal_map/map.tscn @@ -3,16 +3,15 @@ [ext_resource path="res://tileset.tres" type="TileSet" id=1] [ext_resource path="res://troll.tscn" type="PackedScene" id=2] -[node name="Node2D" type="Node2D"] +[node name="Map" type="Node2D"] [node name="TileMap" type="TileMap" parent="."] tile_set = ExtResource( 1 ) cell_size = Vector2( 82, 94 ) cell_half_offset = 1 cell_tile_origin = 1 -centered_textures = true format = 1 tile_data = PoolIntArray( -458747, 0, 0, -458746, 0, 0, -393212, 0, 0, -393211, 0, 0, -393210, 0, 0, -393209, 0, 0, -393208, 0, 0, -393207, 0, 0, -327678, 0, 0, -327677, 0, 0, -327676, 0, 0, -327675, 6, 0, -327674, 6, 0, -327673, 6, 0, -327672, 6, 0, -327671, 0, 0, -327670, 0, 0, -327669, 0, 0, -262142, 0, 0, -262141, 0, 0, -262140, 6, 0, -262139, 6, 0, -262138, 6, 0, -262137, 6, 0, -262136, 6, 0, -262135, 0, 0, -262134, 0, 0, -262133, 0, 0, -262132, 0, 0, -262131, 0, -1200553578, -196606, 0, 0, -196605, 0, 0, -196604, 6, 0, -196603, 6, 0, -196602, 6, 0, -196601, 6, 0, -196600, 1, 0, -196599, 0, 0, -196598, 1, 0, -196597, 1, 0, -196596, 0, 0, -196595, 0, -1200553578, -196594, 0, -1200553578, -131071, 9, 0, -131070, 0, 0, -131069, 0, 0, -131068, 2, 0, -131067, 2, 0, -131066, 0, 0, -131065, 21, 0, -131064, 19, 0, -131063, 0, 0, -131062, 0, 0, -131061, 16, -1200553578, -131060, 0, -1200553578, -131059, 0, 0, -131058, 0, 0, -131057, 0, 0, -131056, 0, -1200553578, -65534, 0, 0, -65533, 1, 0, -65532, 0, 0, -65531, 0, 0, -65530, 20, 0, -65529, 19, 0, -65528, 2, 0, -65527, 0, 0, -65526, 14, 0, -65525, 0, -1200553578, -65524, 0, 0, -65523, 0, 0, -65522, 23, 0, -65521, 0, 0, -65520, 0, -1200553578, -65519, 0, -1200553578, 3, 1, 0, 4, 2, 0, 5, 0, 0, 6, 1, 0, 7, 1, -1200553578, 8, 0, -1200553578, 9, 10, -1200553578, 10, 12, -1200553578, 11, 0, -1200553578, 12, 0, 0, 13, 8, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 65538, 0, -1200553578, 65539, 0, 0, 65540, 2, 0, 65541, 0, 0, 65542, 1, 0, 65543, 15, -1200553578, 65544, 0, 0, 65545, 0, 0, 65546, 0, 0, 65547, 0, 0, 65548, 0, 0, 65549, 25, 0, 65550, 8, 0, 65551, 0, 0, 65552, 21, 0, 65553, 0, 0, 131074, 0, -1200553578, 131075, 1, 0, 131076, 0, 0, 131077, 1, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 5, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 131088, 0, 0, 131089, 0, 0, 196610, 0, -1200553578, 196611, 0, 0, 196612, 0, 0, 196613, 23, 0, 196614, 0, 0, 196615, 0, 0, 196616, 0, 0, 196617, 5, 0, 196618, 5, 0, 196619, 0, 0, 196620, 0, 0, 196621, 0, 0, 196622, 0, 0, 196623, 23, 0, 196624, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 0, 0, 262151, 0, 0, 262152, 8, 0, 262153, 5, 0, 262154, 5, 0, 262155, 0, 0, 262156, 0, 0, 262157, 21, 0, 262158, 0, 0, 262159, 0, 0, 262160, 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, 327694, 0, 0 ) -[node name="troll" parent="." instance=ExtResource( 2 )] +[node name="Troll" parent="." instance=ExtResource( 2 )] position = Vector2( 602.819, -39.2876 ) diff --git a/2d/hexagonal_map/project.godot b/2d/hexagonal_map/project.godot index 87cd39a7..fc22d7e0 100644 --- a/2d/hexagonal_map/project.godot +++ b/2d/hexagonal_map/project.godot @@ -31,24 +31,36 @@ singletons=[ ] [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/hexagonal_map/WWT-01.png b/2d/hexagonal_map/tiles/WWT-01.png similarity index 100% rename from 2d/hexagonal_map/WWT-01.png rename to 2d/hexagonal_map/tiles/WWT-01.png diff --git a/2d/hexagonal_map/WWT-01.png.import b/2d/hexagonal_map/tiles/WWT-01.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-01.png.import rename to 2d/hexagonal_map/tiles/WWT-01.png.import index 4a7db3e3..e3f6161c 100644 --- a/2d/hexagonal_map/WWT-01.png.import +++ b/2d/hexagonal_map/tiles/WWT-01.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-01.png-d71b23a59ce633973e2216144d4c3cc7.stex" +path="res://.import/WWT-01.png-a74af26d994adfc547572b5b9c0c4034.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-01.png" -dest_files=[ "res://.import/WWT-01.png-d71b23a59ce633973e2216144d4c3cc7.stex" ] +source_file="res://tiles/WWT-01.png" +dest_files=[ "res://.import/WWT-01.png-a74af26d994adfc547572b5b9c0c4034.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-02.png b/2d/hexagonal_map/tiles/WWT-02.png similarity index 100% rename from 2d/hexagonal_map/WWT-02.png rename to 2d/hexagonal_map/tiles/WWT-02.png diff --git a/2d/hexagonal_map/WWT-02.png.import b/2d/hexagonal_map/tiles/WWT-02.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-02.png.import rename to 2d/hexagonal_map/tiles/WWT-02.png.import index 24bfd71c..d0f5b908 100644 --- a/2d/hexagonal_map/WWT-02.png.import +++ b/2d/hexagonal_map/tiles/WWT-02.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-02.png-8c7a76bab1a896763ab37f5a7bf77904.stex" +path="res://.import/WWT-02.png-9a9ae8a623554db2531366e8a06b737a.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-02.png" -dest_files=[ "res://.import/WWT-02.png-8c7a76bab1a896763ab37f5a7bf77904.stex" ] +source_file="res://tiles/WWT-02.png" +dest_files=[ "res://.import/WWT-02.png-9a9ae8a623554db2531366e8a06b737a.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-03.png b/2d/hexagonal_map/tiles/WWT-03.png similarity index 100% rename from 2d/hexagonal_map/WWT-03.png rename to 2d/hexagonal_map/tiles/WWT-03.png diff --git a/2d/hexagonal_map/WWT-03.png.import b/2d/hexagonal_map/tiles/WWT-03.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-03.png.import rename to 2d/hexagonal_map/tiles/WWT-03.png.import index 8ed42584..256dd3f0 100644 --- a/2d/hexagonal_map/WWT-03.png.import +++ b/2d/hexagonal_map/tiles/WWT-03.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-03.png-f804f0fa409c5c9ad521581b65c67f26.stex" +path="res://.import/WWT-03.png-111a68b27c5234ed5719f8591af32a0c.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-03.png" -dest_files=[ "res://.import/WWT-03.png-f804f0fa409c5c9ad521581b65c67f26.stex" ] +source_file="res://tiles/WWT-03.png" +dest_files=[ "res://.import/WWT-03.png-111a68b27c5234ed5719f8591af32a0c.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-04.png b/2d/hexagonal_map/tiles/WWT-04.png similarity index 100% rename from 2d/hexagonal_map/WWT-04.png rename to 2d/hexagonal_map/tiles/WWT-04.png diff --git a/2d/hexagonal_map/WWT-04.png.import b/2d/hexagonal_map/tiles/WWT-04.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-04.png.import rename to 2d/hexagonal_map/tiles/WWT-04.png.import index 831570ea..aeb05275 100644 --- a/2d/hexagonal_map/WWT-04.png.import +++ b/2d/hexagonal_map/tiles/WWT-04.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-04.png-a50f93109e34b533b1855a7ef46475b2.stex" +path="res://.import/WWT-04.png-f26081179f39965c61294d932b10ab21.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-04.png" -dest_files=[ "res://.import/WWT-04.png-a50f93109e34b533b1855a7ef46475b2.stex" ] +source_file="res://tiles/WWT-04.png" +dest_files=[ "res://.import/WWT-04.png-f26081179f39965c61294d932b10ab21.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-05.png b/2d/hexagonal_map/tiles/WWT-05.png similarity index 100% rename from 2d/hexagonal_map/WWT-05.png rename to 2d/hexagonal_map/tiles/WWT-05.png diff --git a/2d/hexagonal_map/WWT-05.png.import b/2d/hexagonal_map/tiles/WWT-05.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-05.png.import rename to 2d/hexagonal_map/tiles/WWT-05.png.import index 27446ece..3eb4f181 100644 --- a/2d/hexagonal_map/WWT-05.png.import +++ b/2d/hexagonal_map/tiles/WWT-05.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-05.png-deee12124c9c3ab8368902f7733ff079.stex" +path="res://.import/WWT-05.png-744e3aac04e57d14153c9ab15d0f478b.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-05.png" -dest_files=[ "res://.import/WWT-05.png-deee12124c9c3ab8368902f7733ff079.stex" ] +source_file="res://tiles/WWT-05.png" +dest_files=[ "res://.import/WWT-05.png-744e3aac04e57d14153c9ab15d0f478b.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-06.png b/2d/hexagonal_map/tiles/WWT-06.png similarity index 100% rename from 2d/hexagonal_map/WWT-06.png rename to 2d/hexagonal_map/tiles/WWT-06.png diff --git a/2d/hexagonal_map/WWT-06.png.import b/2d/hexagonal_map/tiles/WWT-06.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-06.png.import rename to 2d/hexagonal_map/tiles/WWT-06.png.import index e298afff..eb9a6acc 100644 --- a/2d/hexagonal_map/WWT-06.png.import +++ b/2d/hexagonal_map/tiles/WWT-06.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-06.png-a16b61cdadeeed4ab2c9f5eec8b79c7c.stex" +path="res://.import/WWT-06.png-42fd05901daa928f55c39f581f1c698b.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-06.png" -dest_files=[ "res://.import/WWT-06.png-a16b61cdadeeed4ab2c9f5eec8b79c7c.stex" ] +source_file="res://tiles/WWT-06.png" +dest_files=[ "res://.import/WWT-06.png-42fd05901daa928f55c39f581f1c698b.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-07.png b/2d/hexagonal_map/tiles/WWT-07.png similarity index 100% rename from 2d/hexagonal_map/WWT-07.png rename to 2d/hexagonal_map/tiles/WWT-07.png diff --git a/2d/hexagonal_map/WWT-07.png.import b/2d/hexagonal_map/tiles/WWT-07.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-07.png.import rename to 2d/hexagonal_map/tiles/WWT-07.png.import index 37df3f7d..b4c49f8d 100644 --- a/2d/hexagonal_map/WWT-07.png.import +++ b/2d/hexagonal_map/tiles/WWT-07.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-07.png-7cc4023daef4567752735bf79f2ccd12.stex" +path="res://.import/WWT-07.png-8e87a5146f132f36aecf29c26d16ff69.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-07.png" -dest_files=[ "res://.import/WWT-07.png-7cc4023daef4567752735bf79f2ccd12.stex" ] +source_file="res://tiles/WWT-07.png" +dest_files=[ "res://.import/WWT-07.png-8e87a5146f132f36aecf29c26d16ff69.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-08.png b/2d/hexagonal_map/tiles/WWT-08.png similarity index 100% rename from 2d/hexagonal_map/WWT-08.png rename to 2d/hexagonal_map/tiles/WWT-08.png diff --git a/2d/hexagonal_map/WWT-08.png.import b/2d/hexagonal_map/tiles/WWT-08.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-08.png.import rename to 2d/hexagonal_map/tiles/WWT-08.png.import index 266a84fb..bc1ab283 100644 --- a/2d/hexagonal_map/WWT-08.png.import +++ b/2d/hexagonal_map/tiles/WWT-08.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-08.png-7eaf3eb568b0293e3b28374e0bcfdf76.stex" +path="res://.import/WWT-08.png-9ab3b0ed6304c6b282e0c1c2866f4c65.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-08.png" -dest_files=[ "res://.import/WWT-08.png-7eaf3eb568b0293e3b28374e0bcfdf76.stex" ] +source_file="res://tiles/WWT-08.png" +dest_files=[ "res://.import/WWT-08.png-9ab3b0ed6304c6b282e0c1c2866f4c65.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-09.png b/2d/hexagonal_map/tiles/WWT-09.png similarity index 100% rename from 2d/hexagonal_map/WWT-09.png rename to 2d/hexagonal_map/tiles/WWT-09.png diff --git a/2d/hexagonal_map/WWT-09.png.import b/2d/hexagonal_map/tiles/WWT-09.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-09.png.import rename to 2d/hexagonal_map/tiles/WWT-09.png.import index f6b7ea8c..10ec6c7d 100644 --- a/2d/hexagonal_map/WWT-09.png.import +++ b/2d/hexagonal_map/tiles/WWT-09.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-09.png-05c1bd2bd71982b595886c84d0655094.stex" +path="res://.import/WWT-09.png-c899d1db7b10c4bc6e5c8ad44627c439.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-09.png" -dest_files=[ "res://.import/WWT-09.png-05c1bd2bd71982b595886c84d0655094.stex" ] +source_file="res://tiles/WWT-09.png" +dest_files=[ "res://.import/WWT-09.png-c899d1db7b10c4bc6e5c8ad44627c439.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-10.png b/2d/hexagonal_map/tiles/WWT-10.png similarity index 100% rename from 2d/hexagonal_map/WWT-10.png rename to 2d/hexagonal_map/tiles/WWT-10.png diff --git a/2d/hexagonal_map/WWT-10.png.import b/2d/hexagonal_map/tiles/WWT-10.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-10.png.import rename to 2d/hexagonal_map/tiles/WWT-10.png.import index 1c4cb216..6d85ba89 100644 --- a/2d/hexagonal_map/WWT-10.png.import +++ b/2d/hexagonal_map/tiles/WWT-10.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-10.png-21f5bebc271347b73cd120c7671bcc04.stex" +path="res://.import/WWT-10.png-c7e17e1ca741da0752bae015501fa73f.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-10.png" -dest_files=[ "res://.import/WWT-10.png-21f5bebc271347b73cd120c7671bcc04.stex" ] +source_file="res://tiles/WWT-10.png" +dest_files=[ "res://.import/WWT-10.png-c7e17e1ca741da0752bae015501fa73f.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-11.png b/2d/hexagonal_map/tiles/WWT-11.png similarity index 100% rename from 2d/hexagonal_map/WWT-11.png rename to 2d/hexagonal_map/tiles/WWT-11.png diff --git a/2d/hexagonal_map/WWT-11.png.import b/2d/hexagonal_map/tiles/WWT-11.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-11.png.import rename to 2d/hexagonal_map/tiles/WWT-11.png.import index 984aab58..1a7ab55f 100644 --- a/2d/hexagonal_map/WWT-11.png.import +++ b/2d/hexagonal_map/tiles/WWT-11.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-11.png-c278f158b8ebe9b98a71fa01d357ea55.stex" +path="res://.import/WWT-11.png-109af6474e89a87a4598cb99f608a4f7.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-11.png" -dest_files=[ "res://.import/WWT-11.png-c278f158b8ebe9b98a71fa01d357ea55.stex" ] +source_file="res://tiles/WWT-11.png" +dest_files=[ "res://.import/WWT-11.png-109af6474e89a87a4598cb99f608a4f7.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-12.png b/2d/hexagonal_map/tiles/WWT-12.png similarity index 100% rename from 2d/hexagonal_map/WWT-12.png rename to 2d/hexagonal_map/tiles/WWT-12.png diff --git a/2d/hexagonal_map/WWT-12.png.import b/2d/hexagonal_map/tiles/WWT-12.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-12.png.import rename to 2d/hexagonal_map/tiles/WWT-12.png.import index 496449d7..00e6d93f 100644 --- a/2d/hexagonal_map/WWT-12.png.import +++ b/2d/hexagonal_map/tiles/WWT-12.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-12.png-f99f6470cbf7469390137cc1b1eac0b1.stex" +path="res://.import/WWT-12.png-dfbf3da77ce636a3e88f9e62405a950b.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-12.png" -dest_files=[ "res://.import/WWT-12.png-f99f6470cbf7469390137cc1b1eac0b1.stex" ] +source_file="res://tiles/WWT-12.png" +dest_files=[ "res://.import/WWT-12.png-dfbf3da77ce636a3e88f9e62405a950b.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-13.png b/2d/hexagonal_map/tiles/WWT-13.png similarity index 100% rename from 2d/hexagonal_map/WWT-13.png rename to 2d/hexagonal_map/tiles/WWT-13.png diff --git a/2d/hexagonal_map/WWT-13.png.import b/2d/hexagonal_map/tiles/WWT-13.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-13.png.import rename to 2d/hexagonal_map/tiles/WWT-13.png.import index ac29714c..5b6ff6d1 100644 --- a/2d/hexagonal_map/WWT-13.png.import +++ b/2d/hexagonal_map/tiles/WWT-13.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-13.png-b831a7b68dbcdd483e454623cca7af6a.stex" +path="res://.import/WWT-13.png-cef8d6fe42386e917ad3aa9b9c54f031.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-13.png" -dest_files=[ "res://.import/WWT-13.png-b831a7b68dbcdd483e454623cca7af6a.stex" ] +source_file="res://tiles/WWT-13.png" +dest_files=[ "res://.import/WWT-13.png-cef8d6fe42386e917ad3aa9b9c54f031.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-14.png b/2d/hexagonal_map/tiles/WWT-14.png similarity index 100% rename from 2d/hexagonal_map/WWT-14.png rename to 2d/hexagonal_map/tiles/WWT-14.png diff --git a/2d/hexagonal_map/WWT-14.png.import b/2d/hexagonal_map/tiles/WWT-14.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-14.png.import rename to 2d/hexagonal_map/tiles/WWT-14.png.import index 4b1d5fa4..eedf602a 100644 --- a/2d/hexagonal_map/WWT-14.png.import +++ b/2d/hexagonal_map/tiles/WWT-14.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-14.png-473aa39bbfdbf2d9ac37478ba67ab5a8.stex" +path="res://.import/WWT-14.png-b9075987807eba6a461b896e310a1b8a.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-14.png" -dest_files=[ "res://.import/WWT-14.png-473aa39bbfdbf2d9ac37478ba67ab5a8.stex" ] +source_file="res://tiles/WWT-14.png" +dest_files=[ "res://.import/WWT-14.png-b9075987807eba6a461b896e310a1b8a.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-15.png b/2d/hexagonal_map/tiles/WWT-15.png similarity index 100% rename from 2d/hexagonal_map/WWT-15.png rename to 2d/hexagonal_map/tiles/WWT-15.png diff --git a/2d/hexagonal_map/WWT-15.png.import b/2d/hexagonal_map/tiles/WWT-15.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-15.png.import rename to 2d/hexagonal_map/tiles/WWT-15.png.import index 633715e9..7ec6d93d 100644 --- a/2d/hexagonal_map/WWT-15.png.import +++ b/2d/hexagonal_map/tiles/WWT-15.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-15.png-f958cd09bdaf7066eb31dea2b35a59fe.stex" +path="res://.import/WWT-15.png-00500699e949fc7109f5946f459a9877.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-15.png" -dest_files=[ "res://.import/WWT-15.png-f958cd09bdaf7066eb31dea2b35a59fe.stex" ] +source_file="res://tiles/WWT-15.png" +dest_files=[ "res://.import/WWT-15.png-00500699e949fc7109f5946f459a9877.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-16.png b/2d/hexagonal_map/tiles/WWT-16.png similarity index 100% rename from 2d/hexagonal_map/WWT-16.png rename to 2d/hexagonal_map/tiles/WWT-16.png diff --git a/2d/hexagonal_map/WWT-16.png.import b/2d/hexagonal_map/tiles/WWT-16.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-16.png.import rename to 2d/hexagonal_map/tiles/WWT-16.png.import index 560225e2..5d00475c 100644 --- a/2d/hexagonal_map/WWT-16.png.import +++ b/2d/hexagonal_map/tiles/WWT-16.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-16.png-1027e2a388bf820efb40bb630699acf6.stex" +path="res://.import/WWT-16.png-fbcd640a627612e528382718aecef7c7.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-16.png" -dest_files=[ "res://.import/WWT-16.png-1027e2a388bf820efb40bb630699acf6.stex" ] +source_file="res://tiles/WWT-16.png" +dest_files=[ "res://.import/WWT-16.png-fbcd640a627612e528382718aecef7c7.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-17.png b/2d/hexagonal_map/tiles/WWT-17.png similarity index 100% rename from 2d/hexagonal_map/WWT-17.png rename to 2d/hexagonal_map/tiles/WWT-17.png diff --git a/2d/hexagonal_map/WWT-17.png.import b/2d/hexagonal_map/tiles/WWT-17.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-17.png.import rename to 2d/hexagonal_map/tiles/WWT-17.png.import index 9a7d398a..d2ff3786 100644 --- a/2d/hexagonal_map/WWT-17.png.import +++ b/2d/hexagonal_map/tiles/WWT-17.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-17.png-06a724fd2ea7c875038b30870c815f35.stex" +path="res://.import/WWT-17.png-eb18073021ced526bfb8971a84830c46.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-17.png" -dest_files=[ "res://.import/WWT-17.png-06a724fd2ea7c875038b30870c815f35.stex" ] +source_file="res://tiles/WWT-17.png" +dest_files=[ "res://.import/WWT-17.png-eb18073021ced526bfb8971a84830c46.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-18.png b/2d/hexagonal_map/tiles/WWT-18.png similarity index 100% rename from 2d/hexagonal_map/WWT-18.png rename to 2d/hexagonal_map/tiles/WWT-18.png diff --git a/2d/hexagonal_map/WWT-18.png.import b/2d/hexagonal_map/tiles/WWT-18.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-18.png.import rename to 2d/hexagonal_map/tiles/WWT-18.png.import index fac2d3a6..3d953ece 100644 --- a/2d/hexagonal_map/WWT-18.png.import +++ b/2d/hexagonal_map/tiles/WWT-18.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-18.png-a7a95e5daf469fc05529f5c4d9ffd83f.stex" +path="res://.import/WWT-18.png-82273bf41643f8f544a05cdc2226c3b8.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-18.png" -dest_files=[ "res://.import/WWT-18.png-a7a95e5daf469fc05529f5c4d9ffd83f.stex" ] +source_file="res://tiles/WWT-18.png" +dest_files=[ "res://.import/WWT-18.png-82273bf41643f8f544a05cdc2226c3b8.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-19.png b/2d/hexagonal_map/tiles/WWT-19.png similarity index 100% rename from 2d/hexagonal_map/WWT-19.png rename to 2d/hexagonal_map/tiles/WWT-19.png diff --git a/2d/hexagonal_map/WWT-19.png.import b/2d/hexagonal_map/tiles/WWT-19.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-19.png.import rename to 2d/hexagonal_map/tiles/WWT-19.png.import index b29a51a1..d51a7fde 100644 --- a/2d/hexagonal_map/WWT-19.png.import +++ b/2d/hexagonal_map/tiles/WWT-19.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-19.png-e53561a49d2426c56b7463fcfe7187ad.stex" +path="res://.import/WWT-19.png-5894de00e931e36aaec31583c3ddce5c.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-19.png" -dest_files=[ "res://.import/WWT-19.png-e53561a49d2426c56b7463fcfe7187ad.stex" ] +source_file="res://tiles/WWT-19.png" +dest_files=[ "res://.import/WWT-19.png-5894de00e931e36aaec31583c3ddce5c.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-20.png b/2d/hexagonal_map/tiles/WWT-20.png similarity index 100% rename from 2d/hexagonal_map/WWT-20.png rename to 2d/hexagonal_map/tiles/WWT-20.png diff --git a/2d/hexagonal_map/WWT-20.png.import b/2d/hexagonal_map/tiles/WWT-20.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-20.png.import rename to 2d/hexagonal_map/tiles/WWT-20.png.import index 0866d5d2..ea103859 100644 --- a/2d/hexagonal_map/WWT-20.png.import +++ b/2d/hexagonal_map/tiles/WWT-20.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-20.png-fa22d2cbc86525aa67ed5be2eb766f38.stex" +path="res://.import/WWT-20.png-88080834968c597a14e2fa47d72452ca.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-20.png" -dest_files=[ "res://.import/WWT-20.png-fa22d2cbc86525aa67ed5be2eb766f38.stex" ] +source_file="res://tiles/WWT-20.png" +dest_files=[ "res://.import/WWT-20.png-88080834968c597a14e2fa47d72452ca.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-21.png b/2d/hexagonal_map/tiles/WWT-21.png similarity index 100% rename from 2d/hexagonal_map/WWT-21.png rename to 2d/hexagonal_map/tiles/WWT-21.png diff --git a/2d/hexagonal_map/WWT-21.png.import b/2d/hexagonal_map/tiles/WWT-21.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-21.png.import rename to 2d/hexagonal_map/tiles/WWT-21.png.import index 11e3fe83..4f48f50a 100644 --- a/2d/hexagonal_map/WWT-21.png.import +++ b/2d/hexagonal_map/tiles/WWT-21.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-21.png-0650363bb3b67f7ad8ea91f2ed66a86c.stex" +path="res://.import/WWT-21.png-390238468871139dc33ef039ad919c91.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-21.png" -dest_files=[ "res://.import/WWT-21.png-0650363bb3b67f7ad8ea91f2ed66a86c.stex" ] +source_file="res://tiles/WWT-21.png" +dest_files=[ "res://.import/WWT-21.png-390238468871139dc33ef039ad919c91.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-22.png b/2d/hexagonal_map/tiles/WWT-22.png similarity index 100% rename from 2d/hexagonal_map/WWT-22.png rename to 2d/hexagonal_map/tiles/WWT-22.png diff --git a/2d/hexagonal_map/WWT-22.png.import b/2d/hexagonal_map/tiles/WWT-22.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-22.png.import rename to 2d/hexagonal_map/tiles/WWT-22.png.import index f9c016b5..c98487ce 100644 --- a/2d/hexagonal_map/WWT-22.png.import +++ b/2d/hexagonal_map/tiles/WWT-22.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-22.png-15702d71f9ada16455bd5ec251efa392.stex" +path="res://.import/WWT-22.png-61b6f2ffc488560cd737af0df3a2aff4.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-22.png" -dest_files=[ "res://.import/WWT-22.png-15702d71f9ada16455bd5ec251efa392.stex" ] +source_file="res://tiles/WWT-22.png" +dest_files=[ "res://.import/WWT-22.png-61b6f2ffc488560cd737af0df3a2aff4.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-23.png b/2d/hexagonal_map/tiles/WWT-23.png similarity index 100% rename from 2d/hexagonal_map/WWT-23.png rename to 2d/hexagonal_map/tiles/WWT-23.png diff --git a/2d/hexagonal_map/WWT-23.png.import b/2d/hexagonal_map/tiles/WWT-23.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-23.png.import rename to 2d/hexagonal_map/tiles/WWT-23.png.import index 7fabf29b..df015e1a 100644 --- a/2d/hexagonal_map/WWT-23.png.import +++ b/2d/hexagonal_map/tiles/WWT-23.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-23.png-b96b4e3e762993c848a02a5920369963.stex" +path="res://.import/WWT-23.png-67ddb05725964560ee768025fb1ace6c.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-23.png" -dest_files=[ "res://.import/WWT-23.png-b96b4e3e762993c848a02a5920369963.stex" ] +source_file="res://tiles/WWT-23.png" +dest_files=[ "res://.import/WWT-23.png-67ddb05725964560ee768025fb1ace6c.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-24.png b/2d/hexagonal_map/tiles/WWT-24.png similarity index 100% rename from 2d/hexagonal_map/WWT-24.png rename to 2d/hexagonal_map/tiles/WWT-24.png diff --git a/2d/hexagonal_map/WWT-24.png.import b/2d/hexagonal_map/tiles/WWT-24.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-24.png.import rename to 2d/hexagonal_map/tiles/WWT-24.png.import index 9f357311..34c65860 100644 --- a/2d/hexagonal_map/WWT-24.png.import +++ b/2d/hexagonal_map/tiles/WWT-24.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-24.png-51252af7231f3c2108e03f43e485e5c9.stex" +path="res://.import/WWT-24.png-f708ede817cd745747bd03a5050d20d7.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-24.png" -dest_files=[ "res://.import/WWT-24.png-51252af7231f3c2108e03f43e485e5c9.stex" ] +source_file="res://tiles/WWT-24.png" +dest_files=[ "res://.import/WWT-24.png-f708ede817cd745747bd03a5050d20d7.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-25.png b/2d/hexagonal_map/tiles/WWT-25.png similarity index 100% rename from 2d/hexagonal_map/WWT-25.png rename to 2d/hexagonal_map/tiles/WWT-25.png diff --git a/2d/hexagonal_map/WWT-25.png.import b/2d/hexagonal_map/tiles/WWT-25.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-25.png.import rename to 2d/hexagonal_map/tiles/WWT-25.png.import index f0ff4913..5d08ecfe 100644 --- a/2d/hexagonal_map/WWT-25.png.import +++ b/2d/hexagonal_map/tiles/WWT-25.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-25.png-db9bd847f53180c4b408ac5fe5509089.stex" +path="res://.import/WWT-25.png-8d42552ab8c27a7d4782e3da8de397f1.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-25.png" -dest_files=[ "res://.import/WWT-25.png-db9bd847f53180c4b408ac5fe5509089.stex" ] +source_file="res://tiles/WWT-25.png" +dest_files=[ "res://.import/WWT-25.png-8d42552ab8c27a7d4782e3da8de397f1.stex" ] [params] diff --git a/2d/hexagonal_map/WWT-26.png b/2d/hexagonal_map/tiles/WWT-26.png similarity index 100% rename from 2d/hexagonal_map/WWT-26.png rename to 2d/hexagonal_map/tiles/WWT-26.png diff --git a/2d/hexagonal_map/WWT-26.png.import b/2d/hexagonal_map/tiles/WWT-26.png.import similarity index 72% rename from 2d/hexagonal_map/WWT-26.png.import rename to 2d/hexagonal_map/tiles/WWT-26.png.import index 8a031218..61a38c25 100644 --- a/2d/hexagonal_map/WWT-26.png.import +++ b/2d/hexagonal_map/tiles/WWT-26.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/WWT-26.png-58e5c6364a04c3baa8d4707bfd79d68c.stex" +path="res://.import/WWT-26.png-317f2102fb6abd09801389544f53c0e1.stex" metadata={ "vram_texture": false } [deps] -source_file="res://WWT-26.png" -dest_files=[ "res://.import/WWT-26.png-58e5c6364a04c3baa8d4707bfd79d68c.stex" ] +source_file="res://tiles/WWT-26.png" +dest_files=[ "res://.import/WWT-26.png-317f2102fb6abd09801389544f53c0e1.stex" ] [params] diff --git a/2d/hexagonal_map/tileset.tres b/2d/hexagonal_map/tileset.tres index 4db4924e..1055e290 100644 --- a/2d/hexagonal_map/tileset.tres +++ b/2d/hexagonal_map/tileset.tres @@ -1,240 +1,290 @@ [gd_resource type="TileSet" load_steps=27 format=2] -[ext_resource path="res://WWT-01.png" type="Texture" id=1] -[ext_resource path="res://WWT-02.png" type="Texture" id=2] -[ext_resource path="res://WWT-11.png" type="Texture" id=3] -[ext_resource path="res://WWT-12.png" type="Texture" id=4] -[ext_resource path="res://WWT-13.png" type="Texture" id=5] -[ext_resource path="res://WWT-14.png" type="Texture" id=6] -[ext_resource path="res://WWT-15.png" type="Texture" id=7] -[ext_resource path="res://WWT-16.png" type="Texture" id=8] -[ext_resource path="res://WWT-17.png" type="Texture" id=9] -[ext_resource path="res://WWT-18.png" type="Texture" id=10] -[ext_resource path="res://WWT-19.png" type="Texture" id=11] -[ext_resource path="res://WWT-20.png" type="Texture" id=12] -[ext_resource path="res://WWT-03.png" type="Texture" id=13] -[ext_resource path="res://WWT-21.png" type="Texture" id=14] -[ext_resource path="res://WWT-22.png" type="Texture" id=15] -[ext_resource path="res://WWT-23.png" type="Texture" id=16] -[ext_resource path="res://WWT-24.png" type="Texture" id=17] -[ext_resource path="res://WWT-25.png" type="Texture" id=18] -[ext_resource path="res://WWT-26.png" type="Texture" id=19] -[ext_resource path="res://WWT-04.png" type="Texture" id=20] -[ext_resource path="res://WWT-05.png" type="Texture" id=21] -[ext_resource path="res://WWT-06.png" type="Texture" id=22] -[ext_resource path="res://WWT-07.png" type="Texture" id=23] -[ext_resource path="res://WWT-08.png" type="Texture" id=24] -[ext_resource path="res://WWT-09.png" type="Texture" id=25] -[ext_resource path="res://WWT-10.png" type="Texture" id=26] +[ext_resource path="res://tiles/WWT-01.png" type="Texture" id=1] +[ext_resource path="res://tiles/WWT-02.png" type="Texture" id=2] +[ext_resource path="res://tiles/WWT-11.png" type="Texture" id=3] +[ext_resource path="res://tiles/WWT-12.png" type="Texture" id=4] +[ext_resource path="res://tiles/WWT-13.png" type="Texture" id=5] +[ext_resource path="res://tiles/WWT-14.png" type="Texture" id=6] +[ext_resource path="res://tiles/WWT-15.png" type="Texture" id=7] +[ext_resource path="res://tiles/WWT-16.png" type="Texture" id=8] +[ext_resource path="res://tiles/WWT-17.png" type="Texture" id=9] +[ext_resource path="res://tiles/WWT-18.png" type="Texture" id=10] +[ext_resource path="res://tiles/WWT-19.png" type="Texture" id=11] +[ext_resource path="res://tiles/WWT-20.png" type="Texture" id=12] +[ext_resource path="res://tiles/WWT-03.png" type="Texture" id=13] +[ext_resource path="res://tiles/WWT-21.png" type="Texture" id=14] +[ext_resource path="res://tiles/WWT-22.png" type="Texture" id=15] +[ext_resource path="res://tiles/WWT-23.png" type="Texture" id=16] +[ext_resource path="res://tiles/WWT-24.png" type="Texture" id=17] +[ext_resource path="res://tiles/WWT-25.png" type="Texture" id=18] +[ext_resource path="res://tiles/WWT-26.png" type="Texture" id=19] +[ext_resource path="res://tiles/WWT-04.png" type="Texture" id=20] +[ext_resource path="res://tiles/WWT-05.png" type="Texture" id=21] +[ext_resource path="res://tiles/WWT-06.png" type="Texture" id=22] +[ext_resource path="res://tiles/WWT-07.png" type="Texture" id=23] +[ext_resource path="res://tiles/WWT-08.png" type="Texture" id=24] +[ext_resource path="res://tiles/WWT-09.png" type="Texture" id=25] +[ext_resource path="res://tiles/WWT-10.png" type="Texture" id=26] [resource] - -0/name = "Tile 1" +0/name = "Tile1" 0/texture = ExtResource( 1 ) 0/tex_offset = Vector2( 0, 0 ) 0/modulate = Color( 1, 1, 1, 1 ) 0/region = Rect2( 0, 0, 128, 128 ) +0/tile_mode = 0 0/occluder_offset = Vector2( 0, 0 ) 0/navigation_offset = Vector2( 0, 0 ) 0/shapes = [ ] -1/name = "Tile 2" +0/z_index = 0 +1/name = "Tile2" 1/texture = ExtResource( 2 ) 1/tex_offset = Vector2( 0, 0 ) 1/modulate = Color( 1, 1, 1, 1 ) 1/region = Rect2( 0, 0, 128, 128 ) +1/tile_mode = 0 1/occluder_offset = Vector2( 0, 0 ) 1/navigation_offset = Vector2( 0, 0 ) 1/shapes = [ ] -2/name = "Tile 3" +1/z_index = 0 +2/name = "Tile3" 2/texture = ExtResource( 13 ) 2/tex_offset = Vector2( 0, 0 ) 2/modulate = Color( 1, 1, 1, 1 ) 2/region = Rect2( 0, 0, 128, 128 ) +2/tile_mode = 0 2/occluder_offset = Vector2( 0, 0 ) 2/navigation_offset = Vector2( 0, 0 ) 2/shapes = [ ] -3/name = "Tile 4" +2/z_index = 0 +3/name = "Tile4" 3/texture = ExtResource( 20 ) 3/tex_offset = Vector2( 0, 0 ) 3/modulate = Color( 1, 1, 1, 1 ) 3/region = Rect2( 0, 0, 128, 128 ) +3/tile_mode = 0 3/occluder_offset = Vector2( 0, 0 ) 3/navigation_offset = Vector2( 0, 0 ) 3/shapes = [ ] -4/name = "Tile 5" +3/z_index = 0 +4/name = "Tile5" 4/texture = ExtResource( 21 ) 4/tex_offset = Vector2( 0, 0 ) 4/modulate = Color( 1, 1, 1, 1 ) 4/region = Rect2( 0, 0, 128, 128 ) +4/tile_mode = 0 4/occluder_offset = Vector2( 0, 0 ) 4/navigation_offset = Vector2( 0, 0 ) 4/shapes = [ ] -5/name = "Tile 6" +4/z_index = 0 +5/name = "Tile6" 5/texture = ExtResource( 22 ) 5/tex_offset = Vector2( 0, 0 ) 5/modulate = Color( 1, 1, 1, 1 ) 5/region = Rect2( 0, 0, 128, 128 ) +5/tile_mode = 0 5/occluder_offset = Vector2( 0, 0 ) 5/navigation_offset = Vector2( 0, 0 ) 5/shapes = [ ] -6/name = "Tile 7" +5/z_index = 0 +6/name = "Tile7" 6/texture = ExtResource( 23 ) 6/tex_offset = Vector2( 0, 0 ) 6/modulate = Color( 1, 1, 1, 1 ) 6/region = Rect2( 0, 0, 128, 128 ) +6/tile_mode = 0 6/occluder_offset = Vector2( 0, 0 ) 6/navigation_offset = Vector2( 0, 0 ) 6/shapes = [ ] -7/name = "Tile 8" +6/z_index = 0 +7/name = "Tile8" 7/texture = ExtResource( 24 ) 7/tex_offset = Vector2( 0, 0 ) 7/modulate = Color( 1, 1, 1, 1 ) 7/region = Rect2( 0, 0, 128, 128 ) +7/tile_mode = 0 7/occluder_offset = Vector2( 0, 0 ) 7/navigation_offset = Vector2( 0, 0 ) 7/shapes = [ ] -8/name = "Tile 9" +7/z_index = 0 +8/name = "Tile9" 8/texture = ExtResource( 25 ) 8/tex_offset = Vector2( 0, 0 ) 8/modulate = Color( 1, 1, 1, 1 ) 8/region = Rect2( 0, 0, 128, 128 ) +8/tile_mode = 0 8/occluder_offset = Vector2( 0, 0 ) 8/navigation_offset = Vector2( 0, 0 ) 8/shapes = [ ] -9/name = "Tile 10" +8/z_index = 0 +9/name = "Tile10" 9/texture = ExtResource( 26 ) 9/tex_offset = Vector2( 0, 0 ) 9/modulate = Color( 1, 1, 1, 1 ) 9/region = Rect2( 0, 0, 128, 128 ) +9/tile_mode = 0 9/occluder_offset = Vector2( 0, 0 ) 9/navigation_offset = Vector2( 0, 0 ) 9/shapes = [ ] -10/name = "Tile 11" +9/z_index = 0 +10/name = "Tile11" 10/texture = ExtResource( 3 ) 10/tex_offset = Vector2( 0, 0 ) 10/modulate = Color( 1, 1, 1, 1 ) 10/region = Rect2( 0, 0, 128, 128 ) +10/tile_mode = 0 10/occluder_offset = Vector2( 0, 0 ) 10/navigation_offset = Vector2( 0, 0 ) 10/shapes = [ ] -11/name = "Tile 12" +10/z_index = 0 +11/name = "Tile12" 11/texture = ExtResource( 4 ) 11/tex_offset = Vector2( 0, 0 ) 11/modulate = Color( 1, 1, 1, 1 ) 11/region = Rect2( 0, 0, 128, 128 ) +11/tile_mode = 0 11/occluder_offset = Vector2( 0, 0 ) 11/navigation_offset = Vector2( 0, 0 ) 11/shapes = [ ] -12/name = "Tile 13" +11/z_index = 0 +12/name = "Tile13" 12/texture = ExtResource( 5 ) 12/tex_offset = Vector2( 0, 0 ) 12/modulate = Color( 1, 1, 1, 1 ) 12/region = Rect2( 0, 0, 128, 128 ) +12/tile_mode = 0 12/occluder_offset = Vector2( 0, 0 ) 12/navigation_offset = Vector2( 0, 0 ) 12/shapes = [ ] -13/name = "Tile 14" +12/z_index = 0 +13/name = "Tile14" 13/texture = ExtResource( 6 ) 13/tex_offset = Vector2( 0, 0 ) 13/modulate = Color( 1, 1, 1, 1 ) 13/region = Rect2( 0, 0, 128, 128 ) +13/tile_mode = 0 13/occluder_offset = Vector2( 0, 0 ) 13/navigation_offset = Vector2( 0, 0 ) 13/shapes = [ ] -14/name = "Tile 15" +13/z_index = 0 +14/name = "Tile15" 14/texture = ExtResource( 7 ) 14/tex_offset = Vector2( 0, 0 ) 14/modulate = Color( 1, 1, 1, 1 ) 14/region = Rect2( 0, 0, 128, 128 ) +14/tile_mode = 0 14/occluder_offset = Vector2( 0, 0 ) 14/navigation_offset = Vector2( 0, 0 ) 14/shapes = [ ] -15/name = "Tile 16" +14/z_index = 0 +15/name = "Tile16" 15/texture = ExtResource( 8 ) 15/tex_offset = Vector2( 0, 0 ) 15/modulate = Color( 1, 1, 1, 1 ) 15/region = Rect2( 0, 0, 128, 128 ) +15/tile_mode = 0 15/occluder_offset = Vector2( 0, 0 ) 15/navigation_offset = Vector2( 0, 0 ) 15/shapes = [ ] -16/name = "Tile 17" +15/z_index = 0 +16/name = "Tile17" 16/texture = ExtResource( 9 ) 16/tex_offset = Vector2( 0, 0 ) 16/modulate = Color( 1, 1, 1, 1 ) 16/region = Rect2( 0, 0, 128, 128 ) +16/tile_mode = 0 16/occluder_offset = Vector2( 0, 0 ) 16/navigation_offset = Vector2( 0, 0 ) 16/shapes = [ ] -17/name = "Tile 18" +16/z_index = 0 +17/name = "Tile18" 17/texture = ExtResource( 10 ) 17/tex_offset = Vector2( 0, 0 ) 17/modulate = Color( 1, 1, 1, 1 ) 17/region = Rect2( 0, 0, 128, 128 ) +17/tile_mode = 0 17/occluder_offset = Vector2( 0, 0 ) 17/navigation_offset = Vector2( 0, 0 ) 17/shapes = [ ] -18/name = "Tile 19" +17/z_index = 0 +18/name = "Tile19" 18/texture = ExtResource( 11 ) 18/tex_offset = Vector2( 0, 0 ) 18/modulate = Color( 1, 1, 1, 1 ) 18/region = Rect2( 0, 0, 128, 128 ) +18/tile_mode = 0 18/occluder_offset = Vector2( 0, 0 ) 18/navigation_offset = Vector2( 0, 0 ) 18/shapes = [ ] -19/name = "Tile 20" +18/z_index = 0 +19/name = "Tile20" 19/texture = ExtResource( 12 ) 19/tex_offset = Vector2( 0, 0 ) 19/modulate = Color( 1, 1, 1, 1 ) 19/region = Rect2( 0, 0, 128, 128 ) +19/tile_mode = 0 19/occluder_offset = Vector2( 0, 0 ) 19/navigation_offset = Vector2( 0, 0 ) 19/shapes = [ ] -20/name = "Tile 21" +19/z_index = 0 +20/name = "Tile21" 20/texture = ExtResource( 14 ) 20/tex_offset = Vector2( 0, 0 ) 20/modulate = Color( 1, 1, 1, 1 ) 20/region = Rect2( 0, 0, 128, 128 ) +20/tile_mode = 0 20/occluder_offset = Vector2( 0, 0 ) 20/navigation_offset = Vector2( 0, 0 ) 20/shapes = [ ] -21/name = "Tile 22" +20/z_index = 0 +21/name = "Tile22" 21/texture = ExtResource( 15 ) 21/tex_offset = Vector2( 0, 0 ) 21/modulate = Color( 1, 1, 1, 1 ) 21/region = Rect2( 0, 0, 128, 128 ) +21/tile_mode = 0 21/occluder_offset = Vector2( 0, 0 ) 21/navigation_offset = Vector2( 0, 0 ) 21/shapes = [ ] -22/name = "Tile 23" +21/z_index = 0 +22/name = "Tile23" 22/texture = ExtResource( 16 ) 22/tex_offset = Vector2( 0, 0 ) 22/modulate = Color( 1, 1, 1, 1 ) 22/region = Rect2( 0, 0, 128, 128 ) +22/tile_mode = 0 22/occluder_offset = Vector2( 0, 0 ) 22/navigation_offset = Vector2( 0, 0 ) 22/shapes = [ ] -23/name = "Tile 24" +22/z_index = 0 +23/name = "Tile24" 23/texture = ExtResource( 17 ) 23/tex_offset = Vector2( 0, 0 ) 23/modulate = Color( 1, 1, 1, 1 ) 23/region = Rect2( 0, 0, 128, 128 ) +23/tile_mode = 0 23/occluder_offset = Vector2( 0, 0 ) 23/navigation_offset = Vector2( 0, 0 ) 23/shapes = [ ] -24/name = "Tile 25" +23/z_index = 0 +24/name = "Tile25" 24/texture = ExtResource( 18 ) 24/tex_offset = Vector2( 0, 0 ) 24/modulate = Color( 1, 1, 1, 1 ) 24/region = Rect2( 0, 0, 128, 128 ) +24/tile_mode = 0 24/occluder_offset = Vector2( 0, 0 ) 24/navigation_offset = Vector2( 0, 0 ) 24/shapes = [ ] -25/name = "Tile 26" +24/z_index = 0 +25/name = "Tile26" 25/texture = ExtResource( 19 ) 25/tex_offset = Vector2( 0, 0 ) 25/modulate = Color( 1, 1, 1, 1 ) 25/region = Rect2( 0, 0, 128, 128 ) +25/tile_mode = 0 25/occluder_offset = Vector2( 0, 0 ) 25/navigation_offset = Vector2( 0, 0 ) 25/shapes = [ ] - +25/z_index = 0 diff --git a/2d/hexagonal_map/tileset_edit.tscn b/2d/hexagonal_map/tileset_edit.tscn index 9d69ebf8..85329cb7 100644 --- a/2d/hexagonal_map/tileset_edit.tscn +++ b/2d/hexagonal_map/tileset_edit.tscn @@ -1,160 +1,159 @@ [gd_scene load_steps=27 format=2] -[ext_resource path="res://WWT-01.png" type="Texture" id=1] -[ext_resource path="res://WWT-02.png" type="Texture" id=2] -[ext_resource path="res://WWT-03.png" type="Texture" id=3] -[ext_resource path="res://WWT-04.png" type="Texture" id=4] -[ext_resource path="res://WWT-05.png" type="Texture" id=5] -[ext_resource path="res://WWT-06.png" type="Texture" id=6] -[ext_resource path="res://WWT-07.png" type="Texture" id=7] -[ext_resource path="res://WWT-08.png" type="Texture" id=8] -[ext_resource path="res://WWT-09.png" type="Texture" id=9] -[ext_resource path="res://WWT-10.png" type="Texture" id=10] -[ext_resource path="res://WWT-11.png" type="Texture" id=11] -[ext_resource path="res://WWT-12.png" type="Texture" id=12] -[ext_resource path="res://WWT-13.png" type="Texture" id=13] -[ext_resource path="res://WWT-14.png" type="Texture" id=14] -[ext_resource path="res://WWT-15.png" type="Texture" id=15] -[ext_resource path="res://WWT-16.png" type="Texture" id=16] -[ext_resource path="res://WWT-17.png" type="Texture" id=17] -[ext_resource path="res://WWT-18.png" type="Texture" id=18] -[ext_resource path="res://WWT-19.png" type="Texture" id=19] -[ext_resource path="res://WWT-20.png" type="Texture" id=20] -[ext_resource path="res://WWT-21.png" type="Texture" id=21] -[ext_resource path="res://WWT-22.png" type="Texture" id=22] -[ext_resource path="res://WWT-23.png" type="Texture" id=23] -[ext_resource path="res://WWT-24.png" type="Texture" id=24] -[ext_resource path="res://WWT-25.png" type="Texture" id=25] -[ext_resource path="res://WWT-26.png" type="Texture" id=26] +[ext_resource path="res://tiles/WWT-01.png" type="Texture" id=1] +[ext_resource path="res://tiles/WWT-02.png" type="Texture" id=2] +[ext_resource path="res://tiles/WWT-03.png" type="Texture" id=3] +[ext_resource path="res://tiles/WWT-04.png" type="Texture" id=4] +[ext_resource path="res://tiles/WWT-05.png" type="Texture" id=5] +[ext_resource path="res://tiles/WWT-06.png" type="Texture" id=6] +[ext_resource path="res://tiles/WWT-07.png" type="Texture" id=7] +[ext_resource path="res://tiles/WWT-08.png" type="Texture" id=8] +[ext_resource path="res://tiles/WWT-09.png" type="Texture" id=9] +[ext_resource path="res://tiles/WWT-10.png" type="Texture" id=10] +[ext_resource path="res://tiles/WWT-11.png" type="Texture" id=11] +[ext_resource path="res://tiles/WWT-12.png" type="Texture" id=12] +[ext_resource path="res://tiles/WWT-13.png" type="Texture" id=13] +[ext_resource path="res://tiles/WWT-14.png" type="Texture" id=14] +[ext_resource path="res://tiles/WWT-15.png" type="Texture" id=15] +[ext_resource path="res://tiles/WWT-16.png" type="Texture" id=16] +[ext_resource path="res://tiles/WWT-17.png" type="Texture" id=17] +[ext_resource path="res://tiles/WWT-18.png" type="Texture" id=18] +[ext_resource path="res://tiles/WWT-19.png" type="Texture" id=19] +[ext_resource path="res://tiles/WWT-20.png" type="Texture" id=20] +[ext_resource path="res://tiles/WWT-21.png" type="Texture" id=21] +[ext_resource path="res://tiles/WWT-22.png" type="Texture" id=22] +[ext_resource path="res://tiles/WWT-23.png" type="Texture" id=23] +[ext_resource path="res://tiles/WWT-24.png" type="Texture" id=24] +[ext_resource path="res://tiles/WWT-25.png" type="Texture" id=25] +[ext_resource path="res://tiles/WWT-26.png" type="Texture" id=26] -[node name="Node2D" type="Node2D"] +[node name="TilesetEdit" type="Node2D"] -[node name="Tile 1" type="Sprite" parent="."] +[node name="Tile1" type="Sprite" parent="."] texture = ExtResource( 1 ) centered = false -[node name="Tile 2" type="Sprite" parent="."] +[node name="Tile2" type="Sprite" parent="."] position = Vector2( 128, 0 ) texture = ExtResource( 2 ) centered = false -[node name="Tile 3" type="Sprite" parent="."] +[node name="Tile3" type="Sprite" parent="."] position = Vector2( 256, 0 ) texture = ExtResource( 3 ) centered = false -[node name="Tile 4" type="Sprite" parent="."] +[node name="Tile4" type="Sprite" parent="."] position = Vector2( 384, 0 ) texture = ExtResource( 4 ) centered = false -[node name="Tile 5" type="Sprite" parent="."] +[node name="Tile5" type="Sprite" parent="."] position = Vector2( 512, 0 ) texture = ExtResource( 5 ) centered = false -[node name="Tile 6" type="Sprite" parent="."] +[node name="Tile6" type="Sprite" parent="."] position = Vector2( 640, 0 ) texture = ExtResource( 6 ) centered = false -[node name="Tile 7" type="Sprite" parent="."] +[node name="Tile7" type="Sprite" parent="."] position = Vector2( 768, 0 ) texture = ExtResource( 7 ) centered = false -[node name="Tile 8" type="Sprite" parent="."] +[node name="Tile8" type="Sprite" parent="."] position = Vector2( 896, 0 ) texture = ExtResource( 8 ) centered = false -[node name="Tile 9" type="Sprite" parent="."] +[node name="Tile9" type="Sprite" parent="."] position = Vector2( 1024, 0 ) texture = ExtResource( 9 ) centered = false -[node name="Tile 10" type="Sprite" parent="."] +[node name="Tile10" type="Sprite" parent="."] position = Vector2( 0, 128 ) texture = ExtResource( 10 ) centered = false -[node name="Tile 11" type="Sprite" parent="."] +[node name="Tile11" type="Sprite" parent="."] position = Vector2( 128, 128 ) texture = ExtResource( 11 ) centered = false -[node name="Tile 12" type="Sprite" parent="."] +[node name="Tile12" type="Sprite" parent="."] position = Vector2( 256, 128 ) texture = ExtResource( 12 ) centered = false -[node name="Tile 13" type="Sprite" parent="."] +[node name="Tile13" type="Sprite" parent="."] position = Vector2( 384, 128 ) texture = ExtResource( 13 ) centered = false -[node name="Tile 14" type="Sprite" parent="."] +[node name="Tile14" type="Sprite" parent="."] position = Vector2( 512, 128 ) texture = ExtResource( 14 ) centered = false -[node name="Tile 15" type="Sprite" parent="."] +[node name="Tile15" type="Sprite" parent="."] position = Vector2( 640, 128 ) texture = ExtResource( 15 ) centered = false -[node name="Tile 16" type="Sprite" parent="."] +[node name="Tile16" type="Sprite" parent="."] position = Vector2( 768, 128 ) texture = ExtResource( 16 ) centered = false -[node name="Tile 17" type="Sprite" parent="."] +[node name="Tile17" type="Sprite" parent="."] position = Vector2( 896, 128 ) texture = ExtResource( 17 ) centered = false -[node name="Tile 18" type="Sprite" parent="."] +[node name="Tile18" type="Sprite" parent="."] position = Vector2( 1024, 128 ) texture = ExtResource( 18 ) centered = false -[node name="Tile 19" type="Sprite" parent="."] +[node name="Tile19" type="Sprite" parent="."] position = Vector2( 0, 256 ) texture = ExtResource( 19 ) centered = false -[node name="Tile 20" type="Sprite" parent="."] +[node name="Tile20" type="Sprite" parent="."] position = Vector2( 128, 256 ) texture = ExtResource( 20 ) centered = false -[node name="Tile 21" type="Sprite" parent="."] +[node name="Tile21" type="Sprite" parent="."] position = Vector2( 256, 256 ) texture = ExtResource( 21 ) centered = false -[node name="Tile 22" type="Sprite" parent="."] +[node name="Tile22" type="Sprite" parent="."] position = Vector2( 384, 256 ) texture = ExtResource( 22 ) centered = false -[node name="Tile 23" type="Sprite" parent="."] +[node name="Tile23" type="Sprite" parent="."] position = Vector2( 512, 256 ) texture = ExtResource( 23 ) centered = false -[node name="Tile 24" type="Sprite" parent="."] +[node name="Tile24" type="Sprite" parent="."] position = Vector2( 640, 256 ) texture = ExtResource( 24 ) centered = false -[node name="Tile 25" type="Sprite" parent="."] +[node name="Tile25" type="Sprite" parent="."] position = Vector2( 768, 256 ) texture = ExtResource( 25 ) centered = false -[node name="Tile 26" type="Sprite" parent="."] +[node name="Tile26" type="Sprite" parent="."] position = Vector2( 896, 256 ) texture = ExtResource( 26 ) centered = false - diff --git a/2d/hexagonal_map/troll.gd b/2d/hexagonal_map/troll.gd index c4229107..27e31627 100644 --- a/2d/hexagonal_map/troll.gd +++ b/2d/hexagonal_map/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/hexagonal_map/troll.tscn b/2d/hexagonal_map/troll.tscn index 81e19e41..8a2fcc55 100644 --- a/2d/hexagonal_map/troll.tscn +++ b/2d/hexagonal_map/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="."] 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 - 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"] 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 2774de61..00000000 Binary files a/2d/kinematic_collision/icon.png and /dev/null differ diff --git a/2d/kinematic_collision/obstacle.png b/2d/kinematic_collision/obstacle.png deleted file mode 100644 index 693f115a..00000000 Binary files a/2d/kinematic_collision/obstacle.png and /dev/null differ 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 0e7d8438..00000000 Binary files a/2d/kinematic_collision/player.png and /dev/null differ 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 ) 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/background.png.import b/2d/lights_and_shadows/background.png.import new file mode 100644 index 00000000..5fa42254 --- /dev/null +++ b/2d/lights_and_shadows/background.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/background.png-98289422cd7d93003950872a7b97021f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://background.png" +dest_files=[ "res://.import/background.png-98289422cd7d93003950872a7b97021f.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/lights_and_shadows/bg.png.import b/2d/lights_and_shadows/bg.png.import deleted file mode 100644 index 370cc07f..00000000 --- a/2d/lights_and_shadows/bg.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/bg.png-24bff804693ee063127ad100e04c5185.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://bg.png" -dest_files=[ "res://.import/bg.png-24bff804693ee063127ad100e04c5185.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/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 ) 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 ) - 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 )