From f4dc1a79fd0ae8f274a7305de2790bef3612e027 Mon Sep 17 00:00:00 2001 From: Ultrablob Date: Wed, 8 May 2024 11:28:26 -0400 Subject: [PATCH] add iamond --- .DS_Store | Bin 18436 -> 16388 bytes Settings.gd | 2 +- iamond-jump.png | Bin 0 -> 2474 bytes iamond-jump.png.import | 34 +++++++ iamond.png | Bin 0 -> 1910 bytes iamond.png.import | 34 +++++++ main.tscn | 4 +- main_menu.tscn | 5 +- pixel circle.png | Bin 0 -> 114 bytes pixel circle.png.import | 34 +++++++ player-iamond.gd | 18 ++++ player-iamond.tscn | 199 ++++++++++++++++++++++++++++++++++++++++ player-row.gd | 2 - player.gd | 4 +- project.godot | 4 +- 15 files changed, 330 insertions(+), 10 deletions(-) create mode 100644 iamond-jump.png create mode 100644 iamond-jump.png.import create mode 100644 iamond.png create mode 100644 iamond.png.import create mode 100644 pixel circle.png create mode 100644 pixel circle.png.import create mode 100644 player-iamond.gd create mode 100644 player-iamond.tscn diff --git a/.DS_Store b/.DS_Store index 2325b7fd442372f82dd1a966fe0254f83ae42ee2..e9a7e7b545cbac314c18bd4865b270bb33606629 100644 GIT binary patch delta 266 zcmZpfz}V8jsKUU&!01$(V#vT?0c3IjF^Cr60SW^-3P9R`d!mZAXcthF1t`J5P|T3Z zP{d%upvRCuS&(V*WCItL$=r-wlf6wG7+EL(uyLR4q@+IC!PH^1Fw+;-i4FXl**RD^ z7_}ys*jh~vV>H}cFQCA&`MHD&`^1I-M%&FN70)tmmQeY}vU!H49qZ&6eXGd_fLNH( zX)?co&SrnZUrdvK=?hM5;AB+X++m{2vf0@37_(|7Lo(0_3=C{Q3<(mbW dUNcYTck$(6gm@0Dc5*sT@8fJTvk@H~QwRHYcgJc)`?=HGbKAZ4D@~)5TTyHBHn(A_`Ywv3oE6L~TQ^{ib4VgMLJpcdz diff --git a/Settings.gd b/Settings.gd index 07d4de9..c645b5d 100644 --- a/Settings.gd +++ b/Settings.gd @@ -2,7 +2,7 @@ extends Node var config = ConfigFile.new() -const CHARACTERS = ["res://player-row.tscn", "res://player-apezoid.tscn"] +const CHARACTERS = ["res://player-row.tscn", "res://player-apezoid.tscn", "res://player-iamond.tscn"] func _ready(): var has_config = config.load("user://settings.cfg") == OK diff --git a/iamond-jump.png b/iamond-jump.png new file mode 100644 index 0000000000000000000000000000000000000000..ccd00e849e2ad37bc8c12e4f1206b79fc103abff GIT binary patch literal 2474 zcmV;b303xqP)Px;N=ZaPRCt{2ok2_-=M~5Q5SH#*W$`93^;D58Ye~}+7hAKrR3Z{6N?Ro=ZBX}O zHo4cseS^< z(6yAcF%Dz~GNwO4ii(u-;9F`2syAb3bMAbMMD-ttN$ zN{$Shv~Bf6RdVsQjs6M1*(l@)K=r`sjYNJ&+m8x`U-Hk2`9wEL#q}3%_0SAmOa0-~ z?)2S1cj08uDFDEo*;xRnf`_Ckxj0aj(gpyWL5m@>`g3P?*47V#$Vpq9>c%$;4tIw3 z5l9_fOHYdV#K!=BZs^)A0AB!rOqklk*9U>A3V7Bw`tPFz11ToHZ*d=}rVzF-7W0Wk zl)C#;id3)bNB|kSmO6jw#q{}0eD6=oTba8H0PI^cyAfrOM1lP|9aGFFx(QA%jvH}x zbS;4(0^mA8hOVV}gRp4~F|bB3J++>86845t7_S{DR01fsU;xVKRaMCi3VW^T%(b4GwVoq?KKk$>_l5l6KCG%r zZg6vF$C2{oz&}DpmIyED_WabqUzc90IF8j1)-*thvF$CJ&woPmg1>vNs2 zz6t<6;jk&-p<0I98ezX`h3FOls7kJ!&b-hw6aLUWu=>G$xTPw&v=b0jq_A3ZKYKf4 z_xFG59@ySo2T+l!tT%yVcQZ& z7oBfiya-j9O^XW;lrBC8rhL%>Kvi;sUI3?74Fo(~#J&#%Q3X8HQ|pe^Kn(+^2ku z?cFb;>Ege2@glZ2*P$v4gMe*stZvT>s04?%ZedH)wNEIToiy|@@@q0VGHjABLvQ>L z0H7)h@dl?dnl&wfPls!0`@@y z>VpIKAMdEJr=CAvh6kvAn2gWe$*{ett{k6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pqh7;pdd{);rUQMcr_4bfV+y zw*%DhRzUcCEt|B&w3+s#Q5k<_L_w7AAx>LhBa1%TXK2ObA_OCPkxnU$U|hJWV5HG? zn70{(NsnN{{Lf6vO+RNv$aUMQ#1kgPoY+>S=(P!qrDRFFNt6*cOD>Hl5%6@iOEC%{ z>hN1* z5qjOKhmdKI;Vst G1_l6vxFKW! literal 0 HcmV?d00001 diff --git a/pixel circle.png.import b/pixel circle.png.import new file mode 100644 index 0000000..1de0de2 --- /dev/null +++ b/pixel circle.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://nfhsl4pdy78b" +path="res://.godot/imported/pixel circle.png-c048f0f8f34afb9cfb3d6b426c3b174f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://pixel circle.png" +dest_files=["res://.godot/imported/pixel circle.png-c048f0f8f34afb9cfb3d6b426c3b174f.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 diff --git a/player-iamond.gd b/player-iamond.gd new file mode 100644 index 0000000..046000f --- /dev/null +++ b/player-iamond.gd @@ -0,0 +1,18 @@ +extends "res://player.gd" + +func _ready(): + speed = 1200 + update_animation() + if config.load("user://settings.cfg") == OK: + absolute_movement = not config.get_value("config", "relative_controls") + +func _input(event): + if event.is_action_pressed("jump"): + $Sprite.speed_scale = 1 + $Sprite.play("jump") + await $Sprite.animation_finished + global_position = get_global_mouse_position() + $Sprite.speed_scale = -1 + $Sprite.play("jump") + await $Sprite.animation_finished + $Sprite.play("idle") diff --git a/player-iamond.tscn b/player-iamond.tscn new file mode 100644 index 0000000..1fbf942 --- /dev/null +++ b/player-iamond.tscn @@ -0,0 +1,199 @@ +[gd_scene load_steps=30 format=3 uid="uid://c4ii0wvj20qe4"] + +[ext_resource type="PackedScene" uid="uid://cgcjicue76wsr" path="res://player.tscn" id="1_l701f"] +[ext_resource type="Script" path="res://player-iamond.gd" id="2_5t06e"] +[ext_resource type="Texture2D" uid="uid://c08j5w5b66kg5" path="res://iamond.png" id="3_3gmdf"] +[ext_resource type="Texture2D" uid="uid://m428rhlgku6w" path="res://iamond-jump.png" id="4_cp8gd"] +[ext_resource type="Texture2D" uid="uid://nfhsl4pdy78b" path="res://pixel circle.png" id="5_fmfr6"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_cvdem"] +atlas = ExtResource("3_3gmdf") +region = Rect2(0, 0, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_dmqd5"] +atlas = ExtResource("3_3gmdf") +region = Rect2(48, 0, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ybuuf"] +atlas = ExtResource("3_3gmdf") +region = Rect2(96, 0, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_s4w4g"] +atlas = ExtResource("3_3gmdf") +region = Rect2(144, 0, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_l2u21"] +atlas = ExtResource("3_3gmdf") +region = Rect2(0, 32, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_w05xj"] +atlas = ExtResource("3_3gmdf") +region = Rect2(48, 32, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fwlao"] +atlas = ExtResource("3_3gmdf") +region = Rect2(96, 32, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_q0u1h"] +atlas = ExtResource("3_3gmdf") +region = Rect2(144, 32, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jpnvd"] +atlas = ExtResource("3_3gmdf") +region = Rect2(0, 64, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0lbuk"] +atlas = ExtResource("3_3gmdf") +region = Rect2(48, 64, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_aswut"] +atlas = ExtResource("3_3gmdf") +region = Rect2(96, 64, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nrcl8"] +atlas = ExtResource("3_3gmdf") +region = Rect2(144, 64, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5srxo"] +atlas = ExtResource("3_3gmdf") +region = Rect2(0, 96, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_q12fn"] +atlas = ExtResource("3_3gmdf") +region = Rect2(48, 96, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_sqq6n"] +atlas = ExtResource("3_3gmdf") +region = Rect2(96, 96, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tb8gh"] +atlas = ExtResource("3_3gmdf") +region = Rect2(144, 96, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_2chkn"] +atlas = ExtResource("4_cp8gd") +region = Rect2(0, 0, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_uj5w0"] +atlas = ExtResource("4_cp8gd") +region = Rect2(48, 0, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_4hkgt"] +atlas = ExtResource("4_cp8gd") +region = Rect2(96, 0, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_korld"] +atlas = ExtResource("4_cp8gd") +region = Rect2(0, 32, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qwh7b"] +atlas = ExtResource("4_cp8gd") +region = Rect2(48, 32, 48, 32) + +[sub_resource type="AtlasTexture" id="AtlasTexture_jj5q4"] +atlas = ExtResource("4_cp8gd") +region = Rect2(96, 32, 48, 32) + +[sub_resource type="SpriteFrames" id="SpriteFrames_7i6wq"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_cvdem") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_dmqd5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ybuuf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_s4w4g") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_l2u21") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_w05xj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fwlao") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_q0u1h") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jpnvd") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0lbuk") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_aswut") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nrcl8") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_5srxo") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_q12fn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_sqq6n") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tb8gh") +}], +"loop": true, +"name": &"idle", +"speed": 15.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_2chkn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_uj5w0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_4hkgt") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_korld") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_qwh7b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_jj5q4") +}], +"loop": false, +"name": &"jump", +"speed": 10.0 +}] + +[sub_resource type="Gradient" id="Gradient_urfxb"] +colors = PackedColorArray(1, 0.9, 0, 1, 1, 0.9, 0, 0) + +[node name="Player" instance=ExtResource("1_l701f")] +linear_damp = 2.0 +script = ExtResource("2_5t06e") + +[node name="Sprite" type="AnimatedSprite2D" parent="." index="1"] +scale = Vector2(2, 2) +sprite_frames = SubResource("SpriteFrames_7i6wq") +animation = &"idle" +autoplay = "idle" +speed_scale = -1.0 + +[node name="Hitbox" type="CollisionPolygon2D" parent="." index="2"] +position = Vector2(12, 0) +polygon = PackedVector2Array(33, 0, 5, -14, -21, 0, 5, 14) + +[node name="CPUParticles2D" type="CPUParticles2D" parent="." index="3"] +position = Vector2(-23, 0) +amount = 80 +texture = ExtResource("5_fmfr6") +gravity = Vector2(2.08165e-12, 2.08165e-12) +color_ramp = SubResource("Gradient_urfxb") diff --git a/player-row.gd b/player-row.gd index a3828f2..264f189 100644 --- a/player-row.gd +++ b/player-row.gd @@ -13,8 +13,6 @@ func _ready(): absolute_movement = not config.get_value("config", "relative_controls") func _input(event): - if event.is_action_pressed("jump"): - global_position = get_global_mouse_position() if event.is_action_pressed("quare"): if num_quares >= max_quares: notifier.notify("All Quares in Use!") diff --git a/player.gd b/player.gd index 27ec6e4..dff4286 100644 --- a/player.gd +++ b/player.gd @@ -33,9 +33,9 @@ func _physics_process(delta): update_animation() if absolute_movement: - apply_central_force(Vector2(side_input, move_input).normalized() * -speed) + apply_central_force(Vector2(side_input, move_input).normalized() * -speed * linear_damp) else: - apply_central_force(transform.y * side_input * speed / -2 + transform.x * move_input * speed) + apply_central_force(transform.y * side_input * speed / -2 + transform.x * move_input * speed * linear_damp) func destroy(): $DeathFX.play() diff --git a/project.godot b/project.godot index 6e85952..c11837e 100644 --- a/project.godot +++ b/project.godot @@ -59,7 +59,9 @@ restart={ } jump={ "deadzone": 0.5, -"events": [] +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(130, 40),"global_position":Vector2(138, 120),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null) +] } quare={ "deadzone": 0.5,