This commit is contained in:
Bingus_Violet 2024-02-22 00:10:13 -06:00
parent 87ef0af5dd
commit 14ef7ad7f9
26 changed files with 1738 additions and 0 deletions

View file

@ -0,0 +1,4 @@
extends Node
func boolToNumb(val, offset=0):
return float(val) + offset

11
Core/Scripts/test.gd Normal file
View file

@ -0,0 +1,11 @@
extends Node
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass

View file

@ -0,0 +1,43 @@
[gd_scene load_steps=5 format=3 uid="uid://cw55umm21amea"]
[ext_resource type="Texture2D" uid="uid://dmlk63esqvmiv" path="res://Tilemaps/BasicSquare/Texture.png" id="1_8s7p6"]
[ext_resource type="PackedScene" uid="uid://cqcjan67wgkc1" path="res://Player/BasicCharacter/Character.tscn" id="1_jcngi"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_t1l2y"]
texture = ExtResource("1_8s7p6")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 0
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
0:0/0/physics_layer_0/angular_velocity = 0.0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
0:0/0/terrains_peering_bit/right_side = 0
0:0/0/terrains_peering_bit/bottom_right_corner = 0
0:0/0/terrains_peering_bit/bottom_side = 0
0:0/0/terrains_peering_bit/bottom_left_corner = 0
0:0/0/terrains_peering_bit/left_side = 0
0:0/0/terrains_peering_bit/top_left_corner = 0
0:0/0/terrains_peering_bit/top_side = 0
0:0/0/terrains_peering_bit/top_right_corner = 0
[sub_resource type="TileSet" id="TileSet_qp0ib"]
tile_size = Vector2i(32, 32)
physics_layer_0/collision_layer = 1
terrain_set_0/mode = 0
terrain_set_0/terrain_0/name = "Terrain 0"
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
sources/0 = SubResource("TileSetAtlasSource_t1l2y")
[node name="Testing Purgatory" type="Node2D"]
metadata/_edit_horizontal_guides_ = [15.0]
[node name="Map" type="Node2D" parent="."]
[node name="TileMap" type="TileMap" parent="Map"]
modulate = Color(0, 0, 0.486275, 1)
tile_set = SubResource("TileSet_qp0ib")
format = 2
layer_0/tile_data = PackedInt32Array(589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 655359, 0, 0, 655358, 0, 0, 655357, 0, 0, 655356, 0, 0, 655355, 0, 0, 655354, 0, 0, 655353, 0, 0, 655352, 0, 0, 655351, 0, 0, 589815, 0, 0, 589816, 0, 0, 589817, 0, 0, 589818, 0, 0, 589819, 0, 0, 589820, 0, 0, 589821, 0, 0, 589822, 0, 0, 589823, 0, 0, 524288, 0, 0, 524289, 0, 0, 524299, 0, 0, 524292, 0, 0, 524291, 0, 0, 524290, 0, 0, 524298, 0, 0, 524297, 0, 0, 524296, 0, 0, 524295, 0, 0, 524293, 0, 0, 524294, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 524305, 0, 0, 524306, 0, 0, 589842, 0, 0, 655350, 0, 0, 589814, 0, 0, 524278, 0, 0, 458742, 0, 0, 393206, 0, 0, 327670, 0, 0, 262134, 0, 0, 196598, 0, 0, 131062, 0, 0, 65526, 0, 0, -10, 0, 0, -65546, 0, 0, -131082, 0, 0, -196618, 0, 0, -262154, 0, 0, 655349, 0, 0, 589813, 0, 0, 524277, 0, 0, 458741, 0, 0, 393205, 0, 0, 327669, 0, 0, 262133, 0, 0, 196597, 0, 0, 131061, 0, 0, 65525, 0, 0, -11, 0, 0, -65547, 0, 0, -131083, 0, 0, -196619, 0, 0, -262155, 0, 0, 655348, 0, 0, 589812, 0, 0, 655347, 0, 0, 589811, 0, 0, 655346, 0, 0, 589810, 0, 0, 655345, 0, 0, 589809, 0, 0, 655344, 0, 0, 589808, 0, 0, 655343, 0, 0, 589807, 0, 0, 655342, 0, 0, 589806, 0, 0, 655341, 0, 0, 589805, 0, 0, 655340, 0, 0, 589804, 0, 0, 655339, 0, 0, 589803, 0, 0, 655338, 0, 0, 589802, 0, 0, 458764, 0, 0, 393228, 0, 0, 327692, 0, 0, 262156, 0, 0, 196620, 0, 0, 131084, 0, 0, 65548, 0, 0, 12, 0, 0, 458763, 0, 0, 393227, 0, 0, 327691, 0, 0, 262155, 0, 0, 196619, 0, 0, 131083, 0, 0, 65547, 0, 0, 11, 0, 0, 589852, 0, 0, 524316, 0, 0, 589851, 0, 0, 524315, 0, 0, 589850, 0, 0, 524314, 0, 0, 589849, 0, 0, 524313, 0, 0, 589848, 0, 0, 524312, 0, 0, 589847, 0, 0, 524311, 0, 0, 589846, 0, 0, 524310, 0, 0, 589845, 0, 0, 524309, 0, 0, 589844, 0, 0, 524308, 0, 0, 589843, 0, 0, 524307, 0, 0)
[node name="Player" parent="." instance=ExtResource("1_jcngi")]

View file

@ -0,0 +1,39 @@
extends Sprite2D
@onready var player = $"../"
func spin(veloc, delta):
var vertSpinMult = abs(veloc.y) * clamp(veloc.x, -1, 1) / 1.5
var spinFactor = (veloc.x + vertSpinMult) / 20
if player.direction:
rotation = lerp(rotation, rotation + (spinFactor), delta)
else:
rotation = lerp(rotation, snappedf(rotation + (spinFactor * delta * 2), PI / 2), delta * 10)
var landed = 0
func _process(delta):
var velocity = player.velocity
var floored = player.is_on_floor()
print(scale)
if not floored:
spin(velocity, delta)
landed = velocity.y
scale = Vector2.ONE
else:
rotation = 0
if landed:
scale.y = 1 - (landed / 800)
scale.x = 1 + (landed / 800)
landed = 0
scale.y = lerp(scale.y, 1.0, delta * 10)
scale.x = lerp(scale.x, 1.0, delta * 10)
offset.y = (8 * pow(scale.y, -1) - 8)

View file

@ -0,0 +1,4 @@
extends Camera2D
func _process(delta):
position = get_local_mouse_position() / 3

View file

@ -0,0 +1,26 @@
[gd_scene load_steps=6 format=3 uid="uid://cqcjan67wgkc1"]
[ext_resource type="Texture2D" uid="uid://dvx8lliqdi3dv" path="res://Player/Skins/Square/Square.png" id="1_3vfyw"]
[ext_resource type="Script" path="res://Player/BasicCharacter/CharacterController.gd" id="1_c5ycp"]
[ext_resource type="Script" path="res://Player/BasicCharacter/CameraController.gd" id="3_2bdku"]
[ext_resource type="Script" path="res://Player/BasicCharacter/AnimationController.gd" id="3_6plye"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_42acf"]
size = Vector2(16, 16)
[node name="Character" type="CharacterBody2D"]
script = ExtResource("1_c5ycp")
[node name="BoxCollider" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_42acf")
[node name="Camera" type="Camera2D" parent="."]
zoom = Vector2(3, 3)
position_smoothing_enabled = true
position_smoothing_speed = 20.0
script = ExtResource("3_2bdku")
[node name="Sprite" type="Sprite2D" parent="."]
self_modulate = Color(1, 0, 0, 1)
texture = ExtResource("1_3vfyw")
script = ExtResource("3_6plye")

View file

@ -0,0 +1,34 @@
extends CharacterBody2D
const SPEED = 400.0
const ACCEL = 7.0
const JUMP_VELOCITY = -400.0
const FALL_SPEED = -JUMP_VELOCITY * 2
var falling = false
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
var direction = Vector2.ZERO
func _physics_process(delta):
if not is_on_floor():
var lowGrav = velocity.y < 0 and Input.is_action_pressed("jump")
velocity.y += gravity * delta / gen.boolToNumb(lowGrav, 1)
else:
falling = false
if Input.is_action_just_pressed("jump") and is_on_floor():
velocity.y = JUMP_VELOCITY
if Input.is_action_just_pressed("down") and not falling:
falling = true
velocity.y = clamp(velocity.y + FALL_SPEED, -INF, FALL_SPEED)
direction = round(Input.get_axis("left", "right"))
velocity.x = lerp(velocity.x, direction * SPEED, delta * ACCEL)
move_and_slide()

BIN
Player/Skins/Square.png~ Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dvx8lliqdi3dv"
path="res://.godot/imported/Square.png-d2b6149c26ef77a81499b9a942c30e43.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Player/Skins/Square/Square.png"
dest_files=["res://.godot/imported/Square.png-d2b6149c26ef77a81499b9a942c30e43.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dmlk63esqvmiv"
path="res://.godot/imported/Texture.png-93165ce48330176d929ec76fdce1b48c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Tilemaps/BasicSquare/Texture.png"
dest_files=["res://.godot/imported/Texture.png-93165ce48330176d929ec76fdce1b48c.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016-2023 The Godot Engine community
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
[configuration]
entry_symbol = "git_plugin_init"
compatibility_minimum = "4.1.0"
[libraries]
macos.editor = "macos/libgit_plugin.macos.editor.universal.dylib"
windows.editor.x86_64 = "win64/libgit_plugin.windows.editor.x86_64.dll"
linux.editor.x86_64 = "linux/libgit_plugin.linux.editor.x86_64.so"
linux.editor.arm64 = "linux/libgit_plugin.linux.editor.arm64.so"
linux.editor.rv64 = ""

View file

@ -0,0 +1,7 @@
[plugin]
name="Godot Git Plugin"
description="This plugin lets you interact with Git without leaving the Godot editor. More information can be found at https://github.com/godotengine/godot-git-plugin/wiki"
author="twaritwaikar"
version="v3.1.0"
script="godot-git-plugin.gd"

1
icon.svg Normal file
View file

@ -0,0 +1 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="124" height="124" rx="14" fill="#363d52" stroke="#212532" stroke-width="4"/><g transform="scale(.101) translate(122 122)"><g fill="#fff"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 813 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H447l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c3 34 55 34 58 0v-86c-3-34-55-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></g></svg>

After

Width:  |  Height:  |  Size: 950 B

37
icon.svg.import Normal file
View file

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://iqd3ev378bd0"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

82
project.godot Normal file
View file

@ -0,0 +1,82 @@
; 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=5
[application]
config/name="Grapple Test"
run/main_scene="res://Maps/Testing Purgatory.tscn"
config/features=PackedStringArray("4.2", "Forward Plus")
boot_splash/bg_color=Color(0, 0, 0, 1)
config/icon="res://icon.svg"
[autoload]
gen="*res://Core/Scripts/GeneralFunctions.gd"
[editor]
version_control/plugin_name="GitPlugin"
version_control/autoload_on_startup=true
[input]
jump={
"deadzone": 0.5,
"events": [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)
]
}
left={
"deadzone": 0.5,
"events": [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":65,"key_label":0,"unicode":97,"echo":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":4194319,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
right={
"deadzone": 0.5,
"events": [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":68,"key_label":0,"unicode":100,"echo":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":4194321,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
up={
"deadzone": 0.5,
"events": [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":87,"key_label":0,"unicode":119,"echo":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":4194320,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
down={
"deadzone": 0.5,
"events": [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":83,"key_label":0,"unicode":115,"echo":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":4194322,"key_label":0,"unicode":0,"echo":false,"script":null)
]
}
pullGrapple={
"deadzone": 0.5,
"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(141, 16),"global_position":Vector2(145, 57),"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":70,"key_label":0,"unicode":102,"echo":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":69,"key_label":0,"unicode":101,"echo":false,"script":null)
]
}
spinGrapple={
"deadzone": 0.5,
"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":2,"position":Vector2(60, 4),"global_position":Vector2(64, 45),"factor":1.0,"button_index":2,"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":71,"key_label":0,"unicode":103,"echo":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":81,"key_label":0,"unicode":113,"echo":false,"script":null)
]
}
[physics]
common/physics_ticks_per_second=144
2d/default_gravity=1300.0
[rendering]
textures/canvas_textures/default_texture_filter=0
environment/defaults/default_clear_color=Color(0.0980392, 0.0980392, 0.0980392, 1)