Added island generator, improved main menu
parent
4089a582e1
commit
b12f3dd14c
|
@ -0,0 +1,12 @@
|
||||||
|
[gd_resource type="Theme" load_steps=3 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://fonts/Roboto/Roboto-Black.ttf" type="DynamicFontData" id=1]
|
||||||
|
|
||||||
|
[sub_resource type="DynamicFont" id=1]
|
||||||
|
size = 64
|
||||||
|
use_mipmaps = true
|
||||||
|
use_filter = true
|
||||||
|
font_data = ExtResource( 1 )
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
default_font = SubResource( 1 )
|
69
Menu.tscn
69
Menu.tscn
|
@ -1,7 +1,8 @@
|
||||||
[gd_scene load_steps=3 format=2]
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Menu.gd" type="Script" id=1]
|
[ext_resource path="res://Menu.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://assets/title logo.png" type="Texture" id=2]
|
[ext_resource path="res://assets/title logo.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://MainMenuTheme.tres" type="Theme" id=3]
|
||||||
|
|
||||||
[node name="Menu" type="Node2D"]
|
[node name="Menu" type="Node2D"]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
@ -11,58 +12,60 @@ anchor_mode = 0
|
||||||
current = true
|
current = true
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Camera2D"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="Camera2D"]
|
||||||
|
anchor_bottom = 0.224
|
||||||
|
margin_top = 92.0
|
||||||
|
margin_right = 2553.0
|
||||||
|
margin_bottom = 1344.0
|
||||||
rect_scale = Vector2( 0.4, 0.4 )
|
rect_scale = Vector2( 0.4, 0.4 )
|
||||||
custom_constants/separation = 64
|
custom_constants/separation = 64
|
||||||
alignment = 1
|
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="Camera2D/VBoxContainer"]
|
[node name="HBoxContainer3" type="HBoxContainer" parent="Camera2D/VBoxContainer"]
|
||||||
margin_right = 1523.0
|
margin_right = 2553.0
|
||||||
margin_bottom = 445.0
|
margin_bottom = 600.0
|
||||||
|
rect_min_size = Vector2( 0, 600 )
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="TextureRect" type="TextureRect" parent="Camera2D/VBoxContainer/HBoxContainer3"]
|
||||||
|
margin_left = 515.0
|
||||||
|
margin_right = 2038.0
|
||||||
|
margin_bottom = 600.0
|
||||||
size_flags_horizontal = 13
|
size_flags_horizontal = 13
|
||||||
size_flags_vertical = 13
|
size_flags_vertical = 13
|
||||||
texture = ExtResource( 2 )
|
texture = ExtResource( 2 )
|
||||||
stretch_mode = 4
|
stretch_mode = 3
|
||||||
|
|
||||||
[node name="HBoxContainer2" type="HBoxContainer" parent="Camera2D/VBoxContainer"]
|
|
||||||
margin_top = 509.0
|
|
||||||
margin_right = 1523.0
|
|
||||||
margin_bottom = 509.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
size_flags_horizontal = 5
|
|
||||||
size_flags_vertical = 5
|
|
||||||
alignment = 1
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="Camera2D/VBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="Camera2D/VBoxContainer"]
|
||||||
margin_top = 573.0
|
margin_top = 664.0
|
||||||
margin_right = 1523.0
|
margin_right = 2553.0
|
||||||
margin_bottom = 673.0
|
margin_bottom = 814.0
|
||||||
custom_constants/separation = 128
|
custom_constants/separation = 128
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
[node name="SimpleButton" type="Button" parent="Camera2D/VBoxContainer/HBoxContainer"]
|
[node name="SimpleButton" type="Button" parent="Camera2D/VBoxContainer/HBoxContainer"]
|
||||||
margin_right = 100.0
|
margin_left = 773.0
|
||||||
margin_bottom = 100.0
|
margin_right = 1023.0
|
||||||
rect_min_size = Vector2( 100, 100 )
|
margin_bottom = 150.0
|
||||||
|
rect_min_size = Vector2( 250, 150 )
|
||||||
|
theme = ExtResource( 3 )
|
||||||
text = "Leicht"
|
text = "Leicht"
|
||||||
|
|
||||||
[node name="MediumButton" type="Button" parent="Camera2D/VBoxContainer/HBoxContainer"]
|
[node name="MediumButton" type="Button" parent="Camera2D/VBoxContainer/HBoxContainer"]
|
||||||
margin_left = 228.0
|
margin_left = 1151.0
|
||||||
margin_right = 328.0
|
margin_right = 1401.0
|
||||||
margin_bottom = 100.0
|
margin_bottom = 150.0
|
||||||
rect_min_size = Vector2( 100, 100 )
|
rect_min_size = Vector2( 250, 150 )
|
||||||
|
theme = ExtResource( 3 )
|
||||||
text = "Mittel"
|
text = "Mittel"
|
||||||
|
|
||||||
[node name="HardButton" type="Button" parent="Camera2D/VBoxContainer/HBoxContainer"]
|
[node name="HardButton" type="Button" parent="Camera2D/VBoxContainer/HBoxContainer"]
|
||||||
margin_left = 456.0
|
margin_left = 1529.0
|
||||||
margin_right = 556.0
|
margin_right = 1779.0
|
||||||
margin_bottom = 100.0
|
margin_bottom = 150.0
|
||||||
rect_min_size = Vector2( 100, 100 )
|
rect_min_size = Vector2( 250, 150 )
|
||||||
|
theme = ExtResource( 3 )
|
||||||
text = "Schwer"
|
text = "Schwer"
|
||||||
|
|
||||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||||
|
|
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -1 +1 @@
|
||||||
{"(-288, 55.425621)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Sand","(-192, 110.85125)":"Sand","(-192, 554.256226)":"Sand","(-192, 665.107483)":"Sand","(-96, -166.276871)":"Sand","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Sand","(-96, 277.128113)":"Sand","(-96, 387.97937)":"Sand","(-96, 498.830627)":"Sand","(-96, 609.681824)":"Grass","(-96, 720.533081)":"Sand","(0, -221.702499)":"Sand","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Grass","(0, 554.256226)":"Grass","(0, 665.107483)":"Grass","(0, 775.95874)":"Sand","(96, -166.276871)":"Sand","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Grass","(96, 498.830597)":"Grass","(96, 609.681885)":"Grass","(96, 720.533142)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Sand","(192, 332.553741)":"Sand","(192, 443.404968)":"Sand","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Sand","(288, -277.128113)":"Sand","(288, -166.276871)":"Sand","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Sand","(288, 498.830627)":"Sand","(288, 609.681885)":"Sand","(288, 720.533142)":"Sand","(384, -110.85125)":"Sand","(384, 0)":"Sand","(384, 110.851242)":"Sand","(480, -55.425613)":"Sand"}
|
{"(-384, -221.702499)":"Sand","(-384, -110.851242)":"Sand","(-384, 0)":"Sand","(-288, -277.128113)":"Sand","(-288, -166.276871)":"Grass","(-288, -55.425629)":"Grass","(-288, 55.425621)":"Sand","(-192, -221.702484)":"Sand","(-192, -110.85125)":"Grass","(-192, 0)":"Sand","(-96, -277.128113)":"Sand","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Sand","(-96, 498.830627)":"Sand","(0, -332.553741)":"Sand","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Sand","(0, 443.404999)":"Sand","(0, 554.256226)":"Sand","(0, 665.107483)":"Sand","(96, -277.128113)":"Sand","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Sand","(96, 166.276871)":"Sand","(96, 277.128113)":"Sand","(96, 387.97937)":"Sand","(96, 498.830597)":"Grass","(96, 609.681885)":"Sand","(96, 720.533142)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Grass","(192, 443.404968)":"Grass","(192, 554.256226)":"Grass","(192, 665.107483)":"Sand","(288, -166.276871)":"Sand","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Grass","(288, 277.128113)":"Grass","(288, 387.97937)":"Grass","(288, 498.830627)":"Grass","(288, 609.681885)":"Grass","(288, 720.533142)":"Sand","(384, -110.85125)":"Sand","(384, 0)":"Sand","(384, 110.851242)":"Sand","(384, 221.702499)":"Grass","(384, 332.553711)":"Grass","(384, 443.404968)":"Grass","(384, 554.256226)":"Grass","(384, 665.107483)":"Sand","(480, 166.276886)":"Sand","(480, 277.128113)":"Sand","(480, 387.97937)":"Grass","(480, 498.830627)":"Grass","(480, 609.681885)":"Sand","(576, 332.553741)":"Sand","(576, 443.404999)":"Sand","(576, 554.256226)":"Sand"}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"(-480, -55.425629)":"Sand","(-480, 55.425613)":"Sand","(-480, 166.276855)":"Sand","(-480, 498.830627)":"Sand","(-384, -110.851242)":"Sand","(-384, 0)":"Grass","(-384, 110.85125)":"Grass","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Sand","(-384, 443.404999)":"Sand","(-384, 554.256226)":"Sand","(-288, -55.425629)":"Sand","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Grass","(-288, 498.830627)":"Grass","(-288, 609.681885)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Grass","(-192, 554.256226)":"Sand","(-96, -55.425625)":"Sand","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Grass","(-96, 498.830627)":"Sand","(0, 0)":"Sand","(0, 110.85125)":"Sand","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Sand","(96, 166.276871)":"Sand","(96, 277.128113)":"Grass","(96, 387.97937)":"Sand","(192, 110.85125)":"Sand","(192, 221.702484)":"Grass","(192, 332.553741)":"Sand","(288, 166.276871)":"Sand","(288, 277.128113)":"Grass","(288, 387.97937)":"Sand","(384, 110.851242)":"Sand","(384, 221.702499)":"Grass","(384, 332.553711)":"Sand","(480, 55.425629)":"Sand","(480, 166.276886)":"Grass","(480, 277.128113)":"Grass","(480, 387.97937)":"Sand","(576, 0)":"Sand","(576, 110.851257)":"Sand","(576, 221.702484)":"Sand","(576, 332.553741)":"Sand"}
|
{"(-672, 55.425629)":"Sand","(-672, 166.276871)":"Sand","(-672, 277.128113)":"Sand","(-576, 0)":"Sand","(-576, 110.851242)":"Grass","(-576, 221.702484)":"Grass","(-576, 332.553741)":"Sand","(-480, -166.276886)":"Sand","(-480, -55.425629)":"Sand","(-480, 55.425613)":"Grass","(-480, 166.276855)":"Grass","(-480, 277.128113)":"Grass","(-480, 387.97937)":"Sand","(-384, -221.702499)":"Sand","(-384, -110.851242)":"Grass","(-384, 0)":"Grass","(-384, 110.85125)":"Sand","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Sand","(-288, -498.830627)":"Sand","(-288, -387.97937)":"Sand","(-288, -277.128113)":"Sand","(-288, -166.276871)":"Grass","(-288, -55.425629)":"Grass","(-288, 55.425621)":"Sand","(-192, -554.256226)":"Sand","(-192, -443.404968)":"Grass","(-192, -332.553741)":"Grass","(-192, -221.702484)":"Grass","(-192, -110.85125)":"Grass","(-192, 0)":"Sand","(-96, -609.681885)":"Sand","(-96, -498.830597)":"Grass","(-96, -387.97937)":"Grass","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Sand","(0, -665.107483)":"Sand","(0, -554.256226)":"Grass","(0, -443.404999)":"Grass","(0, -332.553741)":"Grass","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Sand","(96, -609.681824)":"Sand","(96, -498.830627)":"Grass","(96, -387.97937)":"Grass","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Sand","(192, -665.107483)":"Sand","(192, -554.256226)":"Grass","(192, -443.404999)":"Grass","(192, -332.553741)":"Grass","(192, -221.702499)":"Grass","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Sand","(192, 332.553741)":"Sand","(288, -609.681885)":"Sand","(288, -498.830627)":"Sand","(288, -387.97937)":"Sand","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Grass","(288, 277.128113)":"Grass","(288, 387.97937)":"Sand","(384, -332.553741)":"Sand","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Grass","(384, 110.851242)":"Grass","(384, 221.702499)":"Grass","(384, 332.553711)":"Grass","(384, 443.404968)":"Sand","(480, -277.128113)":"Sand","(480, -166.276855)":"Grass","(480, -55.425613)":"Grass","(480, 55.425629)":"Grass","(480, 166.276886)":"Sand","(480, 277.128113)":"Sand","(480, 387.97937)":"Sand","(576, -221.702484)":"Sand","(576, -110.851242)":"Grass","(576, 0)":"Sand","(576, 110.851257)":"Sand","(672, -166.276871)":"Sand","(672, -55.425629)":"Sand"}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"(-576, 0)":"Sand","(-576, 110.851242)":"Sand","(-480, -166.276886)":"Sand","(-480, -55.425629)":"Sand","(-480, 55.425613)":"Grass","(-480, 166.276855)":"Sand","(-480, 277.128113)":"Sand","(-480, 387.97937)":"Sand","(-384, -221.702499)":"Sand","(-384, -110.851242)":"Grass","(-384, 0)":"Grass","(-384, 110.85125)":"Grass","(-384, 221.702499)":"Grass","(-384, 332.553741)":"Sand","(-288, -166.276871)":"Sand","(-288, -55.425629)":"Grass","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Sand","(-192, -221.702484)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Sand","(-96, -55.425625)":"Sand","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Sand","(0, 0)":"Sand","(0, 110.85125)":"Grass","(0, 221.702499)":"Sand","(96, -55.425625)":"Sand","(96, 55.425625)":"Grass","(96, 166.276871)":"Sand","(192, -332.553741)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Sand","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Sand","(288, -387.97937)":"Sand","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Grass","(288, 277.128113)":"Sand","(384, -443.404999)":"Sand","(384, -332.553741)":"Grass","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Grass","(384, 110.851242)":"Sand","(384, 221.702499)":"Sand","(480, -387.97937)":"Sand","(480, -277.128113)":"Grass","(480, -166.276855)":"Grass","(480, -55.425613)":"Grass","(480, 55.425629)":"Sand","(576, -332.553741)":"Sand","(576, -221.702484)":"Sand","(576, -110.851242)":"Sand","(576, 0)":"Sand"}
|
{"(-672, 609.681885)":"Sand","(-672, 720.533081)":"Sand","(-576, 554.256226)":"Sand","(-576, 665.107483)":"Grass","(-576, 775.95874)":"Sand","(-480, 387.97937)":"Sand","(-480, 498.830627)":"Sand","(-480, 609.681885)":"Grass","(-480, 720.533081)":"Grass","(-480, 831.384338)":"Sand","(-384, 332.553741)":"Sand","(-384, 443.404999)":"Grass","(-384, 554.256226)":"Grass","(-384, 665.107483)":"Grass","(-384, 775.95874)":"Grass","(-384, 886.809998)":"Sand","(-288, 55.425621)":"Sand","(-288, 166.276871)":"Sand","(-288, 277.128113)":"Sand","(-288, 387.97937)":"Grass","(-288, 498.830627)":"Grass","(-288, 609.681885)":"Grass","(-288, 720.533081)":"Grass","(-288, 831.384338)":"Sand","(-192, 0)":"Sand","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Sand","(-192, 554.256226)":"Sand","(-192, 665.107483)":"Grass","(-192, 775.95874)":"Grass","(-192, 886.809998)":"Sand","(-96, -55.425625)":"Sand","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Sand","(-96, 609.681824)":"Sand","(-96, 720.533081)":"Grass","(-96, 831.384338)":"Sand","(0, -110.85125)":"Sand","(0, 0)":"Grass","(0, 110.85125)":"Sand","(0, 221.702499)":"Sand","(0, 332.553741)":"Sand","(0, 554.256226)":"Sand","(0, 665.107483)":"Grass","(0, 775.95874)":"Grass","(0, 886.809998)":"Sand","(96, -55.425625)":"Sand","(96, 55.425625)":"Sand","(96, 498.830597)":"Sand","(96, 609.681885)":"Grass","(96, 720.533142)":"Grass","(96, 831.384399)":"Sand","(192, 332.553741)":"Sand","(192, 443.404968)":"Sand","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Grass","(192, 886.809998)":"Sand","(288, 166.276871)":"Sand","(288, 277.128113)":"Sand","(288, 387.97937)":"Grass","(288, 498.830627)":"Grass","(288, 609.681885)":"Grass","(288, 720.533142)":"Grass","(288, 831.384399)":"Sand","(384, 110.851242)":"Sand","(384, 221.702499)":"Grass","(384, 332.553711)":"Grass","(384, 443.404968)":"Grass","(384, 554.256226)":"Grass","(384, 665.107483)":"Grass","(384, 775.95874)":"Sand","(480, 166.276886)":"Sand","(480, 277.128113)":"Grass","(480, 387.97937)":"Grass","(480, 498.830627)":"Grass","(480, 609.681885)":"Sand","(480, 720.533142)":"Sand","(576, 110.851257)":"Sand","(576, 221.702484)":"Grass","(576, 332.553741)":"Grass","(576, 443.404999)":"Grass","(576, 554.256226)":"Sand","(672, 55.425629)":"Sand","(672, 166.276855)":"Grass","(672, 277.128113)":"Grass","(672, 387.97937)":"Grass","(672, 498.830627)":"Sand","(768, 0)":"Sand","(768, 110.851227)":"Grass","(768, 221.702484)":"Grass","(768, 332.553741)":"Sand","(768, 443.404999)":"Sand","(864, 55.425598)":"Sand","(864, 166.276855)":"Grass","(864, 277.128113)":"Sand","(960, 0)":"Sand","(960, 110.851257)":"Grass","(960, 221.702515)":"Grass","(960, 332.553772)":"Sand","(1056, 55.425598)":"Sand","(1056, 166.276855)":"Grass","(1056, 277.128113)":"Sand","(1152, 110.851257)":"Sand","(1152, 221.702515)":"Sand"}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"(-384, 110.85125)":"Sand","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Sand","(-384, 443.404999)":"Sand","(-288, -55.425629)":"Sand","(-288, 55.425621)":"Sand","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Grass","(-288, 498.830627)":"Sand","(-288, 609.681885)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Grass","(-192, 554.256226)":"Grass","(-192, 665.107483)":"Sand","(-96, -277.128113)":"Sand","(-96, -166.276871)":"Sand","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Sand","(-96, 277.128113)":"Sand","(-96, 387.97937)":"Sand","(-96, 498.830627)":"Sand","(-96, 609.681824)":"Grass","(-96, 720.533081)":"Sand","(0, -332.553741)":"Sand","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Sand","(0, 554.256226)":"Sand","(0, 665.107483)":"Grass","(0, 775.95874)":"Sand","(96, -387.97937)":"Sand","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Sand","(96, 498.830597)":"Sand","(96, 609.681885)":"Grass","(96, 720.533142)":"Sand","(192, -332.553741)":"Sand","(192, -221.702499)":"Grass","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Sand","(192, 443.404968)":"Sand","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Sand","(288, -387.97937)":"Sand","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Sand","(288, 498.830627)":"Sand","(288, 609.681885)":"Sand","(288, 720.533142)":"Grass","(288, 831.384399)":"Sand","(384, -332.553741)":"Sand","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Grass","(384, 110.851242)":"Sand","(384, 665.107483)":"Sand","(384, 775.95874)":"Sand","(480, -277.128113)":"Sand","(480, -166.276855)":"Sand","(480, -55.425613)":"Sand","(480, 55.425629)":"Sand","(480, 609.681885)":"Sand","(480, 720.533142)":"Sand","(576, 665.107544)":"Sand"}
|
{"(-96, -166.276871)":"Sand","(-96, -55.425625)":"Sand","(-96, 55.425625)":"Sand","(0, -332.553741)":"Sand","(0, -221.702499)":"Sand","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Sand","(0, 221.702499)":"Sand","(96, -387.97937)":"Sand","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Sand","(192, -443.404999)":"Sand","(192, -332.553741)":"Grass","(192, -221.702499)":"Grass","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Sand","(192, 443.404968)":"Sand","(192, 554.256226)":"Sand","(192, 665.107483)":"Sand","(288, -498.830627)":"Sand","(288, -387.97937)":"Grass","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Grass","(288, 277.128113)":"Grass","(288, 387.97937)":"Grass","(288, 498.830627)":"Grass","(288, 609.681885)":"Grass","(288, 720.533142)":"Sand","(384, -554.256226)":"Sand","(384, -443.404999)":"Grass","(384, -332.553741)":"Grass","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Grass","(384, 110.851242)":"Grass","(384, 221.702499)":"Grass","(384, 332.553711)":"Grass","(384, 443.404968)":"Grass","(384, 554.256226)":"Grass","(384, 665.107483)":"Grass","(384, 775.95874)":"Sand","(384, 886.809937)":"Sand","(384, 997.661255)":"Sand","(480, -609.681885)":"Sand","(480, -498.830627)":"Grass","(480, -387.97937)":"Grass","(480, -277.128113)":"Grass","(480, -166.276855)":"Grass","(480, -55.425613)":"Sand","(480, 55.425629)":"Sand","(480, 166.276886)":"Sand","(480, 277.128113)":"Grass","(480, 387.97937)":"Sand","(480, 498.830627)":"Sand","(480, 609.681885)":"Grass","(480, 720.533142)":"Grass","(480, 831.384338)":"Grass","(480, 942.235657)":"Grass","(480, 1053.086914)":"Sand","(576, -554.256226)":"Sand","(576, -443.404999)":"Grass","(576, -332.553741)":"Grass","(576, -221.702484)":"Sand","(576, -110.851242)":"Sand","(576, 221.702484)":"Sand","(576, 332.553741)":"Sand","(576, 554.256226)":"Sand","(576, 665.107544)":"Sand","(576, 775.95874)":"Grass","(576, 886.810059)":"Grass","(576, 997.661255)":"Grass","(576, 1108.512573)":"Sand","(672, -498.830627)":"Sand","(672, -387.97937)":"Sand","(672, -277.128113)":"Sand","(672, 720.533081)":"Sand","(672, 831.384399)":"Sand","(672, 942.235596)":"Sand","(672, 1053.086914)":"Sand"}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"(-384, 443.404999)":"Sand","(-384, 554.256226)":"Sand","(-384, 665.107483)":"Sand","(-288, -55.425629)":"Sand","(-288, 55.425621)":"Sand","(-288, 387.97937)":"Sand","(-288, 498.830627)":"Grass","(-288, 609.681885)":"Grass","(-288, 720.533081)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Grass","(-192, 110.85125)":"Sand","(-192, 221.702499)":"Sand","(-192, 332.553741)":"Sand","(-192, 443.404999)":"Grass","(-192, 554.256226)":"Grass","(-192, 665.107483)":"Sand","(-96, -166.276871)":"Sand","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Grass","(-96, 498.830627)":"Grass","(-96, 609.681824)":"Grass","(-96, 720.533081)":"Sand","(0, -221.702499)":"Sand","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Grass","(0, 554.256226)":"Grass","(0, 665.107483)":"Grass","(0, 775.95874)":"Sand","(96, -277.128113)":"Sand","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Sand","(96, 166.276871)":"Sand","(96, 277.128113)":"Sand","(96, 387.97937)":"Grass","(96, 498.830597)":"Grass","(96, 609.681885)":"Grass","(96, 720.533142)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Sand","(192, 0)":"Sand","(192, 332.553741)":"Sand","(192, 443.404968)":"Sand","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Sand","(288, 498.830627)":"Sand","(288, 609.681885)":"Grass","(288, 720.533142)":"Sand","(384, 554.256226)":"Sand","(384, 665.107483)":"Grass","(384, 775.95874)":"Sand","(480, 498.830627)":"Sand","(480, 609.681885)":"Sand","(480, 720.533142)":"Sand","(576, 554.256226)":"Sand"}
|
{"(-384, -110.851242)":"Sand","(-384, 0)":"Sand","(-384, 110.85125)":"Sand","(-288, -166.276871)":"Sand","(-288, -55.425629)":"Grass","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Sand","(-288, 277.128113)":"Sand","(-288, 387.97937)":"Sand","(-288, 498.830627)":"Sand","(-192, -665.107483)":"Sand","(-192, -554.256226)":"Sand","(-192, -443.404968)":"Sand","(-192, -221.702484)":"Sand","(-192, -110.85125)":"Grass","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Grass","(-192, 554.256226)":"Sand","(-96, -720.533142)":"Sand","(-96, -609.681885)":"Grass","(-96, -498.830597)":"Grass","(-96, -387.97937)":"Sand","(-96, -166.276871)":"Sand","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Sand","(-96, 498.830627)":"Sand","(0, -775.95874)":"Sand","(0, -665.107483)":"Grass","(0, -554.256226)":"Grass","(0, -443.404999)":"Sand","(0, -110.85125)":"Sand","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Sand","(96, -831.384338)":"Sand","(96, -720.533081)":"Grass","(96, -609.681824)":"Grass","(96, -498.830627)":"Sand","(96, -55.425625)":"Sand","(96, 55.425625)":"Sand","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Sand","(192, -775.95874)":"Sand","(192, -665.107483)":"Grass","(192, -554.256226)":"Grass","(192, -443.404999)":"Sand","(192, 110.85125)":"Sand","(192, 221.702484)":"Grass","(192, 332.553741)":"Grass","(192, 443.404968)":"Sand","(288, -831.384338)":"Sand","(288, -720.533081)":"Grass","(288, -609.681885)":"Grass","(288, -498.830627)":"Grass","(288, -387.97937)":"Sand","(288, -55.425621)":"Sand","(288, 55.425629)":"Sand","(288, 166.276871)":"Grass","(288, 277.128113)":"Grass","(288, 387.97937)":"Sand","(384, -886.809998)":"Sand","(384, -775.95874)":"Grass","(384, -665.107483)":"Grass","(384, -554.256226)":"Grass","(384, -443.404999)":"Sand","(384, -110.85125)":"Sand","(384, 0)":"Grass","(384, 110.851242)":"Grass","(384, 221.702499)":"Grass","(384, 332.553711)":"Sand","(480, -831.384338)":"Sand","(480, -720.533081)":"Sand","(480, -609.681885)":"Grass","(480, -498.830627)":"Grass","(480, -387.97937)":"Sand","(480, -277.128113)":"Sand","(480, -166.276855)":"Sand","(480, -55.425613)":"Grass","(480, 55.425629)":"Grass","(480, 166.276886)":"Grass","(480, 277.128113)":"Sand","(576, -665.107483)":"Sand","(576, -554.256226)":"Grass","(576, -443.404999)":"Grass","(576, -332.553741)":"Grass","(576, -221.702484)":"Grass","(576, -110.851242)":"Grass","(576, 0)":"Sand","(576, 110.851257)":"Sand","(576, 221.702484)":"Sand","(672, -609.681885)":"Sand","(672, -498.830627)":"Grass","(672, -387.97937)":"Grass","(672, -277.128113)":"Grass","(672, -166.276871)":"Grass","(672, -55.425629)":"Sand","(768, -665.107483)":"Sand","(768, -554.256226)":"Grass","(768, -443.404999)":"Grass","(768, -332.553741)":"Sand","(768, -221.702499)":"Sand","(768, -110.851257)":"Sand","(864, -609.681885)":"Sand","(864, -498.830627)":"Sand","(864, -387.97937)":"Sand"}
|
||||||
|
|
|
@ -29,6 +29,11 @@ config/icon="res://assets/pirate.svg"
|
||||||
HexTileDrawer="*res://scenes/HexTileDrawer.gd"
|
HexTileDrawer="*res://scenes/HexTileDrawer.gd"
|
||||||
Globals="*res://Globals.gd"
|
Globals="*res://Globals.gd"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/stretch/mode="2d"
|
||||||
|
window/stretch/aspect="expand"
|
||||||
|
|
||||||
[global]
|
[global]
|
||||||
|
|
||||||
view=false
|
view=false
|
||||||
|
@ -39,31 +44,31 @@ export=false
|
||||||
|
|
||||||
walk_left={
|
walk_left={
|
||||||
"deadzone": 0.5,
|
"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":85,"unicode":0,"echo":false,"script":null)
|
"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":85,"physical_scancode":0,"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(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
walk_right={
|
walk_right={
|
||||||
"deadzone": 0.5,
|
"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)
|
"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,"physical_scancode":0,"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(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
walk_up={
|
walk_up={
|
||||||
"deadzone": 0.5,
|
"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":86,"unicode":0,"echo":false,"script":null)
|
"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":86,"physical_scancode":0,"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(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
walk_down={
|
walk_down={
|
||||||
"deadzone": 0.5,
|
"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":73,"unicode":0,"echo":false,"script":null)
|
"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":73,"physical_scancode":0,"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(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
interact={
|
interact={
|
||||||
"deadzone": 0.5,
|
"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)
|
"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,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,3 +97,8 @@ func _on_IslandIndex_value_changed(_value):
|
||||||
island.save_island(get_island_filename_for_index(last_index))
|
island.save_island(get_island_filename_for_index(last_index))
|
||||||
island.clear_island()
|
island.clear_island()
|
||||||
island.load_island(get_island_filename())
|
island.load_island(get_island_filename())
|
||||||
|
|
||||||
|
|
||||||
|
func _on_GenerateButton_pressed():
|
||||||
|
island.clear_island()
|
||||||
|
island.generate()
|
||||||
|
|
|
@ -91,7 +91,6 @@ script = ExtResource( 7 )
|
||||||
[node name="UI" type="CanvasLayer" parent="Editor"]
|
[node name="UI" type="CanvasLayer" parent="Editor"]
|
||||||
|
|
||||||
[node name="Editor" type="VBoxContainer" parent="Editor/UI"]
|
[node name="Editor" type="VBoxContainer" parent="Editor/UI"]
|
||||||
visible = false
|
|
||||||
margin_left = 12.0
|
margin_left = 12.0
|
||||||
margin_top = 53.0
|
margin_top = 53.0
|
||||||
margin_right = 94.0
|
margin_right = 94.0
|
||||||
|
@ -102,44 +101,50 @@ __meta__ = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Island" type="Label" parent="Editor/UI/Editor"]
|
[node name="Island" type="Label" parent="Editor/UI/Editor"]
|
||||||
margin_right = 110.0
|
margin_right = 120.0
|
||||||
margin_bottom = 33.0
|
margin_bottom = 33.0
|
||||||
text = "Island"
|
text = "Island"
|
||||||
|
|
||||||
[node name="IslandIndex" type="SpinBox" parent="Editor/UI/Editor"]
|
[node name="IslandIndex" type="SpinBox" parent="Editor/UI/Editor"]
|
||||||
margin_top = 37.0
|
margin_top = 37.0
|
||||||
margin_right = 110.0
|
margin_right = 120.0
|
||||||
margin_bottom = 80.0
|
margin_bottom = 80.0
|
||||||
max_value = 9.0
|
max_value = 9.0
|
||||||
|
|
||||||
[node name="ClearWorldButton" type="Button" parent="Editor/UI/Editor"]
|
[node name="ClearWorldButton" type="Button" parent="Editor/UI/Editor"]
|
||||||
margin_top = 84.0
|
margin_top = 84.0
|
||||||
margin_right = 110.0
|
margin_right = 120.0
|
||||||
margin_bottom = 123.0
|
margin_bottom = 123.0
|
||||||
text = "Clear"
|
text = "Clear"
|
||||||
|
|
||||||
[node name="LoadWorldButton" type="Button" parent="Editor/UI/Editor"]
|
[node name="LoadWorldButton" type="Button" parent="Editor/UI/Editor"]
|
||||||
margin_top = 127.0
|
margin_top = 127.0
|
||||||
margin_right = 110.0
|
margin_right = 120.0
|
||||||
margin_bottom = 166.0
|
margin_bottom = 166.0
|
||||||
text = "Load"
|
text = "Load"
|
||||||
|
|
||||||
[node name="SaveWorldButton" type="Button" parent="Editor/UI/Editor"]
|
[node name="SaveWorldButton" type="Button" parent="Editor/UI/Editor"]
|
||||||
margin_top = 170.0
|
margin_top = 170.0
|
||||||
margin_right = 110.0
|
margin_right = 120.0
|
||||||
margin_bottom = 209.0
|
margin_bottom = 209.0
|
||||||
text = "Save"
|
text = "Save"
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="Editor/UI/Editor"]
|
[node name="GenerateButton" type="Button" parent="Editor/UI/Editor"]
|
||||||
margin_top = 213.0
|
margin_top = 213.0
|
||||||
margin_right = 110.0
|
margin_right = 120.0
|
||||||
margin_bottom = 246.0
|
margin_bottom = 252.0
|
||||||
|
text = "Generate"
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="Editor/UI/Editor"]
|
||||||
|
margin_top = 256.0
|
||||||
|
margin_right = 120.0
|
||||||
|
margin_bottom = 289.0
|
||||||
text = "Tiles"
|
text = "Tiles"
|
||||||
|
|
||||||
[node name="NoneButton" type="Button" parent="Editor/UI/Editor"]
|
[node name="NoneButton" type="Button" parent="Editor/UI/Editor"]
|
||||||
margin_top = 250.0
|
margin_top = 293.0
|
||||||
margin_right = 110.0
|
margin_right = 120.0
|
||||||
margin_bottom = 289.0
|
margin_bottom = 332.0
|
||||||
rect_pivot_offset = Vector2( -1239.87, 282.07 )
|
rect_pivot_offset = Vector2( -1239.87, 282.07 )
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
group = SubResource( 3 )
|
group = SubResource( 3 )
|
||||||
|
@ -149,9 +154,9 @@ __meta__ = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="SandButton" type="Button" parent="Editor/UI/Editor"]
|
[node name="SandButton" type="Button" parent="Editor/UI/Editor"]
|
||||||
margin_top = 293.0
|
margin_top = 336.0
|
||||||
margin_right = 110.0
|
margin_right = 120.0
|
||||||
margin_bottom = 332.0
|
margin_bottom = 375.0
|
||||||
rect_pivot_offset = Vector2( -1239.87, 282.07 )
|
rect_pivot_offset = Vector2( -1239.87, 282.07 )
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
group = SubResource( 3 )
|
group = SubResource( 3 )
|
||||||
|
@ -161,9 +166,9 @@ __meta__ = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="GrassButton" type="Button" parent="Editor/UI/Editor"]
|
[node name="GrassButton" type="Button" parent="Editor/UI/Editor"]
|
||||||
margin_top = 336.0
|
margin_top = 379.0
|
||||||
margin_right = 110.0
|
margin_right = 120.0
|
||||||
margin_bottom = 375.0
|
margin_bottom = 418.0
|
||||||
rect_pivot_offset = Vector2( -1239.87, 282.07 )
|
rect_pivot_offset = Vector2( -1239.87, 282.07 )
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
group = SubResource( 3 )
|
group = SubResource( 3 )
|
||||||
|
@ -273,6 +278,7 @@ __meta__ = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="World/UI/SuccessMessage"]
|
[node name="TextureRect" type="TextureRect" parent="World/UI/SuccessMessage"]
|
||||||
|
visible = false
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
|
@ -475,6 +481,7 @@ render_target_update_mode = 1
|
||||||
[connection signal="pressed" from="Editor/UI/Editor/ClearWorldButton" to="Editor" method="_on_ClearWorldButton_pressed"]
|
[connection signal="pressed" from="Editor/UI/Editor/ClearWorldButton" to="Editor" method="_on_ClearWorldButton_pressed"]
|
||||||
[connection signal="pressed" from="Editor/UI/Editor/LoadWorldButton" to="Editor" method="_on_LoadWorldButton_pressed"]
|
[connection signal="pressed" from="Editor/UI/Editor/LoadWorldButton" to="Editor" method="_on_LoadWorldButton_pressed"]
|
||||||
[connection signal="pressed" from="Editor/UI/Editor/SaveWorldButton" to="Editor" method="_on_SaveWorldButton_pressed"]
|
[connection signal="pressed" from="Editor/UI/Editor/SaveWorldButton" to="Editor" method="_on_SaveWorldButton_pressed"]
|
||||||
|
[connection signal="pressed" from="Editor/UI/Editor/GenerateButton" to="Editor" method="_on_GenerateButton_pressed"]
|
||||||
[connection signal="bird_flight_start" from="World" to="SoundEffectsPlayer" method="_on_World_bird_flight_start"]
|
[connection signal="bird_flight_start" from="World" to="SoundEffectsPlayer" method="_on_World_bird_flight_start"]
|
||||||
[connection signal="digging_started" from="World" to="SoundEffectsPlayer" method="_on_World_digging_started"]
|
[connection signal="digging_started" from="World" to="SoundEffectsPlayer" method="_on_World_digging_started"]
|
||||||
[connection signal="level_started" from="World" to="MusicPlayer" method="_on_World_level_started"]
|
[connection signal="level_started" from="World" to="MusicPlayer" method="_on_World_level_started"]
|
||||||
|
|
|
@ -45,6 +45,64 @@ func clear_island():
|
||||||
update()
|
update()
|
||||||
|
|
||||||
|
|
||||||
|
func generate_random_walk (length):
|
||||||
|
|
||||||
|
var cur_hex_coord = Vector2(0,0)
|
||||||
|
var i = length
|
||||||
|
while (i >= 0):
|
||||||
|
var cur_world_pos = Globals.HexToWorld(cur_hex_coord)
|
||||||
|
tiles[cur_world_pos] = "Sand"
|
||||||
|
var neighbours = Globals.HexGrid.get_hex_at(cur_hex_coord).get_all_adjacent()
|
||||||
|
var exists = true
|
||||||
|
for j in range (len(neighbours)):
|
||||||
|
neighbours[j] = neighbours[j].axial_coords
|
||||||
|
var rand_idx = randi() % 6
|
||||||
|
cur_hex_coord = cur_hex_coord + neighbours[rand_idx]
|
||||||
|
i = i - 1
|
||||||
|
|
||||||
|
|
||||||
|
func extrude_island():
|
||||||
|
var old_tiles = tiles
|
||||||
|
tiles = {}
|
||||||
|
|
||||||
|
for tile in old_tiles:
|
||||||
|
var hex_coord = Globals.WorldToHex(tile)
|
||||||
|
tiles[tile] = "Sand"
|
||||||
|
var neighbours = Globals.HexGrid.get_hex_at(hex_coord).get_all_adjacent()
|
||||||
|
for cell in neighbours:
|
||||||
|
var world_coord = Globals.HexToWorld(hex_coord + cell.axial_coords)
|
||||||
|
tiles[world_coord] = "Sand"
|
||||||
|
|
||||||
|
|
||||||
|
func mark_grass():
|
||||||
|
var old_tiles = tiles
|
||||||
|
tiles = {}
|
||||||
|
|
||||||
|
for tile in old_tiles:
|
||||||
|
var hex_coord = Globals.WorldToHex(tile)
|
||||||
|
|
||||||
|
var neighbours = Globals.HexGrid.get_hex_at(hex_coord).get_all_adjacent()
|
||||||
|
var is_center_cell = true
|
||||||
|
for cell in neighbours:
|
||||||
|
var world_coord = Globals.HexToWorld(hex_coord + cell.axial_coords)
|
||||||
|
if not world_coord in old_tiles.keys():
|
||||||
|
is_center_cell = false
|
||||||
|
|
||||||
|
if is_center_cell:
|
||||||
|
tiles[tile] = "Grass"
|
||||||
|
else:
|
||||||
|
tiles[tile] = "Sand"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func generate():
|
||||||
|
var size = 62
|
||||||
|
|
||||||
|
generate_random_walk(size)
|
||||||
|
extrude_island()
|
||||||
|
mark_grass()
|
||||||
|
|
||||||
|
|
||||||
func calc_bbox():
|
func calc_bbox():
|
||||||
var coord_min = Vector2.ONE * 10000
|
var coord_min = Vector2.ONE * 10000
|
||||||
var coord_max = Vector2.ONE * -10000
|
var coord_max = Vector2.ONE * -10000
|
||||||
|
|
|
@ -6,66 +6,22 @@
|
||||||
[sub_resource type="Shader" id=1]
|
[sub_resource type="Shader" id=1]
|
||||||
code = "shader_type canvas_item;
|
code = "shader_type canvas_item;
|
||||||
|
|
||||||
uniform vec2 tiled_factor = vec2(5.0, 5.0);
|
uniform float region_size = 300.0;
|
||||||
uniform float aspect_ratio = 0.5;
|
uniform float aspect_ratio = 0.5;
|
||||||
uniform float wave_speed = 0.4;
|
uniform float wave_speed = 0.4;
|
||||||
|
uniform vec4 blue_color : hint_color = vec4(0.04, 0.33, 1.0, 1.);
|
||||||
vec4 fragment_tiled_voronoi(vec2 uv) {
|
uniform float exponent = 4.;
|
||||||
vec2 tiled_uvs = uv * tiled_factor;
|
uniform float blue_scale = 0.1;
|
||||||
tiled_uvs.y *= aspect_ratio;
|
uniform float wave_step = 1.0;
|
||||||
|
|
||||||
vec2 i_st = floor(tiled_uvs);
|
|
||||||
vec2 f_st = fract(tiled_uvs);
|
|
||||||
|
|
||||||
vec2 point = vec2 (0.2, 0.2);
|
|
||||||
|
|
||||||
|
|
||||||
vec2 diff = point - f_st;
|
|
||||||
float dist = length(diff);
|
|
||||||
|
|
||||||
return vec4(1.0, 0., 0., 1.0);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
void fragment_old() {
|
|
||||||
vec2 tiled_uvs = UV * tiled_factor;
|
|
||||||
tiled_uvs.y *= aspect_ratio;
|
|
||||||
|
|
||||||
vec2 uv_offset = vec2(0., 0.);
|
|
||||||
// uv_offset.x = sin(TIME * wave_speed);
|
|
||||||
// uv_offset.y = cos(TIME * wave_speed);
|
|
||||||
|
|
||||||
tiled_uvs = tiled_uvs;
|
|
||||||
|
|
||||||
vec2 uv_repeat = tiled_uvs;
|
|
||||||
uv_repeat.x = uv_repeat.x - round(uv_repeat.x) + 0.5;
|
|
||||||
uv_repeat.y = uv_repeat.y - round(uv_repeat.y) + 0.5;
|
|
||||||
|
|
||||||
vec2 points[5];
|
|
||||||
points[0] = vec2(0.83,0.75);
|
|
||||||
points[1] = vec2(0.60,0.07);
|
|
||||||
points[2] = vec2(0.28,0.64);
|
|
||||||
points[3] = vec2(0.31,0.26);
|
|
||||||
|
|
||||||
float m_dist = 1.;
|
|
||||||
for (int i = 0; i < 5; i++) {
|
|
||||||
float dist = distance (uv_repeat, points[i]);
|
|
||||||
m_dist = min(m_dist, dist);
|
|
||||||
}
|
|
||||||
|
|
||||||
COLOR = vec4(uv_repeat, 0., 1.);
|
|
||||||
COLOR = vec4(m_dist, m_dist, m_dist, 1.0);
|
|
||||||
// COLOR = texture(TEXTURE, uv_repeat);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
vec2 rand(vec2 co){
|
vec2 rand(vec2 co){
|
||||||
return vec2(
|
return vec2(
|
||||||
fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453),
|
fract(sin(dot(co.xy, vec2(12.9898,78.233))) * 43758.5453),
|
||||||
fract(sin(dot(co.yx ,vec2(12.9898,78.233))) * 43758.5453));
|
fract(sin(dot(co.yx, vec2(12.9898,78.233))) * 43758.5453));
|
||||||
}
|
}
|
||||||
|
|
||||||
void fragment() {
|
void fragment() {
|
||||||
vec2 tiled_uvs = UV * tiled_factor;
|
vec2 tiled_uvs = UV * vec2(region_size, region_size);
|
||||||
tiled_uvs.y *= aspect_ratio;
|
tiled_uvs.y *= aspect_ratio;
|
||||||
|
|
||||||
vec2 i_st = floor(tiled_uvs);
|
vec2 i_st = floor(tiled_uvs);
|
||||||
|
@ -85,21 +41,21 @@ void fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 blue_color = vec4(0.04, 0.33, 1.0, 1.);
|
|
||||||
vec4 m_dist_color = vec4(m_dist, m_dist, m_dist, 1.);
|
vec4 m_dist_color = vec4(m_dist, m_dist, m_dist, 1.);
|
||||||
float exponent = 4.;
|
vec4 color = blue_color + vec4(blue_scale * pow(m_dist, exponent));
|
||||||
vec4 color = blue_color + 0.5 * pow(m_dist_color, vec4(exponent, exponent, exponent, 1.));
|
|
||||||
// vec4 color =
|
|
||||||
// color += 1.0 - m_dist;
|
|
||||||
|
|
||||||
COLOR = vec4(color);
|
COLOR = vec4(color);
|
||||||
}"
|
}"
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id=2]
|
[sub_resource type="ShaderMaterial" id=2]
|
||||||
shader = SubResource( 1 )
|
shader = SubResource( 1 )
|
||||||
shader_param/tiled_factor = Vector2( 300, 300 )
|
shader_param/region_size = 999.0
|
||||||
shader_param/aspect_ratio = 0.647
|
shader_param/aspect_ratio = 0.647
|
||||||
shader_param/wave_speed = 0.4
|
shader_param/wave_speed = 0.4
|
||||||
|
shader_param/blue_color = Color( 0, 0.25098, 0.494118, 1 )
|
||||||
|
shader_param/exponent = 4.0
|
||||||
|
shader_param/blue_scale = 0.04
|
||||||
|
shader_param/wave_step = 3.0
|
||||||
|
|
||||||
[node name="Water" type="Node2D"]
|
[node name="Water" type="Node2D"]
|
||||||
|
|
||||||
|
|
|
@ -707,7 +707,6 @@ func _on_GenerateButton_pressed():
|
||||||
RepeatButton.disabled = true
|
RepeatButton.disabled = true
|
||||||
generate()
|
generate()
|
||||||
|
|
||||||
|
|
||||||
func _on_BackButton_pressed():
|
func _on_BackButton_pressed():
|
||||||
get_tree().change_scene("res://Menu.tscn")
|
get_tree().change_scene("res://Menu.tscn")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue