Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
8009ffdf7e | |||
fd4688a3ab | |||
1c79e2d57b | |||
0194bbdc0d | |||
d0f9e894ee |
@ -1,6 +1,6 @@
|
|||||||
[gd_scene load_steps=10 format=2]
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Tetrominos/Mino/MinoMaterial.tres" type="Material" id=1]
|
[ext_resource path="res://Tetrominos/Mino/MinoMesh.tres" type="CubeMesh" id=1]
|
||||||
|
|
||||||
[sub_resource type="Gradient" id=1]
|
[sub_resource type="Gradient" id=1]
|
||||||
|
|
||||||
@ -30,19 +30,19 @@ render_priority = 0
|
|||||||
trail_divisor = 2
|
trail_divisor = 2
|
||||||
trail_color_modifier = SubResource( 4 )
|
trail_color_modifier = SubResource( 4 )
|
||||||
emission_shape = 2
|
emission_shape = 2
|
||||||
emission_box_extents = Vector3( 8, 0.5, 0.5 )
|
emission_box_extents = Vector3( 10, 1, 1 )
|
||||||
flag_align_y = false
|
flag_align_y = false
|
||||||
flag_rotate_y = true
|
flag_rotate_y = true
|
||||||
flag_disable_z = false
|
flag_disable_z = false
|
||||||
spread = 30.0
|
spread = 0.0
|
||||||
flatness = 0.0
|
flatness = 0.0
|
||||||
gravity = Vector3( 0, -30, 0 )
|
gravity = Vector3( 0, -10, 30 )
|
||||||
initial_velocity = 10.0
|
initial_velocity = 20.0
|
||||||
initial_velocity_random = 0.8
|
initial_velocity_random = 1.0
|
||||||
angular_velocity = 97.14
|
angular_velocity = 97.14
|
||||||
angular_velocity_random = 1.0
|
angular_velocity_random = 1.0
|
||||||
linear_accel = 100.0
|
linear_accel = 100.0
|
||||||
linear_accel_random = 0.84
|
linear_accel_random = 1.0
|
||||||
radial_accel = 8.48
|
radial_accel = 8.48
|
||||||
radial_accel_random = 0.85
|
radial_accel_random = 0.85
|
||||||
tangential_accel = 0.0
|
tangential_accel = 0.0
|
||||||
@ -61,38 +61,9 @@ anim_speed_random = 0.0
|
|||||||
anim_offset = 0.0
|
anim_offset = 0.0
|
||||||
anim_offset_random = 0.0
|
anim_offset_random = 0.0
|
||||||
anim_loop = false
|
anim_loop = false
|
||||||
_sections_unfolded = [ "Angular Velocity", "Color", "Emission Shape", "Gravity", "Scale", "Spread" ]
|
_sections_unfolded = [ "Angular Velocity", "Color", "Gravity", "Initial Velocity", "Linear Accel", "Scale", "Spread" ]
|
||||||
|
|
||||||
[sub_resource type="PrismMesh" id=6]
|
[node name="ExplodingLine" type="Particles" index="0"]
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
[sub_resource type="PrismMesh" id=7]
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
[sub_resource type="CubeMesh" id=8]
|
|
||||||
|
|
||||||
material = ExtResource( 1 )
|
|
||||||
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
|
layers = 1
|
||||||
material_override = null
|
material_override = null
|
||||||
@ -104,23 +75,21 @@ lod_min_hysteresis = 0.0
|
|||||||
lod_max_distance = 0.0
|
lod_max_distance = 0.0
|
||||||
lod_max_hysteresis = 0.0
|
lod_max_hysteresis = 0.0
|
||||||
emitting = false
|
emitting = false
|
||||||
amount = 800
|
amount = 40
|
||||||
lifetime = 2.0
|
lifetime = 2.0
|
||||||
one_shot = true
|
one_shot = true
|
||||||
preprocess = 0.0
|
preprocess = 0.0
|
||||||
speed_scale = 2.18
|
speed_scale = 2.18
|
||||||
explosiveness = 0.9
|
explosiveness = 1.0
|
||||||
randomness = 0.69
|
randomness = 0.0
|
||||||
fixed_fps = 0
|
fixed_fps = 0
|
||||||
fract_delta = true
|
fract_delta = true
|
||||||
visibility_aabb = AABB( -5, -0.5, -1, 10, 1, 2 )
|
visibility_aabb = AABB( -5, -0.5, -1, 10, 1, 2 )
|
||||||
local_coords = false
|
local_coords = false
|
||||||
draw_order = 0
|
draw_order = 0
|
||||||
process_material = SubResource( 5 )
|
process_material = SubResource( 5 )
|
||||||
draw_passes = 3
|
draw_passes = 1
|
||||||
draw_pass_1 = SubResource( 6 )
|
draw_pass_1 = ExtResource( 1 )
|
||||||
draw_pass_2 = SubResource( 7 )
|
|
||||||
draw_pass_3 = SubResource( 8 )
|
|
||||||
_sections_unfolded = [ "Draw Passes", "Drawing", "Process Material", "Time", "Transform" ]
|
_sections_unfolded = [ "Draw Passes", "Drawing", "Process Material", "Time", "Transform" ]
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,5 +58,6 @@ func clear_lines():
|
|||||||
for x in range(NB_COLLUMNS):
|
for x in range(NB_COLLUMNS):
|
||||||
set_cell_item(x, y2, 0, get_cell_item(x, y2+1, 0))
|
set_cell_item(x, y2, 0, get_cell_item(x, y2+1, 0))
|
||||||
lines_cleared += 1
|
lines_cleared += 1
|
||||||
|
exploding_lines[y].emitting = true
|
||||||
exploding_lines[y].restart()
|
exploding_lines[y].restart()
|
||||||
return lines_cleared
|
return lines_cleared
|
@ -14,6 +14,7 @@ const password = "TETRIS 3000"
|
|||||||
const NEXT_POSITION = Vector3(13, 16, 0)
|
const NEXT_POSITION = Vector3(13, 16, 0)
|
||||||
const START_POSITION = Vector3(5, 20, 0)
|
const START_POSITION = Vector3(5, 20, 0)
|
||||||
const HOLD_POSITION = Vector3(-5, 16, 0)
|
const HOLD_POSITION = Vector3(-5, 16, 0)
|
||||||
|
const THERE = Vector3(0, 0, 0)
|
||||||
|
|
||||||
const movements = {
|
const movements = {
|
||||||
"move_right": Vector3(1, 0, 0),
|
"move_right": Vector3(1, 0, 0),
|
||||||
@ -70,12 +71,11 @@ func new_piece():
|
|||||||
autoshift_action = ""
|
autoshift_action = ""
|
||||||
next_piece = random_piece()
|
next_piece = random_piece()
|
||||||
next_piece.translation = NEXT_POSITION
|
next_piece.translation = NEXT_POSITION
|
||||||
if move(movements["soft_drop"]):
|
if move(THERE):
|
||||||
$DropTimer.start()
|
$DropTimer.start()
|
||||||
$LockDelay.start()
|
$LockDelay.start()
|
||||||
current_piece_held = false
|
current_piece_held = false
|
||||||
else:
|
else:
|
||||||
current_piece.translate(movements["soft_drop"])
|
|
||||||
game_over()
|
game_over()
|
||||||
|
|
||||||
func random_piece():
|
func random_piece():
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[gd_scene load_steps=21 format=2]
|
[gd_scene load_steps=21 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Main.gd" type="Script" id=1]
|
[ext_resource path="res://Main.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://night-sky-background-14391263141jp.jpg" type="Texture" id=2]
|
[ext_resource path="res://pexels-photo-1341279.jpeg" type="Texture" id=2]
|
||||||
[ext_resource path="res://Tetrominos/Mino/MinoLibrary.tres" type="MeshLibrary" id=3]
|
[ext_resource path="res://Tetrominos/Mino/MinoLibrary.tres" type="MeshLibrary" id=3]
|
||||||
[ext_resource path="res://GridMap.gd" type="Script" id=4]
|
[ext_resource path="res://GridMap.gd" type="Script" id=4]
|
||||||
[ext_resource path="res://midi/MidiPlayer.tscn" type="PackedScene" id=5]
|
[ext_resource path="res://midi/MidiPlayer.tscn" type="PackedScene" id=5]
|
||||||
@ -229,14 +229,14 @@ extra_spacing_bottom = 5
|
|||||||
font_data = ExtResource( 11 )
|
font_data = ExtResource( 11 )
|
||||||
_sections_unfolded = [ "Extra Spacing", "Font", "Settings" ]
|
_sections_unfolded = [ "Extra Spacing", "Font", "Settings" ]
|
||||||
|
|
||||||
[node name="Main" type="WorldEnvironment" index="0"]
|
[node name="Main" type="WorldEnvironment"]
|
||||||
|
|
||||||
environment = SubResource( 2 )
|
environment = SubResource( 2 )
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="Sprite3D" type="Sprite3D" parent="." index="0"]
|
[node name="Sprite3D" type="Sprite3D" parent="." index="0"]
|
||||||
|
|
||||||
transform = Transform( 19.2, 0, 0, 0, 12.8, 0, 0, 0, 1, 5, 10, -80 )
|
transform = Transform( 12.8, 0, 0, 0, 8.53, 0, 0, 0, 1, 5, 10, -32 )
|
||||||
layers = 1
|
layers = 1
|
||||||
material_override = null
|
material_override = null
|
||||||
cast_shadow = 1
|
cast_shadow = 1
|
||||||
@ -264,7 +264,7 @@ hframes = 1
|
|||||||
frame = 0
|
frame = 0
|
||||||
region_enabled = false
|
region_enabled = false
|
||||||
region_rect = Rect2( 0, 0, 0, 0 )
|
region_rect = Rect2( 0, 0, 0, 0 )
|
||||||
_sections_unfolded = [ "Animation", "Flags", "Transform" ]
|
_sections_unfolded = [ "Animation", "Flags", "Geometry", "Transform" ]
|
||||||
|
|
||||||
[node name="Camera" type="Camera" parent="." index="1"]
|
[node name="Camera" type="Camera" parent="." index="1"]
|
||||||
|
|
||||||
@ -279,8 +279,8 @@ projection = 0
|
|||||||
current = true
|
current = true
|
||||||
fov = 70.0
|
fov = 70.0
|
||||||
size = 1.0
|
size = 1.0
|
||||||
near = 0.1
|
near = 0.05
|
||||||
far = 1.29056e+006
|
far = 500.0
|
||||||
_sections_unfolded = [ "Transform" ]
|
_sections_unfolded = [ "Transform" ]
|
||||||
|
|
||||||
[node name="DirectionalLight" type="DirectionalLight" parent="." index="2"]
|
[node name="DirectionalLight" type="DirectionalLight" parent="." index="2"]
|
||||||
@ -336,7 +336,6 @@ NB_COLLUMNS = 10
|
|||||||
|
|
||||||
[node name="Backs" type="Spatial" parent="." index="4"]
|
[node name="Backs" type="Spatial" parent="." index="4"]
|
||||||
|
|
||||||
editor/display_folded = true
|
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
[node name="GridBack" type="MeshInstance" parent="Backs" index="0"]
|
[node name="GridBack" type="MeshInstance" parent="Backs" index="0"]
|
||||||
|
@ -25,7 +25,7 @@ params_grow = false
|
|||||||
params_use_alpha_scissor = false
|
params_use_alpha_scissor = false
|
||||||
albedo_color = Color( 0.601563, 0.775878, 1, 0.486471 )
|
albedo_color = Color( 0.601563, 0.775878, 1, 0.486471 )
|
||||||
metallic = 1.0
|
metallic = 1.0
|
||||||
metallic_specular = 1.0
|
metallic_specular = 0.63
|
||||||
metallic_texture_channel = 4
|
metallic_texture_channel = 4
|
||||||
roughness = 0.46
|
roughness = 0.46
|
||||||
roughness_texture_channel = 0
|
roughness_texture_channel = 0
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
[ext_resource path="res://Tetrominos/TetroT.gd" type="Script" id=1]
|
[ext_resource path="res://Tetrominos/TetroT.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Tetrominos/Mino/Mino.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://Tetrominos/Mino/Mino.tscn" type="PackedScene" id=2]
|
||||||
|
|
||||||
|
[node name="TetroT" type="Spatial"]
|
||||||
[node name="TetroT" type="Spatial" index="0"]
|
|
||||||
|
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
BIN
source/pexels-photo-1341279.jpeg
Normal file
BIN
source/pexels-photo-1341279.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 206 KiB |
Reference in New Issue
Block a user