Compare commits

..

No commits in common. "2fad294d6a1b6b88a517abe6eb41b9623f0883fd" and "fca7af83dfa4ef8f39fa93c23c3e9a7fae550401" have entirely different histories.

11 changed files with 15 additions and 369 deletions

View file

@ -15,10 +15,6 @@ run/main_scene="uid://bxdnehietcpkj"
config/features=PackedStringArray("4.6", "Mobile")
config/icon="res://icon.svg"
[autoload]
Global="*uid://4hvgybxt05qj"
[editor_plugins]
enabled=PackedStringArray("res://addons/godot_super-wakatime/plugin.cfg")

View file

@ -1,13 +1,11 @@
[gd_scene format=3 uid="uid://bxdnehietcpkj"]
[ext_resource type="Script" uid="uid://dhfun46prq3uk" path="res://scripts/game.gd" id="1_gee14"]
[ext_resource type="Script" uid="uid://crf3d7dpjvlsl" path="res://scripts/player_camera.gd" id="1_lnu2h"]
[ext_resource type="Script" uid="uid://66iq60cxqomg" path="res://scripts/player.gd" id="1_yqjtg"]
[ext_resource type="Texture2D" uid="uid://dp3jbqmr5toth" path="res://textures/character-body.png" id="3_p57ef"]
[ext_resource type="Texture2D" uid="uid://b6krbvbco0jt6" path="res://textures/shadow.png" id="4_lbhrr"]
[ext_resource type="Texture2D" uid="uid://3ptkafoafq14" path="res://textures/character-leg.png" id="4_u5sy4"]
[ext_resource type="PackedScene" uid="uid://b0kty7juk7rfo" path="res://models/stalagmite.gltf" id="5_iywne"]
[ext_resource type="Texture2D" uid="uid://rgxhw23471ut" path="res://textures/character-arm.png" id="5_u5sy4"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_lbhrr"]
albedo_color = Color(0.61, 0.28791997, 0.17079999, 1)
@ -90,54 +88,6 @@ tracks/5/keys = {
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Body/ArmPivot/FrontArm:rotation")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(),
"transitions": PackedFloat32Array(),
"update": 0,
"values": []
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Body/ArmPivot/FrontArm:position")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(),
"transitions": PackedFloat32Array(),
"update": 0,
"values": []
}
tracks/8/type = "value"
tracks/8/imported = false
tracks/8/enabled = true
tracks/8/path = NodePath("Body/ArmPivot/BackArm:rotation")
tracks/8/interp = 1
tracks/8/loop_wrap = true
tracks/8/keys = {
"times": PackedFloat32Array(),
"transitions": PackedFloat32Array(),
"update": 0,
"values": []
}
tracks/9/type = "value"
tracks/9/imported = false
tracks/9/enabled = true
tracks/9/path = NodePath("Body/ArmPivot/BackArm:position")
tracks/9/interp = 1
tracks/9/loop_wrap = true
tracks/9/keys = {
"times": PackedFloat32Array(),
"transitions": PackedFloat32Array(),
"update": 0,
"values": []
}
[sub_resource type="Animation" id="Animation_u5sy4"]
resource_name = "fall"
@ -215,30 +165,6 @@ tracks/5/keys = {
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Body/ArmPivot/FrontArm:rotation")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 1.134464)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Body/ArmPivot/BackArm:rotation")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, -1.134464)]
}
[sub_resource type="Animation" id="Animation_p57ef"]
resource_name = "jump"
@ -315,131 +241,6 @@ tracks/5/keys = {
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0, 0.06981317), Vector3(0, 0, 0)]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Body/ArmPivot/FrontArm:rotation")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0, 0.06666667, 0.18),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0.08726646), Vector3(0, 0, 0.61086524), Vector3(0, 0, 0.5235988)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Body/ArmPivot/BackArm:rotation")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0, 0.06666667, 0.18),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, -0.08726646), Vector3(0, 0, -0.61086524), Vector3(0, 0, -0.5235988)]
}
[sub_resource type="Animation" id="Animation_vtaks"]
resource_name = "leap"
length = 0.2
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Body/FrontLeg:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.0033333339),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0.045, -0.09000015, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Body/FrontLeg:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.0033333339),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0.10471976)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Body/BackLeg:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.0033333339),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(-0.044999994, -0.09000015, 0)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Body/BackLeg:rotation")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0.0033333339),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0.10471976)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Body:position")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0.0033333339),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("Body:rotation")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0.0033333339),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("Body/ArmPivot/FrontArm:rotation")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0.033333335),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0.5235988)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("Body/ArmPivot/BackArm:rotation")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0.033333335),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, -0.5235988)]
}
[sub_resource type="Animation" id="Animation_0tnpc"]
resource_name = "move"
@ -468,55 +269,15 @@ tracks/1/keys = {
"update": 0,
"values": [Vector3(0, 0, 0.34906584), Vector3(0, 0, -0.34906584), Vector3(0, 0, 0.34906584)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Body/ArmPivot/FrontArm:rotation")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.5, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, -0.17453292), Vector3(0, 0, 0.17453292), Vector3(0, 0, -0.17453292)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Body/ArmPivot/BackArm:rotation")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.5, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, 0.17453292), Vector3(0, 0, -0.17453292), Vector3(0, 0, 0.17453292)]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("Body:position")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(),
"transitions": PackedFloat32Array(),
"update": 0,
"values": []
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_vtaks"]
_data = {
&"RESET": SubResource("Animation_gee14"),
&"fall": SubResource("Animation_u5sy4"),
&"jump": SubResource("Animation_p57ef"),
&"leap": SubResource("Animation_vtaks"),
&"move": SubResource("Animation_0tnpc")
}
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_vtaks"]
animation = &"leap"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_p57ef"]
animation = &"jump"
@ -527,8 +288,6 @@ animation = &"fall"
[sub_resource type="AnimationNodeOneShot" id="AnimationNodeOneShot_u5sy4"]
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_kvpfn"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_gee14"]
animation = &"move"
@ -540,10 +299,10 @@ animation = &"RESET"
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_p57ef"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_kvpfn"]
graph_offset = Vector2(-228.28757, 27.085762)
nodes/output/position = Vector2(1140, 140)
graph_offset = Vector2(-299.60645, 18.418121)
nodes/output/position = Vector2(1020, 160)
nodes/jump/node = SubResource("AnimationNodeOneShot_u5sy4")
nodes/jump/position = Vector2(860, 140)
nodes/jump/position = Vector2(680, 140)
nodes/reset/node = SubResource("AnimationNodeAnimation_0tnpc")
nodes/reset/position = Vector2(60, 20)
nodes/move/node = SubResource("AnimationNodeAnimation_gee14")
@ -551,25 +310,20 @@ nodes/move/position = Vector2(-80, 220)
nodes/walk/node = SubResource("AnimationNodeBlend2_vtaks")
nodes/walk/position = Vector2(240, 80)
nodes/Animation/node = SubResource("AnimationNodeAnimation_p57ef")
nodes/Animation/position = Vector2(680, 420)
nodes/Animation/position = Vector2(480, 360)
nodes/walk_speed/node = SubResource("AnimationNodeTimeScale_p57ef")
nodes/walk_speed/position = Vector2(80, 220)
nodes/fall/node = SubResource("AnimationNodeBlend2_gee14")
nodes/fall/position = Vector2(480, 100)
nodes/fall_anim/node = SubResource("AnimationNodeAnimation_u5sy4")
nodes/fall_anim/position = Vector2(260, 400)
"nodes/Animation 2/node" = SubResource("AnimationNodeAnimation_vtaks")
"nodes/Animation 2/position" = Vector2(480, 420)
nodes/leap/node = SubResource("AnimationNodeBlend2_kvpfn")
nodes/leap/position = Vector2(670.4032, 137.15503)
node_connections = [&"output", 0, &"jump", &"jump", 0, &"leap", &"jump", 1, &"Animation", &"walk", 0, &"reset", &"walk", 1, &"walk_speed", &"walk_speed", 0, &"move", &"fall", 0, &"walk", &"fall", 1, &"fall_anim", &"leap", 0, &"fall", &"leap", 1, &"Animation 2"]
node_connections = [&"output", 0, &"jump", &"jump", 0, &"fall", &"jump", 1, &"Animation", &"walk", 0, &"reset", &"walk", 1, &"walk_speed", &"walk_speed", 0, &"move", &"fall", 0, &"walk", &"fall", 1, &"fall_anim"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_yqjtg"]
radius = 0.25
height = 1.0
[node name="Game" type="Node3D" unique_id=1358608749]
script = ExtResource("1_gee14")
[node name="CSGBox3D" type="CSGBox3D" parent="." unique_id=1781956012]
use_collision = true
@ -610,25 +364,6 @@ pixel_size = 0.03
texture_filter = 0
texture = ExtResource("4_u5sy4")
[node name="ArmPivot" type="Node3D" parent="Player/DreamerBody/Body" unique_id=101320487]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1500001, 0)
[node name="FrontArm" type="Sprite3D" parent="Player/DreamerBody/Body/ArmPivot" unique_id=1454211664]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.089999996, 0, 0)
offset = Vector2(0, -6)
pixel_size = 0.03
texture_filter = 0
render_priority = 6
texture = ExtResource("5_u5sy4")
[node name="BackArm" type="Sprite3D" parent="Player/DreamerBody/Body/ArmPivot" unique_id=1463191879]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.089999996, 0, 0)
offset = Vector2(0, -6)
pixel_size = 0.03
texture_filter = 0
render_priority = -1
texture = ExtResource("5_u5sy4")
[node name="Animations" type="AnimationPlayer" parent="Player/DreamerBody" unique_id=708762765]
libraries/ = SubResource("AnimationLibrary_vtaks")
@ -641,7 +376,6 @@ parameters/jump/request = 0
parameters/walk/blend_amount = 0.0
parameters/walk_speed/scale = 3.1400000000000006
parameters/fall/blend_amount = 0.0
parameters/leap/blend_amount = 0.0
[node name="Shadow" type="Sprite3D" parent="Player" unique_id=495232250]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, 0)

View file

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

View file

@ -1 +0,0 @@
uid://dhfun46prq3uk

View file

@ -1,5 +0,0 @@
extends Node
const weapons = {
}

View file

@ -1 +0,0 @@
uid://4hvgybxt05qj

View file

@ -4,41 +4,23 @@ const SPEED = 2.5
const JUMP_VELOCITY = 4.5
var walk_animation_time = 0
var face_rotation = null
var face_left = false
@onready var game = get_parent()
@onready var camera = game.get_node("PlayerCamera")
func _ready() -> void:
$DreamerBody.look_at(game.get_node("PlayerCamera").global_position)
$DreamerBody.rotation.x = 0
face_rotation = $DreamerBody.rotation.y
func _physics_process(delta: float) -> void:
if not is_on_floor():
velocity += get_gravity() * delta
var viewport_size = (get_viewport().get_visible_rect().size / 2.0)
if face_left:
$DreamerBody.rotation.y = face_rotation + deg_to_rad(180)
else:
$DreamerBody.rotation.y = face_rotation
#$DreamerBody/Body/ArmPivot.rotation.z = viewport_size.angle_to_point(get_viewport().get_mouse_position())
if Input.is_action_pressed("jump") and is_on_floor():
velocity.y = JUMP_VELOCITY
$DreamerBody/Animator.set("parameters/jump/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)
var input_dir := Input.get_vector("move_left", "move_right", "move_up", "move_down")
if input_dir.x > 0:
face_left = false
if input_dir.x < 0:
face_left = true
var direction = (camera.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
var direction := (transform.basis * Vector3(input_dir.y + input_dir.x, 0, input_dir.y - input_dir.x)).normalized()
if direction:
velocity.x = direction.x * SPEED
velocity.z = direction.z * SPEED
@ -54,7 +36,7 @@ func _physics_process(delta: float) -> void:
if direction and is_on_floor():
walk_animation_time += delta * 25
$DreamerBody.position.y = sin(walk_animation_time + 1) / 16
$DreamerBody.position.y = sin(walk_animation_time + 1) / 8
$DreamerBody.rotation.z = sin(walk_animation_time / 2) / 16
else:
walk_animation_time = 0
@ -65,14 +47,8 @@ func _physics_process(delta: float) -> void:
if is_on_floor():
$DreamerBody/Animator.set("parameters/fall/blend_amount", 0)
$DreamerBody/Animator.set("parameters/leap/blend_amount", 0)
else:
if velocity.y < 0:
$DreamerBody/Animator.set("parameters/fall/blend_amount", 1)
$DreamerBody/Animator.set("parameters/leap/blend_amount", 0)
else:
$DreamerBody/Animator.set("parameters/fall/blend_amount", 0)
$DreamerBody/Animator.set("parameters/leap/blend_amount", 1)
$DreamerBody/Animator.set("parameters/fall/blend_amount", 1)
move_and_slide()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

View file

@ -1,41 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://rgxhw23471ut"
path.s3tc="res://.godot/imported/character-arm.png-887bc51ad4f0b012b30145a175363600.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://textures/character-arm.png"
dest_files=["res://.godot/imported/character-arm.png-887bc51ad4f0b012b30145a175363600.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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=0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B

After

Width:  |  Height:  |  Size: 103 B

View file

@ -3,20 +3,19 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://btqaj6yslgvax"
path.s3tc="res://.godot/imported/example-character-hand.png-363b3285c631aacb16602f2b09024d62.s3tc.ctex"
path="res://.godot/imported/example-character-hand.png-363b3285c631aacb16602f2b09024d62.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
"vram_texture": false
}
[deps]
source_file="res://textures/example-character-hand.png"
dest_files=["res://.godot/imported/example-character-hand.png-363b3285c631aacb16602f2b09024d62.s3tc.ctex"]
dest_files=["res://.godot/imported/example-character-hand.png-363b3285c631aacb16602f2b09024d62.ctex"]
[params]
compress/mode=2
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
@ -24,7 +23,7 @@ compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
@ -38,4 +37,4 @@ process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0
detect_3d/compress_to=1