Started tracking progress with git.

main
parent 9eb110b509
commit 7a567d6796

2
.gitattributes vendored

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

3
.gitignore vendored

@ -1,3 +1,6 @@
# Godot 4+ specific ignores
.godot/
# ---> Godot
# Godot-specific ignores
.import/

@ -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

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b8sq1ket4sycd"
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

@ -0,0 +1,16 @@
; 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="Axolotl"
run/main_scene="res://scenes/Dojo.tscn"
config/features=PackedStringArray("4.2", "Forward Plus")
config/icon="res://icon.svg"

@ -0,0 +1,237 @@
[gd_scene load_steps=13 format=3 uid="uid://d4nb1twqrmebx"]
[ext_resource type="Texture2D" uid="uid://dfh0dpo7iq3eb" path="res://sprites/Axolotl.png" id="1_tbw8a"]
[ext_resource type="Script" path="res://scripts/Axolotl.gd" id="1_uo3dg"]
[ext_resource type="PackedScene" uid="uid://cf24ht1sv1yih" path="res://scenes/Camera.tscn" id="2_fge4g"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_np4lk"]
radius = 6.0
height = 24.0
[sub_resource type="Animation" id="Animation_m4cwp"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:frame_coords")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [Vector2i(0, 3)]
}
[sub_resource type="Animation" id="Animation_hwv1x"]
resource_name = "idle"
length = 0.6
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame_coords")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [Vector2i(0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3, 4, 5]
}
[sub_resource type="Animation" id="Animation_oelbc"]
resource_name = "munch"
length = 0.6
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame_coords")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [Vector2i(1, 4)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [24, 25, 26, 27, 28, 29]
}
[sub_resource type="Animation" id="Animation_7s1x2"]
resource_name = "sprint"
length = 0.5
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame_coords")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [Vector2i(1, 2)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [12, 13, 14, 15, 16]
}
[sub_resource type="Animation" id="Animation_rht3k"]
resource_name = "swim"
length = 0.7
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame_coords")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [Vector2i(0, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [6, 7, 8, 9, 10, 11]
}
[sub_resource type="Animation" id="Animation_k4uu0"]
resource_name = "turn"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame_coords")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [Vector2i(0, 3)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite2D:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [18, 19, 20, 21, 22]
}
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.4),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"end_turn"
}]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_sojmd"]
_data = {
"RESET": SubResource("Animation_m4cwp"),
"idle": SubResource("Animation_hwv1x"),
"munch": SubResource("Animation_oelbc"),
"sprint": SubResource("Animation_7s1x2"),
"swim": SubResource("Animation_rht3k"),
"turn": SubResource("Animation_k4uu0")
}
[sub_resource type="AnimationRootNode" id="AnimationRootNode_7r5ga"]
[node name="Axolotl" type="Node2D"]
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
script = ExtResource("1_uo3dg")
[node name="Camera2D" parent="CharacterBody2D" instance=ExtResource("2_fge4g")]
[node name="Sprite2D" type="Sprite2D" parent="CharacterBody2D"]
texture_filter = 1
texture = ExtResource("1_tbw8a")
hframes = 6
vframes = 5
frame = 18
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
visible = false
rotation = 1.5708
shape = SubResource("CapsuleShape2D_np4lk")
[node name="AnimationTree" type="AnimationTree" parent="CharacterBody2D"]
libraries = {
"": SubResource("AnimationLibrary_sojmd")
}
tree_root = SubResource("AnimationRootNode_7r5ga")
anim_player = NodePath("../AnimationPlayer")
[node name="AnimationPlayer" type="AnimationPlayer" parent="CharacterBody2D"]
libraries = {
"": SubResource("AnimationLibrary_sojmd")
}

@ -0,0 +1,8 @@
[gd_scene format=3 uid="uid://cf24ht1sv1yih"]
[node name="Camera2D" type="Camera2D"]
zoom = Vector2(3, 3)
limit_smoothed = true
position_smoothing_enabled = true
editor_draw_limits = true
editor_draw_drag_margin = true

@ -0,0 +1,19 @@
[gd_scene load_steps=3 format=3 uid="uid://c8s3or2hskj0i"]
[ext_resource type="PackedScene" uid="uid://d4nb1twqrmebx" path="res://scenes/Axolotl.tscn" id="1_eysle"]
[ext_resource type="PackedScene" uid="uid://pptrf5oq4k1x" path="res://scenes/generic_obstacle.tscn" id="2_q2aw5"]
[node name="Dojo" type="Node2D"]
[node name="Axolotl" parent="." instance=ExtResource("1_eysle")]
[node name="GenericObstacle" parent="." instance=ExtResource("2_q2aw5")]
[node name="GenericObstacle4" parent="." instance=ExtResource("2_q2aw5")]
position = Vector2(508, 364)
[node name="GenericObstacle3" parent="." instance=ExtResource("2_q2aw5")]
position = Vector2(631, 128)
[node name="GenericObstacle2" parent="." instance=ExtResource("2_q2aw5")]
position = Vector2(245, 226)

@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=3 uid="uid://pptrf5oq4k1x"]
[ext_resource type="Texture2D" uid="uid://b8sq1ket4sycd" path="res://icon.svg" id="1_dpci1"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_6u7yk"]
size = Vector2(124, 122)
[node name="GenericObstacle" type="Sprite2D"]
position = Vector2(866, 474)
texture = ExtResource("1_dpci1")
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
shape = SubResource("RectangleShape2D_6u7yk")

@ -0,0 +1,85 @@
extends CharacterBody2D
const SPEED = 150.0
const SPRINT_MAX = 2
# Get the gravity from the project settings to be synced with RigidBody nodes.
#var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
var sprint = 1
var gravity = 0
var turning = false
var anim
var sprite
var direction = Vector2.ZERO
func _ready():
anim = $AnimationPlayer
sprite = $Sprite2D
func end_turn():
sprite.flip_h = !sprite.flip_h
turning = false
anim.speed_scale = 1
print( "turned" )
func turn():
#turning = true
anim.speed_scale = 1
anim.play("turn")
func _physics_process(delta):
# Add the gravity.
if gravity !=0 and not is_on_floor():
velocity.y += gravity * delta
# Handle sprint.
if Input.is_action_just_pressed("ui_accept"):
sprint = SPRINT_MAX
else:
sprint = move_toward( sprint, 1 , 0.01 )
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
direction = Vector2 (Input.get_axis("ui_left", "ui_right"),Input.get_axis("ui_up", "ui_down")/2).normalized()
if (Input.is_action_just_pressed("ui_right") and sprite.flip_h) or (Input.is_action_just_pressed("ui_left") and !sprite.flip_h):
turn()
pass
if direction != Vector2.ZERO and !turning:
if ( direction.x < 0 and sprite.flip_h ) or ( direction.x > 0 and !sprite.flip_h ):
sprite.rotation = 0;
velocity.x = direction.x * SPEED * sprint
if sprint > 1:
anim.speed_scale = sprint
anim.play("sprint")
else:
anim.speed_scale = 1
anim.play("swim")
velocity.y = direction.y * SPEED
if !sprite.flip_h:
sprite.rotation = move_toward(direction.angle(),0, .1)
else:
sprite.rotation = move_toward(direction.angle() - PI,0, -.1)
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
velocity.y = move_toward(velocity.y, 0, SPEED)
anim.speed_scale = .5
sprite.rotation = move_toward(sprite.rotation,0, .1)
$AnimationPlayer.play("idle")
move_and_slide()

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dfh0dpo7iq3eb"
path="res://.godot/imported/Axolotl.png-28ad26bf605b849020409dac18749725.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/Axolotl.png"
dest_files=["res://.godot/imported/Axolotl.png-28ad26bf605b849020409dac18749725.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
Loading…
Cancel
Save