15 Commits
1.6 ... v1.7

Author SHA1 Message Date
b1c37e73f4 v1.6 release 2019-01-24 20:39:07 +01:00
b7650efdf6 tweaks 2019-01-24 20:37:42 +01:00
231ba2fbff tweaks 2019-01-24 18:17:44 +01:00
a1fb70a3ee Revert "high-angle shot"
This reverts commit 8435997cc4.
2019-01-24 18:04:37 +01:00
8435997cc4 high-angle shot 2019-01-24 18:01:27 +01:00
8eb3aba5d5 tweaking 2019-01-24 17:35:56 +01:00
f3e61d319f forgot to hide grid 2019-01-24 17:30:08 +01:00
c4aee1c2bc low angle shot 2019-01-24 17:29:28 +01:00
f220739ffc compatibility with Godot 3.1 2019-01-21 16:59:47 +01:00
1b5cccd8c9 Exploding minoes instead of lines 2019-01-19 16:23:41 +01:00
685acd4589 externalize environment 2019-01-19 15:21:34 +01:00
831d07d436 boost html5 loading 2019-01-18 17:42:48 +01:00
1829102bb1 the signals 2019-01-18 16:39:57 +01:00
4cde8ff47f Update TETRIS3000.pck 2019-01-18 10:42:04 +01:00
e9152d7d81 Update Main.tscn 2019-01-18 10:41:56 +01:00
21 changed files with 13254 additions and 297 deletions

87
source/Environment.tres Normal file
View File

@ -0,0 +1,87 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="PanoramaSky" id=1]
radiance_size = 0
[resource]
resource_local_to_scene = true
background_mode = 0
background_sky = SubResource( 1 )
background_sky_custom_fov = 0.0
background_color = Color( 0, 0, 0, 1 )
background_energy = 0.0
background_canvas_max_layer = 0
ambient_light_color = Color( 0.86908, 0.949502, 0.958984, 1 )
ambient_light_energy = 2.0
ambient_light_sky_contribution = 0.92
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 = 3
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 = 0.26
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 = 6.17
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 = 0.27
adjustment_contrast = 1.0
adjustment_saturation = 0.34
_sections_unfolded = [ "Adjustments", "Ambient Light", "Background", "Resource" ]

View File

@ -1,12 +1,12 @@
extends GridMap
const Tetromino = preload("res://Tetrominos/Tetromino.gd")
const ExplodingLine = preload("res://ExplodingLine.tscn")
const ExplodingMino = preload("res://Tetrominos/Mino/ExplodingMino.tscn")
const EMPTY_CELL = -1
const MINO = 0
var exploding_lines = []
var exploding_minoes = []
var nb_collumns
var nb_lines
@ -14,9 +14,11 @@ func _ready():
nb_collumns = int(get_parent().scale.x)
nb_lines = int(get_parent().scale.y)
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)
exploding_minoes.append([])
for x in range(nb_collumns):
exploding_minoes[y].append(ExplodingMino.instance())
add_child(exploding_minoes[y][x])
exploding_minoes[y][x].translation = Vector3(x, y, 0)
func clear():
for used_cell in get_used_cells():
@ -65,6 +67,7 @@ func clear_lines():
var above_cell = get_cell_item(x, y2+1, 0)
set_cell_item(x, y2, 0, above_cell)
lines_cleared += 1
exploding_lines[y].emitting = true
exploding_lines[y].restart()
for x in range(nb_collumns):
exploding_minoes[y][x].emitting = true
exploding_minoes[y][x].restart()
return lines_cleared

View File

@ -100,9 +100,9 @@ func _unhandled_input(event):
if event.is_action_pressed("hard_drop"):
hard_drop()
if event.is_action_pressed("rotate_clockwise"):
current_piece.rotate(Tetromino.CLOCKWISE)
current_piece.turn(Tetromino.CLOCKWISE)
if event.is_action_pressed("rotate_counterclockwise"):
current_piece.rotate(Tetromino.COUNTERCLOCKWISE)
current_piece.turn(Tetromino.COUNTERCLOCKWISE)
if event.is_action_pressed("hold"):
hold()

View File

@ -1,104 +1,20 @@
[gd_scene load_steps=21 format=2]
[gd_scene load_steps=20 format=2]
[ext_resource path="res://Main.gd" type="Script" id=1]
[ext_resource path="res://aperture-vintage-472251-unsplash.jpg" type="Texture" id=2]
[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://midi/MidiPlayer.tscn" type="PackedScene" id=5]
[ext_resource path="res://MidiPlayer.gd" type="Script" id=6]
[ext_resource path="res://FlashText.gd" type="Script" id=7]
[ext_resource path="res://fonts/525-ROUN.TTF" type="DynamicFontData" id=8]
[ext_resource path="res://Stats.tscn" type="PackedScene" id=9]
[ext_resource path="res://controls.tscn" type="PackedScene" id=10]
[ext_resource path="res://Start.tscn" type="PackedScene" id=11]
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=12]
[ext_resource path="res://Environment.tres" type="Environment" id=1]
[ext_resource path="res://Main.gd" type="Script" id=2]
[ext_resource path="res://aperture-vintage-472251-unsplash.jpg" type="Texture" id=3]
[ext_resource path="res://Tetrominos/Mino/MinoLibrary.tres" type="MeshLibrary" id=4]
[ext_resource path="res://GridMap.gd" type="Script" id=5]
[ext_resource path="res://midi/MidiPlayer.tscn" type="PackedScene" id=6]
[ext_resource path="res://MidiPlayer.gd" type="Script" id=7]
[ext_resource path="res://FlashText.gd" type="Script" id=8]
[ext_resource path="res://fonts/525-ROUN.TTF" type="DynamicFontData" id=9]
[ext_resource path="res://Stats.tscn" type="PackedScene" id=10]
[ext_resource path="res://controls.tscn" type="PackedScene" id=11]
[ext_resource path="res://Start.tscn" type="PackedScene" id=12]
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=13]
[sub_resource type="PanoramaSky" id=1]
radiance_size = 0
[sub_resource type="Environment" id=2]
resource_local_to_scene = true
background_mode = 0
background_sky = SubResource( 1 )
background_sky_custom_fov = 0.0
background_color = Color( 0, 0, 0, 1 )
background_energy = 0.0
background_canvas_max_layer = 0
ambient_light_color = Color( 0.86908, 0.949502, 0.958984, 1 )
ambient_light_energy = 2.0
ambient_light_sky_contribution = 0.92
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 = 3
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 = 0.26
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 = 6.17
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 = 0.27
adjustment_contrast = 1.0
adjustment_saturation = 0.34
_sections_unfolded = [ "Adjustments", "Ambient Light", "Background", "Resource" ]
[sub_resource type="SpatialMaterial" id=3]
[sub_resource type="SpatialMaterial" id=1]
render_priority = 0
flags_transparent = true
@ -149,35 +65,35 @@ 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" ]
_sections_unfolded = [ "Albedo", "Emission", "Flags", "Metallic", "NormalMap", "Proximity Fade" ]
[sub_resource type="CubeMesh" id=4]
[sub_resource type="CubeMesh" id=2]
material = SubResource( 3 )
material = SubResource( 1 )
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
size = Vector3( 1, 1, 1 )
subdivide_width = 0
subdivide_height = 0
subdivide_depth = 0
[sub_resource type="CubeMesh" id=5]
[sub_resource type="CubeMesh" id=3]
material = SubResource( 3 )
material = SubResource( 1 )
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
size = Vector3( 1, 1, 1 )
subdivide_width = 0
subdivide_height = 0
subdivide_depth = 0
[sub_resource type="DynamicFont" id=6]
[sub_resource type="DynamicFont" id=4]
size = 30
use_mipmaps = true
use_filter = false
font_data = ExtResource( 8 )
font_data = ExtResource( 9 )
_sections_unfolded = [ "Font", "Settings" ]
[sub_resource type="Animation" id=7]
[sub_resource type="Animation" id=5]
resource_name = "Flash"
length = 1.0
@ -220,23 +136,23 @@ tracks/2/keys = {
"values": [ Vector2( 0, 110 ), Vector2( 0, -50 ), Vector2( 0, -60 ), Vector2( 0, -100 ) ]
}
[sub_resource type="DynamicFont" id=8]
[sub_resource type="DynamicFont" id=6]
size = 20
use_mipmaps = false
use_filter = false
extra_spacing_bottom = 5
font_data = ExtResource( 12 )
font_data = ExtResource( 13 )
_sections_unfolded = [ "Extra Spacing", "Font", "Settings" ]
[node name="Main" type="WorldEnvironment" index="0"]
environment = SubResource( 2 )
script = ExtResource( 1 )
environment = ExtResource( 1 )
script = ExtResource( 2 )
[node name="Background" type="Sprite3D" parent="." index="0"]
transform = Transform( 12.8, 0, 0, 0, 8.53, 0, 0, 0, 1, 5, 10, -32 )
transform = Transform( 12.8, 0, 0, 0, 8.53, 0, 0, 0, 1, 4.5, 25, -32 )
layers = 1
material_override = null
cast_shadow = 1
@ -255,10 +171,10 @@ opacity = 1.0
pixel_size = 0.01
axis = 2
transparent = false
shaded = true
shaded = false
double_sided = false
alpha_cut = 0
texture = ExtResource( 2 )
texture = ExtResource( 3 )
vframes = 1
hframes = 1
frame = 0
@ -268,7 +184,7 @@ _sections_unfolded = [ "Animation", "Flags", "Geometry", "Transform" ]
[node name="Camera" type="Camera" parent="." index="1"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.5, 10, 20 )
transform = Transform( 1, 0, 0, 0, 0.939693, -0.34202, 0, 0.34202, 0.939693, 4.5, 2, 17 )
keep_aspect = 1
cull_mask = 1048575
environment = null
@ -277,7 +193,7 @@ v_offset = 0.0
doppler_tracking = 0
projection = 0
current = true
fov = 70.0
fov = 60.3
size = 1.0
near = 0.05
far = 500.0
@ -324,7 +240,7 @@ lod_min_distance = 0.0
lod_min_hysteresis = 0.0
lod_max_distance = 0.0
lod_max_hysteresis = 0.0
mesh = SubResource( 4 )
mesh = SubResource( 2 )
skeleton = NodePath("..")
material/0 = null
_sections_unfolded = [ "Transform", "material" ]
@ -332,8 +248,7 @@ _sections_unfolded = [ "Transform", "material" ]
[node name="GridMap" type="GridMap" parent="Matrix" index="0"]
transform = Transform( 0.1, 0, 0, 0, 0.05, 0, 0, 0, 1, -0.45, -0.475, 0 )
visible = false
theme = ExtResource( 3 )
theme = ExtResource( 4 )
cell_size = Vector3( 1, 1, 1 )
cell_octant_size = 8
cell_center_x = false
@ -345,7 +260,7 @@ collision_mask = 1
data = {
"cells": PoolIntArray( )
}
script = ExtResource( 4 )
script = ExtResource( 5 )
_sections_unfolded = [ "Cell", "Transform" ]
__meta__ = {
"_editor_clip_": 1,
@ -370,7 +285,7 @@ lod_min_distance = 0.0
lod_min_hysteresis = 0.0
lod_max_distance = 0.0
lod_max_hysteresis = 0.0
mesh = SubResource( 5 )
mesh = SubResource( 3 )
skeleton = NodePath("..")
material/0 = null
_sections_unfolded = [ "Transform" ]
@ -393,7 +308,7 @@ lod_min_distance = 0.0
lod_min_hysteresis = 0.0
lod_max_distance = 0.0
lod_max_hysteresis = 0.0
mesh = SubResource( 5 )
mesh = SubResource( 3 )
skeleton = NodePath("..")
material/0 = null
_sections_unfolded = [ "Transform" ]
@ -431,14 +346,15 @@ wait_time = 0.03
one_shot = false
autostart = false
[node name="MidiPlayer" parent="." index="10" instance=ExtResource( 5 )]
[node name="MidiPlayer" parent="." index="10" instance=ExtResource( 6 )]
editor/display_folded = true
script = ExtResource( 6 )
script = ExtResource( 7 )
_sections_unfolded = [ "Pause" ]
file = "res://midi/Korobeiniki.mid"
volume_db = -24
loop = true
loop_start = 1.81
soundfont = "res://midi/TimGM6mb.sf2"
[node name="LineCLearTimer" type="Timer" parent="MidiPlayer" index="1"]
@ -464,7 +380,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
script = ExtResource( 7 )
script = ExtResource( 8 )
_sections_unfolded = [ "Material", "Size Flags", "Theme" ]
[node name="Label" type="Label" parent="FlashText" index="0"]
@ -482,7 +398,7 @@ mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = SubResource( 6 )
custom_fonts/font = SubResource( 4 )
custom_colors/font_color = Color( 0.445404, 0.710476, 0.820313, 0 )
align = 1
valign = 1
@ -498,27 +414,27 @@ autoplay = ""
playback_process_mode = 1
playback_default_blend_time = 0.0
playback_speed = 1.0
anims/Flash = SubResource( 7 )
anims/Flash = SubResource( 5 )
blend_times = [ ]
_sections_unfolded = [ "Playback Options" ]
[node name="Stats" parent="." index="12" instance=ExtResource( 9 )]
[node name="Stats" parent="." index="12" instance=ExtResource( 10 )]
visible = false
anchor_left = 0.0
anchor_top = 1.0
anchor_right = 0.0
anchor_bottom = 1.0
margin_left = 95.0
margin_top = -250.0
margin_right = 205.0
margin_bottom = -40.0
margin_left = 30.0
margin_top = -220.0
margin_right = 140.0
margin_bottom = -25.0
[node name="controls_ui" parent="." index="13" instance=ExtResource( 10 )]
[node name="controls_ui" parent="." index="13" instance=ExtResource( 11 )]
visible = false
[node name="Start" parent="." index="14" instance=ExtResource( 11 )]
[node name="Start" parent="." index="14" instance=ExtResource( 12 )]
[node name="ReplayButton" type="Button" parent="." index="15"]
@ -538,7 +454,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
custom_fonts/font = SubResource( 8 )
custom_fonts/font = SubResource( 6 )
custom_colors/font_color = Color( 1, 1, 1, 1 )
toggle_mode = false
enabled_focus_mode = 2
@ -559,6 +475,8 @@ _sections_unfolded = [ "Margin", "custom_colors", "custom_fonts" ]
[connection signal="animation_finished" from="FlashText/AnimationPlayer" to="FlashText" method="_on_AnimationPlayer_animation_finished"]
[connection signal="flash_text" from="Stats" to="FlashText" method="print"]
[connection signal="level_up" from="Stats" to="." method="new_level"]
[connection signal="start" from="Start" to="." method="new_game"]

View File

@ -1,21 +1,30 @@
[gd_scene load_steps=7 format=2]
[gd_scene load_steps=9 format=2]
[ext_resource path="res://Start.gd" type="Script" id=1]
[ext_resource path="res://fonts/TitleFont.tres" type="DynamicFont" id=2]
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=3]
[ext_resource path="res://fonts/ButtonFont.tres" type="DynamicFont" id=4]
[ext_resource path="res://fonts/525-ROUN.TTF" type="DynamicFontData" id=3]
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=4]
[ext_resource path="res://fonts/ButtonFont.tres" type="DynamicFont" id=5]
[sub_resource type="DynamicFont" id=1]
[sub_resource type="DynamicFont" id=4]
size = 50
use_mipmaps = false
use_filter = false
font_data = ExtResource( 3 )
_sections_unfolded = [ "Font", "Settings" ]
[sub_resource type="DynamicFont" id=2]
size = 20
use_mipmaps = false
use_filter = false
font_data = ExtResource( 3 )
font_data = ExtResource( 4 )
_sections_unfolded = [ "Extra Spacing", "Font", "Font/fallback", "Settings" ]
[sub_resource type="Theme" id=2]
[sub_resource type="Theme" id=3]
default_font = SubResource( 1 )
default_font = SubResource( 2 )
[node name="Start" type="Control" index="0"]
@ -42,9 +51,9 @@ anchor_top = 0.0
anchor_right = 0.5
anchor_bottom = 0.0
margin_left = -250.0
margin_top = -100.0
margin_top = -109.0
margin_right = 250.0
margin_bottom = -26.0
margin_bottom = -69.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
@ -54,15 +63,40 @@ size_flags_vertical = 4
custom_fonts/font = ExtResource( 2 )
custom_colors/font_color = Color( 0.443137, 0.709804, 0.819608, 0.533333 )
custom_colors/font_color_shadow = Color( 1, 1, 1, 0.101333 )
text = "TETRIS
3000"
text = "TETRIS"
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Theme", "custom_colors", "custom_fonts" ]
[node name="Label2" type="Label" parent="." index="1"]
anchor_left = 0.5
anchor_top = 0.0
anchor_right = 0.5
anchor_bottom = 0.0
margin_left = -250.0
margin_top = -75.0
margin_right = 250.0
margin_bottom = -19.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
custom_fonts/font = SubResource( 4 )
custom_colors/font_color = Color( 0.443137, 0.709804, 0.819608, 0.533333 )
custom_colors/font_color_shadow = Color( 1, 1, 1, 0.101333 )
text = "3000"
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "custom_colors", "custom_fonts" ]
[node name="SpinBox" type="SpinBox" parent="." index="1"]
[node name="SpinBox" type="SpinBox" parent="." index="2"]
anchor_left = 0.5
anchor_top = 0.5
@ -78,7 +112,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
theme = SubResource( 2 )
theme = SubResource( 3 )
min_value = 1.0
max_value = 15.0
step = 1.0
@ -91,7 +125,7 @@ prefix = "Level "
suffix = ""
_sections_unfolded = [ "Margin", "Theme" ]
[node name="PlayButton" type="Button" parent="." index="2"]
[node name="PlayButton" type="Button" parent="." index="3"]
anchor_left = 0.5
anchor_top = 0.5
@ -108,7 +142,7 @@ mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
custom_fonts/font = ExtResource( 4 )
custom_fonts/font = ExtResource( 5 )
toggle_mode = false
enabled_focus_mode = 2
shortcut = null

View File

@ -16,13 +16,12 @@ var score
var high_score
var time
var combos
var flash_text
signal level_up(level)
signal flash_text(text)
func _ready():
load_user_data()
flash_text = get_node("../FlashText")
func load_user_data():
var save_game = File.new()
@ -49,7 +48,7 @@ func new_level():
goal += 5 * level
$VBC/Level.text = str(level)
$VBC/Goal.text = str(goal)
flash_text.print("Level\n%d"%level)
emit_signal("flash_text", "Level\n%d"%level)
emit_signal("level_up", level)
func _on_Clock_timeout():
@ -70,15 +69,15 @@ func piece_locked(lines, t_spin):
var ds
if lines or t_spin:
if lines and t_spin:
flash_text.print(t_spin + " " + LINES_CLEARED_NAMES[lines])
emit_signal("flash_text", t_spin + " " + LINES_CLEARED_NAMES[lines])
elif lines:
flash_text.print(LINES_CLEARED_NAMES[lines])
emit_signal("flash_text", LINES_CLEARED_NAMES[lines])
elif t_spin:
flash_text.print(t_spin)
emit_signal("flash_text", t_spin)
goal -= SCORES[lines][""]
$VBC/Goal.text = str(goal)
ds = 100 * level * SCORES[lines][t_spin]
flash_text.print(str(ds))
emit_signal("flash_text", str(ds))
score += ds
$VBC/Score.text = str(score)
if score > high_score:
@ -89,9 +88,9 @@ func piece_locked(lines, t_spin):
combos += 1
if combos > 0:
if combos == 1:
flash_text.print("COMBO")
emit_signal("flash_text", "COMBO")
else:
flash_text.print("COMBO x%d"%combos)
emit_signal("flash_text", "COMBO x%d"%combos)
ds = (20 if lines==1 else 50) * combos * level
emit_signal("flash_text", str(ds))
score += ds

View File

@ -267,9 +267,10 @@ anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 153.0
margin_right = 78.0
margin_bottom = 170.0
margin_left = -116.0
margin_top = 205.0
margin_right = -38.0
margin_bottom = 222.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2

View File

@ -30,16 +30,16 @@ render_priority = 0
trail_divisor = 2
trail_color_modifier = SubResource( 4 )
emission_shape = 2
emission_box_extents = Vector3( 10, 1, 1 )
emission_box_extents = Vector3( 1, 1, 1 )
flag_align_y = false
flag_rotate_y = true
flag_disable_z = false
spread = 0.0
flatness = 0.0
gravity = Vector3( 0, -10, 30 )
initial_velocity = 20.0
gravity = Vector3( 0, -30, 5 )
initial_velocity = 100.0
initial_velocity_random = 1.0
angular_velocity = 97.14
angular_velocity = 210.0
angular_velocity_random = 1.0
linear_accel = 100.0
linear_accel_random = 1.0
@ -61,9 +61,9 @@ 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", "Linear Accel", "Scale", "Spread" ]
_sections_unfolded = [ "Angular Velocity", "Color", "Emission Shape", "Gravity", "Initial Velocity", "Linear Accel", "Scale", "Spread" ]
[node name="ExplodingLine" type="Particles" index="0"]
[node name="ExplodingMino" type="Particles"]
layers = 1
material_override = null
@ -75,7 +75,7 @@ lod_min_hysteresis = 0.0
lod_max_distance = 0.0
lod_max_hysteresis = 0.0
emitting = false
amount = 40
amount = 1
lifetime = 2.0
one_shot = true
preprocess = 0.0
@ -84,7 +84,7 @@ explosiveness = 1.0
randomness = 0.0
fixed_fps = 0
fract_delta = true
visibility_aabb = AABB( -5, -0.5, -1, 10, 1, 2 )
visibility_aabb = AABB( -0.5, -0.5, -0.5, 1, 1, 1 )
local_coords = false
draw_order = 0
process_material = SubResource( 5 )

View File

@ -162,7 +162,7 @@ subdivide_width = 0
subdivide_height = 0
subdivide_depth = 0
[node name="Mino" type="Spatial"]
[node name="Mino" type="Spatial" index="0"]
transform = Transform( 0.997027, 0, 0, 0, 0.997027, 0, 0, 0, 0.997027, 0, 0, 0 )
_sections_unfolded = [ "Pause", "Transform", "Visibility" ]
@ -204,13 +204,13 @@ _sections_unfolded = [ "Draw Passes", "Drawing", "Geometry", "LOD", "Process Mat
[node name="SpotLight" type="SpotLight" parent="." index="2"]
transform = Transform( 1, 0, 0, 0, -4.37114e-008, 1, 0, -1, -4.37114e-008, 0, 0, 0.5 )
transform = Transform( 1, 0, 0, 0, 0.0174524, 0.999848, 0, -0.999848, 0.0174524, 0, 4, 1 )
layers = 1
light_color = Color( 1, 1, 1, 1 )
light_energy = 16.0
light_indirect_energy = 1.0
light_negative = false
light_specular = 0.5
light_specular = 0.86
light_bake_mode = 1
light_cull_mask = -1
shadow_enabled = false
@ -219,10 +219,10 @@ shadow_bias = 0.15
shadow_contact = 0.0
shadow_reverse_cull_face = false
editor_only = false
spot_range = 20.0
spot_range = 30.0
spot_attenuation = 0.5
spot_angle = 5.0
spot_angle_attenuation = 2.0
_sections_unfolded = [ "Light", "Spot", "Transform" ]
_sections_unfolded = [ "Editor", "Light", "Spot", "Transform" ]

View File

@ -23,7 +23,7 @@ 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.486471 )
albedo_color = Color( 0.601563, 0.775878, 1, 0.259529 )
metallic = 1.0
metallic_specular = 0.63
metallic_texture_channel = 4
@ -31,7 +31,7 @@ roughness = 0.46
roughness_texture_channel = 0
emission_enabled = true
emission = Color( 0.755859, 1, 0.914169, 1 )
emission_energy = 0.2
emission_energy = 0.1
emission_operator = 0
emission_on_uv2 = false
normal_enabled = false

View File

@ -2,8 +2,6 @@
[ext_resource path="res://Tetrominos/Mino/MinoMaterial.tres" type="Material" id=1]
[sub_resource type="CubeMesh" id=1]
custom_aabb = AABB( 0, 0, 0, 0, 0, 0 )
@ -12,7 +10,7 @@ subdivide_width = 0
subdivide_height = 0
subdivide_depth = 0
[node name="Mino" type="MeshInstance" index="0"]
[node name="Mino" type="MeshInstance"]
layers = 1
material_override = null

View File

@ -1,8 +1,7 @@
extends "Tetromino.gd"
const CLOCKWISE = -1
const COUNTERCLOCKWISE = 1
const SUPER_ROTATION_SYSTEM = [
func _init():
super_rotation_system = [
{
COUNTERCLOCKWISE: [
Vector3(0, -1, 0),

View File

@ -1,5 +1,5 @@
extends "Tetromino.gd"
func rotate(direction):
func turn(direction):
return false

View File

@ -6,6 +6,7 @@
[node name="TetroT" type="Spatial"]
script = ExtResource( 1 )
_sections_unfolded = [ "Transform" ]
[node name="Mino0" parent="." index="0" instance=ExtResource( 2 )]

View File

@ -3,7 +3,8 @@ extends Spatial
const NB_MINOES = 4
const CLOCKWISE = -1
const COUNTERCLOCKWISE = 1
const SUPER_ROTATION_SYSTEM = [
var super_rotation_system = [
{
COUNTERCLOCKWISE: [
Vector3(0, 0, 0),
@ -101,7 +102,7 @@ func move(movement):
return true
return false
func rotate(direction):
func turn(direction):
var translations = get_translations()
var rotated_translations = [translations[0]]
var center = translations[0]
@ -110,7 +111,7 @@ func rotate(direction):
rt = Vector3(-1*direction*rt.y, direction*rt.x, 0)
rt += center
rotated_translations.append(rt)
var movements = SUPER_ROTATION_SYSTEM[orientation][direction]
var movements = super_rotation_system[orientation][direction]
for i in range(movements.size()):
if grid_map.possible_positions(rotated_translations, movements[i]):
orientation = (orientation - direction) % NB_MINOES

View File

@ -36,13 +36,13 @@ func set_instrument( instrument ):
self.ads_state = instrument.ads_state
self.release_state = instrument.release_state
func play( ):
func play( from_position=0.0 ):
self.releasing = false
self.timer = 0.0
self.using_timer = 0.0
self.current_volume = self.ads_state[0].volume
self.stream.mix_rate = round( self.mix_rate * ( 1.0 + self.pitch_bend * 0.5 ) )
.play( 0.0 )
.play( from_position )
self._update_volume( )
func start_release( ):

View File

@ -50,4 +50,5 @@ toggle_fullscreen=[ Object(InputEventKey,"resource_local_to_scene":false,"resour
[rendering]
environment/default_clear_color=Color( 0, 0, 0, 1 )
environment/default_environment="res://Environment.tres"
quality/main_loop_type=""

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 KiB

After

Width:  |  Height:  |  Size: 421 KiB