This commit is contained in:
Ultrablob 2024-04-24 14:57:29 -04:00
parent 6d75dd22a0
commit 3ca455a5b9
18 changed files with 315 additions and 27 deletions

BIN
.DS_Store vendored

Binary file not shown.

View file

@ -10,9 +10,11 @@ func _physics_process(delta):
return
if get_last_slide_collision():
var collision: KinematicCollision2D = get_last_slide_collision()
if collision.get_collider() and collision.get_collider().name == "Bullet":
if collision.get_collider() and collision.get_collider().is_in_group("bullet"):
collision.get_collider().queue_free()
elif collision.get_collider():
#print(collision.get_collider().name)
hit(collision.get_collider())
velocity = velocity.bounce(clamp_to_1bit(collision.get_normal()))

View file

@ -4,17 +4,18 @@ const MAIN_SCENE_PATH = "res://main.tscn"
var tip_level = 1
var config = ConfigFile.new()
func _ready():
if config.load("user://settings.cfg") == OK:
if config.get_value("hidden", "tip_level") == null:
tip_level = 1
config.set_value("hidden", "tip_level", tip_level)
else:
tip_level = config.get_value("hidden", "tip_level")
func disabled_ready():
if config.load("user://settings.cfg") == OK and "hidden" in config.get_sections() and config.get_value("hidden", "tip_level") != null:
tip_level = config.get_value("hidden", "tip_level")
else:
tip_level = 1
config.set_value("hidden", "tip_level", tip_level)
if randi_range(0, 20) == 5: # small chance to get more and more insane tips as you keep playing
tip_level += 1
config.set_value("hidden", "tip_level", tip_level)
config.save("user://settings.cfg")
func pick(l):
return l[randi_range(0, len(l)-1)]
@ -37,6 +38,6 @@ func play():
var tip = pick(tip_options)
$LoadingScreen/Tip.text = "Tip: %s" % tip
await get_tree().create_timer(0.2).timeout
await get_tree().create_timer(0.4).timeout
var game = ResourceLoader.load_threaded_get(MAIN_SCENE_PATH)
get_tree().change_scene_to_packed(game)

View file

@ -12,7 +12,7 @@ bounce = 1.0
[sub_resource type="CircleShape2D" id="CircleShape2D_b5cca"]
radius = 13.0
[node name="Bullet" type="RigidBody2D"]
[node name="Bullet" type="RigidBody2D" groups=["bullet"]]
collision_layer = 2
physics_material_override = SubResource("PhysicsMaterial_xnhwp")
gravity_scale = 1.66533e-16

BIN
explosion.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

34
explosion.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://pa732bpnx3p6"
path="res://.godot/imported/explosion.png-730076d88b39dbfd5c22ad71f1135b01.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://explosion.png"
dest_files=["res://.godot/imported/explosion.png-730076d88b39dbfd5c22ad71f1135b01.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

47
explosion.tscn Normal file
View file

@ -0,0 +1,47 @@
[gd_scene load_steps=7 format=3 uid="uid://cepurdbgvu4b6"]
[ext_resource type="Texture2D" uid="uid://pa732bpnx3p6" path="res://explosion.png" id="1_jiu1j"]
[sub_resource type="AtlasTexture" id="AtlasTexture_8ecv2"]
atlas = ExtResource("1_jiu1j")
region = Rect2(0, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_ww7i0"]
atlas = ExtResource("1_jiu1j")
region = Rect2(64, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_ooksh"]
atlas = ExtResource("1_jiu1j")
region = Rect2(128, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_2mdlv"]
atlas = ExtResource("1_jiu1j")
region = Rect2(192, 0, 64, 64)
[sub_resource type="SpriteFrames" id="SpriteFrames_70iie"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_8ecv2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ww7i0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ooksh")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2mdlv")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]
[node name="AnimatedSprite2D" type="AnimatedSprite2D"]
texture_filter = 1
scale = Vector2(3, 3)
sprite_frames = SubResource("SpriteFrames_70iie")
autoplay = "default"
[connection signal="animation_looped" from="." to="." method="queue_free"]

View file

@ -7,7 +7,7 @@ dedicated_server=false
custom_features=""
export_filter="exclude"
export_files=PackedStringArray("res://godotgif/godotgif.gdextension")
include_filter=""
include_filter="*.txt"
exclude_filter=""
export_path="../Build/index.html"
encryption_include_filters=""

View file

@ -60,3 +60,10 @@ func start_aim():
func can_shoot(yn):
can_damage = yn
func destroy():
var explosion = load("res://explosion.tscn").instantiate()
$"/root/Node2D".add_child(explosion)
explosion.global_position = global_position
await get_tree().create_timer(0.2).timeout
queue_free()

File diff suppressed because one or more lines are too long

View file

@ -161,16 +161,22 @@ popup/item_1/text = "Absolute"
popup/item_1/id = 1
[node name="Tutorial Text" type="Label" parent="."]
visible = false
z_index = 2
layout_mode = 1
anchors_preset = 15
anchors_preset = -1
anchor_left = 0.203
anchor_top = 0.111
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -178.76
offset_top = 40.12
offset_right = -211.0
offset_bottom = -160.0
grow_horizontal = 2
grow_vertical = 2
theme_override_fonts/font = ExtResource("4_ybv7t")
theme_override_font_sizes/font_size = 64
theme_override_font_sizes/font_size = 60
text = "! GAMING !"
horizontal_alignment = 1
vertical_alignment = 1
@ -218,12 +224,12 @@ grow_horizontal = 2
grow_vertical = 2
theme_override_fonts/font = ExtResource("4_ybv7t")
theme_override_font_sizes/font_size = 60
text = "TIP: THE BULLETS OF A RIANGLE ALWAYS SHOOT FROM THE POINTS"
text = "TIP: THE TIP SYSTEM DOES NOT WORK"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="Title" type="Label" parent="LoadingScreen"]
[node name="Title" type="RichTextLabel" parent="LoadingScreen"]
layout_mode = 1
anchors_preset = 14
anchor_top = 0.5
@ -233,17 +239,16 @@ offset_top = 255.0
offset_bottom = 535.0
grow_horizontal = 2
grow_vertical = 2
theme_override_fonts/font = ExtResource("4_ybv7t")
theme_override_font_sizes/font_size = 200
text = "LOADING..."
horizontal_alignment = 1
vertical_alignment = 1
theme_override_fonts/normal_font = ExtResource("4_ybv7t")
theme_override_font_sizes/normal_font_size = 200
bbcode_enabled = true
text = "[center][wave]LOADING..."
[connection signal="pressed" from="Layout/Play" to="." method="play"]
[connection signal="pressed" from="Layout/Settings" to="Settings Panel" method="show"]
[connection signal="pressed" from="Layout/Tutorial" to="Tutorial Text" method="show"]
[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"]
[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="hide"]
[connection signal="pressed" from="Settings Panel/Close" to="Settings Panel" method="save"]
[connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel" method="check_valid"]
[connection signal="text_changed" from="Settings Panel/Menu/Username" to="Settings Panel/Menu/Username" method="check"]
[connection signal="pressed" from="Tutorial Text/Close" to="Tutorial Text" method="hide"]

View file

@ -4,7 +4,10 @@ func _ready():
$AnimatedSprite.play("gif")
func destroy():
var timer = Timer.new()
if not is_queued_for_deletion():
var explosion = load("res://explosion.tscn").instantiate()
$"/root/Node2D".add_child(explosion)
explosion.global_position = global_position
await get_tree().create_timer(0.2).timeout
$"../Player".aquire_quare()
queue_free()

8
riangle.gd Normal file
View file

@ -0,0 +1,8 @@
extends StaticBody2D
func destroy():
var explosion = load("res://explosion.tscn").instantiate()
$"/root/Node2D".add_child(explosion)
explosion.global_position = global_position
await get_tree().create_timer(0.2).timeout
queue_free()

View file

@ -1,11 +1,13 @@
[gd_scene load_steps=4 format=3 uid="uid://yu50iyftoyaj"]
[gd_scene load_steps=5 format=3 uid="uid://yu50iyftoyaj"]
[ext_resource type="SpriteFrames" uid="uid://dt3chppm3qub7" path="res://riangle.gif" id="1_5ndal"]
[ext_resource type="Script" path="res://riangle.gd" id="1_0404b"]
[ext_resource type="Script" path="res://Gun.gd" id="3_kffl0"]
[ext_resource type="PackedScene" uid="uid://c6ybtahxwpukd" path="res://bullet.tscn" id="4_tfncc"]
[node name="Riangle" type="StaticBody2D" groups=["destructible"]]
scale = Vector2(0.25, 0.25)
script = ExtResource("1_0404b")
[node name="Sprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
@ -42,7 +44,7 @@ autostart = true
position = Vector2(-8, 0)
polygon = PackedVector2Array(-80, -104, 100, 0, -80, 104)
[connection signal="timeout" from="Timer" to="." method="queue_free"]
[connection signal="timeout" from="Timer" to="." method="destroy"]
[connection signal="timeout" from="Timer" to="Gun2" method="shoot"]
[connection signal="timeout" from="Timer" to="Gun3" method="shoot"]
[connection signal="timeout" from="Timer" to="Gun" method="shoot"]

134
tar.tscn Normal file
View file

@ -0,0 +1,134 @@
[gd_scene load_steps=17 format=3 uid="uid://4sdwatj6up8i"]
[ext_resource type="Texture2D" uid="uid://d4cjh2d7wxdyp" path="res://tar_body.png" id="1_pwibo"]
[ext_resource type="PackedScene" uid="uid://yu50iyftoyaj" path="res://riangle.tscn" id="2_c7e5b"]
[sub_resource type="AtlasTexture" id="AtlasTexture_3gxc7"]
atlas = ExtResource("1_pwibo")
region = Rect2(0, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_5bonr"]
atlas = ExtResource("1_pwibo")
region = Rect2(128, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_7eyi7"]
atlas = ExtResource("1_pwibo")
region = Rect2(256, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_dpolb"]
atlas = ExtResource("1_pwibo")
region = Rect2(384, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_onjcm"]
atlas = ExtResource("1_pwibo")
region = Rect2(512, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_ouj4i"]
atlas = ExtResource("1_pwibo")
region = Rect2(640, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_hhfnx"]
atlas = ExtResource("1_pwibo")
region = Rect2(768, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_jx1ui"]
atlas = ExtResource("1_pwibo")
region = Rect2(896, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_7m8ij"]
atlas = ExtResource("1_pwibo")
region = Rect2(1024, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_l7soy"]
atlas = ExtResource("1_pwibo")
region = Rect2(1152, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_271up"]
atlas = ExtResource("1_pwibo")
region = Rect2(1280, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_doo2w"]
atlas = ExtResource("1_pwibo")
region = Rect2(1408, 0, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_7lhsa"]
atlas = ExtResource("1_pwibo")
region = Rect2(1536, 0, 128, 128)
[sub_resource type="SpriteFrames" id="SpriteFrames_ufq3r"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_3gxc7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5bonr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7eyi7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dpolb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_onjcm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ouj4i")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hhfnx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jx1ui")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7m8ij")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l7soy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_271up")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_doo2w")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7lhsa")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]
[node name="Tar" type="Node2D"]
[node name="Sprite" type="AnimatedSprite2D" parent="."]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_ufq3r")
frame = 4
frame_progress = 0.271976
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D"]
scale = Vector2(0.5, 0.5)
polygon = PackedVector2Array(2, -89, 98, -20, 61, 95, -57, 94, -93, -19)
[node name="Riangle Zone" type="Node2D" parent="."]
[node name="Riangle1" type="Marker2D" parent="Riangle Zone"]
position = Vector2(0, 151)
[node name="Riangle" parent="Riangle Zone/Riangle1" instance=ExtResource("2_c7e5b")]
position = Vector2(0, -33)
rotation = 1.5708
[node name="Riangle2" type="Marker2D" parent="Riangle Zone"]
[node name="Riangle3" type="Marker2D" parent="Riangle Zone"]
[node name="Riangle4" type="Marker2D" parent="Riangle Zone"]
[node name="Riangle5" type="Marker2D" parent="Riangle Zone"]

BIN
tar_body.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

34
tar_body.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d4cjh2d7wxdyp"
path="res://.godot/imported/tar_body.png-950dbabc46f1d15c3b1ba46a18204aca.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tar_body.png"
dest_files=["res://.godot/imported/tar_body.png-950dbabc46f1d15c3b1ba46a18204aca.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -12,3 +12,14 @@
1 | You can control where the ectangle moves with your quares!
1 | Use your exagon if you are in danger!
1 | The bullets of a riangle always shoot from the points!
2 | Press space bar to pause the game when you need a break.
2 | The game is rigged against you, all patterns are random and impossible to predict.
3 | You can control time by pressing Ctrl + Z and redoing your moves.
2 | The game's difficulty increases with each level, but it's just a number.
1 | Be patient and observe the patterns of shapes moving around you.
3 | Every shape has a hidden personality, talk to them to learn their secrets.
1 | Use your Quares and Exagons wisely for maximum effect.
2 | The game is not meant to be won, just enjoy the ride.
3 | You can communicate with the shapes through your computer's microphone.
2 | Press R to restart a level if you make a mistake.
3 | The game has hidden easter eggs, find them all for ultimate bragging rights.