added game

This commit is contained in:
ivy 2025-04-17 21:35:23 +02:00
commit 85d53bd89b
25 changed files with 522 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
assets/bean.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

34
assets/bean.png.import Normal file
View file

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

BIN
assets/dirt_block.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

View file

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

BIN
assets/grass_block.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

View file

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

BIN
assets/spike.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

34
assets/spike.png.import Normal file
View file

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

108
export_presets.cfg Normal file
View file

@ -0,0 +1,108 @@
[preset.0]
name="Linux"
platform="Linux"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../Desktop/platformer bean.x86_64"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.0.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""
[preset.1]
name="Windows Desktop"
platform="Windows Desktop"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../Desktop/platformer bean.exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.1.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon=""
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"

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: 994 B

37
icon.svg.import Normal file
View file

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

30
project.godot Normal file
View file

@ -0,0 +1,30 @@
; 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="platformer bean"
run/main_scene="uid://drpvbc4k32k55"
config/features=PackedStringArray("4.4", "Forward Plus")
config/icon="res://icon.svg"
[display]
window/stretch/mode="viewport"
window/stretch/scale=3.0
[physics]
2d/default_gravity=650.0
[rendering]
textures/canvas_textures/default_texture_filter=0
environment/defaults/default_clear_color=Color(0.144092, 0.378883, 0.531616, 1)

55
scenes/level.tscn Normal file

File diff suppressed because one or more lines are too long

32
scenes/player.tscn Normal file
View file

@ -0,0 +1,32 @@
[gd_scene load_steps=7 format=3 uid="uid://bp7jtahwqrb8u"]
[ext_resource type="Texture2D" uid="uid://cus7cgpaxqju3" path="res://assets/bean.png" id="1_3vyb7"]
[ext_resource type="Script" uid="uid://dqbx5v0g4etuu" path="res://scripts/player.gd" id="1_g2els"]
[ext_resource type="AudioStream" uid="uid://d4flkpinisd3g" path="res://sounds/rice.wav" id="3_qhqgy"]
[ext_resource type="AudioStream" uid="uid://kwbs5x6303aq" path="res://sounds/boing.wav" id="4_dqkch"]
[ext_resource type="AudioStream" uid="uid://donstucdml31j" path="res://sounds/AAAAAAAAAAAAAAAAAAAAAAA.wav" id="5_qlg0r"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_g2els"]
size = Vector2(10, 16)
[node name="Player" type="CharacterBody2D"]
script = ExtResource("1_g2els")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_3vyb7")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_g2els")
[node name="Camera2D" type="Camera2D" parent="."]
[node name="rice" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("3_qhqgy")
[node name="boing" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("4_dqkch")
[node name="death" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("5_qlg0r")
[connection signal="finished" from="death" to="." method="_on_death_finished"]

41
scripts/player.gd Normal file
View file

@ -0,0 +1,41 @@
extends CharacterBody2D
const SPEED: int = 200
const JUMP_VELOCITY: int = -300
func _physics_process(delta: float) -> void:
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta
# Handle jump.
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = JUMP_VELOCITY
$boing.play()
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var direction: float = Input.get_axis("ui_left", "ui_right")
velocity.x = direction * SPEED
if $death.playing:
velocity = Vector2(0, 0)
move_and_slide()
for i in get_slide_collision_count():
if get_slide_collision(i).get_collider() == $"../TileMapLayer2" and not $death.playing:
$death.play()
func _on_player_entered(body: Node2D) -> void:
if body == self:
$rice.play()
await $rice.finished
get_tree().quit()
func _on_death_finished() -> void:
get_tree().reload_current_scene()

1
scripts/player.gd.uid Normal file
View file

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

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://donstucdml31j"
path="res://.godot/imported/AAAAAAAAAAAAAAAAAAAAAAA.wav-2353c5c4569e86f63da2547b40e0b780.sample"
[deps]
source_file="res://sounds/AAAAAAAAAAAAAAAAAAAAAAA.wav"
dest_files=["res://.godot/imported/AAAAAAAAAAAAAAAAAAAAAAA.wav-2353c5c4569e86f63da2547b40e0b780.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

BIN
sounds/boing.wav Normal file

Binary file not shown.

24
sounds/boing.wav.import Normal file
View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://kwbs5x6303aq"
path="res://.godot/imported/boing.wav-12a7abcdba7efa849d1291c1177388df.sample"
[deps]
source_file="res://sounds/boing.wav"
dest_files=["res://.godot/imported/boing.wav-12a7abcdba7efa849d1291c1177388df.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

BIN
sounds/rice.wav Normal file

Binary file not shown.

24
sounds/rice.wav.import Normal file
View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d4flkpinisd3g"
path="res://.godot/imported/rice.wav-b6f839df01e8f63e99c3c9da9a6756e3.sample"
[deps]
source_file="res://sounds/rice.wav"
dest_files=["res://.godot/imported/rice.wav-b6f839df01e8f63e99c3c9da9a6756e3.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2