Initial commit
This commit is contained in:
parent
d61f563aed
commit
d2146dde2d
14
Breakage1.tres
Normal file
14
Breakage1.tres
Normal file
@ -0,0 +1,14 @@
|
||||
[gd_resource type="PrismMesh" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://SparkSpatialmaterial.tres" type="Material" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
material = ExtResource( 1 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
left_to_right = 2.98023e-008
|
||||
size = Vector3( 0.2, 0.2, 0.2 )
|
||||
subdivide_width = 2
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
14
Breakage2.tres
Normal file
14
Breakage2.tres
Normal file
@ -0,0 +1,14 @@
|
||||
[gd_resource type="PrismMesh" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://SparkSpatialmaterial.tres" type="Material" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
material = ExtResource( 1 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
left_to_right = 0.5
|
||||
size = Vector3( 0.2, 0.2, 0.2 )
|
||||
subdivide_width = 2
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
108
ExplodingLine.tscn
Normal file
108
ExplodingLine.tscn
Normal file
@ -0,0 +1,108 @@
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://Mino/Breakage1.tres" type="PrismMesh" id=1]
|
||||
[ext_resource path="res://Mino/Breakage2.tres" type="PrismMesh" id=2]
|
||||
[ext_resource path="res://Mino/BackMaterial.tres" type="Material" id=3]
|
||||
|
||||
[sub_resource type="Gradient" id=1]
|
||||
|
||||
offsets = PoolRealArray( 0, 1 )
|
||||
colors = PoolColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=2]
|
||||
|
||||
flags = 4
|
||||
gradient = SubResource( 1 )
|
||||
width = 2048
|
||||
|
||||
[sub_resource type="Gradient" id=3]
|
||||
|
||||
offsets = PoolRealArray( 0, 1 )
|
||||
colors = PoolColorArray( 0.802765, 1, 0.451172, 1, 1, 1, 1, 0 )
|
||||
|
||||
[sub_resource type="GradientTexture" id=4]
|
||||
|
||||
flags = 4
|
||||
gradient = SubResource( 3 )
|
||||
width = 2048
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=5]
|
||||
|
||||
render_priority = 0
|
||||
trail_divisor = 2
|
||||
trail_color_modifier = SubResource( 4 )
|
||||
emission_shape = 2
|
||||
emission_box_extents = Vector3( 8, 0.5, 1 )
|
||||
flag_align_y = false
|
||||
flag_rotate_y = true
|
||||
flag_disable_z = false
|
||||
spread = 10.0
|
||||
flatness = 0.0
|
||||
gravity = Vector3( 0, -20, 0 )
|
||||
initial_velocity = 10.0
|
||||
initial_velocity_random = 0.8
|
||||
angular_velocity = 197.74
|
||||
angular_velocity_random = 1.0
|
||||
linear_accel = 100.0
|
||||
linear_accel_random = 0.84
|
||||
radial_accel = 8.48
|
||||
radial_accel_random = 0.85
|
||||
tangential_accel = 0.0
|
||||
tangential_accel_random = 0.0
|
||||
damping = 0.0
|
||||
damping_random = 0.0
|
||||
angle = 402.7
|
||||
angle_random = 0.78
|
||||
scale = 0.5
|
||||
scale_random = 1.0
|
||||
color_ramp = SubResource( 2 )
|
||||
hue_variation = 0.0
|
||||
hue_variation_random = 0.0
|
||||
anim_speed = 0.0
|
||||
anim_speed_random = 0.0
|
||||
anim_offset = 0.0
|
||||
anim_offset_random = 0.0
|
||||
anim_loop = false
|
||||
_sections_unfolded = [ "Color", "Emission Shape", "Gravity", "Scale", "Spread" ]
|
||||
|
||||
[sub_resource type="CubeMesh" id=6]
|
||||
|
||||
material = ExtResource( 3 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
size = Vector3( 0.2, 0.2, 0.2 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
||||
[node name="ExplodingLine" type="Particles"]
|
||||
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
emitting = false
|
||||
amount = 1000
|
||||
lifetime = 2.0
|
||||
one_shot = true
|
||||
preprocess = 0.0
|
||||
speed_scale = 2.18
|
||||
explosiveness = 0.9
|
||||
randomness = 0.69
|
||||
fixed_fps = 0
|
||||
fract_delta = true
|
||||
visibility_aabb = AABB( -5, -0.5, -1, 10, 1, 2 )
|
||||
local_coords = false
|
||||
draw_order = 0
|
||||
process_material = SubResource( 5 )
|
||||
draw_passes = 3
|
||||
draw_pass_1 = ExtResource( 1 )
|
||||
draw_pass_2 = ExtResource( 2 )
|
||||
draw_pass_3 = SubResource( 6 )
|
||||
_sections_unfolded = [ "Draw Passes", "Drawing", "Process Material", "Time", "Transform" ]
|
||||
|
||||
|
356
Grid.tscn
Normal file
356
Grid.tscn
Normal file
@ -0,0 +1,356 @@
|
||||
[gd_scene format=2]
|
||||
|
||||
[node name="Grid" type="Node2D" index="0"]
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="." index="0"]
|
||||
|
||||
position = Vector2( 0, 1 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D2" type="Line2D" parent="." index="1"]
|
||||
|
||||
position = Vector2( 0, 1 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D33" type="Line2D" parent="." index="2"]
|
||||
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D3" type="Line2D" parent="." index="3"]
|
||||
|
||||
position = Vector2( 0, 2 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D4" type="Line2D" parent="." index="4"]
|
||||
|
||||
position = Vector2( 0, 3 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D5" type="Line2D" parent="." index="5"]
|
||||
|
||||
position = Vector2( 0, 4 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D6" type="Line2D" parent="." index="6"]
|
||||
|
||||
position = Vector2( 0, 5 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D7" type="Line2D" parent="." index="7"]
|
||||
|
||||
position = Vector2( 0, 6 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D8" type="Line2D" parent="." index="8"]
|
||||
|
||||
position = Vector2( 0, 7 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D9" type="Line2D" parent="." index="9"]
|
||||
|
||||
position = Vector2( 0, 8 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D10" type="Line2D" parent="." index="10"]
|
||||
|
||||
position = Vector2( 0, 9 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D11" type="Line2D" parent="." index="11"]
|
||||
|
||||
position = Vector2( 0, 10 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D12" type="Line2D" parent="." index="12"]
|
||||
|
||||
position = Vector2( 0, 11 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D13" type="Line2D" parent="." index="13"]
|
||||
|
||||
position = Vector2( 0, 12 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D14" type="Line2D" parent="." index="14"]
|
||||
|
||||
position = Vector2( 0, 13 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D15" type="Line2D" parent="." index="15"]
|
||||
|
||||
position = Vector2( 0, 14 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D16" type="Line2D" parent="." index="16"]
|
||||
|
||||
position = Vector2( 0, 15 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D17" type="Line2D" parent="." index="17"]
|
||||
|
||||
position = Vector2( 0, 16 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D18" type="Line2D" parent="." index="18"]
|
||||
|
||||
position = Vector2( 0, 17 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D19" type="Line2D" parent="." index="19"]
|
||||
|
||||
position = Vector2( 0, 18 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D20" type="Line2D" parent="." index="20"]
|
||||
|
||||
position = Vector2( 0, 19 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D34" type="Line2D" parent="." index="21"]
|
||||
|
||||
position = Vector2( 0, 20 )
|
||||
points = PoolVector2Array( 0, 0, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D21" type="Line2D" parent="." index="22"]
|
||||
|
||||
position = Vector2( 0.890217, 19.8953 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D22" type="Line2D" parent="." index="23"]
|
||||
|
||||
position = Vector2( 1, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D31" type="Line2D" parent="." index="24"]
|
||||
|
||||
position = Vector2( 0, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D23" type="Line2D" parent="." index="25"]
|
||||
|
||||
position = Vector2( 2, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D24" type="Line2D" parent="." index="26"]
|
||||
|
||||
position = Vector2( 3, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D25" type="Line2D" parent="." index="27"]
|
||||
|
||||
position = Vector2( 4, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D26" type="Line2D" parent="." index="28"]
|
||||
|
||||
position = Vector2( 5, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D27" type="Line2D" parent="." index="29"]
|
||||
|
||||
position = Vector2( 6, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D28" type="Line2D" parent="." index="30"]
|
||||
|
||||
position = Vector2( 7, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D29" type="Line2D" parent="." index="31"]
|
||||
|
||||
position = Vector2( 8, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D30" type="Line2D" parent="." index="32"]
|
||||
|
||||
position = Vector2( 9, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="Line2D32" type="Line2D" parent="." index="33"]
|
||||
|
||||
position = Vector2( 10, 20 )
|
||||
scale = Vector2( 0.0108696, 1.04688 )
|
||||
points = PoolVector2Array( 1, -19, 10, 0 )
|
||||
width = 0.1
|
||||
default_color = Color( 0.4, 0.5, 1, 1 )
|
||||
texture_mode = 1881419456
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
|
31
GridBack.tscn
Normal file
31
GridBack.tscn
Normal file
@ -0,0 +1,31 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Mino/BackMaterial.tres" type="Material" id=1]
|
||||
|
||||
[sub_resource type="CubeMesh" id=3]
|
||||
|
||||
material = ExtResource( 1 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
size = Vector3( 11, 22, 0.1 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
||||
[node name="GridBack" type="MeshInstance"]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.5, 9.5, -1 )
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 3 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = null
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
|
217
GridMap.gd
Normal file
217
GridMap.gd
Normal file
@ -0,0 +1,217 @@
|
||||
extends GridMap
|
||||
|
||||
const ExplodingLine = preload("res://ExplodingLine.tscn")
|
||||
const Tetromino = preload("res://Tetrominos/Tetromino.gd")
|
||||
const TetroI = preload("res://Tetrominos/TetroI.tscn")
|
||||
const TetroJ = preload("res://Tetrominos/TetroJ.tscn")
|
||||
const TetroL = preload("res://Tetrominos/TetroL.tscn")
|
||||
const TetroO = preload("res://Tetrominos/TetroO.tscn")
|
||||
const TetroS = preload("res://Tetrominos/TetroS.tscn")
|
||||
const TetroT = preload("res://Tetrominos/TetroT.tscn")
|
||||
const TetroZ = preload("res://Tetrominos/TetroZ.tscn")
|
||||
|
||||
const EMPTY_CELL = -1
|
||||
const NB_MINOES = 4
|
||||
const NEXT_POSITION = Vector3(13, 16, 0)
|
||||
const START_POSITION = Vector3(5, 20, 0)
|
||||
const HOLD_POSITION = Vector3(-5, 16, 0)
|
||||
|
||||
export (int) var NB_LINES
|
||||
export (int) var NB_COLLUMNS
|
||||
|
||||
var next_piece = random_piece()
|
||||
var current_piece
|
||||
var held_piece
|
||||
var current_piece_held = false
|
||||
var locked = false
|
||||
var autoshift_action = ""
|
||||
var movements = {
|
||||
"move_right": Vector3(1, 0, 0),
|
||||
"move_left": Vector3(-1, 0, 0),
|
||||
"soft_drop": Vector3(0, -1, 0)
|
||||
}
|
||||
var exploding_lines = []
|
||||
var lines_to_clear = []
|
||||
var hard_dropping = false
|
||||
var random_bag = []
|
||||
var paused = false
|
||||
|
||||
func _ready():
|
||||
randomize()
|
||||
for y in range(NB_LINES):
|
||||
exploding_lines.append(ExplodingLine.instance())
|
||||
add_child(exploding_lines[y])
|
||||
exploding_lines[y].translation = Vector3(NB_COLLUMNS/2, y, 1)
|
||||
new_piece()
|
||||
|
||||
func random_piece():
|
||||
if not random_bag:
|
||||
random_bag = [
|
||||
TetroI,
|
||||
TetroJ,
|
||||
TetroL,
|
||||
TetroO,
|
||||
TetroS,
|
||||
TetroT,
|
||||
TetroZ
|
||||
]
|
||||
var choice = randi() % random_bag.size()
|
||||
var piece = random_bag[choice].instance()
|
||||
random_bag.remove(choice)
|
||||
add_child(piece)
|
||||
return piece
|
||||
|
||||
func new_piece():
|
||||
current_piece = next_piece
|
||||
current_piece.translation = START_POSITION
|
||||
next_piece = random_piece()
|
||||
next_piece.translation = NEXT_POSITION
|
||||
if move(movements["soft_drop"]):
|
||||
$DropTimer.start()
|
||||
$LockDelay.start()
|
||||
current_piece_held = false
|
||||
else:
|
||||
game_over()
|
||||
|
||||
func _process(delta):
|
||||
if autoshift_action:
|
||||
if not Input.is_action_pressed(autoshift_action):
|
||||
$AutoShiftDelay.stop()
|
||||
$AutoShiftTimer.stop()
|
||||
autoshift_action = ""
|
||||
if Input.is_action_just_pressed("pause"):
|
||||
pause()
|
||||
if not paused and not hard_dropping:
|
||||
for action in movements:
|
||||
if action != autoshift_action:
|
||||
if Input.is_action_pressed(action):
|
||||
move(movements[action])
|
||||
autoshift_action = action
|
||||
$AutoShiftTimer.stop()
|
||||
$AutoShiftDelay.start()
|
||||
if Input.is_action_just_pressed("hard_drop"):
|
||||
hard_dropping = true
|
||||
$HardDropTimer.start()
|
||||
if Input.is_action_just_pressed("rotate_clockwise"):
|
||||
rotate(Tetromino.CLOCKWISE)
|
||||
if Input.is_action_just_pressed("rotate_counterclockwise"):
|
||||
rotate(Tetromino.COUNTERCLOCKWISE)
|
||||
if Input.is_action_just_pressed("hold"):
|
||||
hold()
|
||||
|
||||
func _on_AutoShiftDelay_timeout():
|
||||
if not paused and autoshift_action:
|
||||
move(movements[autoshift_action])
|
||||
$AutoShiftTimer.start()
|
||||
|
||||
func _on_AutoShiftTimer_timeout():
|
||||
if not paused and autoshift_action:
|
||||
move(movements[autoshift_action])
|
||||
|
||||
func is_free_cell(position):
|
||||
return (
|
||||
0 <= position.x and position.x < NB_COLLUMNS
|
||||
and position.y >= 0
|
||||
and get_cell_item(position.x, position.y, 0) == GridMap.INVALID_CELL_ITEM
|
||||
)
|
||||
|
||||
func possible_positions(initial_positions, movement):
|
||||
var position
|
||||
var test_positions = []
|
||||
for i in range(4):
|
||||
position = initial_positions[i] + movement
|
||||
if is_free_cell(position):
|
||||
test_positions.append(position)
|
||||
if test_positions.size() == NB_MINOES:
|
||||
return test_positions
|
||||
else:
|
||||
return []
|
||||
|
||||
func move(movement):
|
||||
if current_piece.move(self, movement):
|
||||
$LockDelay.start()
|
||||
return true
|
||||
else:
|
||||
return false
|
||||
|
||||
func rotate(direction):
|
||||
current_piece.rotate(self, direction)
|
||||
|
||||
func _on_DropTimer_timeout():
|
||||
move(movements["soft_drop"])
|
||||
|
||||
func _on_HardDropTimer_timeout():
|
||||
if not move(movements["soft_drop"]):
|
||||
$HardDropTimer.stop()
|
||||
hard_dropping = false
|
||||
lock_piece()
|
||||
|
||||
func _on_LockDelay_timeout():
|
||||
if not move(movements["soft_drop"]):
|
||||
lock_piece()
|
||||
|
||||
func lock_piece():
|
||||
if current_piece.t_spin == Tetromino.T_SPIN:
|
||||
print("T-SPIN")
|
||||
elif current_piece.t_spin == Tetromino.MINI_T_SPIN:
|
||||
print("MINI T-SPIN")
|
||||
for mino in current_piece.minoes:
|
||||
set_cell_item(current_piece.to_global(mino.translation).x, current_piece.to_global(mino.translation).y, 0, 0)
|
||||
remove_child(current_piece)
|
||||
line_clear()
|
||||
|
||||
func line_clear():
|
||||
var NB_MINOES
|
||||
lines_to_clear = []
|
||||
for y in range(NB_LINES-1, -1, -1):
|
||||
NB_MINOES = 0
|
||||
for x in range(NB_COLLUMNS):
|
||||
if get_cell_item(x, y, 0) == 0:
|
||||
NB_MINOES += 1
|
||||
if NB_MINOES == NB_COLLUMNS:
|
||||
for x in range(NB_COLLUMNS):
|
||||
set_cell_item(x, y, 0, EMPTY_CELL)
|
||||
lines_to_clear.append(y)
|
||||
exploding_lines[y].restart()
|
||||
if lines_to_clear:
|
||||
print(lines_to_clear.size(), " LINES CLEARED")
|
||||
$ExplosionDelay.start()
|
||||
else:
|
||||
new_piece()
|
||||
|
||||
func _on_ExplosionDelay_timeout():
|
||||
for cleared_line in lines_to_clear:
|
||||
for y in range(cleared_line, NB_LINES+2):
|
||||
for x in range(NB_COLLUMNS):
|
||||
set_cell_item(x, y, 0, get_cell_item(x, y+1, 0))
|
||||
new_piece()
|
||||
|
||||
func hold():
|
||||
if not current_piece_held:
|
||||
if held_piece:
|
||||
var tmp = held_piece
|
||||
held_piece = current_piece
|
||||
current_piece = tmp
|
||||
current_piece.translation = START_POSITION
|
||||
else:
|
||||
held_piece = current_piece
|
||||
new_piece()
|
||||
held_piece.translation = HOLD_POSITION
|
||||
current_piece_held = true
|
||||
|
||||
func pause():
|
||||
paused = not paused
|
||||
if paused:
|
||||
print("PAUSE")
|
||||
$DropTimer.stop()
|
||||
$LockDelay.stop()
|
||||
else:
|
||||
print("RESUME")
|
||||
$DropTimer.start()
|
||||
$LockDelay.start()
|
||||
|
||||
func game_over():
|
||||
print("GAME OVER")
|
||||
$DropTimer.stop()
|
||||
$AutoShiftDelay.stop()
|
||||
$AutoShiftTimer.stop()
|
110
GridMap.tscn
Normal file
110
GridMap.tscn
Normal file
@ -0,0 +1,110 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://Mino/MinoLibrary.tres" type="MeshLibrary" id=1]
|
||||
[ext_resource path="res://GridMap.gd" type="Script" id=2]
|
||||
[ext_resource path="res://GridBack.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://Mino/BackMaterial.tres" type="Material" id=4]
|
||||
|
||||
[sub_resource type="CubeMesh" id=1]
|
||||
|
||||
material = ExtResource( 4 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
size = Vector3( 1, 1, 1 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
||||
[node name="GridMap" type="GridMap" index="0"]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.657175, -0.5, -1 )
|
||||
theme = ExtResource( 1 )
|
||||
cell_size = Vector3( 1, 1, 2 )
|
||||
cell_octant_size = 8
|
||||
cell_center_x = false
|
||||
cell_center_y = false
|
||||
cell_center_z = false
|
||||
cell_scale = 1.0
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
data = {
|
||||
"cells": PoolIntArray( 13, 0, 0, 65543, 0, 0 )
|
||||
}
|
||||
script = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Cell", "Transform" ]
|
||||
__meta__ = {
|
||||
"_editor_clip_": 0,
|
||||
"_editor_floor_": Vector3( 0, 3, 0 )
|
||||
}
|
||||
NB_LINES = 20
|
||||
NB_COLLUMNS = 10
|
||||
|
||||
[node name="DropTimer" type="Timer" parent="." index="0"]
|
||||
|
||||
process_mode = 1
|
||||
wait_time = 0.5
|
||||
one_shot = false
|
||||
autostart = false
|
||||
|
||||
[node name="LockDelay" type="Timer" parent="." index="1"]
|
||||
|
||||
process_mode = 1
|
||||
wait_time = 1.0
|
||||
one_shot = true
|
||||
autostart = false
|
||||
|
||||
[node name="AutoShiftDelay" type="Timer" parent="." index="2"]
|
||||
|
||||
process_mode = 1
|
||||
wait_time = 0.2
|
||||
one_shot = true
|
||||
autostart = false
|
||||
|
||||
[node name="AutoShiftTimer" type="Timer" parent="." index="3"]
|
||||
|
||||
process_mode = 1
|
||||
wait_time = 0.03
|
||||
one_shot = false
|
||||
autostart = true
|
||||
|
||||
[node name="HardDropTimer" type="Timer" parent="." index="4"]
|
||||
|
||||
process_mode = 0
|
||||
wait_time = 0.01
|
||||
one_shot = false
|
||||
autostart = false
|
||||
|
||||
[node name="ExplosionDelay" type="Timer" parent="." index="5"]
|
||||
|
||||
process_mode = 1
|
||||
wait_time = 0.1
|
||||
one_shot = true
|
||||
autostart = false
|
||||
|
||||
[node name="GridBack" parent="." index="6" instance=ExtResource( 3 )]
|
||||
|
||||
transform = Transform( 10, 0, 0, 0, 20, 0, 0, 0, 0.1, 4.5, 9.5, -1 )
|
||||
mesh = SubResource( 1 )
|
||||
|
||||
[node name="HoldBack" parent="." index="7" instance=ExtResource( 3 )]
|
||||
|
||||
transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 0.1, -5, 16, -1 )
|
||||
mesh = SubResource( 1 )
|
||||
|
||||
[node name="NextBack" parent="." index="8" instance=ExtResource( 3 )]
|
||||
|
||||
transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 0.1, 14, 16, -1 )
|
||||
mesh = SubResource( 1 )
|
||||
|
||||
[connection signal="timeout" from="DropTimer" to="." method="_on_DropTimer_timeout"]
|
||||
|
||||
[connection signal="timeout" from="LockDelay" to="." method="_on_LockDelay_timeout"]
|
||||
|
||||
[connection signal="timeout" from="AutoShiftDelay" to="." method="_on_AutoShiftDelay_timeout"]
|
||||
|
||||
[connection signal="timeout" from="AutoShiftTimer" to="." method="_on_AutoShiftTimer_timeout"]
|
||||
|
||||
[connection signal="timeout" from="HardDropTimer" to="." method="_on_HardDropTimer_timeout"]
|
||||
|
||||
[connection signal="timeout" from="ExplosionDelay" to="." method="_on_ExplosionDelay_timeout"]
|
||||
|
||||
|
143
Mino.tscn
Normal file
143
Mino.tscn
Normal file
@ -0,0 +1,143 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://MinoMesh.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://MinoMesh.tres" type="CubeMesh" id=2]
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=1]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 0.601563, 0.775878, 1, 0.520275 )
|
||||
metallic = 0.68
|
||||
metallic_specular = 1.0
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 1.0
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Emission", "Metallic", "NormalMap", "Proximity Fade" ]
|
||||
|
||||
[sub_resource type="GradientTexture" id=2]
|
||||
|
||||
flags = 4
|
||||
width = 2048
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=3]
|
||||
|
||||
render_priority = 0
|
||||
trail_divisor = 1
|
||||
emission_shape = 0
|
||||
flag_align_y = false
|
||||
flag_rotate_y = false
|
||||
flag_disable_z = true
|
||||
spread = 0.0
|
||||
flatness = 0.0
|
||||
gravity = Vector3( 0, -30, 0 )
|
||||
initial_velocity = 0.0
|
||||
initial_velocity_random = 0.0
|
||||
angular_velocity = 0.0
|
||||
angular_velocity_random = 0.0
|
||||
orbit_velocity = 0.0
|
||||
orbit_velocity_random = 0.0
|
||||
linear_accel = 0.0
|
||||
linear_accel_random = 0.0
|
||||
radial_accel = 0.0
|
||||
radial_accel_random = 0.0
|
||||
tangential_accel = 0.0
|
||||
tangential_accel_random = 0.0
|
||||
damping = 0.0
|
||||
damping_random = 0.0
|
||||
angle = 0.0
|
||||
angle_random = 0.0
|
||||
scale = 1.0
|
||||
scale_random = 0.0
|
||||
color_ramp = SubResource( 2 )
|
||||
hue_variation = 0.0
|
||||
hue_variation_random = 0.0
|
||||
anim_speed = 0.0
|
||||
anim_speed_random = 0.0
|
||||
anim_offset = 0.0
|
||||
anim_offset_random = 0.0
|
||||
anim_loop = false
|
||||
_sections_unfolded = [ "Angular Velocity", "Color", "Gravity", "Initial Velocity" ]
|
||||
|
||||
[node name="Mino" type="Spatial"]
|
||||
|
||||
_sections_unfolded = [ "Pause", "Transform", "Visibility" ]
|
||||
|
||||
[node name="MinoMesh" parent="." index="0" instance=ExtResource( 1 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0.5, 1 )
|
||||
_sections_unfolded = [ "Geometry", "Transform", "material" ]
|
||||
|
||||
[node name="Trail" type="Particles" parent="." index="1"]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0.5, 0.5 )
|
||||
visible = false
|
||||
layers = 1
|
||||
material_override = SubResource( 1 )
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
emitting = true
|
||||
amount = 10
|
||||
lifetime = 0.1
|
||||
one_shot = false
|
||||
preprocess = 0.0
|
||||
speed_scale = 1.0
|
||||
explosiveness = 0.0
|
||||
randomness = 0.0
|
||||
fixed_fps = 0
|
||||
fract_delta = true
|
||||
visibility_aabb = AABB( -4, -4, -4, 8, 8, 8 )
|
||||
local_coords = false
|
||||
draw_order = 0
|
||||
process_material = SubResource( 3 )
|
||||
draw_passes = 1
|
||||
draw_pass_1 = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Draw Passes", "Process Material", "Transform" ]
|
||||
|
||||
|
55
Mino/BackMaterial.tres
Normal file
55
Mino/BackMaterial.tres
Normal file
@ -0,0 +1,55 @@
|
||||
[gd_resource type="SpatialMaterial" format=2]
|
||||
|
||||
[resource]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 0.601563, 0.775878, 1, 0.0338039 )
|
||||
metallic = 0.18
|
||||
metallic_specular = 1.0
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.46
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 1.0
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Emission", "Metallic", "NormalMap", "Proximity Fade" ]
|
||||
|
14
Mino/Breakage1.tres
Normal file
14
Mino/Breakage1.tres
Normal file
@ -0,0 +1,14 @@
|
||||
[gd_resource type="PrismMesh" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Mino/MinoMaterial.tres" type="Material" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
material = ExtResource( 1 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
left_to_right = 2.98023e-008
|
||||
size = Vector3( 0.2, 0.2, 0.2 )
|
||||
subdivide_width = 2
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
14
Mino/Breakage2.tres
Normal file
14
Mino/Breakage2.tres
Normal file
@ -0,0 +1,14 @@
|
||||
[gd_resource type="PrismMesh" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Mino/MinoMaterial.tres" type="Material" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
material = ExtResource( 1 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
left_to_right = 0.5
|
||||
size = Vector3( 0.2, 0.2, 0.2 )
|
||||
subdivide_width = 2
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
152
Mino/Mino.tscn
Normal file
152
Mino/Mino.tscn
Normal file
@ -0,0 +1,152 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://Mino/MinoMesh.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Mino/MinoMesh.tres" type="CubeMesh" id=2]
|
||||
[ext_resource path="res://Mino/TrailMaterial.tres" type="Material" id=3]
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=1]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 0.601563, 0.775878, 1, 0.270275 )
|
||||
metallic = 0.68
|
||||
metallic_specular = 1.0
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 1.0
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Emission", "Metallic", "NormalMap", "Proximity Fade" ]
|
||||
|
||||
[sub_resource type="GradientTexture" id=2]
|
||||
|
||||
flags = 4
|
||||
width = 2048
|
||||
|
||||
[sub_resource type="ParticlesMaterial" id=3]
|
||||
|
||||
render_priority = 0
|
||||
trail_divisor = 1
|
||||
emission_shape = 0
|
||||
flag_align_y = false
|
||||
flag_rotate_y = false
|
||||
flag_disable_z = true
|
||||
spread = 0.0
|
||||
flatness = 0.0
|
||||
gravity = Vector3( 0, 0, 0 )
|
||||
initial_velocity = 0.0
|
||||
initial_velocity_random = 0.0
|
||||
angular_velocity = 0.0
|
||||
angular_velocity_random = 0.0
|
||||
orbit_velocity = 0.0
|
||||
orbit_velocity_random = 0.0
|
||||
linear_accel = 0.0
|
||||
linear_accel_random = 0.0
|
||||
radial_accel = 0.0
|
||||
radial_accel_random = 0.0
|
||||
tangential_accel = 0.0
|
||||
tangential_accel_random = 0.0
|
||||
damping = 0.0
|
||||
damping_random = 0.0
|
||||
angle = 0.0
|
||||
angle_random = 0.0
|
||||
scale = 1.0
|
||||
scale_random = 0.0
|
||||
color_ramp = SubResource( 2 )
|
||||
hue_variation = 0.0
|
||||
hue_variation_random = 0.0
|
||||
anim_speed = 0.0
|
||||
anim_speed_random = 0.0
|
||||
anim_offset = 0.0
|
||||
anim_offset_random = 0.0
|
||||
anim_loop = false
|
||||
_sections_unfolded = [ "Color", "Gravity" ]
|
||||
|
||||
[sub_resource type="CubeMesh" id=4]
|
||||
|
||||
material = ExtResource( 3 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
size = Vector3( 0.9, 0.9, 2 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
||||
[node name="Mino" type="Spatial"]
|
||||
|
||||
_sections_unfolded = [ "Pause", "Transform", "Visibility" ]
|
||||
|
||||
[node name="MinoMesh" parent="." index="0" instance=ExtResource( 1 )]
|
||||
|
||||
mesh = ExtResource( 2 )
|
||||
material/0 = null
|
||||
_sections_unfolded = [ "Geometry", "Transform", "material" ]
|
||||
|
||||
[node name="Trail" type="Particles" parent="." index="1"]
|
||||
|
||||
layers = 1
|
||||
material_override = SubResource( 1 )
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
emitting = true
|
||||
amount = 20
|
||||
lifetime = 0.1
|
||||
one_shot = false
|
||||
preprocess = 0.0
|
||||
speed_scale = 1.0
|
||||
explosiveness = 0.0
|
||||
randomness = 0.0
|
||||
fixed_fps = 0
|
||||
fract_delta = true
|
||||
visibility_aabb = AABB( -0.5, -0.5, -1, 1, 1, 2 )
|
||||
local_coords = false
|
||||
draw_order = 0
|
||||
process_material = SubResource( 3 )
|
||||
draw_passes = 1
|
||||
draw_pass_1 = SubResource( 4 )
|
||||
_sections_unfolded = [ "Draw Passes", "Drawing", "Geometry", "LOD", "Process Material", "Time", "Transform" ]
|
||||
|
||||
|
BIN
Mino/MinoLibrary.meshlib
Normal file
BIN
Mino/MinoLibrary.meshlib
Normal file
Binary file not shown.
31
Mino/MinoLibrary.tres
Normal file
31
Mino/MinoLibrary.tres
Normal file
File diff suppressed because one or more lines are too long
59
Mino/MinoMaterial.tres
Normal file
59
Mino/MinoMaterial.tres
Normal file
@ -0,0 +1,59 @@
|
||||
[gd_resource type="SpatialMaterial" format=2]
|
||||
|
||||
[resource]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 0.601563, 0.775878, 1, 0.25 )
|
||||
metallic = 0.4
|
||||
metallic_specular = 1.0
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.46
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = true
|
||||
emission = Color( 0.755859, 1, 0.914169, 1 )
|
||||
emission_energy = 0.7
|
||||
emission_operator = 0
|
||||
emission_on_uv2 = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 1.0
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Emission", "NormalMap", "Proximity Fade" ]
|
||||
|
13
Mino/MinoMesh.tres
Normal file
13
Mino/MinoMesh.tres
Normal file
@ -0,0 +1,13 @@
|
||||
[gd_resource type="CubeMesh" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Mino/MinoMaterial.tres" type="Material" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
material = ExtResource( 1 )
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
size = Vector3( 0.9, 0.9, 1.9 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
30
Mino/MinoMesh.tscn
Normal file
30
Mino/MinoMesh.tscn
Normal file
@ -0,0 +1,30 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Mino/MinoMaterial.tres" type="Material" id=1]
|
||||
|
||||
|
||||
[sub_resource type="CubeMesh" id=1]
|
||||
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
size = Vector3( 0.9, 0.9, 0.9 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
||||
[node name="Mino" type="MeshInstance" index="0"]
|
||||
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 1 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Transform", "material" ]
|
||||
|
||||
|
59
Mino/SparkSpatialmaterial.tres
Normal file
59
Mino/SparkSpatialmaterial.tres
Normal file
@ -0,0 +1,59 @@
|
||||
[gd_resource type="SpatialMaterial" format=2]
|
||||
|
||||
[resource]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 0.67451, 1, 0.988235, 0.108118 )
|
||||
metallic = 0.22
|
||||
metallic_specular = 1.0
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.49
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = true
|
||||
emission = Color( 0.700471, 1, 0.98947, 1 )
|
||||
emission_energy = 0.2
|
||||
emission_operator = 0
|
||||
emission_on_uv2 = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 1.0
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Emission", "Metallic", "Parameters" ]
|
||||
|
55
Mino/TrailMaterial.tres
Normal file
55
Mino/TrailMaterial.tres
Normal file
@ -0,0 +1,55 @@
|
||||
[gd_resource type="SpatialMaterial" format=2]
|
||||
|
||||
[resource]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 0.601563, 0.775878, 1, 0.00392157 )
|
||||
metallic = 0.68
|
||||
metallic_specular = 1.0
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 1.0
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Albedo", "Emission", "Proximity Fade" ]
|
||||
|
BIN
MinoLibrary.meshlib
Normal file
BIN
MinoLibrary.meshlib
Normal file
Binary file not shown.
40
MinoLibrary.tres
Normal file
40
MinoLibrary.tres
Normal file
File diff suppressed because one or more lines are too long
59
MinoMaterial.tres
Normal file
59
MinoMaterial.tres
Normal file
@ -0,0 +1,59 @@
|
||||
[gd_resource type="SpatialMaterial" format=2]
|
||||
|
||||
[resource]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 0.601563, 0.775878, 1, 1 )
|
||||
metallic = 0.68
|
||||
metallic_specular = 1.0
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.46
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = true
|
||||
emission = Color( 0.71875, 0.897827, 1, 1 )
|
||||
emission_energy = 0.3
|
||||
emission_operator = 1
|
||||
emission_on_uv2 = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 1.0
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Emission", "NormalMap", "Proximity Fade", "Roughness" ]
|
||||
|
10
MinoMesh.tres
Normal file
10
MinoMesh.tres
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_resource type="CubeMesh" format=2]
|
||||
|
||||
[resource]
|
||||
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
size = Vector3( 0.9, 0.9, 1.9 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
29
MinoMesh.tscn
Normal file
29
MinoMesh.tscn
Normal file
@ -0,0 +1,29 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://MinoMaterial.tres" type="Material" id=1]
|
||||
|
||||
[sub_resource type="CubeMesh" id=1]
|
||||
|
||||
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
|
||||
size = Vector3( 0.9, 0.9, 0.9 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
||||
[node name="Mino" type="MeshInstance"]
|
||||
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 1 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Transform", "material" ]
|
||||
|
||||
|
10
Mino_Library.tscn
Normal file
10
Mino_Library.tscn
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://Mino/MinoMesh.tscn" type="PackedScene" id=1]
|
||||
|
||||
|
||||
[node name="Mino_Library" type="Spatial" index="0"]
|
||||
|
||||
[node name="Mino" parent="." index="0" instance=ExtResource( 1 )]
|
||||
|
||||
|
59
SparkSpatialmaterial.tres
Normal file
59
SparkSpatialmaterial.tres
Normal file
@ -0,0 +1,59 @@
|
||||
[gd_resource type="SpatialMaterial" format=2]
|
||||
|
||||
[resource]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 0.887543, 1, 0.738281, 0.529294 )
|
||||
metallic = 0.78
|
||||
metallic_specular = 1.0
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.49
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = true
|
||||
emission = Color( 1, 1, 0.700471, 1 )
|
||||
emission_energy = 0.2
|
||||
emission_operator = 0
|
||||
emission_on_uv2 = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 1.0
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Emission", "Proximity Fade" ]
|
||||
|
70
TetroI.gd
Normal file
70
TetroI.gd
Normal file
@ -0,0 +1,70 @@
|
||||
extends "Tetrominos/Tetromino.gd"
|
||||
|
||||
const CLOCKWISE = -1
|
||||
const COUNTERCLOCKWISE = 1
|
||||
const SUPER_ROTATION_SYSTEM = [
|
||||
{
|
||||
COUNTERCLOCKWISE: [
|
||||
Vector3(0, -1, 0),
|
||||
Vector3(-1, -1, 0),
|
||||
Vector3(2, -1, 0),
|
||||
Vector3(-1, 1, 0),
|
||||
Vector3(2, -2, 0)
|
||||
],
|
||||
CLOCKWISE: [
|
||||
Vector3(1, 0, 0),
|
||||
Vector3(-1, 0, 0),
|
||||
Vector3(2, 0, 0),
|
||||
Vector3(-1, -1, 0),
|
||||
Vector3(2, 2, 0)
|
||||
],
|
||||
},
|
||||
{
|
||||
COUNTERCLOCKWISE: [
|
||||
Vector3(-1, 0, 0),
|
||||
Vector3(1, 0, 0),
|
||||
Vector3(-2, 0, 0),
|
||||
Vector3(1, 1, 0),
|
||||
Vector3(-2, -2, 0)
|
||||
],
|
||||
CLOCKWISE: [
|
||||
Vector3(0, -1, 0),
|
||||
Vector3(-1, -1, 0),
|
||||
Vector3(2, -1, 0),
|
||||
Vector3(-1, 1, 0),
|
||||
Vector3(2, -2, 0)
|
||||
],
|
||||
},
|
||||
{
|
||||
COUNTERCLOCKWISE: [
|
||||
Vector3(0, 1, 0),
|
||||
Vector3(1, 1, 0),
|
||||
Vector3(-2, 1, 0),
|
||||
Vector3(1, -1, 0),
|
||||
Vector3(-2, 2, 0)
|
||||
],
|
||||
CLOCKWISE: [
|
||||
Vector3(-1, 0, 0),
|
||||
Vector3(1, 0, 0),
|
||||
Vector3(-2, 0, 0),
|
||||
Vector3(1, 1, 0),
|
||||
Vector3(-2, -2, 0)
|
||||
],
|
||||
},
|
||||
{
|
||||
COUNTERCLOCKWISE: [
|
||||
Vector3(1, 0, 0),
|
||||
Vector3(-1, 0, 0),
|
||||
Vector3(2, 0, 0),
|
||||
Vector3(-1, -1, 0),
|
||||
Vector3(2, 2, 0)
|
||||
],
|
||||
CLOCKWISE: [
|
||||
Vector3(0, 1, 0),
|
||||
Vector3(1, 1, 0),
|
||||
Vector3(-2, 1, 0),
|
||||
Vector3(1, -1, 0),
|
||||
Vector3(-2, 2, 0)
|
||||
],
|
||||
},
|
||||
]
|
6
TetroT.gd
Normal file
6
TetroT.gd
Normal file
@ -0,0 +1,6 @@
|
||||
extends Spatial
|
||||
|
||||
var minos
|
||||
|
||||
func _ready():
|
||||
minos = [$Mino, $Mino2, $Mino3, $Mino4]
|
25
TetroT.tscn
Normal file
25
TetroT.tscn
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://TetroT.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Mino.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="TetroT" type="Spatial"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="Mino" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Mino2" parent="." index="1" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0 )
|
||||
|
||||
[node name="Mino3" parent="." index="2" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
|
||||
|
||||
[node name="Mino4" parent="." index="3" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 )
|
||||
|
||||
|
25
Tetrominos/TetroI.tscn
Normal file
25
Tetrominos/TetroI.tscn
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://TetroI.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Mino/Mino.tscn" type="PackedScene" id=2]
|
||||
|
||||
|
||||
[node name="TetroI" type="Spatial" index="0"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Mino1" parent="." index="1" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0 )
|
||||
|
||||
[node name="Mino2" parent="." index="2" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
|
||||
|
||||
[node name="Mino3" parent="." index="3" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0 )
|
||||
|
||||
|
2
Tetrominos/TetroJ.gd
Normal file
2
Tetrominos/TetroJ.gd
Normal file
@ -0,0 +1,2 @@
|
||||
extends "Tetromino.gd"
|
||||
|
24
Tetrominos/TetroJ.tscn
Normal file
24
Tetrominos/TetroJ.tscn
Normal file
@ -0,0 +1,24 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Tetrominos/TetroJ.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Mino/Mino.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="TetroJ" type="Spatial"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Mino1" parent="." index="1" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 1, 0 )
|
||||
|
||||
[node name="Mino2" parent="." index="2" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0 )
|
||||
|
||||
[node name="Mino3" parent="." index="3" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
|
||||
|
||||
|
2
Tetrominos/TetroL.gd
Normal file
2
Tetrominos/TetroL.gd
Normal file
@ -0,0 +1,2 @@
|
||||
extends "Tetromino.gd"
|
||||
|
25
Tetrominos/TetroL.tscn
Normal file
25
Tetrominos/TetroL.tscn
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Tetrominos/TetroL.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Mino/Mino.tscn" type="PackedScene" id=2]
|
||||
|
||||
|
||||
[node name="TetroL" type="Spatial" index="0"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Mino1" parent="." index="1" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0 )
|
||||
|
||||
[node name="Mino2" parent="." index="2" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
|
||||
|
||||
[node name="Mino3" parent="." index="3" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0 )
|
||||
|
||||
|
4
Tetrominos/TetroO.gd
Normal file
4
Tetrominos/TetroO.gd
Normal file
@ -0,0 +1,4 @@
|
||||
extends "Tetromino.gd"
|
||||
|
||||
func rotate(grid, direction):
|
||||
pass
|
25
Tetrominos/TetroO.tscn
Normal file
25
Tetrominos/TetroO.tscn
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Tetrominos/TetroO.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Mino/Mino.tscn" type="PackedScene" id=2]
|
||||
|
||||
|
||||
[node name="TetroO" type="Spatial" index="0"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Mino1" parent="." index="1" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
|
||||
|
||||
[node name="Mino2" parent="." index="2" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0 )
|
||||
|
||||
[node name="Mino3" parent="." index="3" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
|
||||
|
||||
|
2
Tetrominos/TetroS.gd
Normal file
2
Tetrominos/TetroS.gd
Normal file
@ -0,0 +1,2 @@
|
||||
extends "Tetromino.gd"
|
||||
|
25
Tetrominos/TetroS.tscn
Normal file
25
Tetrominos/TetroS.tscn
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Tetrominos/TetroS.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Mino/Mino.tscn" type="PackedScene" id=2]
|
||||
|
||||
|
||||
[node name="TetroS" type="Spatial" index="0"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Mino1" parent="." index="1" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0 )
|
||||
|
||||
[node name="Mino2" parent="." index="2" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
|
||||
|
||||
[node name="Mino3" parent="." index="3" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0 )
|
||||
|
||||
|
23
Tetrominos/TetroT.gd
Normal file
23
Tetrominos/TetroT.gd
Normal file
@ -0,0 +1,23 @@
|
||||
extends "Tetromino.gd"
|
||||
|
||||
const T_SLOT = [
|
||||
Vector3(-1, 1, 0),
|
||||
Vector3(1, 1, 0),
|
||||
Vector3(1, -1, 0),
|
||||
Vector3(-1, -1, 0)
|
||||
]
|
||||
|
||||
func rotate(grid, direction):
|
||||
if .rotate(grid, direction):
|
||||
var center = to_global(minoes[0].translation)
|
||||
var a = not grid.is_free_cell(center + T_SLOT[orientation])
|
||||
var b = not grid.is_free_cell(center + T_SLOT[(1+orientation)%4])
|
||||
var c = not grid.is_free_cell(center + T_SLOT[(2+orientation)%4])
|
||||
var d = not grid.is_free_cell(center + T_SLOT[(3+orientation)%4])
|
||||
if a and b and (c or d):
|
||||
t_spin = T_SPIN
|
||||
elif c and d and (a or b):
|
||||
if t_spin != T_SPIN:
|
||||
t_spin = MINI_T_SPIN
|
||||
return true
|
||||
return false
|
25
Tetrominos/TetroT.tscn
Normal file
25
Tetrominos/TetroT.tscn
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Tetrominos/TetroT.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Mino/Mino.tscn" type="PackedScene" id=2]
|
||||
|
||||
|
||||
[node name="TetroT" type="Spatial" index="0"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Mino1" parent="." index="1" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0 )
|
||||
|
||||
[node name="Mino2" parent="." index="2" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
|
||||
|
||||
[node name="Mino3" parent="." index="3" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
|
||||
|
||||
|
2
Tetrominos/TetroZ.gd
Normal file
2
Tetrominos/TetroZ.gd
Normal file
@ -0,0 +1,2 @@
|
||||
extends "Tetromino.gd"
|
||||
|
25
Tetrominos/TetroZ.tscn
Normal file
25
Tetrominos/TetroZ.tscn
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Tetrominos/TetroZ.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Mino/Mino.tscn" type="PackedScene" id=2]
|
||||
|
||||
|
||||
[node name="TetroZ" type="Spatial" index="0"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]
|
||||
|
||||
[node name="Mino1" parent="." index="1" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 1, 0 )
|
||||
|
||||
[node name="Mino2" parent="." index="2" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
|
||||
|
||||
[node name="Mino3" parent="." index="3" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
|
||||
|
||||
|
125
Tetrominos/Tetromino.gd
Normal file
125
Tetrominos/Tetromino.gd
Normal file
@ -0,0 +1,125 @@
|
||||
extends Spatial
|
||||
|
||||
const NB_MINOES = 4
|
||||
const CLOCKWISE = -1
|
||||
const COUNTERCLOCKWISE = 1
|
||||
const T_SPIN = 2
|
||||
const MINI_T_SPIN = 1
|
||||
const SUPER_ROTATION_SYSTEM = [
|
||||
{
|
||||
COUNTERCLOCKWISE: [
|
||||
Vector3(0, 0, 0),
|
||||
Vector3(1, 0, 0),
|
||||
Vector3(1, 1, 0),
|
||||
Vector3(0, -2, 0),
|
||||
Vector3(1, -2, 0)
|
||||
],
|
||||
CLOCKWISE: [
|
||||
Vector3(0, 0, 0),
|
||||
Vector3(-1, 0, 0),
|
||||
Vector3(-1, 1, 0),
|
||||
Vector3(0, -2, 0),
|
||||
Vector3(-1, -2, 0)
|
||||
],
|
||||
},
|
||||
{
|
||||
COUNTERCLOCKWISE: [
|
||||
Vector3(0, 0, 0),
|
||||
Vector3(1, 0, 0),
|
||||
Vector3(1, -1, 0),
|
||||
Vector3(0, 2, 0),
|
||||
Vector3(1, 2, 0)
|
||||
],
|
||||
CLOCKWISE: [
|
||||
Vector3(0, 0, 0),
|
||||
Vector3(1, 0, 0),
|
||||
Vector3(1, -1, 0),
|
||||
Vector3(0, 2, 0),
|
||||
Vector3(1, 2, 0)
|
||||
],
|
||||
},
|
||||
{
|
||||
COUNTERCLOCKWISE: [
|
||||
Vector3(0, 0, 0),
|
||||
Vector3(-1, 0, 0),
|
||||
Vector3(-1, 1, 0),
|
||||
Vector3(0, -2, 0),
|
||||
Vector3(-1, -2, 0)
|
||||
],
|
||||
CLOCKWISE: [
|
||||
Vector3(0, 0, 0),
|
||||
Vector3(1, 0, 0),
|
||||
Vector3(1, 1, 0),
|
||||
Vector3(0, -2, 0),
|
||||
Vector3(1, -2, 0)
|
||||
],
|
||||
},
|
||||
{
|
||||
COUNTERCLOCKWISE: [
|
||||
Vector3(0, 0, 0),
|
||||
Vector3(-1, 0, 0),
|
||||
Vector3(-1, -1, 0),
|
||||
Vector3(0, 2, 0),
|
||||
Vector3(-1, 2, 0)
|
||||
],
|
||||
CLOCKWISE: [
|
||||
Vector3(0, 0, 0),
|
||||
Vector3(-1, 0, 0),
|
||||
Vector3(-1, -1, 0),
|
||||
Vector3(0, -2, 0),
|
||||
Vector3(-1, 2, 0)
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
var minoes
|
||||
var orientation = 0
|
||||
var t_spin = 0
|
||||
|
||||
func _ready():
|
||||
minoes = [$Mino0, $Mino1, $Mino2, $Mino3]
|
||||
|
||||
func positions():
|
||||
var p = []
|
||||
for mino in minoes:
|
||||
p.append(to_global(mino.translation))
|
||||
return p
|
||||
|
||||
func rotated_positions(direction):
|
||||
var translations = [to_global(minoes[0].translation) ]
|
||||
for i in range(1, 4):
|
||||
var v = to_global(minoes[i].translation)
|
||||
v -= to_global(minoes[0].translation)
|
||||
v = Vector3(-1*direction*v.y, direction*v.x, 0)
|
||||
v += to_global(minoes[0].translation)
|
||||
translations.append(v)
|
||||
return translations
|
||||
|
||||
func rotation_movement_liberty(direction):
|
||||
return SUPER_ROTATION_SYSTEM[orientation][direction]
|
||||
|
||||
func apply_positions(positions):
|
||||
for i in range(4):
|
||||
minoes[i].translation = to_local(positions[i])
|
||||
|
||||
func move(grid, movement):
|
||||
var new_positions = grid.possible_positions(positions(), movement)
|
||||
if new_positions:
|
||||
translate(movement)
|
||||
return true
|
||||
else:
|
||||
return false
|
||||
|
||||
func rotate(grid, direction):
|
||||
var rotated_positions = rotated_positions(direction)
|
||||
var movements = rotation_movement_liberty(direction)
|
||||
var test_position
|
||||
for movement in movements:
|
||||
test_position = grid.possible_positions(rotated_positions, movement)
|
||||
if test_position:
|
||||
orientation -= direction
|
||||
orientation %= NB_MINOES
|
||||
apply_positions(rotated_positions)
|
||||
translate(movement)
|
||||
return true
|
||||
return false
|
55
TrailMaterial.tres
Normal file
55
TrailMaterial.tres
Normal file
@ -0,0 +1,55 @@
|
||||
[gd_resource type="SpatialMaterial" format=2]
|
||||
|
||||
[resource]
|
||||
|
||||
render_priority = 0
|
||||
flags_transparent = true
|
||||
flags_unshaded = false
|
||||
flags_vertex_lighting = false
|
||||
flags_no_depth_test = false
|
||||
flags_use_point_size = false
|
||||
flags_world_triplanar = false
|
||||
flags_fixed_size = false
|
||||
flags_albedo_tex_force_srgb = false
|
||||
vertex_color_use_as_albedo = false
|
||||
vertex_color_is_srgb = false
|
||||
params_diffuse_mode = 0
|
||||
params_specular_mode = 0
|
||||
params_blend_mode = 1
|
||||
params_cull_mode = 0
|
||||
params_depth_draw_mode = 0
|
||||
params_line_width = 1.0
|
||||
params_point_size = 1.0
|
||||
params_billboard_mode = 0
|
||||
params_grow = false
|
||||
params_use_alpha_scissor = false
|
||||
albedo_color = Color( 0.601563, 0.775878, 1, 0.520275 )
|
||||
metallic = 0.68
|
||||
metallic_specular = 1.0
|
||||
metallic_texture_channel = 0
|
||||
roughness = 0.0
|
||||
roughness_texture_channel = 0
|
||||
emission_enabled = false
|
||||
normal_enabled = false
|
||||
rim_enabled = false
|
||||
clearcoat_enabled = false
|
||||
anisotropy_enabled = false
|
||||
ao_enabled = false
|
||||
depth_enabled = false
|
||||
subsurf_scatter_enabled = false
|
||||
transmission_enabled = false
|
||||
refraction_enabled = false
|
||||
detail_enabled = false
|
||||
uv1_scale = Vector3( 1, 1, 1 )
|
||||
uv1_offset = Vector3( 0, 0, 0 )
|
||||
uv1_triplanar = false
|
||||
uv1_triplanar_sharpness = 1.0
|
||||
uv2_scale = Vector3( 1, 1, 1 )
|
||||
uv2_offset = Vector3( 0, 0, 0 )
|
||||
uv2_triplanar = false
|
||||
uv2_triplanar_sharpness = 1.0
|
||||
proximity_fade_enable = true
|
||||
proximity_fade_distance = 1.0
|
||||
distance_fade_enable = false
|
||||
_sections_unfolded = [ "Proximity Fade" ]
|
||||
|
148
WorldEnvironment.tscn
Normal file
148
WorldEnvironment.tscn
Normal file
@ -0,0 +1,148 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://starmap_g8k.jpg" type="Texture" id=1]
|
||||
[ext_resource path="res://GridMap.tscn" type="PackedScene" id=2]
|
||||
|
||||
[sub_resource type="PanoramaSky" id=1]
|
||||
|
||||
radiance_size = 4
|
||||
panorama = ExtResource( 1 )
|
||||
|
||||
[sub_resource type="Environment" id=2]
|
||||
|
||||
resource_local_to_scene = true
|
||||
background_mode = 2
|
||||
background_sky = SubResource( 1 )
|
||||
background_sky_custom_fov = 0.0
|
||||
background_color = Color( 0, 0, 0, 1 )
|
||||
background_energy = 2.0
|
||||
background_canvas_max_layer = 0
|
||||
ambient_light_color = Color( 0.469971, 0.542197, 0.6875, 1 )
|
||||
ambient_light_energy = 3.0
|
||||
ambient_light_sky_contribution = 1.0
|
||||
fog_enabled = false
|
||||
fog_color = Color( 0.5, 0.6, 0.7, 1 )
|
||||
fog_sun_color = Color( 1, 0.9, 0.7, 1 )
|
||||
fog_sun_amount = 0.0
|
||||
fog_depth_enabled = true
|
||||
fog_depth_begin = 10.0
|
||||
fog_depth_curve = 1.0
|
||||
fog_transmit_enabled = false
|
||||
fog_transmit_curve = 1.0
|
||||
fog_height_enabled = false
|
||||
fog_height_min = 0.0
|
||||
fog_height_max = 100.0
|
||||
fog_height_curve = 1.0
|
||||
tonemap_mode = 0
|
||||
tonemap_exposure = 1.0
|
||||
tonemap_white = 1.0
|
||||
auto_exposure_enabled = false
|
||||
auto_exposure_scale = 0.4
|
||||
auto_exposure_min_luma = 0.05
|
||||
auto_exposure_max_luma = 8.0
|
||||
auto_exposure_speed = 0.5
|
||||
ss_reflections_enabled = false
|
||||
ss_reflections_max_steps = 64
|
||||
ss_reflections_fade_in = 0.15
|
||||
ss_reflections_fade_out = 2.0
|
||||
ss_reflections_depth_tolerance = 0.2
|
||||
ss_reflections_roughness = true
|
||||
ssao_enabled = false
|
||||
ssao_radius = 1.0
|
||||
ssao_intensity = 1.0
|
||||
ssao_radius2 = 0.0
|
||||
ssao_intensity2 = 1.0
|
||||
ssao_bias = 0.01
|
||||
ssao_light_affect = 0.0
|
||||
ssao_color = Color( 0, 0, 0, 1 )
|
||||
ssao_quality = 0
|
||||
ssao_blur = 3
|
||||
ssao_edge_sharpness = 4.0
|
||||
dof_blur_far_enabled = false
|
||||
dof_blur_far_distance = 10.0
|
||||
dof_blur_far_transition = 5.0
|
||||
dof_blur_far_amount = 0.1
|
||||
dof_blur_far_quality = 1
|
||||
dof_blur_near_enabled = false
|
||||
dof_blur_near_distance = 2.0
|
||||
dof_blur_near_transition = 1.0
|
||||
dof_blur_near_amount = 0.1
|
||||
dof_blur_near_quality = 1
|
||||
glow_enabled = false
|
||||
glow_levels/1 = false
|
||||
glow_levels/2 = false
|
||||
glow_levels/3 = true
|
||||
glow_levels/4 = false
|
||||
glow_levels/5 = true
|
||||
glow_levels/6 = false
|
||||
glow_levels/7 = false
|
||||
glow_intensity = 0.8
|
||||
glow_strength = 1.0
|
||||
glow_bloom = 0.0
|
||||
glow_blend_mode = 2
|
||||
glow_hdr_threshold = 1.0
|
||||
glow_hdr_scale = 2.0
|
||||
glow_bicubic_upscale = false
|
||||
adjustment_enabled = false
|
||||
adjustment_brightness = 1.0
|
||||
adjustment_contrast = 1.0
|
||||
adjustment_saturation = 1.0
|
||||
_sections_unfolded = [ "Ambient Light", "Background", "Resource" ]
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment"]
|
||||
|
||||
environment = SubResource( 2 )
|
||||
|
||||
[node name="Camera" type="Camera" parent="." index="0"]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.5, 10, 20 )
|
||||
keep_aspect = 1
|
||||
cull_mask = 1048575
|
||||
environment = null
|
||||
h_offset = 0.0
|
||||
v_offset = 0.0
|
||||
doppler_tracking = 0
|
||||
projection = 0
|
||||
current = false
|
||||
fov = 70.0
|
||||
size = 1.0
|
||||
near = 0.05
|
||||
far = -1.22275e+007
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="DirectionalLight" type="DirectionalLight" parent="." index="1"]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 0.999391, -0.0348995, 0, 0.0348995, 0.999391, 5, 10, 50 )
|
||||
layers = 1
|
||||
light_color = Color( 1, 1, 1, 1 )
|
||||
light_energy = 1.0
|
||||
light_indirect_energy = 1.0
|
||||
light_negative = false
|
||||
light_specular = 0.5
|
||||
light_bake_mode = 1
|
||||
light_cull_mask = -1
|
||||
shadow_enabled = false
|
||||
shadow_color = Color( 0, 0, 0, 1 )
|
||||
shadow_bias = 0.1
|
||||
shadow_contact = 0.0
|
||||
shadow_reverse_cull_face = false
|
||||
editor_only = false
|
||||
directional_shadow_mode = 2
|
||||
directional_shadow_split_1 = 0.1
|
||||
directional_shadow_split_2 = 0.2
|
||||
directional_shadow_split_3 = 0.5
|
||||
directional_shadow_blend_splits = false
|
||||
directional_shadow_normal_bias = 0.8
|
||||
directional_shadow_bias_split_scale = 0.25
|
||||
directional_shadow_depth_range = 0
|
||||
directional_shadow_max_distance = 200.0
|
||||
_sections_unfolded = [ "Light", "Transform" ]
|
||||
|
||||
[node name="GridMap" parent="." index="2" instance=ExtResource( 2 )]
|
||||
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
data = {
|
||||
"cells": PoolIntArray( )
|
||||
}
|
||||
|
||||
|
57
project.godot
Normal file
57
project.godot
Normal file
@ -0,0 +1,57 @@
|
||||
; 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=3
|
||||
|
||||
[application]
|
||||
|
||||
config/name="TETRIS3000"
|
||||
run/main_scene="res://WorldEnvironment.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/width=500
|
||||
window/size/height=500
|
||||
|
||||
[gui]
|
||||
|
||||
theme/use_hidpi=true
|
||||
|
||||
[input]
|
||||
|
||||
hold=[ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":4,"pressure":0.0,"pressed":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":5,"pressure":0.0,"pressed":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":16777237,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
pause=[ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":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":16777217,"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":16777244,"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":16777225,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
hard_drop=[ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":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":16777238,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
move_left=[ 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)
|
||||
]
|
||||
soft_drop=[ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":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)
|
||||
]
|
||||
move_right=[ 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)
|
||||
]
|
||||
rotate_clockwise=[ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":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":88,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
rotate_counterclockwise=[ Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":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":16777221,"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":90,"unicode":0,"echo":false,"script":null)
|
||||
]
|
BIN
starmap_g8k.jpg
Normal file
BIN
starmap_g8k.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 MiB |
29
starmap_g8k.jpg.import
Normal file
29
starmap_g8k.jpg.import
Normal file
@ -0,0 +1,29 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/starmap_g8k.jpg-617060714ab9f6908ea55c401bab327a.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://starmap_g8k.jpg"
|
||||
dest_files=[ "res://.import/starmap_g8k.jpg-617060714ab9f6908ea55c401bab327a.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Loading…
x
Reference in New Issue
Block a user