Dead simple, but it's a start

This commit is contained in:
2026-01-19 19:59:58 +11:00
commit df7b9e0714
22 changed files with 446 additions and 0 deletions

4
.editorconfig Normal file
View File

@@ -0,0 +1,4 @@
root = true
[*]
charset = utf-8

2
.gitattributes vendored Normal file
View File

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

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# Godot 4+ specific ignores
.godot/
/android/

BIN
boxboy.xcf Normal file

Binary file not shown.

36
boxboy/boxboy.gd Normal file
View File

@@ -0,0 +1,36 @@
extends CharacterBody2D
@onready var _sprite = $AnimatedSprite2D
const GRAVITY: Vector2 = Vector2(0, 9.8)
const MAX_SPEED: int = 500
const IMPULSE: int = 80
const JUMP: int = -400 #TODO: proper jump arch
func _ready():
_sprite.play("idle", 1)
#physics and controls
func _physics_process(_delta) -> void:
#falling or jumping
if is_on_floor() and Input.is_action_just_pressed("input_jump"):
velocity.y = JUMP
velocity += GRAVITY
var direction = Input.get_axis("input_left", "input_right")
if direction:
velocity.x += IMPULSE * direction
if abs(velocity.x) > MAX_SPEED:
velocity.x = MAX_SPEED * sign(velocity.x)
elif velocity.x != 0:
velocity.x = log(abs(velocity.x)) * sign(velocity.x)
move_and_slide()
#animation stuff
func _on_animation_finished() -> void:
if randf() < 0.2:
_sprite.play("idle_glance", 2)
else:
_sprite.play("idle", 2)

1
boxboy/boxboy.gd.uid Normal file
View File

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

BIN
boxboy/boxboy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

40
boxboy/boxboy.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bpjhq0b2dae1d"
path="res://.godot/imported/boxboy.png-42da31f64cf96e900fd482e99903aaa1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://boxboy/boxboy.png"
dest_files=["res://.godot/imported/boxboy.png-42da31f64cf96e900fd482e99903aaa1.ctex"]
[params]
compress/mode=0
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=false
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=1

1
icon.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><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 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

After

Width:  |  Height:  |  Size: 995 B

43
icon.svg.import Normal file
View File

@@ -0,0 +1,43 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bwfdf4thos37h"
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/uastc_level=0
compress/rdo_quality_loss=0.0
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/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=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

42
project.godot Normal file
View File

@@ -0,0 +1,42 @@
; 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="colorvania"
run/main_scene="res://scene.tscn"
config/features=PackedStringArray("4.5", "Forward Plus")
config/icon="res://icon.svg"
[input]
input_right={
"deadzone": 0.2,
"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":4194321,"key_label":0,"unicode":0,"location":0,"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":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
]
}
input_left={
"deadzone": 0.2,
"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":4194319,"key_label":0,"unicode":0,"location":0,"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":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
]
}
input_jump={
"deadzone": 0.2,
"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,"location":0,"echo":false,"script":null)
]
}
[rendering]
textures/canvas_textures/default_texture_filter=0
renderer/rendering_method="mobile"
2d/snap/snap_2d_transforms_to_pixel=true

74
scene.tscn Normal file
View File

@@ -0,0 +1,74 @@
[gd_scene load_steps=10 format=4 uid="uid://b7ndmr6uvnyqb"]
[ext_resource type="Texture2D" uid="uid://ddl0kxl0inw6r" path="res://tiles/atlas.png" id="1_3253y"]
[ext_resource type="Script" uid="uid://c2x51mppxugpn" path="res://boxboy/boxboy.gd" id="1_nxogm"]
[ext_resource type="Texture2D" uid="uid://bpjhq0b2dae1d" path="res://boxboy/boxboy.png" id="1_ulcgi"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_u3cyc"]
texture = ExtResource("1_3253y")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
1:0/0 = 0
1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:0/0 = 0
2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
3:0/0 = 0
3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
[sub_resource type="TileSet" id="TileSet_xlvrw"]
tile_size = Vector2i(32, 32)
physics_layer_0/collision_layer = 1
sources/4 = SubResource("TileSetAtlasSource_u3cyc")
tile_proxies/coords_level = [[0, Vector2i(0, 0)], [4, Vector2i(0, 0)], [1, Vector2i(0, 0)], [4, Vector2i(1, 0)], [2, Vector2i(0, 0)], [4, Vector2i(2, 0)], [3, Vector2i(0, 0)], [4, Vector2i(3, 0)]]
[sub_resource type="AtlasTexture" id="AtlasTexture_nxogm"]
atlas = ExtResource("1_ulcgi")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_u3cyc"]
atlas = ExtResource("1_ulcgi")
region = Rect2(32, 0, 32, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_y2354"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_nxogm")
}],
"loop": false,
"name": &"idle",
"speed": 1.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_u3cyc")
}],
"loop": false,
"name": &"idle_glance",
"speed": 1.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ulcgi"]
radius = 14.0
height = 32.0
[node name="Node2D" type="Node2D"]
[node name="TileMapLayer" type="TileMapLayer" parent="."]
position = Vector2(117, 76)
tile_map_data = PackedByteArray("AAD9/w0ABAAAAAAAAAD9/w4ABAABAAAAAAD9/w8ABAABAAAAAAD+/w0ABAAAAAAAAAD+/w4ABAABAAAAAAD+/w8ABAABAAAAAAD//w0ABAAAAAAAAAD//w4ABAABAAAAAAD//w8ABAABAAAAAAAAAA0ABAAAAAAAAAAAAA4ABAABAAAAAAAAAA8ABAABAAAAAAABAA0ABAAAAAAAAAABAA4ABAABAAAAAAABAA8ABAABAAAAAAACAA0ABAAAAAAAAAACAA4ABAABAAAAAAACAA8ABAABAAAAAAADAA0ABAAAAAAAAAADAA4ABAABAAAAAAADAA8ABAABAAAAAAAEAA0ABAAAAAAAAAAEAA4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AA0ABAAAAAAAAAAbAA4ABAABAAAAAAAbAA8ABAABAAAAAAAcAA0ABAAAAAAAAAAcAA4ABAABAAAAAAAcAA8ABAABAAAAAAAdAA0ABAAAAAAAAAAdAA4ABAABAAAAAAAdAA8ABAABAAAAAAAeAA0ABAAAAAAAAAAeAA4ABAABAAAAAAAeAA8ABAABAAAAAAAfAA0ABAAAAAAAAAAfAA4ABAABAAAAAAAfAA8ABAABAAAAAAD9/xAABAABAAAAAAD+/xAABAABAAAAAAD//xAABAABAAAAAAAAABAABAABAAAAAAABABAABAABAAAAAAACABAABAABAAAAAAADABAABAABAAAAAAAEABAABAABAAAAAAAFABAABAABAAAAAAAGABAABAABAAAAAAAHABAABAABAAAAAAAIABAABAABAAAAAAAJABAABAABAAAAAAAKABAABAABAAAAAAALABAABAABAAAAAAAMABAABAABAAAAAAANABAABAABAAAAAAAOABAABAABAAAAAAAPABAABAABAAAAAAAQABAABAABAAAAAAARABAABAABAAAAAAASABAABAABAAAAAAATABAABAABAAAAAAAUABAABAABAAAAAAAVABAABAABAAAAAAAWABAABAABAAAAAAAXABAABAABAAAAAAAYABAABAABAAAAAAAZABAABAABAAAAAAAaABAABAABAAAAAAAbABAABAABAAAAAAAcABAABAABAAAAAAAdABAABAABAAAAAAAeABAABAABAAAAAAAfABAABAABAAAAAAAWAAoABAABAAAAAAAXAAoABAABAAAAAAAYAAoABAABAAAAAAAZAAoABAABAAAAAAAaAAoABAABAAAAAAAbAAoABAABAAAAAAAcAAoABAABAAAAAAAWAAkABAAAAAAAAAAXAAkABAAAAAAAAAAYAAkABAAAAAAAAAAZAAkABAAAAAAAAAAaAAkABAAAAAAAAAAbAAkABAAAAAAAAAAcAAkABAAAAAAAAAA=")
tile_set = SubResource("TileSet_xlvrw")
[node name="Boxboy" type="CharacterBody2D" parent="."]
position = Vector2(117, 76)
script = ExtResource("1_nxogm")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Boxboy"]
sprite_frames = SubResource("SpriteFrames_y2354")
animation = &"idle"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Boxboy"]
shape = SubResource("CapsuleShape2D_ulcgi")
[connection signal="animation_finished" from="Boxboy/AnimatedSprite2D" to="Boxboy" method="_on_animation_finished"]

BIN
tiles/atlas.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

40
tiles/atlas.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ddl0kxl0inw6r"
path="res://.godot/imported/atlas.png-5241d6490b551cb8c6727c7555b2c9a8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tiles/atlas.png"
dest_files=["res://.godot/imported/atlas.png-5241d6490b551cb8c6727c7555b2c9a8.ctex"]
[params]
compress/mode=0
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=false
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=1

BIN
tiles/dirt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

40
tiles/dirt.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cieabtlhmftbl"
path="res://.godot/imported/dirt.png-eac6b861b2594e07232e227af2213ab3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tiles/dirt.png"
dest_files=["res://.godot/imported/dirt.png-eac6b861b2594e07232e227af2213ab3.ctex"]
[params]
compress/mode=0
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=false
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=1

BIN
tiles/flowers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

40
tiles/flowers.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c2r2gwnidyq4v"
path="res://.godot/imported/flowers.png-035d69f4a5923605472579b7588e5c52.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tiles/flowers.png"
dest_files=["res://.godot/imported/flowers.png-035d69f4a5923605472579b7588e5c52.ctex"]
[params]
compress/mode=0
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=false
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=1

BIN
tiles/grass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

40
tiles/grass.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c0arwivh81qcc"
path="res://.godot/imported/grass.png-c071e97c7a48eab5d5946768c0bc8946.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tiles/grass.png"
dest_files=["res://.godot/imported/grass.png-c071e97c7a48eab5d5946768c0bc8946.ctex"]
[params]
compress/mode=0
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=false
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=1

BIN
tiles/rock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

40
tiles/rock.png.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bujpi8tkb46a7"
path="res://.godot/imported/rock.png-18b312849450ce55273f6ed526db0ce9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://tiles/rock.png"
dest_files=["res://.godot/imported/rock.png-18b312849450ce55273f6ed526db0ce9.ctex"]
[params]
compress/mode=0
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=false
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=1